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; hideClosed?: boolean;
onAssignModeChange?: (assignMode: boolean) => void; onAssignModeChange?: (assignMode: boolean) => void;
onSelectedIssueChange?: (issue: BeadIssue | null) => void; onSelectedIssueChange?: (issue: BeadIssue | null) => void;
swarmId?: string;
} }
const DEPTH_OPTIONS: GraphHopDepth[] = [1, 2, 'full']; const DEPTH_OPTIONS: GraphHopDepth[] = [1, 2, 'full'];
@ -33,6 +34,7 @@ export function SmartDag({
hideClosed: hideClosedProp = false, hideClosed: hideClosedProp = false,
onAssignModeChange, onAssignModeChange,
onSelectedIssueChange, onSelectedIssueChange,
swarmId,
}: SmartDagProps) { }: SmartDagProps) {
const { archetypes } = useArchetypes(projectRoot); const { archetypes } = useArchetypes(projectRoot);
@ -251,6 +253,7 @@ export function SmartDag({
blocksDetailsMap={blocksDetailsMap} blocksDetailsMap={blocksDetailsMap}
actionableIds={actionableNodeIds} actionableIds={actionableNodeIds}
onSelect={handleTaskSelect} onSelect={handleTaskSelect}
swarmId={swarmId}
/> />
</div> </div>
) : ( ) : (
@ -262,6 +265,7 @@ export function SmartDag({
hideClosed={hideClosed} hideClosed={hideClosed}
archetypes={archetypes} archetypes={archetypes}
assignMode={assignMode} assignMode={assignMode}
swarmId={swarmId}
/> />
</div> </div>
)} )}

View file

@ -42,6 +42,8 @@ interface TaskCardGridProps {
actionableIds: Set<string>; actionableIds: Set<string>;
/** Callback fired when the user selects a task. */ /** Callback fired when the user selects a task. */
onSelect: (id: string, shouldOpenDrawer?: boolean) => void; 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'} hideClosed={graphTab !== 'flow'}
onAssignModeChange={handleAssignModeChange} onAssignModeChange={handleAssignModeChange}
onSelectedIssueChange={handleSelectedIssueChange} onSelectedIssueChange={handleSelectedIssueChange}
swarmId={swarmId ?? undefined}
/> />
); );
} }
@ -152,6 +153,7 @@ export function UnifiedShell({
projectScopeOptions={projectScopeOptions} projectScopeOptions={projectScopeOptions}
blockedOnly={blockedOnly} blockedOnly={blockedOnly}
projectRoot={projectRoot} projectRoot={projectRoot}
swarmId={swarmId ?? undefined}
/> />
); );
} }

View file

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

View file

@ -25,6 +25,7 @@ interface SocialCardProps {
blockedByDetails?: Array<{ id: string; title: string; epic?: string }>; blockedByDetails?: Array<{ id: string; title: string; epic?: string }>;
unblocksDetails?: Array<{ id: string; title: string; epic?: string }>; unblocksDetails?: Array<{ id: string; title: string; epic?: string }>;
archetypes?: AgentArchetype[]; archetypes?: AgentArchetype[];
swarmId?: string;
} }
function handleCardKeyDown(event: KeyboardEvent<HTMLDivElement>, onClick?: MouseEventHandler<HTMLDivElement>) { function handleCardKeyDown(event: KeyboardEvent<HTMLDivElement>, onClick?: MouseEventHandler<HTMLDivElement>) {
@ -120,10 +121,12 @@ export function SocialCard({
blockedByDetails = [], blockedByDetails = [],
unblocksDetails = [], unblocksDetails = [],
archetypes = [], archetypes = [],
swarmId,
}: SocialCardProps) { }: SocialCardProps) {
const status = statusVisual(data.status); const status = statusVisual(data.status);
const { selectedArchetype, setSelectedArchetype, isAssigning, assignSuccess, handleAssign } = useArchetypePicker(); const { selectedArchetype, setSelectedArchetype, isAssigning, assignSuccess, handleAssign } = useArchetypePicker();
const showAssign = (data.status === 'blocked' || data.agents.length === 0) && archetypes.length > 0; const showAssign = (data.status === 'blocked' || data.agents.length === 0) && archetypes.length > 0;
const isSwarmHighlighted = swarmId && data.id.includes(swarmId);
return ( return (
<div <div
@ -134,6 +137,7 @@ export function SocialCard({
aria-label={`Open ${data.title}`} aria-label={`Open ${data.title}`}
className={cn( 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)]', '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, className,
)} )}
style={{ style={{

View file

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