feat(8ij.2): add inline assign affordance to SocialCard

Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
zenchantlive 2026-03-01 17:18:13 -08:00
parent b996d889d5
commit 6d560b6c49
3 changed files with 57 additions and 3 deletions

View file

@ -1,6 +1,6 @@
'use client';
import { useMemo, useState } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useRouter } from 'next/navigation';
import type { BeadIssue } from '../../lib/types';
import type { ProjectScopeOption } from '../../lib/project-scope';
@ -48,6 +48,19 @@ export function UnifiedShell({
hideClosed: true,
});
const [actor, setActor] = useState<string>('');
// Read from localStorage after hydration to avoid SSR/client mismatch
useEffect(() => {
const stored = window.localStorage.getItem('bb.humanActor');
if (stored) setActor(stored);
}, []);
const handleActorChange = useCallback((name: string) => {
setActor(name);
window.localStorage.setItem('bb.humanActor', name);
}, []);
const [customRightPanel, setCustomRightPanel] = useState<React.ReactNode | null>(null);
// Assign mode state for graph view
@ -138,6 +151,7 @@ export function UnifiedShell({
onSelect={handleCardSelect}
projectScopeOptions={projectScopeOptions}
blockedOnly={blockedOnly}
projectRoot={projectRoot}
/>
);
}
@ -165,7 +179,7 @@ export function UnifiedShell({
}
// Default: ContextualRightPanel
return <ContextualRightPanel epicId={epicId} taskId={taskId} swarmId={swarmId} issues={issues} projectRoot={projectRoot} />;
return <ContextualRightPanel epicId={epicId} taskId={taskId} swarmId={swarmId} issues={issues} projectRoot={projectRoot} actor={actor} />;
};
return (
@ -176,6 +190,8 @@ export function UnifiedShell({
criticalAlerts={issues.filter(i => i.status === 'blocked').length}
busyCount={issues.filter(i => i.status === 'in_progress').length}
idleCount={0}
actor={actor}
onActorChange={handleActorChange}
/>
{!bdHealth.loading && !bdHealth.healthy ? (
<div className="border-b border-amber-500/35 bg-amber-500/12 px-4 py-2 text-xs text-amber-100">
@ -231,6 +247,7 @@ export function UnifiedShell({
embedded={true}
issue={selectedItem}
projectRoot={projectRoot}
actor={actor}
onIssueUpdated={async () => {
router.refresh();
}}