Repository navigation
feat(desktop): show configured agents in the model picker - #6103
Conversation
Use a compact brand rail for configured ACP agents, keep recovery actions in the model panel, and route sign-in to the agent settings detail. Generated-by: Codex
Route agent settings through the overlay command, reuse injected provider marks, and refresh the renderer architecture and Astryx inventories without adding legacy debt. Generated-by: Codex
Resolve the renderer architecture token count and regenerate the Astryx surface inventory from the combined source. Generated-by: Codex
Preserve search focus when external agents load by isolating picker clicks from the composer. Reuse Astryx combobox navigation and retain async selection behavior. Generated-by: Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
At 3872ddb0181742e00cd3afc40efddec29084ce1b, I found one P2: the new click-propagation guard makes the required Astryx inventory check fail. The current test run stops at executor-model-picker.tsx with hand-written interactive <div>. Running node scripts/check-astryx-surface-inventory.mjs locally reproduces the same failure.
The guard has a real purpose: removing only this handler makes the inventory check pass, but the search-focus regression test then fails because the Composer takes focus back from the search input. Please implement this propagation boundary in a form accepted by the component contract, preserving search focus and catalog-arrival behavior rather than dropping the guard or relaxing the check.
The configured-agent presentation itself works in the tested browser states: the 52px rail contains 40px controls, the unconfigured picker stays single-column, and unavailable/sign-in/refresh states remain usable at 320px, 720px and 1280px in light and dark themes. Successful keyboard model selection closes the picker. Those results do not remove the current CI failure.
| <div className="maka-executor-picker-panel" data-layout={showExecutorRail ? 'split' : 'single'} | ||
| // Portalled clicks still bubble through React to ChatComposer's | ||
| // click-to-focus body. Keep input focus inside this selector. | ||
| onClick={(event) => event.stopPropagation()}> |
There was a problem hiding this comment.
[P2] Keep the search-focus guard without breaking the required inventory check. This new onClick on a raw div is classified as a hand-written interactive control, causing node scripts/check-astryx-surface-inventory.mjs and the current required test run to fail. Removing only the handler makes that check pass, but the new search-focus regression test fails because Composer takes focus from the search input. Please preserve the propagation boundary using an accepted component/event contract; deleting the guard or weakening the check is not sufficient.
Move click propagation protection from the raw panel div to the public TextInput event prop. Preserve search focus while satisfying the Astryx surface inventory contract. Generated-by: Codex
Move selection decoration and fixed rail spacing to product containers. Use the existing icon-only button size and wrap the settings glyph without targeting Astryx internals. Generated-by: Codex
6eb437a to
6750137
Compare
Use shared status semantics for executor readiness and render compact EmptyState recovery with a clear-search action that restores input focus. Generated-by: OpenAI Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
At 1b153cb14c8d79dd7840ace10de17eaa2fbcef43, the previous P2 is fixed. I checked the three commits after 3872ddb0181742e00cd3afc40efddec29084ce1b: the click guard now uses the public Astryx TextInput event (packages/ui/src/model-picker-panel.tsx:95), rail decoration belongs to product containers rather than Button internals, and status/empty-search recovery use the shared components. The original inventory check passes without changing its rules. Removing only the new input guard makes the focus regression fail because Composer takes focus back.
I found no new verified P0–P2 issue. All 789 UI tests, 34 focused Desktop/Host wiring tests, inventory checks and their 23 tests, full Desktop typecheck, production renderer build, and strict renderer architecture checks pass. Browser checks cover 36 ready/loading search-recovery combinations and 18 asynchronous catalog-arrival combinations across 320/720/1280px, English/Simplified Chinese/Traditional Chinese, and light/dark themes. Search input identity, query, and focus survive catalog arrival; clear-search restores options and focus; keyboard selection and Escape work. Rail rows remain 40×40px with Astryx-owned 36×36px buttons. Restoring the previous all-warning status mapping makes the new restoring-state test fail.
[P3] The loading story still omits Traditional Chinese from its text matcher (packages/ui/stories/model-picker.stories.tsx:237), so its unmodified play function fails in that locale despite the loading message rendering. I extended that matcher only in the test fixture for the additional runs above. The asynchronous runs also use a fixture-only catalog-arrival signal; production components are unchanged. These checks do not establish real Agent discovery/authentication or native Electron behavior.
There are no protocol changes; the compatibility epoch remains 222. A synthetic merge with main 8686793e5d051018c61e53350e542992d19d5311 is conflict-free, but I did not test that merged tree. Current-head CI is still running, so this is not a claim of green CI or an approval.
Generated-by: OpenAI Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
Incremental review: 1b153cb14c8d79dd7840ace10de17eaa2fbcef43..7bac3aba4c9dd0c59e9d6c198c9657d53e2a5c5a, one commit touching only packages/ui/stories/model-picker.stories.tsx.
The previous P3 is fixed: the loading story's matcher now includes the Traditional Chinese copy, which matches the catalog string 正在讀取執行者與模型… in packages/ui/src/executor-model-picker.tsx:156. No production code changed, no protocol files touched (epoch unaffected), and there are no new findings. The PR is MERGEABLE; current-head CI is still running, so this is not a claim of green CI or an approval.
Use the native Astryx Selector and chat model rows for fixed external sessions. Keep agent browsing in new tasks and preserve pending configuration and recovery actions. Generated-by: Codex
Resolve renderer architecture ledger against the combined AppShell source. Keep the native Selector search isolated from Composer click-to-focus and validate the existing-session browser scenario. Generated-by: Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.Incremental review:
7bac3aba..1e2d2a55. It has one author commit and a merge of main at2c429077, and the merge also contains author changes. I found no P0–P2 issue, and CItestpasses on this head.
817ccf4c (existing external sessions use the native model Selector).
- When
fixedis set and the selected executor isready, the picker renders an AstryxSelector. It lists that executor's models, collapsing model groups to their highest variant, with search and the shared chat-model option renderer. - It is disabled while a configuration is pending or the executor does not support model changes. A failed selection shows an alert next to it.
- Fixed sessions that are not ready still use the
ComplexSelector, with the executor rail and footer hidden. The unavailable, invalid and error recovery block below the picker, includingonRetry, is unchanged, so recovery actions remain reachable. - New-task pickers (
fixedunset) behave as before. The new unit test covers the native Selector, with a single column, no rail or manage entry, and a selection that sends{ model }and closes the popup.
Merge 1e2d2a55. Besides resolving the AppShell token count in renderer-architecture.json, the merge adds new code:
- a
Stackwrapper withonClick={stopPropagation}around the fixed-session Selector, so clicks in the portaled popup no longer reach the Composer's click-to-focus handler - the matching inventory row
- a story fix that targets the expanded combobox
The change is reasonable. Stopping only the React click event does not affect Astryx's outside-press dismissal.
P3 (process): this is new behavior inside a merge commit, so git log of the author commits does not show it. Put such changes in a separate commit next time.
Note: the maintainer approval on this PR was given at 7bac3aba. The changes above have not been approved at this head.
Summary
Existing conversations keep the native Maka model-selection UI: once an external Agent is fixed to a Session, reopening model selection shows the same single-column Astryx Selector, searchable model-name rows, provider icons, and model-only trigger as native Maka. The Agent rail and management footer remain in new-task selection. Existing-session model groups still select the highest supported intensity; pending changes block submission, failures retain the confirmed model, and recovery actions remain available. Search clicks are isolated from Composer focus handling.
Users who have not configured an external ACP agent currently see an unavailable Antigravity entry when choosing a model. Show the native model list in a single column until an agent is configured, while keeping the management entry available.
For new tasks, once agents are configured, show a compact logo rail beside the existing model list. Keep configured agents visible when signed out or unavailable. Use the existing Maka sky asset and provider brand assets, with an accessible generic fallback for unknown agents. Place refresh indicators in each external agent logo’s bottom-right corner without changing spacing.
Use the existing EmptyState component for recovery: show Retry in the right panel only when unavailable, and Go to sign in for authentication-required agents. Sign-in opens the corresponding settings detail; the gear opens the external-agent overview. Generalize the overview description so it describes external agents rather than Antigravity alone.
Use Astryx ComplexSelector for the new-task single- and two-column picker, retaining the existing model rows and selection callbacks. Reuse Astryx combobox keyboard navigation and isolate picker clicks from the composer so clicking search keeps focus, including when external agents finish loading.
UI — before / after
The Before image is the original desktop screenshot supplied during review. The After images below render the production components and styles at
67501376b, including the Astryx Button styling fix. They use Chinese UI copy and fixture model data in an isolated browser preview; model names and availability are illustrative.No external ACP agent configured
Configured agents and refresh feedback
Each product-owned rail row remains 40 × 40 px. Astryx owns the icon-only Button dimensions through
size="lg"andisIconOnly(36 × 36 px in the current theme), centered within the row. Selection decoration belongs to the outer container; renderer CSS no longer overrides rail Button dimensions, padding, or its internal SVG.Clicking a logo only changes the browsed agent; selecting a model commits the choice. Existing native model rows and selection callbacks are retained.
Authentication and connection recovery
The gear opens the external-agent overview. Ready agents show their models without Retry. Removing all external-agent configuration returns new sessions to the single-column layout. The settings overview describes external agents generally rather than Antigravity alone.
Status semantics and empty-search recovery
External Agent status dots now use the shared
dotForStatusvocabulary instead of showing every non-ready state as a warning:When a native or external model search has no matches, the picker now shows a compact Astryx
EmptyStatewith a ghost/small Clear search action. Clearing restores the full candidate list, resets the keyboard highlight, and returns focus to the search field without closing the picker or moving focus to the composer. A genuinely empty catalog uses the same compact empty state without a clear action. The recovery action is localized in English, Simplified Chinese, and Traditional Chinese and sits outside the listbox.The screenshots above capture the original layout at
67501376b; this status and empty-search follow-up is implemented in1b153cb14.Verification
2c4290772). The new component regression fails against the previous picker. The production Composer browser scenario checks search focus, ArrowDown/Enter selection, Escape focus restoration, native row styling, and popup width. Existing/new Agent picker scenarios pass in Simplified Chinese, Traditional Chinese, and English, each in light and dark themes (12 runs).67501376b: native keyboard search/selection and Escape focus restoration; asynchronous catalog arrival, split layout and external selection; recovery actions and loading-indicator containment. External Agent catalogs used deterministic IPC fixtures. The latest status/empty-search changes were validated with the component and browser checks above. Full Electron and full-repository suites were not run.Review scope
The current built-in settings catalog still offers Antigravity; the multiple-agent preview uses sample catalog entries to validate layout. This change does not add installers for additional agents. Loading indicators reflect the existing catalog-wide refresh, not independent per-agent progress.
AI use
Tool(s) and scope: OpenAI Codex assisted with implementation, focused tests, and browser validation. The implementation commit includes a Generated-by trailer.
Checklist
Does this PR entail a change in behavior?