fix(frontend): worker session opens orchestrator, not Kanban (#248)

A worker agent session's primary topbar action read "Kanban" and
navigated to the board. Workers now get an "Open orchestrator" button
(Waypoints icon) that navigates to their project's orchestrator, while
orchestrator sessions keep the "Open Kanban" board action.

Closes #234

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Harshit Singh Bhandari 2026-06-15 21:49:16 +05:30 committed by GitHub
parent 198b79757c
commit 43ae7ebbc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 11 deletions

View File

@ -36,7 +36,8 @@ const STATUS_PILL: Record<WorkerDisplayStatus, { label: string; tone: string; br
// (.is-under-titlebar-nav pads past them). The // (.is-under-titlebar-nav pads past them). The
// variant is derived from the route, not props: a sessionId in the URL swaps // variant is derived from the route, not props: a sessionId in the URL swaps
// the lead to the session identity (orchestrator crumb + mode badge, or worker // the lead to the session identity (orchestrator crumb + mode badge, or worker
// branch + status pill) and the actions to Kanban/inspector controls; // branch + status pill) and the actions to board/orchestrator + inspector
// controls (orchestrators open the Kanban board; workers open their orchestrator);
// otherwise it's the dashboard crumb plus the Orchestrator launcher when a // otherwise it's the dashboard crumb plus the Orchestrator launcher when a
// project is in scope. Merges the old DashboardTopbar/Topbar pair — // project is in scope. Merges the old DashboardTopbar/Topbar pair —
// agent-orchestrator keeps those as two components aligned only by CSS. // agent-orchestrator keeps those as two components aligned only by CSS.
@ -127,16 +128,30 @@ export function ShellTopbar() {
<div className="dashboard-app-header__actions"> <div className="dashboard-app-header__actions">
{isSessionRoute ? ( {isSessionRoute ? (
<> <>
<button {isOrchestrator ? (
aria-label={isOrchestrator ? "Open Kanban" : "Back to board"} <button
className="dashboard-app-header__primary-btn" aria-label="Open Kanban"
onClick={openBoard} className="dashboard-app-header__primary-btn"
style={noDragStyle} onClick={openBoard}
type="button" style={noDragStyle}
> type="button"
<LayoutGrid className="h-3.5 w-3.5" aria-hidden="true" /> >
{isOrchestrator ? "Open Kanban" : "Kanban"} <LayoutGrid className="h-3.5 w-3.5" aria-hidden="true" />
</button> Open Kanban
</button>
) : (
<button
aria-label="Open orchestrator"
className="dashboard-app-header__primary-btn"
disabled={isSpawning}
onClick={() => void openOrchestrator()}
style={noDragStyle}
type="button"
>
<Waypoints className="h-3.5 w-3.5" aria-hidden="true" />
{isSpawning ? "Spawning…" : "Open orchestrator"}
</button>
)}
{/* Inspector collapse (worker sessions only — orchestrators have no rail). */} {/* Inspector collapse (worker sessions only — orchestrators have no rail). */}
{!isOrchestrator && ( {!isOrchestrator && (
<button <button