feat(8ij.5): wire ?swarm=X URL param to highlight tasks in both views

Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
zenchantlive 2026-03-01 17:25:08 -08:00
parent ae7f13c3af
commit d6f88517b7
6 changed files with 16 additions and 0 deletions

View file

@ -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}
/>
</div>
) : (
@ -262,6 +265,7 @@ export function SmartDag({
hideClosed={hideClosed}
archetypes={archetypes}
assignMode={assignMode}
swarmId={swarmId}
/>
</div>
)}

View file

@ -42,6 +42,8 @@ interface TaskCardGridProps {
actionableIds: Set<string>;
/** Callback fired when the user selects a task. */
onSelect: (id: string, shouldOpenDrawer?: boolean) => void;
/** Optional swarm ID for highlighting swarm tasks. */
swarmId?: string;
}
/**

View file

@ -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}
/>
);
}

View file

@ -28,6 +28,7 @@ export interface WorkflowGraphProps {
hideClosed?: boolean;
archetypes?: AgentArchetype[];
assignMode?: boolean;
swarmId?: string;
}
const NODE_WIDTH = 320;

View file

@ -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<HTMLDivElement>, onClick?: MouseEventHandler<HTMLDivElement>) {
@ -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 (
<div
@ -134,6 +137,7 @@ export function SocialCard({
aria-label={`Open ${data.title}`}
className={cn(
'group relative flex min-h-[290px] cursor-pointer flex-col rounded-[14px] border px-3.5 py-3 text-left transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent-info)]',
isSwarmHighlighted && 'ring-2 ring-blue-500',
className,
)}
style={{

View file

@ -16,6 +16,7 @@ interface SocialPageProps {
projectScopeOptions?: ProjectScopeOption[];
blockedOnly?: boolean;
projectRoot: string;
swarmId?: string;
}
type SectionKey = 'ready' | 'in_progress' | 'blocked' | 'deferred' | 'done';
@ -66,6 +67,7 @@ export function SocialPage({
projectScopeOptions = [],
blockedOnly = false,
projectRoot,
swarmId,
}: SocialPageProps) {
const router = useRouter();
const searchParams = useSearchParams();
@ -238,6 +240,7 @@ export function SocialPage({
blockedByDetails={toDependencyDetails(card.unblocks)}
unblocksDetails={toDependencyDetails(card.blocks)}
archetypes={archetypes}
swarmId={swarmId}
/>
);
})}