feat(chat): tabbed model selector with agent segmented control#3437
Closed
tlgimenes wants to merge 12 commits into
Closed
feat(chat): tabbed model selector with agent segmented control#3437tlgimenes wants to merge 12 commits into
tlgimenes wants to merge 12 commits into
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The dialog used sm:max-w-3xl (768px) for every state. The grid view needs that width to fit provider cards, but the OAuth/provision spinner and the error state just show a one-line message — they looked oversized. Switch to sm:max-w-md (448px) for those states. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Non-clonable agents (no githubRepo metadata) can't route through a desktop CLI, so showing Claude Code / Codex tabs in the popover was misleading. Expose isAgentClonable in chat prefs and pass lockedAgent="decopilot" to the popover when false — that branch already renders a single section's body with no tab bar. Also tighten the row style: right-align the muted description (text-right) and bump py-1.5 to py-2.5 for breathing room. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The selected row's bg-accent highlight already conveys selection; the trailing "On" text was redundant alongside the new right-aligned description. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The right-aligned description left an awkward gap inside w-64. Tighter container reduces the empty space between label and description. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@deco/ui's PopoverContent bakes w-72 into its base className, so my inner w-56 container left a ~64px empty band of popover background on the right. Adding w-auto to PopoverContent lets the inner width own the sizing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e model pill The chat input now exposes agent selection (Decopilot / Claude Code / Codex) as an always-visible segmented control to the left of the existing model pill. The popover loses its tab bar entirely and becomes a clean tier picker for the active agent. - New AgentSegmentedControl + AgentSegmentedControlPure components, hidden when the agent is not clonable or fewer than two sections are eligible. - AgentModelPopover simplified: no tabs, no lockedAgent prop, always renders the active section's three tier rows. - AgentModelTrigger drops lockedAgent pass-through. - Tests updated; new tests cover the segmented control surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsSuggested: Minor ( React with an emoji to override the release type:
Current version:
|
Contributor
There was a problem hiding this comment.
2 issues found across 13 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/mesh/src/web/components/chat/agent-model-popover.tsx">
<violation number="1" location="apps/mesh/src/web/components/chat/agent-model-popover.tsx:34">
P2: Fallback section rendering can lose the selected tier highlight when `activeAgent` is missing. Use `activeTier` for the rendered section so the picker always shows a selected row.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| return <div className="flex flex-col gap-1 w-60" />; | ||
| } | ||
|
|
||
| const selectedTier = section.kind === activeAgent ? activeTier : null; |
Contributor
There was a problem hiding this comment.
P2: Fallback section rendering can lose the selected tier highlight when activeAgent is missing. Use activeTier for the rendered section so the picker always shows a selected row.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/components/chat/agent-model-popover.tsx, line 34:
<comment>Fallback section rendering can lose the selected tier highlight when `activeAgent` is missing. Use `activeTier` for the rendered section so the picker always shows a selected row.</comment>
<file context>
@@ -9,45 +9,39 @@ interface Props {
+ return <div className="flex flex-col gap-1 w-60" />;
+ }
+
+ const selectedTier = section.kind === activeAgent ? activeTier : null;
return (
</file context>
Suggested change
| const selectedTier = section.kind === activeAgent ? activeTier : null; | |
| const selectedTier = activeTier; |
A second pill next to the model pill makes the harness picker match the existing model picker UX — closed pill shows the active harness, click opens a popover with one row per eligible harness. Visibility rules are unchanged (hidden when the agent is not clonable or only one section is eligible). The model popover also widens from w-60 to w-72 to give the description more room. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What is this contribution about?
Redesigns the chat-input model selector to remove repetition and add explicit agent switching:
w-72baked into sharedPopoverContent).Haiku 4.5,Sonnet 4.6,Opus 4.7.sm:max-w-3xlfor every state — its OAuth-pending / provision-pending / provision-error states now usesm:max-w-mdso the "Authorize the connection in the popup window…" message no longer floats inside a giant box.Screenshots/Demonstration
(internal — verified locally in the conductor workspace)
How to Test
Migration Notes
Not applicable.
Review Checklist
🤖 Generated with Claude Code
Summary by cubic
Redesigned the chat model selector: agent choice is now a second select pill next to the model pill, and the popover is a compact three-tier picker for the active agent. Also narrowed the provider connect dialog in pending/error states and versioned Claude Code labels.
New Features
w-autopopover with an innerw-72container. Dropped the redundant “On” tag.Bug Fixes
sm:max-w-mdfor OAuth/provision pending and error states to avoid oversized layouts.Written for commit 33677e7. Summary will update on new commits. Review in cubic