Skip to content

feat(tui): match main model metadata in child sessions - #50798

Open
guanbear wants to merge 10 commits into
anomalyco:v2from
guanbear:fix/v2-subagent-model-variant-tab
Open

guanbear wants to merge 10 commits into
anomalyco:v2from
guanbear:fix/v2-subagent-model-variant-tab

Conversation

@guanbear

@guanbear guanbear commented Sep 23, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #50795

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Opening a subagent's child session in v2 replaces the normal prompt with the Composer, so the usual model metadata row disappears. The child Composer now reuses the main prompt's PromptMetadataRow, reading the child's persisted model and resolving names from its location's catalog. It hides the row until the child has a model. The Subagents list is unchanged.

#38772 covers similar footer behavior on dev. #51232 targets the v2 Subagents list instead; this PR shows the model after opening the child, using the main prompt’s metadata row. I would appreciate guidance on the preferred UI placement and merge path.

How did you verify your code works?

  • bun test test/cli/tui in packages/tui: 425 passed on the final head, updated to v2 at a604b7f7.
  • bun typecheck in packages/tui; Prettier and oxlint on the changed files; repository lint and typecheck via the pre-push hook.
  • Rendered the production child Composer with fixture sessions at 80 and 40 columns. These captures use fixture data, not a live delegated run.

Screenshots / recordings

Opened child session before, 80 columns:

Child session before: no model metadata

Opened child session after, 80 columns:

Child session after: main prompt model metadata row

Opened child session after, 40 columns:

Child session after: compact model metadata row

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
@guanbear

guanbear commented Sep 29, 2026 •

Copy link
Copy Markdown
Author

Update: I updated the branch against current v2 (a604b7f7; PR head 256e28cb2) and reused the main prompt's PromptMetadataRow in the opened child session. The Subagents list remains unchanged. I added focused tests for normal, missing-agent, and default-variant cases; the final v2 TUI suite passed (425 tests), as did package typecheck and the repository pre-push lint/typecheck. The PR now has refreshed 80- and 40-column captures of the production component with fixture data.

I also noted #51232, which proposes showing the model in the list, and #38772 on dev. This PR follows #50795's opened-child footer behavior. I would appreciate guidance on the preferred placement and merge path. Thank you.

guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
@guanbear guanbear changed the title feat(tui): show effective subagent model and variant in v2 tab feat(tui): show child model in v2 session footer Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
guanbear added a commit to guanbear/opencode that referenced this pull request Sep 29, 2026
@guanbear guanbear changed the title feat(tui): show child model in v2 session footer feat(tui): match main model metadata in child sessions Sep 29, 2026

This branch has not been deployed

No deployments
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