Repository navigation
feat: show workspace badge in agent chat top bar - #23964
Merged
Merged
Conversation
Adds a visible workspace status badge to the ChatTopBar so users can see the attached workspace name and status at a glance, and click to navigate to it. Previously this required clicking the ellipsis menu and selecting 'View Workspace'. The badge shows a colored status dot (matching WorkspaceStatusIndicator conventions) and the workspace name, with a tooltip showing the status text. Clicking opens the workspace page in a new tab.
The bare name + dot wasn't obviously a workspace. Now shows a MonitorIcon (matching the dropdown's 'View Workspace' item) and the tooltip reads 'Workspace: Running' instead of just 'Running'.
On mobile, the workspace name is hidden — the badge collapses to just MonitorIcon + StatusDot (~40px). The tooltip shows the full name and status on hover/long-press. This prevents the workspace and PR badges from crowding out the chat title on small viewports. Both badges now live inside a shared container so they're treated as a single layout unit. Added MobileWithWorkspaceAndPR story to cover the narrow-viewport scenario.
…ents
Moved ChatTopBar.tsx into components/ChatTopBar/ directory and
extracted WorkspaceBadge and PullRequestBadge into their own files.
Also fixed a stray {" "} in the JSX.
The PR badge logic (url parsing, hasPR check, render-or-null) now
lives in PullRequestBadge, which simplifies ChatTopBar and makes
the badge independently testable.
Destructure diffStatusData directly, remove redundant pr-prefixed locals, deduplicate label logic, and simplify the early return guard.
The workspace badge now renders as a ToolBadge pill in the chat input toolbar, alongside existing MCP server pills. This leverages the existing pill infrastructure that already shows a workspace pill on the create-chat page. The pill is non-removable (no X button), clickable (links to the workspace page), and shows a status dot. It appears for loaded chats that have an attached workspace. Removes the workspace badge from ChatTopBar since the info now lives in the input toolbar, freeing top-bar space on mobile.
Reverts all ChatTopBar changes (directory split, WorkspaceBadge, PullRequestBadge extraction). The workspace indicator now lives solely in the input toolbar pills.
DanielleMaywood
force-pushed
the
dm/agent-chat-workspace-badge
branch
from
April 2, 2026 14:33
d54fc25 to
af57834
Compare
Replace the StatusIndicatorDot (bright, bordered, 12px) with a simple 6px circle using muted color classes. Running is a soft green (bg-content-success/60), stopped is a faded grey, and error/warning states stay vivid. Feels more like a power LED than a status badge.
Replaces the colored dot with shape-based status icons so the indicator doesn't rely on color alone: - Running: filled circle (muted green) - Starting/pending: spinning loader (grey) - Stopped/inactive: square (faded grey) - Error/warning: alert triangle (red/orange) Shape communicates state independently of color, making the indicator accessible to users with color vision deficiency.
Running is a 6px filled dot, stopped is a 6px ring (border only). Lucide's CircleIcon was too chunky at small sizes — a plain span with rounded-full reads much cleaner as a status LED.
The hollow ring at 6px was invisible. Stopped now uses the same filled dot as running but in a faded grey (bg-content-secondary/40) so it's clearly visible but reads as 'dim' next to running's green.
The dot is the power indicator — its presence means the workspace is running. No dot means off. This is accessible without color since the distinction is presence vs absence, not hue.
Stopped workspaces show a small muted moon icon instead of nothing, conveying 'sleeping/off'. Distinct shape from the filled dot (running), spinner (starting), and alert triangle (error).
Replace the separate status icon to the right of the name with monitor icon variants on the left: - MonitorIcon: running - MonitorPauseIcon: stopped - MonitorXIcon: error/warning - MonitorDotIcon: starting/pending Single icon communicates both 'this is a workspace' and its state.
Shows the workspace status text (Running, Stopped, Starting, etc.) on hover. Also threads statusLabel through ChatPageContent and updates all stories.
- Fix mangled indentation on statusLabel line in AgentChatPageView
- Extract shared AttachedWorkspaceInfo type to avoid duplication
across AgentChatInput and ChatPageContent
- Fix story statusLabel values to match actual output
('Workspace running' not 'Running')
- Restore removed blank line between import groups
P2 fixes: - Unhealthy workspace tooltip now reads 'Workspace running (unhealthy)' instead of contradicting the MonitorXIcon with 'Workspace running'. (Edge Case, Contract Auditor, Frontend) - WebSocket dedup now compares health.healthy so the badge icon updates when a workspace transitions to/from unhealthy without a build status change. (Contract Auditor) P3 fixes: - Add rel='noreferrer' to the workspace badge Link for convention consistency with other target='_blank' links. (Frontend) Nit fixes: - Use intersection type for attached-workspace ToolBadgeData variant to stay in sync with AttachedWorkspaceInfo. (Style, Modernization)
DanielleMaywood
marked this pull request as ready for review
April 2, 2026 16:30
ibetitsmike
approved these changes
Apr 2, 2026
| return ( | ||
| <ToolBadge | ||
| key={badge.kind === "workspace" ? "ws" : badge.server.id} | ||
| key={badge.kind === "mcp" ? badge.server.id : badge.kind} |
Collaborator
There was a problem hiding this comment.
the diff resolution in git is lovely sometimes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a visible workspace status badge to the ChatTopBar so users can see the attached workspace at a glance. Previously, viewing the workspace required clicking the ellipsis menu and selecting "View Workspace".
The badge shows a colored status dot and the workspace name, with a tooltip displaying the full status text. Clicking navigates to the workspace page.
Implementation details
Changes:
ChatTopBar.tsx— AddedWorkspaceBadgecomponent with status dot (using existingStatusIndicatorDot+getDisplayWorkspaceStatuspatterns) and workspace name link. AddedworkspaceDataandworkspaceRouteoptional props.AgentChatPageView.tsx— Constructs workspace route and passesworkspaceData/workspaceRouteto ChatTopBar.AgentChatPage.tsx— Passesworkspaceobject to AgentChatPageView (prop already existed on the interface but wasn't being passed).ChatTopBar.stories.tsx— AddedWithWorkspace,WithWorkspaceStopped, andWithWorkspaceAndPRstories.Design decisions:
target="_blank"to match the existing "View Workspace" behavior.statusVariantMapasWorkspaceStatusIndicatorfor color consistency.