Skip to content

fix(subagents): align subagent view with official (hide composer, full SubagentBar, child actions) - #1304

Merged
Hona merged 1 commit into
devfrom
upstream-f/align-subagent-view
Nov 26, 2026
Merged

Hona merged 1 commit into
devfrom
upstream-f/align-subagent-view

Conversation

@Hona

@Hona Hona commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Aligns the subagent (child session) view with official anomalyco/opencode (packages/app/src/session/composer/{region.tsx,session-composer-region.tsx,subagent-bar.tsx,timeline-actions.ts}, packages/session-ui/src/message/message-content.tsx).

Summary

  • Hide prompt composer, queue tray, and free-limit panel on child sessions (apps/desktop/src/shell/view/composer.rs, crates/session-view/src/composer/mod.rs, apps/desktop/src/shell/view/session.rs):
    • Added session_view::composer::request_dock so child sessions render only an active question or permission dock (spaced 8 pt above SubagentBar, matching session-composer-region.tsx:68-98) without rendering the prompt composer card, queue tray, or free-limit panel.
    • Suppressed background activity/todo/plugin pills in story_composer on child sessions as well as session_body.
  • Complete SubagentBar metadata and surface (features/subagents/src/{lib,reply}.rs, apps/desktop/src/session/timeline/subagents.rs):
    • Added SubagentModel + SubagentsHost::subagent_model resolving info.model (or falling back to the last assistant message's model in the child transcript, matching region.tsx:565-583) through provider/model display labels.
    • Updated build_status_line (subagent-bar) to show all known metadata separated by middle dots: status icon, status label, elapsed duration, capitalized agent name, provider / model name, and dimmed variant (opacity 0.66, no separator), on p.bg_base with the right-aligned Main session (ESC) button (subagent-bar.tsx:44-112).
  • Child-session interaction alignment:
    • apps/desktop/src/session/timeline/subagents.rs and features/subagents/src/reply.rs: Escape on a child session always navigates back to the parent session (region.tsx:201), even if the main session's composer holds a draft.
    • apps/desktop/src/shell/view/session/host.rs: can_switch_model() returns false on child sessions (timeline-actions.ts:45), hiding Switch model on error cards.
    • features/history/src/rewind/mod.rs: user message menus on child sessions omit Fork from here, Revert/Undo, and pending queue/delete items, leaving only timestamp and Copy message (timeline-actions.ts:36-45, message-content.tsx:471-489).
    • apps/desktop/src/session/composer/dropzone.rs: file drops and hover overlays are ignored on child sessions where no composer exists.
    • apps/desktop/src/shell/view/header.rs: included info.parent in session-header memo inputs so placeholder-to-child transitions always rebuild breadcrumbs cleanly.

Verification

  • CI run 45782791498 on head 1785b0bbdb: green (guardrails, build-macos, build-windows (x64), build-windows (arm64), build-linux (x64); Linux arm64 skipped).
  • Headless Windows x64 PR build verification beside a before build (c1360881ed) on --scene subagent (all passes exit 0):
    • Subagent view (before vs after): before showed the full prompt composer (composer/prompt present) and truncated Done / 20m 00s bar (subagent-model absent). After shows NO prompt composer (composer/prompt absent), compact header (lumen / Fix flaky reconnect in the ev... / Review the reconnect change, no rename button or ... menu), and full SubagentBar (Done, 20m 00s, General, anthropic / Claude Opus 5.5 High, Main session ESC).
    • Stray keys (abc) on child session: composer/prompt remain absent and abc is not typed into any hidden composer.
    • Escape on child session: navigates back to parent session (subagent-bar absent, parent session composer shown).
  • Local guardrails (scripts/guardrails.ps1): 9/9 passed; bun scripts/web-clock.ts: 0 violations.
  • Not run: active question/permission dock on child session, child user message right-click menu in headless run, real window, macOS, Linux.

@Hona
Hona marked this pull request as ready for review November 26, 2026 08:57
@Hona
Hona merged commit f9b992d into dev Nov 26, 2026
7 checks passed
@Hona
Hona deleted the upstream-f/align-subagent-view branch November 26, 2026 08:57
Hona added a commit that referenced this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant