Skip to content

Put Chat UI in the existing Chat settings section - #22934

Closed
brennanb2025 wants to merge 18 commits into
brennanb2025/structured-chat-defaultfrom
brennanb2025/native-chat-settings-pane
Closed

brennanb2025 wants to merge 18 commits into
brennanb2025/structured-chat-defaultfrom
brennanb2025/native-chat-settings-pane

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​514 $\color{#cf222e}{\Huge{\mathbf{−}}}$​321 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​193
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​533 $\color{#cf222e}{\Huge{\mathbf{−}}}$​496 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37

ELI5

Held as a draft for the later regular-settings rollout. Today only #22933 ships: Chat UI remains under Experimental while supported new chats default to structured.

The switch that turns on Chat UI (agents opening as a chat view instead of a terminal) was hidden under Settings → Experimental. The Chat section, where the chat appearance and chat naming controls already live, was hidden entirely until you had opted in. So the one place a user would look for "turn on chat" didn't exist yet. Now Settings → Interface → Chat is always there, and it holds a single Chat UI switch next to the existing chat controls.

What Changed

Before: With Chat UI off, Settings had no Chat section at all, so appearance and naming were unreachable. The Chat UI switch sat under Experimental, alongside a separate default-view choice that suggested there were two decisions to make.

After:

  • Settings → Interface → Chat is always shown, including on a new profile with Chat UI off.
  • At the top is one Chat UI switch. On: new launches of agents that support chat open as a chat. Off: new agents open in the terminal. Chats you already have stay open either way.
  • Appearance, chat naming (with its "discard unsaved changes?" prompt), and inline visuals stay editable while Chat UI is off.
  • The desktop-only options are shown on the desktop when Chat UI is on or this machine still holds chats:
    • queueing follow-ups (only when the host supports it)
    • resume after restart
    • shell environment
  • Experimental no longer has a Chat UI row, and there is no default-view selector anywhere.
  • A browser paired to a desktop sees only Appearance in the Chat section: no Chat UI switch and no desktop-only options. The browser can't open chats or change the desktop's settings, so those controls could never take effect there.
  • Settings search returns exactly the rows on screen. Search for "agent", "chat", or an agent name (Grok, OMP, OpenCode, Codex, Claude) and you land on Chat UI. Search never lists a row that is hidden.
  • The restart dialog, the settings reference, and the Chat UI guide now point to Settings → Chat. The hardcoded list of supported agents beside the switch is removed, because which agents can chat depends on the host. The shell environment copy now says it applies to every chat agent, not only Codex and Claude.

Mechanism: One list of Chat UI rows drives both the rendered rows and their search entries (getChatUiSearchEntries). A small hook, useChatUiRowConditions, supplies the conditions that list needs. The Settings page and the search index both read that list, so the two can't drift apart. The "Chat UI on, or chats held on this machine" rule reuses the existing useLocalStructuredChatsInUse instead of a second copy of the same check.

Why

The existing Chat section already owns appearance, naming, its search targets, and the unsaved-changes guard, so extending it keeps all of that. A second Chat page would give users two destinations. A default-view selector would suggest a second choice after the Chat UI switch, but the launch policy in #22933 has only one choice.

How this differs from the common pattern, each intended:

  • Settings row instead of a toggle in the launch dialog. The user asked for the switch in Settings. It is a standing preference for future launches, not a choice made per launch.
  • No static list of supported agents. Chat support is reported by the host that runs the agent and varies from host to host, so a fixed list would be wrong on some hosts.
  • Desktop-only rows hidden in the browser, not shown disabled. The browser has no way to write the desktop's settings or open chats. A disabled control with nothing behind it would only confuse.

Linked Issue

Direct product request; no issue. Depends on #22933 (merge it first; this PR is based on it).

This PR and #26540 must first ship together in the future graduation update. #22933 can ship earlier on its own while Chat UI remains Experimental. At the later graduation, #26540 permanently records which profiles have the Experimental setting on before regular opt-ins become possible, then limits the upgrade tip to that audience. Shipping this regular-settings move before the snapshot would lose that distinction. The current Chat UI setting remains user-controlled. #26336, already merged, supplies the sidebar action described by the tip.

Visual Proof

Screenshots of the hidden test app, taken over its debugging connection on macOS (M4Air). A non-Claude test agent (Codex gpt-5.6-terra) drove the UI; it never used the desktop. Every image is labelled with the commit it was taken on.

Final app code, 6f24254. The final head 6c9e1d4 only adds two parent test-file changes.

Chat UI off (default) Chat UI on
Chat section with the Chat UI switch off, Appearance below Chat UI on; resume-after-restart and shell-environment rows appear

Ordinary agent launch, 6f24254. The launch used New tab → Claude, with a stand-in script in place of the real CLI.

Chat UI off → terminal tab Chat UI on → chat tab
Chat UI off: Claude opens as a terminal tab Chat UI on: Claude opens as a chat tab

The chat tab's "stopped before it finished starting" notice is expected: the stand-in is not a real agent.

First full pass on d7aa079 (same settings code as the final head)
Experimental has no Chat UI row Search "grok" finds Chat UI Search "queue" finds nothing hidden
Experimental without a Chat row grok finds Chat UI queue: no settings found
Unsaved chat-name changes still prompt Spanish strings restored Paired browser: Appearance only
discard prompt Spanish resume row web Chat section: Appearance only

Also passed on this pass:

  • S1 off, with the sidebar showing Chat: shot
  • Search "chat ui": shot
  • Unsaved chat-name draft kept after the switch is toggled: shot
  • Browser search "chat ui" finds nothing: shot

The resume-on-restart tip dialog was not exercised because the fixture had no working chats.

Testing

  • I manually tested these changes locally (rendered app on macOS, test agent driving the UI over its debugging connection)

  • Automated tests added/updated, or explained why not below

  • macOS rendered app, M4Air: the screenshots above. Windows and Linux were not run as rendered apps. The change is renderer-only, with no paths, shells or shortcuts.

  • Final head 6c9e1d4 (merges the parent's test-only 1b24297):

    • terminal-pane-store-subscription-budget.test.tsx and terminal-chat-ownership-lifecycle.test.tsx passed 11/11. The budget file is the only file that changed since b7deff8.
    • A fresh pnpm tc:web passed.
    • orca-ci-checks --no-typecheck passed 22/22.
  • b7deff8:

    • pnpm tc:web passed.
    • agent-launch-caller-permissions.test.ts passed 60/60. This is the only file that changed since 6f24254.
    • orca-ci-checks --no-typecheck passed 22/22.
  • 6f24254 (the merge of the parent's final code):

    • tc:web and tc:node passed.
    • orca-ci-checks passed 23/23, including the typecheck.
    • One test run over 85 files covered this PR's tests plus every test file the parent added or changed. 1341 of 1342 tests passed.
    • The one failure came from the parent and was fixed there (9ec1966, merged here).
    • orca-runtime.test.ts did not load on this machine because its Bun is older than the repo's pinned version. The parent coordinator reports it passes on the pinned Bun and under Node.
  • The last observed CI snapshot on the final head is 20 successful checks and 18 skipped, with no failures; CI was not waited on.

AI Disclosure

Review

Adversarial review in two rounds by fresh read-only reviewers, plus an architecture challenger who sketched a solution from the request alone. No release-blocking findings. The fixes are summarised in the PR comment.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • No remote wire field, host-published content, or phone setting changes. A paired client reads the same capabilities as before.
  • SSH and remote hosts: the desktop-only rows describe the desktop that is running the settings window. The queue row still asks the local host whether it supports queueing, exactly as before.
  • Mobile keeps its own phone-side "Default view" preference. This PR does not touch it.
  • Chat UI stays off by default. Turning it off never closes existing chats.

Author: @BrennanKB5

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Chat UI leaves Settings > Experimental for a Chat UI pane under AI
Capabilities, after Agents. It stays off by default and keeps the
persisted experimentalNativeChat key, so existing choices carry over.

Each row (Chat UI, Default view, resume after restart, shell
environment) is its own searchable setting. The resume and shell rows
show whenever the default view is Chat UI, and are hidden on paired web
clients, where they would only write browser storage the host never
reads. Copy drops the experimental/preview wording under new keys;
unchanged strings move with their translations.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

  • New Chat UI pane: ChatPane.tsx replaces NativeChatExperimentalSetting.tsx, rendering the on/off switch plus the Default view, resume, and shell-environment child rows under a new chat settings section.
  • New search index: chat-search.ts exposes one searchable entry per row and filters the two host-owned rows for web clients; the Experimental search entry and ExperimentalPane row are removed.
  • Navigation + routing: chat added to the capabilities group and SETTINGS_NAV_TARGETS; renderChatSettingsSection wired into settings-page-renderer.tsx.
  • i18n: ChatPane / chat.search namespaces replace the Experimental ones across en/es/fr/ja/ko/zh, plus the resume-dialog hint rename to dontAskAgainSettingsHint.
  • Docs: Chat UI moved out of Experimental in settings.mdx and native-chat.mdx.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/renderer/src/i18n/locales/es.json Outdated
"defaultCopy": "Elige cómo se abren las nuevas pestañas de terminal de agentes compatibles.",
"defaultViewLabel": "Vista predeterminada de Chat UI",
"defaultViewTerminal": "Chat en terminal",
"defaultViewNative": "Chat UI",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

es is the only locale missing these four ChatPane keys — structuredScopeLocalOnly, resumeTitle, resumeCopy, and resumeToggleLabel. fr, ja, ko, and zh all carry them under ChatPane, so Spanish falls back to English for the resume row and the local-only note. They were also absent from the old es ExperimentalPane.nativeChat, so this is not a regression — but since the namespace is being renamed here anyway, it's worth closing the gap and reusing the fr wording.

… rows it reveals

Searching "resume" or "variables" with Default view set to Terminal chat left only the
already-on Chat UI switch visible, with no way to reveal the matching row without clearing
the search.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — re-reviewed the one commit since pullfrog's prior review (381b5799b3 → c0e6eb0c41); it touches only ChatPane.tsx and ChatPane.test.tsx.

  • Search-gated Default view: ChatPane now subscribes to settingsSearchQuery and passes forceVisible to the Default view row when the query matches either host-owned structured entry, so a search for "resume" or "variables" no longer lands on a section whose only matching row is hidden behind a non-matching Default view.
  • Web gate reuse: extracted hostOwnedRowsAvailable from the web-client check and reused it for both showStructuredRows and the new search-match condition, keeping paired web clients from forcing the row.
  • Test correction and coverage: the existing structured-row search case now expects Default view visible, plus two added cases for the Terminal-chat default and a non-matching query.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Both settings apply to every chat open in Chat UI, and the resume dialog
points users here to undo "Don't ask again". Hiding them under Terminal
chat left that switch unreachable, and needed a search special case to
keep Default view visible; neither is needed now.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — no new actionable findings in this commit.

Reviewed changes — re-reviewed the one commit since the prior pullfrog review (c0e6eb0c41 → 9516a45e25); it touches ChatPane.tsx, ChatPane.test.tsx, and the settings docs.

  • Resume and shell rows decoupled from Default view: ChatPane now renders both whenever Chat UI is on and the window is not a paired web client, so a Terminal-chat default no longer hides settings that still apply to open Chat UI tabs.
  • Gating simplified: the structuredRowSearchMatch helper and the forceVisible prop on the Default view row were removed now that the host-owned rows are unconditionally visible; SearchableSetting matches each row on its own search entry, and chat-ui keeps forceVisible.
  • Tests and docs aligned: the shell/resume visibility matrix and the search cases were updated to the new behavior, and settings.mdx now says those rows are shown "while Chat UI is on".

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@brennanb2025 brennanb2025 changed the title feat(settings): give Chat UI its own settings page Put Chat UI in the existing Chat settings section Oct 8, 2026
The Chat page decided which Chat UI rows to show in one place and what
Settings search indexed in another, and the two had drifted: a paired web
client showed a Chat UI switch that cannot open chats there, and Queue
follow-ups was searchable on hosts where the row never renders.

getChatUiSearchEntries now takes the live conditions (web client, chats in
use on this machine, host queues follow-ups) and the page renders exactly
the rows that index lists. The web client gets no Chat UI rows; Queue
follow-ups appears, in the page and in search, only once this machine's
runtime says it queues follow-ups.
Moving the Chat UI rows to the Chat page dropped the Spanish resume-row
copy and Chat search keywords, so Spanish users saw English there, and it
dropped grok and omp as search words, so searching an agent's name no
longer found Chat UI. The Spanish strings and the agent names (plus
opencode, also a chat agent) are back, and a locale test checks every
language keeps them.
NativeChatSupportedAgents lost its last caller when Chat UI moved to the
Chat page; only its own test imported it. The component, its test, and
its strings in every locale are gone.
The shell environment row said only Codex and Claude chats inherit the
login shell's variables, but every chat agent starts with them. It now
says "Chats start with every variable...", in every language. Also drops
a duplicate 'chat' from the Settings navigation target list.
The Chat settings page now always shows, but the sidebar test still
expected it hidden with Chat UI off.
@brennanb2025

brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Held as a draft for later. #22933 can ship today with the on/off switch still in Experimental. This PR’s regular-settings move is deferred.

Review and QA summary (final head 6c9e1d4)

Problem: Settings → Interface → Chat (where chat appearance and naming live) was hidden until you had opted in to Chat UI, and the switch to opt in sat under Experimental, so the place you'd look for "turn on chat" didn't exist yet.

What changes for you:

  • Settings → Chat is always there, with a single Chat UI switch at the top.
  • Off (the default): new agents open in a terminal.
  • On: agents that support chat open as a chat.
  • Appearance, naming and inline visuals stay editable either way.
  • Experimental no longer has a Chat UI row, and there is no default-view selector.

Review. Two adversarial rounds plus an architecture challenger, all with fresh read-only reviewers. No release blocker (nothing at P0 or P1). Fixed in this PR:

  • P2 – Chat UI switch shown in a paired browser. The switch was shown there, where it can never take effect: the browser doesn't open chats or write the desktop's settings. The browser now shows only Appearance in the Chat section.
  • P2 – phantom "Queue follow-ups" search result. Settings search listed it on every desktop even though the row is hidden, so the result led to an empty gap. The rows and their search entries now come from one list, so search only finds rows that are on screen.
  • P2 – Spanish strings dropped. The resume-after-restart strings and Spanish search keywords had been dropped; they are restored, with a test that checks every language.
  • P2 – stale sidebar test. A sidebar test still expected the Chat page to hide when Chat UI was off; it now expects Chat to be shown either way.
  • P3 fixes:
    • Searching for Grok, OMP or OpenCode finds Chat UI again.
    • The "Chat UI on, or chats still open on this machine" check reuses the existing one instead of a second copy.
    • The unused supported-agents list is removed.
    • The shell-environment text now says it applies to every chat agent, not just Codex and Claude.

Deferred (minor, not fixed here):

  • The docs line "there is no default view selector" is internal wording.
  • The Chat UI description says "Unsupported launches use the terminal"; plainer wording would help.
  • In a paired browser the section description still says "Choose how new agents open", but there is no switch there.
  • One leftover entry in the CI timing table.
  • A duplicate entry in the settings navigation type union.
  • The phone app keeps its own phone-side "Default view" preference. That is outside this PR.

How this differs from the common pattern, all intended:

  • The switch is a Settings row rather than a launch-dialog toggle, because it was requested in Settings.
  • There is no fixed list of supported agents, because support depends on the host.
  • Desktop-only rows are hidden in the browser rather than shown disabled, because nothing behind them could work there.

Verified:

  • Rendered app, macOS (M4Air). The planned settings checks passed on d7aa079, followed by the final settings and launch smoke on 6f24254, which is the final app code. The unexercised rows are listed below. Screenshots are in the PR body. Launching an agent with Chat UI off opened a terminal tab; with it on, a chat tab.
  • 6f24254:
    • Web and node typechecks passed.
    • The CI static checks passed 23/23.
    • One test run covered this PR's tests plus every test file the parent added or changed (85 files): 83 files passed, 2 failed.
      • orca-runtime.test.ts failed to load (No such built-in module: node:sqlite) because this laptop has Bun 1.3.14, while the repo pins 1.4.2. It passes on the pinned Bun and under Node.
      • One stale assertion in the parent's agent-launch-caller-permissions.test.ts (1 of 1342 tests). It was fixed in the parent (9ec1966) and merged here.
  • b7deff8: the changed test file passed 60/60, the web typecheck passed, and the static checks passed 22/22.
  • 6c9e1d4 (final head): this only merges the parent's 1b24297, a test-only change that sets the terminal pane's store-listener budget to the measured 15. The budget test and the terminal chat-ownership lifecycle test passed 11/11 (4 and 7), a fresh web typecheck passed, and the static checks passed 22/22.

Not verified:

  • The rendered app on Windows, Linux, WSL, an SSH remote or the phone app. The change is settings UI only, with no paths, shells, shortcuts or remote calls. A paired browser was checked: it shows Appearance only.
  • A real signed-in agent. The launch check used stand-in agents.
  • The resume-on-restart tip dialog: the fixture had no working chats.
  • The Chat UI off + explicit-resume row for an old chat: there was no saved old chat to test with.
  • The last observed CI snapshot on 6c9e1d4 is 20 successful checks and 18 skipped, with no failures; CI was not waited on.

Release:

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing as superseded: a merged PR already covers this change. Merged #28050 (edd8084, 10-12) moved the Chat UI settings from Experimental to the Chat page (ChatBehaviorSetting/ChatSettingsSection), and #29071 (251516d) added the per-agent chat list; base #22933 merged. The PR's deleted files are already gone on

(Stale-PR cleanup 2026-10-20, approved by Brennan. Reopen if something here is still missing on main.)

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