feat(workstation-trail): collapsed subagents section with submenu - #1189
Merged
Conversation
Adds a default-collapsed Subagents section to the focused-chat workstation trail (wide rail and compact menu): the parent session's child sessions render as icon rows with icon-only status glyphs, the first five inline and the rest behind a load-more row that opens a left-side second-level panel reusing the list's width. Rows open the subagent in the floating side chat. Existing locale strings are unified on the 'Subagent' term the new labels use.
Collaborator
|
@Harry19081 Do you want to verify this UI first. |
Collaborator
Every section title (panel header included) is now a full-row fold toggle with an always-visible chevron, clickable anywhere left of the header action buttons, in both the wide rail and the compact menu. The panel header's bottom gap switches to the section rhythm when its own group is folded, so stacked collapsed titles sit at equal distances. The hover-revealed WorkstationGroupToggle is gone; its reveal class moves to trailActionReveal.ts for the remaining header actions.
Label and chevron lighten from text-3 to text-2 while a section heading or the panel title is hovered, so the full-row toggles read as clickable without adding a background fill.
Harry19081
approved these changes
Sep 1, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Problem
A session that fans out work has no ambient view of its subagents from the focused chat. The workstation trail shows the local and session environments and open tabs, but the child sessions the agent spawned — how many, which are still running, which failed — are only visible by leaving the chat for the sidebar or the simulator grid. On sessions with many delegated tasks (15–20 subagents are common) there is no way to glance at progress or jump into one worker without losing the focused view.
Solution
Adds a Subagents section to the focused-chat workstation trail, in both the wide rail and the compact header menu:
collapsiblesection mode that, unlike the other groups, also folds in the compact menu) and shows a localized count.resolveSessionRowIcon, so e.g. a Codex session's subagents carry the Codex mark), the task title only, and an icon-only status glyph (running / pending / completed / failed) whose localized label lives in the tooltip.document.body, opening on the left of the list and reusing the list's exact width. Vertical fitting reuses the sharedclampSubmenuTop. A newadditionalInsideRefsprop on the sharedDropdownlets the compact menu treat the portaled panel as inside itself so it stays open while the submenu is used.openSideChatAtom) — the same per-session snapshot path the subagent grid cells use, so it never hijacks the main transcript pipeline.useSubagentSessionsquery (es_get_child_sessions), re-fetched when the parent session'supdated_atadvances — the same freshness signal the sidebar uses.sessions.jsonwording sweep in 10 locales; newcommon:git.rail.*keys in all 13).mb-3) when its own group is folded, so stacked collapsed titles sit at equal distances. The hover-revealedWorkstationGroupToggleis removed (its reveal class moves totrailActionReveal.tsfor the remaining header actions), andWorkstationTrailHeadergains opt-inonTitleToggle/bodyGapprops that leave other consumers untouched.Potential risks
DropdowngainsadditionalInsideRefs, consulted in the outside-click handler. It defaults toundefined, so existing dropdowns are unaffected; the only consumer is the trail's compact menu.getSubmenuAnchor; on a list flush against the window's left edge it flips right. Positions were not exercised under every window size.subagentsCount_one/_other; languages with richer plural forms fall back to_other, matching existing count keys in this namespace.Pre-commit hook ran.trailer is intentionally absent; verification was run manually (below).Verification
Run in a detached
git worktreeof exactly each branch commit (base361e67e5a+ this change only), withnode_modulessymlinked — not in the dirty working tree; repeated at each follow-up commit (d7fd415,950fe76):npx tsc --noEmit --pretty false— clean (exit 0) at both commits.npx vitest run --config config/vitest.config.ts src/modules/shared/layouts/FocusedChatWorkstationRail src/engines/ChatPanel/focusedChatWorkstationLayout.test.ts src/components/Dropdown— all pass at both commits (115 tests at the first, 114 at the second: the deletedWorkstationGroupToggletests leave with their component, and a new panel-title-toggle test covers fold +mb-1↔mb-3gap switching). Coverage: section ordering with subagents; section folding behind clickable headings in wide and compact presentations; an end-to-end rail test (default collapsed → expand → five rows + "Load more (+1)" → submenu lists all six → row click sets the side-chat atoms and closes the panel; status is glyph-only with atitletooltip; no secondary row text).npx eslint --max-warnings 0 --report-unused-disable-directivesover the changed TS/TSX — clean.