cmux NEXT New Tab: open, ask or search from what you type, no switch
In progress: waiting for #22674 to land, a fresh review of head 2e197a76 and CI.
Summary
Leo (2026-10-20): no mode toggle on the cmux NEXT New Tab. You type and press Return.
- New pure classifier
omniboxAction(text, { home })inwebviews/src/agent-session/acpmux/omniboxAction.ts, built on the existing URL resolver (classifyNewTabInput, which the Swift side shares):- open: a scheme, a domain with a TLD,
localhost:port, an IP, an intranetgo/x, a file path (/…,~/…). - ask: a
?, a leading question or instruction word (what/how/why/can…, fix/write/explain/refactor…), a verb and its object ("open the voice settings"), several sentences or lines, a clause break in a longer sentence, inline code, or 10+ words. Words that are often nouns or names ("test", "will", "my", "design") count only with two more words after them, so "test cricket" and "will smith" stay searches. - search: anything else.
- open: a scheme, a domain with a TLD,
screenRowsputs the classifier's pick first, and that row is the one Return takes: "Ask Claude Code" (the composer's current agent, on the chip's model), "Search the web for …", or the address. The other action is the next row down, so Down, Tab or a click picks it when the guess is wrong.- Removed the Search | Ask switch, its "Tab to switch" hint, Tab-to-flip, the Search placeholder,
ScreenMode, its CSS and its 5 strings. Tab now steps through the open suggestions, as in Chrome; Shift-Tab still leaves the field. - A question with no agent installed searches the web on Return (it used to do nothing).
Takes back #21817: Leo 2026-10-20 wants no Search | Ask toggle; the field decides, and the other action is one row down.
Takes back #21419: the animation of that same switch, removed with it.
Coordination: #22674 (newtab-minimal) wraps the switch in a modeSwitch widget. I asked that lane to drop the widget. Whichever PR lands second removes it. I won't push to #22674.
Testing
bun test test/omnibox-action.test.ts: a 61-row table covering URLs, hosts, paths, questions, commands and plain keywords, plus first-row checks.bun test test/new-tab test/agent-pane-no-capsules test/omnibox test/gallery: 341 pass, 0 fail.scripts/web-lint.sh: 0 errors.vp checkstill exits 1 because of 2 base warnings inconversation/UserBubble.tsx, a file this PR does not touch.python3 scripts/cmux-next/prepush-gate.py: no new violations.
Observed / Not run
- Observed: the bun tests and lints above, run on cmux16.
- Not run: no Swift build (none needed: web only) and no gallery capture yet. The gallery states
typed-keywords,typed-questionandtemplate-cards-typedreplacetyped-search-mode,typed-ask-mode,empty-search-mode,typed-url-search-modeandtemplate-cards-search. - A full single-process
bun testrun shows failures from cross-file state in unrelated files (tooltips, markdown, pages). The New Tab ones pass when run on their own.
Localization: no new strings; 5 removed (newTab.mode.*, newTab.searchPlaceholder). The classifier's words are English; ? works in any language.
Follow-ups (left alone because they overlap #22674's hunks): stale "Search | Ask" comments in newtab/templates.ts, NewTabTemplateSetting.swift, AppServices.swift and NewTabTunables.swift.
Changelog
- Changed: New Tab picks open, ask or search from what you type, with no Search | Ask switch.
Agent session: cmux16
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Removes the Search | Ask switch from the cmux NEXT New Tab so typing and pressing Return picks the action automatically. A new pure classifier (omniboxAction, built on the existing URL resolver) reads the typed text: an address or path opens; a question or an instruction asks the composer's agent; anything else searches the web. Its pick is the first suggestion row and Return takes it; Down or Tab picks the other action for a miss.
Ambiguous lead words (can, should, test, will, my…) count as a request only with at least three more words, so "can opener", "find my iphone" and "build a bear" stay web searches; a pointing word after a known request lead ("make this faster", "move it up") or a request word followed by "the" ("run the tests", "tail the logs") asks from three words. Titles that open with a preposition or an article ("under the tuscan sun", "around the world in 80 days") stay searches. Tab steps the suggestions as in Chrome and, from the last row, moves focus on so the keyboard can leave the field. A question with no agent installed now searches the web on Return instead of doing nothing.
Removed with the switch
- Removes Tab-to-flip, the "Tab to switch" hint, the Search placeholder,
ScreenMode, and 5 localized strings.