Repository navigation
feat(native-chat): choose which agents open as a chat - #29071
Conversation
Settings → Chat gets a Providers list. Each agent the host can open as a chat has a switch; off opens that agent in a terminal instead. Only choices the user makes are saved. Unchosen: Claude and Codex on, others on when their CLI is installed on this computer. The renderer's route and the host's launch-mode decision both read one rule, so the tab menu, shortcuts, CLI, orchestration and relayed phone launches agree.
|
Users could choose Chat UI only for all agents at once. This adds Settings → Chat → Providers so turning one agent off opens its new launches in a terminal while other agents can keep opening chats. Saved choices apply to desktop, command-line, orchestration and phone launches; existing chats remain usable. Untouched agents keep the existing chat launch default. Installation on this computer controls the switch's initial display, so an untouched switch can look off here while a capable server still opens that agent as a chat; this is the approved behavior. Explicit-off creation uses the normal terminal templates/setup path; an empty workspace whose default agent is off opens a shell. The separate terminal path, multiple execution hosts, desktop-owned phone preference and installation-based switch display are intended differences from the common pattern. Fixed during review: host launches read saved choices privately; rapid switches preserve both updates; Windows/WSL workspace detection cannot change native Settings defaults; Agents-disabled preserves the saved provider value; folder startup uses the execution host's shell/platform; host-answer timers/listeners settle together. Provider discovery no longer delays existing-terminal prompt delivery, phone forwarding or worker startup. Round 4 verified the fixture/main integration and found two Settings defects; the completed design panel ruled on their correction. Fixed in ec26393: queued saves preserve the clicked value even when installation detection changes, and failed native refreshes retain the keyed inventory with its matching display context. Independent round 5 agreed with both corrections and found no new issue. Repeated clicks before the displayed switch changes request the same value. The actual rendered-switch and native/WSL ownership regressions passed within 38 tests across three named files. Temporary difference from the common pattern: cold local-discovery failure still becomes an empty inventory and can incorrectly say “Not installed” until another action triggers discovery. STA-10901 tracks separating failed completion from inventory knowledge and updating existing loading/retry consumers; a null-only change would leave those consumers stuck. Known-list refresh retention is fixed here, but cold failure semantics are not. Deferred, pre-existing: browser master-switch readback and a stale startup warning after recovery. Comparison QA also identified Setup taking selection (STA-10869; original base and branch each reproduced 3/9), disabled-agent terminal startup (STA-10357), agent startup replacing the first template command (STA-10870), first-folder onboarding startup (STA-10871), Microsoft Store PowerShell detection (STA-10879), and a false WSL startup toast (STA-10880). Restart tab ordering, setup-trust behavior and onboarding copy were also reported; the old QA left a WSL test-project trust entry and disclosed real-config hash changes without attributing all of them to the rigs. These are not silently counted as passing flows. Verified: the source readiness pass covered the full diff; the two final Settings findings received a three-model ruling and were corrected. Independent narrow verification, final-head full PR CI and focused Settings QA are complete at ec26393. Prior real Electron main-versus-branch QA covered provider switches and persistence, chat/terminal launches, existing-chat replies after switching off, empty workspace, setup/templates and terminal prompt delivery on macOS; Windows native-versus-WSL routing and off/on switching passed. The original macOS run launched 42be27e (production identical to 0564e02); the focused Setup comparison and Windows run launched 0564e02. Paired-WSL server behavior remains untested because no paired WSL server was available; Codex replies in the isolated profile and first-folder default-agent startup were also blocked. The final main merge changed launch focus/setup/recovery dependencies, so a fresh comparison tested c71e260 against main 702ffc7: provider off/on menu and shortcut launches passed with terminal/composer focus and real Claude replies; empty-workspace chat/shell routing passed; all three new-workspace repetitions on each build stayed on the chat rather than Setup. Command-line creation reproduced the same existing failures on both builds: the Dev server tab remained selected instead of the new chat (STA-10869), a terminal agent replaced the first template command (STA-10870), and an absent Gemini returned success while its terminal showed command-not-found (STA-10894). Those cases are not passes. Clicking Send can leave focus outside the composer on main too (STA-10897); Enter-submitted menu/shortcut chats kept focus on both builds. This is pre-existing. Final-head CI passed: full PR workflow 38988663509 on ec26393, including Other observations from final QA: both builds reopened Settings underneath the “Search every agent session” modal and showed promotional/onboarding cards over controls. The restart screenshot below was taken after dismissing the modal. A completed reply still exposed the accessible label “Agent is responding”; a bounded source trace confirms the label is unconditional in unchanged main code, so this is deferred outside this PR and tracked in STA-10926. Main also called a missing fixture path “not a Git repository”; the fixture was recreated before testing. The reported onboarding typo is pre-existing. No new fix was added for these observations. Current head d7cb1a8: the only changes since the reviewed head ec26393 are two merges of current main, both clean with no hand-resolved conflicts ( For Brennan's review Current head d7cb1a8 (M4Air smoke): Providers after restart → Claude off gives a terminal → Claude on gives a chat → Chat UI off → Chat UI onFinal-head macOS comparison: main 702ffc7 → branch ec26393. Four cases passed; main has no Providers controls for the first two. Screenshots show rendered state; the report’s saved-settings samples establish persistence. Final head: main Chat settings → provider choices after a rapid burst → after restartClaude off and Grok on persisted. The restart screenshot follows dismissal of the pre-existing search modal. Final head: installed inventory survives an injected refresh failure, main → branchBoth builds retained their installed list in this rig. This comparison does not reproduce the old cross-context wipe; the native/WSL lifecycle regression covers it. Final head: main chat reply → branch provider off terminal → branch provider on chat replyReal Claude replied MANGO in both chats. The terminal screenshot includes the pre-existing split-pane coachmark. Post-main-merge macOS comparison: main 702ffc7 → #29071 c71e260. Provider-off launches open Claude terminals; provider-on launches reply in chats; new-workspace repetitions keep the chat selected. The initial Send-button focus concern was reproduced on main and is tracked as pre-existing (STA-10897). The pre-merge comparison below tested main 78bb358 versus branch 42be27e (production identical to 0564e02). Windows screenshots tested 0564e02. These do not substitute for current-head launch/focus/setup/recovery verification. Windows native installation display (branch 0564e02)Windows native chat: main → branch; WSL terminal: main startup → branch trust screenNative launch (agent replies were blocked by the isolated profile's sign-in): WSL launch (main screenshot captured the initial terminal; branch reached the real CLI trust screen): Pre-merge workspace creation: main Chat UI off → branch provider off; pre-existing Setup selection on bothTerminal path and default tabs (main 78bb358 → branch 42be27e): Setup-selection race (base 78bb358 rep 8 → branch 0564e02 rep 7; both selected Setup): The three intentional choices worth inspecting are:
|
…ngs reader The host now reads saved chat choices through requireStore().getSettings(); the shared RPC fixture only had getClientSettings, so the launch-mode reader saw no settings and create support refused Claude. The fixture now follows each test's client settings.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
255162eb-bb3e-4a95-bbbc-5ec9a8527cc2
📒 Files selected for processing: 64
src/main/agent-launch/agent-launch-account-env.test.tssrc/main/agent-launch/agent-launch-execution.tssrc/main/agent-launch/agent-launch-executor.test.tssrc/main/agent-launch/agent-launch-executor.tssrc/main/agent-launch/agent-launch-legacy-host-policy.test.tssrc/main/agent-launch/agent-launch-mode-settings.test.tssrc/main/agent-launch/agent-launch-mode.tssrc/main/agent-launch/agent-launch-opencode-model.test.tssrc/main/agent-launch/startup-agent-worktree-create.test.tssrc/main/automations/headless-automation-agent-launch.test.tssrc/main/persistence/applying-settings/settings-update.tssrc/main/runtime/mobile-desktop-relay/mobile-desktop-relay.test.tssrc/main/runtime/mobile-desktop-relay/mobile-desktop-relay.tssrc/main/runtime/mobile-desktop-relay/relayed-phone-frames.tssrc/main/runtime/rpc/methods/agent-launch-floating-workspace.test.tssrc/main/runtime/rpc/methods/agent-launch.test-fixture.tssrc/main/runtime/rpc/methods/orchestration-worker-mode-opacity.test.tssrc/main/runtime/rpc/methods/orchestration-worker-start-mode-selection.test.tssrc/main/runtime/rpc/methods/orchestration-worker-start-mode.tssrc/main/runtime/rpc/methods/orchestration-worker-start-registered-agent.test.tssrc/main/runtime/rpc/methods/structured-agent-session-admission.test.tssrc/main/runtime/rpc/methods/structured-agent-session-gate.tssrc/main/runtime/rpc/methods/structured-agent-session-policy.tssrc/main/runtime/rpc/methods/structured-agent-session-rpc.test-fixture.tssrc/main/runtime/runtime-rpc/runtime-rpc-pairing.tssrc/main/runtime/runtime-store-contract.tssrc/renderer/src/components/onboarding/onboarding-folder-agent-startup.test.tssrc/renderer/src/components/settings/ChatSettingsSection.test.tsxsrc/renderer/src/components/settings/ChatSettingsSection.tsxsrc/renderer/src/components/settings/NativeChatExperimentalSetting.tsxsrc/renderer/src/components/settings/NativeChatProvidersSetting.tsxsrc/renderer/src/components/settings/NativeChatSupportedAgents.test.tsxsrc/renderer/src/components/settings/NativeChatSupportedAgents.tsxsrc/renderer/src/components/settings/agent-availability-settings.test.tssrc/renderer/src/components/settings/agent-availability-settings.tssrc/renderer/src/components/settings/chat-providers-search.tssrc/renderer/src/components/sidebar/NonGitFolderDialog.tsxsrc/renderer/src/hooks/settings-navigation-interface-sections.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-launch-route-registered-agents.test.tssrc/renderer/src/lib/agent-launch-routing.test.tssrc/renderer/src/lib/agent-launch-routing.tssrc/renderer/src/lib/agent-session-launch-plan.tssrc/renderer/src/lib/launch-agent-in-new-tab-host-agents.test.tssrc/renderer/src/lib/local-preflight-context-key.tssrc/renderer/src/lib/onboarding-folder-agent-launch.tssrc/renderer/src/lib/onboarding-folder-agent-startup.tssrc/renderer/src/runtime/host-structured-agents-sync.tssrc/renderer/src/runtime/host-structured-agents.test.tssrc/renderer/src/runtime/host-structured-agents.tssrc/renderer/src/store/repos/repo-add-actions.tssrc/renderer/src/store/slices/local-detected-agent-state.test.tssrc/renderer/src/store/slices/local-detected-agent-state.tssrc/renderer/src/store/slices/local-detected-agent-store-state.tssrc/renderer/src/store/slices/repos-onboarding-folder-startup.test.tssrc/shared/native-chat-agent-support.tssrc/shared/native-chat-appearance-settings.tssrc/shared/native-chat-providers.tssrc/shared/structured-native-chat-launch-route.ts
💤 Files with no reviewable changes: 8
- src/renderer/src/components/settings/NativeChatSupportedAgents.tsx
- src/renderer/src/components/settings/NativeChatExperimentalSetting.tsx
- src/renderer/src/components/settings/NativeChatSupportedAgents.test.tsx
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/fr.json
- src/renderer/src/i18n/locales/ko.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.







































ELI5
With Chat UI on, every agent Orca can open as a chat opens as one, and you can't change that per agent. If you want Grok in its terminal but Claude as a chat, there's no way to say so. This adds a Providers list to Settings → Chat with an on/off switch for each agent Orca can open as a chat. Turn one off and that agent opens in its terminal, as it would with Chat UI off. Leave it alone and nothing changes from today.
What Changed
orcaCLI, orchestration workers, and phone launches relayed through this desktop.Mechanism
nativeChatProviders(agent → on/off). It holds only the choices the user made.isNativeChatDefaultFor(settings, agent)inshared/structured-native-chat-launch-route.ts, is Chat UI on && (saved choice ?? on). The renderer's route (resolveAgentLaunchRoute) and the host's launch mode (decideAgentLaunchMode, used by the CLI, orchestration and phone launches) both read it. No launch waits on detecting which agents are installed.isNativeChatProviderDisplayedOn). It uses this computer's own install list, so it no longer flips when you switch between a native and a WSL project.nativeChatDefault). That stamp is now per agent, in the same boolean field, so older servers read it unchanged.Why
Next: #29074 updates the + menu to match. It marks rows that open a terminal "(CLI)", shows turned-on chats that can't run on the workspace's machine as disabled with the reason, and adds a side menu to open a chat agent's CLI instead.
Linked Issue
N/A (maintainer).
Visual Proof
Real Electron comparison on macOS covered main 702ffc7 versus c71e260, including off/on launches and replies, empty workspace, setup/default tabs and command-line creation. Windows native/WSL inventory and routing were tested on 0564e02. Full evidence, actual tested commits and pre-existing failures are in the review status comment. Focused M4Air QA on final head ec26393 passed rapid switches, immediate refresh after a click, restart persistence, injected failed-refresh retention, terminal/chat launches and Chat UI off/on, with real Claude replies. Main has no Providers controls for the switch cases. Main also retained its list under the injected failure, so the native/WSL mismatch regression is established by the lifecycle test rather than this rig. Cold detection failure remains deferred in STA-10901. Both builds showed pre-existing restart/coachmark overlays; a stale accessible working label is also pre-existing in unchanged source (STA-10926). The complete report, limits and final-head screenshots are in the review status comment.
Final-head provider choices after restart:
Main → branch, Claude chat reply:
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Routing: an unchosen agent opens as a chat even with an empty install list; a saved off opens a terminal; a saved on opens a chat.
Host: an orchestration worker for an agent switched off starts in a terminal; reusing a running terminal for an unchosen agent doesn't wait on detection.
Settings: 38 tests passed across the three named files, including the actual rendered switch under delayed saves/inventory changes, native cache retention after a WSL context and failed refresh, and legacy context settlement. The greyed Agents-disabled state remains covered.
New folder or workspace start commands are quoted for the machine that runs them.
Exact-head full PR workflow 38988663509 passed: lint/typecheck, five test shards, relay integration, wire compatibility and macOS/Windows packaging. Readiness and independent round-5 review are complete.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)