Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
fix: include calendar tasks in unread inbox with type badge
Gusbeaa662d92b5
diff --git a/src/shared/src/db/queries/inbox.ts b/src/shared/src/db/queries/inbox.tsindex aca6f55ac..2bc9a8287 100644--- a/src/shared/src/db/queries/inbox.ts+++ b/src/shared/src/db/queries/inbox.ts@@ -24,6 +24,7 @@ export async function listUnreadConversations(agent_name: string | null;agent_avatar_url: string | null;root_task_status: string | null;+ root_task_type: string | null;}>(sql`SELECT c.id,c.agent_id,@@ -34,7 +35,8 @@ export async function listUnreadConversations(t.prompt AS root_prompt,a.name AS agent_name,a.avatar_url AS agent_avatar_url,- t.status AS root_task_status+ t.status AS root_task_status,+ t.type AS root_task_typeFROM agent_task_queue tINNER JOIN conversation cON c.id = t.conversation_id@@ -58,7 +60,7 @@ export async function listUnreadConversations(WHERE t.workspace_id = ${workspaceId}AND t.parent_task_id IS NULLAND t.trace_id IS NOT NULL- AND t.type = 'user_dm_message'+ AND t.type IN ('user_dm_message', 'calendar_event')AND t.status IN ('completed', 'failed')AND t.completed_at > COALESCE(crs.last_read_at, '1970-01-01T00:00:00.000Z')AND t.id = (@@ -67,7 +69,7 @@ export async function listUnreadConversations(AND conversation_id = c.idAND parent_task_id IS NULLAND trace_id IS NOT NULL- AND type = 'user_dm_message'+ AND type IN ('user_dm_message', 'calendar_event')AND status IN ('completed', 'failed')ORDER BY completed_at DESC LIMIT 1)@@ -99,7 +101,7 @@ export async function getUnreadCount(WHERE t.workspace_id = ${workspaceId}AND t.parent_task_id IS NULLAND t.trace_id IS NOT NULL- AND t.type = 'user_dm_message'+ AND t.type IN ('user_dm_message', 'calendar_event')AND t.status IN ('completed', 'failed')AND t.completed_at > COALESCE(crs.last_read_at, '1970-01-01T00:00:00.000Z')`);diff --git a/src/web/src/app/(app)/w/[slug]/unread/page.tsx b/src/web/src/app/(app)/w/[slug]/unread/page.tsxindex 68d4ce009..fa9624b0a 100644--- a/src/web/src/app/(app)/w/[slug]/unread/page.tsx+++ b/src/web/src/app/(app)/w/[slug]/unread/page.tsx@@ -50,6 +50,21 @@ function AgentAvatar({ name, avatarUrl, size = 32 }: { name?: string | null; ava);}+const TYPE_LABELS: Record<string, string> = {+ user_dm_message: "DM",+ calendar_event: "Calendar",+};++function TypeBadge({ type }: { type: string | null }) {+ if (!type) return null;+ const label = TYPE_LABELS[type] ?? type;+ return (+ <span className="text-[10px] leading-none px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground font-medium">+ {label}+ </span>+ );+}+function InboxRow({ item, slug, onClick }: { item: InboxItem; slug: string; onClick?: () => void }) {const statusLabel = item.root_task_status === "failed" ? "Failed" : "Completed";@@ -79,6 +94,7 @@ function InboxRow({ item, slug, onClick }: { item: InboxItem; slug: string; onCl)}<StatusDot status={item.root_task_status} /><span className="text-xs text-muted-foreground">{statusLabel}</span>+ <TypeBadge type={item.root_task_type} /></div><p className="text-xs text-muted-foreground/70 mt-1 line-clamp-1">{item.latest_response}diff --git a/src/web/src/lib/api.ts b/src/web/src/lib/api.tsindex d0f539379..232493e84 100644--- a/src/web/src/lib/api.ts+++ b/src/web/src/lib/api.ts@@ -1056,6 +1056,7 @@ export interface InboxItem {agent_name: string | null;agent_avatar_url: string | null;root_task_status: string | null;+ root_task_type: string | null;}export const listInboxItems = (