From d6f88517b7dff6d4223893fbd8227e56dd27fe08 Mon Sep 17 00:00:00 2001 From: zenchantlive Date: Sun, 1 Mar 2026 17:25:08 -0800 Subject: [PATCH] feat(8ij.5): wire ?swarm=X URL param to highlight tasks in both views Co-Authored-By: Oz --- src/components/graph/smart-dag.tsx | 4 ++++ src/components/graph/task-card-grid.tsx | 2 ++ src/components/shared/unified-shell.tsx | 2 ++ src/components/shared/workflow-graph.tsx | 1 + src/components/social/social-card.tsx | 4 ++++ src/components/social/social-page.tsx | 3 +++ 6 files changed, 16 insertions(+) diff --git a/src/components/graph/smart-dag.tsx b/src/components/graph/smart-dag.tsx index 331092e..2efbef5 100644 --- a/src/components/graph/smart-dag.tsx +++ b/src/components/graph/smart-dag.tsx @@ -20,6 +20,7 @@ export interface SmartDagProps { hideClosed?: boolean; onAssignModeChange?: (assignMode: boolean) => void; onSelectedIssueChange?: (issue: BeadIssue | null) => void; + swarmId?: string; } const DEPTH_OPTIONS: GraphHopDepth[] = [1, 2, 'full']; @@ -33,6 +34,7 @@ export function SmartDag({ hideClosed: hideClosedProp = false, onAssignModeChange, onSelectedIssueChange, + swarmId, }: SmartDagProps) { const { archetypes } = useArchetypes(projectRoot); @@ -251,6 +253,7 @@ export function SmartDag({ blocksDetailsMap={blocksDetailsMap} actionableIds={actionableNodeIds} onSelect={handleTaskSelect} + swarmId={swarmId} /> ) : ( @@ -262,6 +265,7 @@ export function SmartDag({ hideClosed={hideClosed} archetypes={archetypes} assignMode={assignMode} + swarmId={swarmId} /> )} diff --git a/src/components/graph/task-card-grid.tsx b/src/components/graph/task-card-grid.tsx index 46b0afc..e11b93a 100644 --- a/src/components/graph/task-card-grid.tsx +++ b/src/components/graph/task-card-grid.tsx @@ -42,6 +42,8 @@ interface TaskCardGridProps { actionableIds: Set; /** Callback fired when the user selects a task. */ onSelect: (id: string, shouldOpenDrawer?: boolean) => void; + /** Optional swarm ID for highlighting swarm tasks. */ + swarmId?: string; } /** diff --git a/src/components/shared/unified-shell.tsx b/src/components/shared/unified-shell.tsx index e3e31ea..cde3914 100644 --- a/src/components/shared/unified-shell.tsx +++ b/src/components/shared/unified-shell.tsx @@ -139,6 +139,7 @@ export function UnifiedShell({ hideClosed={graphTab !== 'flow'} onAssignModeChange={handleAssignModeChange} onSelectedIssueChange={handleSelectedIssueChange} + swarmId={swarmId ?? undefined} /> ); } @@ -152,6 +153,7 @@ export function UnifiedShell({ projectScopeOptions={projectScopeOptions} blockedOnly={blockedOnly} projectRoot={projectRoot} + swarmId={swarmId ?? undefined} /> ); } diff --git a/src/components/shared/workflow-graph.tsx b/src/components/shared/workflow-graph.tsx index 7a35868..f0ee067 100644 --- a/src/components/shared/workflow-graph.tsx +++ b/src/components/shared/workflow-graph.tsx @@ -28,6 +28,7 @@ export interface WorkflowGraphProps { hideClosed?: boolean; archetypes?: AgentArchetype[]; assignMode?: boolean; + swarmId?: string; } const NODE_WIDTH = 320; diff --git a/src/components/social/social-card.tsx b/src/components/social/social-card.tsx index 9ca0d35..6c65f7d 100644 --- a/src/components/social/social-card.tsx +++ b/src/components/social/social-card.tsx @@ -25,6 +25,7 @@ interface SocialCardProps { blockedByDetails?: Array<{ id: string; title: string; epic?: string }>; unblocksDetails?: Array<{ id: string; title: string; epic?: string }>; archetypes?: AgentArchetype[]; + swarmId?: string; } function handleCardKeyDown(event: KeyboardEvent, onClick?: MouseEventHandler) { @@ -120,10 +121,12 @@ export function SocialCard({ blockedByDetails = [], unblocksDetails = [], archetypes = [], + swarmId, }: SocialCardProps) { const status = statusVisual(data.status); const { selectedArchetype, setSelectedArchetype, isAssigning, assignSuccess, handleAssign } = useArchetypePicker(); const showAssign = (data.status === 'blocked' || data.agents.length === 0) && archetypes.length > 0; + const isSwarmHighlighted = swarmId && data.id.includes(swarmId); return (
); })}