refactor(ui): unify composer model selection with Astryx Selector #6158
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6158"
general
weight: 0.35
liugddx
Summary
Model selection used nested radio menus, a custom ACP Agent rail/search panel, a compact WorkHub wheel, and a separate Codex plugin selector. Context capacity and selected-model summaries also appeared repeatedly.
Use one Composer-owned Astryx
Selector, with search and connection/Agent groups. Thinking effort uses the shared adjacent selector. Remove context capacity and duplicate menu summaries.Paths unified
| Path | Result |
| --- | --- |
| Native conversations and expanded WorkHub | Searchable connection groups and the shared thinking control. |
| New tasks/home and side chat | Native models, ACP Agents and Codex models share one selector. |
| Existing ACP sessions | The same selector, scoped to the current Agent, retaining opaque model variants, modes and session recovery. |
| Codex client plugin | Supplies its remote model catalog, provider identity and loading/retry callback through the existing slot's
renderPicker; Composer owns rendering, shared provider logos, native/ACP composition, mutations and pending-send admission. || Compact WorkHub | The same controls use Astryx's bottom sheet. |
| Model-recovery action | Opens the production selector directly. |
Settings retains its existing Astryx
ModelPickerand shared native option shaping. Runtime Host, storage and dependency contracts are unchanged.Integration and recovery
The slot delegates rendering to Composer with plugin-owned catalog data. One filtered executor catalog defines the scope: editable new tasks retain all configured Agents, while fixed sessions retain only their current Agent. Model options and recovery actions use that same catalog; selecting one Agent does not lock a new task to it.
Unavailable and authentication-required Agents expose Retry or Sign in both before selection and while a different ready Agent is selected. Recovery uses the existing callbacks without changing the current selection. Existing-session restore/history actions keep their existing callbacks. Loading uses Astryx's native loading state; new-task triggers retain Agent identity. Recovery notices wrap onto a separate row so they do not squeeze the model label on narrow screens. Fixed ACP sessions do not activate the Codex contribution or expose recovery actions for other Agents.
Removed implementations
chat-model-switcher.tsx,composer-options-menu.tsx,executor-model-picker.tsx,model-picker-panel.tsxandmodel-wheel-picker.tsx, their obsolete styles and exports.The cumulative diff adds 1,042 lines and removes 5,356 across 37 files (net −4,314).
Client integration migration
conversation.composer.model-selectionnow receivesrenderPicker,hasModels,fixedExecutorIdand the current executor target. Contributions callrenderPickerwith their own model catalog instead of rendering replacement controls. The previous full-control owner props andModelWheelPickerclient export are removed. The repository-only Codex example is migrated in this PR; existing installations must be reinstalled from the matching Maka checkout. Its README documents this requirement. No compatibility picker or duplicate execution state is retained.Refs #5787, #5789, #6103.
Verification
Agentgroup and no other Agent's recovery button, retaining failed-write/confirmed-model checks. Removing the native-option guard or the catalog's fixed-session filter independently fails that isolation test. Earlier ACP-composition and pre-selection-recovery mutations also failed their regressions.68a62a530, which M4n5ter approved after rechecking the recovery and fixed-session paths. All three inline review threads are resolved. Electron E2E and packaged-app checks were not run locally.Visual comparison
Same real
product-workhub--standard-composerstory, fixtures, Chinese locale and 1000 × 900 viewport. Left: separately builtmainat286ffa820; right: this branch at500b83641. Each image contains the complete composer and open popup.!Light theme: nested menu before, unified Astryx Selector after
!Dark theme: nested menu before, unified Astryx Selector after
<details>
<summary>Current Codex contribution through the shared picker</summary>
The story loads the actual Codex client bundle. Native, Codex and ACP groups share the same searchable list; longer catalogs scroll inside Astryx's popup.
!Codex contribution through the unified picker, light
!Codex contribution through the unified picker, dark
</details>
AI use
Tool(s) and scope: Codex assisted with component and plugin consolidation, legacy removal, regression tests, Storybook/CDP verification and this description.
Checklist
Does this PR entail a change in behavior?