Repository navigation
Description
Summary
Clicking the Activity pill above the composer expands a small summary, and only a second click opens the Activity panel, where the useful information is. Make the pill open the Activity panel directly, remove the expand/collapse step, and keep the pill visible by default through a new setting.
This replaces this issue's original report: the clock icon on the expanded summary's elapsed-time line overlapped its "6m" label (ActivityDock.tsx:453, :497). The overlap came from buttonVariants' [&_svg]:-mx-0.5 (apps/web/src/components/ui/button.tsx:11) overriding the icon's mr-1. The redesign removes that line, so the overlap goes with it.
Seen on v0.10.0, Linux desktop (AppImage).
Current state
apps/web/src/components/activity/ActivityDock.tsx:
- Collapsed pill: provider glyph plus Active N and Done N. A click toggles
expanded(:405-413). The parent owns that state throughexpanded/onExpandedChange(:264-267), inChatView.tsx:6836andProviderTerminalActivityDock.tsx. - Expanded summary (
:416-505): one row each for Subagents and Background tasks. Each row shows that section's active and done counts, the oldest active item's elapsed time, and a stale/error marker (SectionStatus,:214-229). Clicking a row callsopenSection(section), which opens the Activity panel. - What the expanded view adds:
- The counts per section. The pill shows only the combined totals.
- One elapsed time. The panel shows elapsed or completed times for every item.
- The per-section stale/error marker. This is the only signal the pill lacks.
Proposed behavior
-
Clicking the pill calls
onOpenSectionwith the section to open:- the section with an error;
- else the one with active work, Subagents first;
- else the one with the most recent item.
If the Activity panel is already open, the click focuses it and scrolls to that section.
-
Remove:
- the
expandedstate andonExpandedChange, in the dock and both callers; - the chevron and the expanded rows;
- the Escape-to-collapse handler.
- the
-
Move onto the pill: a stale or error marker when any section is stale or failing, reusing
SectionStatusand its icons. Errors win over stale. -
Pill accessibility:
- The
aria-labelbecomes "Open Activity: Subagents 1 active, 6 done; Background tasks 0 active, 0 done", plus the status when degraded. - A tooltip shows the same breakdown.
- Drop
aria-expanded.
- The
-
Kept as is: the live-region announcement (
liveAnnouncement,:319), the compact layout, and the sheet inset.
Always visible (new setting, on by default)
- New client setting
activityDockAlwaysVisibleinClientSettingsSchema(packages/contracts/src/settings.ts:119). Defaulttrue. It is a per-device display preference, so it lives next towordWrapanddiffIgnoreWhitespace, not inServerSettings. - Settings row: Always show Activity, placed right after Chat agent activity (
apps/web/src/components/settings/SettingsPanels.tsx:1032), with a reset action. Description: "Keep the Activity button above the chat even before any subagent or background task runs."- When Chat agent activity is off, the row is disabled and explains why: "Turn on Chat agent activity to show it."
- On (default):
- The pill shows on every thread whose provider reports activity, even with no records yet.
selectActivityDockVisibility(apps/web/src/components/activity/activityPresentation.ts:33-70) drops thehasRecordsrequirement for supported sections, but still hidesunsupportedones. - Idle state: with no records, the pill shows the provider glyph and a muted Activity label instead of "Active 0 · Done 0". Clicking it still opens the Activity panel, which shows its existing empty state.
- Providers that never report subagents or background tasks get no pill, as today. A permanent zero would suggest nothing is running when BiBCode just can't see it.
- The pill shows on every thread whose provider reports activity, even with no records yet.
- Off: today's rule. The pill appears once the thread has a subagent or background task.
Acceptance criteria
- One click on the pill opens the Activity panel on the chosen section, by the rules above.
- With the panel already open, a click focuses it and scrolls to that section without closing it.
- The pill shows a stale or error marker whenever any section is stale or failing.
- No expanded summary, chevron or collapse state remains. The
expanded/onExpandedChangeprops are gone fromActivityDockand its callers. - The accessible name and tooltip give per-section counts. Screen readers no longer announce an expandable control.
- Keyboard: Enter or Space on the pill opens the panel.
-
activityDockAlwaysVisibledecodes with defaulttrue. Stored settings without the key still decode. - With the setting on, the pill shows on a thread whose provider supports activity before any record exists, in its idle state. It still hides for unsupported providers.
- With the setting off, visibility matches today's rule.
- Settings shows Always show Activity with a reset action. It is disabled with a reason while Chat agent activity is off.
Validation
ActivityDock.test.tsxandProviderTerminalActivityDock.test.tsx:- section choice: error, then active, then latest;
- a click calls
onOpenSection; - the marker on the pill;
- the accessible name.
activityPresentation.test.ts: visibility with the setting on/off, with records/without, and with supported/unsupported sections.- Contracts settings test: the default and decoding of old stored settings.
SettingsPanels.test.tsx: the row, its reset, and the disabled reason.ActivityPanel.test.tsx: opening at a section when the panel is already open.vp checkandvp run typecheck.UI.mdreview: one step to useful information, and the degraded state stays visible.vercel-react-best-practicesreview: removed state, no new effects for scrolling.- Update
docs/user/workspace-ui.mdif it describes the dock, and review thedocs/testing/runbooks. - Profiler coverage: none applies (client-only UI change).
Open questions
- Should a second click on the pill, with the panel open on that section, close the panel? Default: no, keep it predictable.
Activity
[-]Activity dock: elapsed-time clock icon overlaps its label[/-][+]Activity dock: open the Activity panel on click, drop the expanded summary[/+][-]Activity dock: open the Activity panel on click, drop the expanded summary[/-][+]Activity dock: always visible, opens the Activity panel on click[/+]merge: v0.12.0 issue batch, Pipelines and sidebar (#181)
test(desktop): align packaged specs with the Activity pill and Codex …
merge: v0.12.0 packaged validation fixes (#183)