Skip to content

Make Cmd-P search tab titles by default - #3888

Closed
austinywang wants to merge 18 commits into
mainfrom
issue-3724-go-to-tab-palette
Closed

austinywang wants to merge 18 commits into
mainfrom
issue-3724-go-to-tab-palette

Conversation

@austinywang

@austinywang austinywang commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Enable Cmd-P switcher searches to include tab/panel surface titles by default
  • Keep the existing setting as an opt-out for workspace-only search
  • Add unit coverage for the default switcher surface-search behavior

Testing

  • git diff --check
  • Local tests/build not run per instruction; CI will run them

Closes #3724


Note

Medium Risk
Changes the default command-palette switcher search scope, which may affect user expectations and result ordering, but is limited to UI/search behavior with opt-out preserved.

Overview
Cmd-P’s switcher now includes tab titles in search by default by flipping CommandPaletteSwitcherSearchSettings.defaultSearchAllSurfaces to true, while keeping the existing commandPalette.switcherSearchAllSurfaces setting as an opt-out.

UI/UX text is updated throughout to reflect “tabs” terminology (placeholders/empty states, settings label/subtitle, and the File menu item now reading “Go to Workspace or Tab…”), including refreshed localization entries and settings-search aliases.

Adds unit tests covering the new default behavior, explicit opt-out, and that tab-title queries rank/select the expected tab entry.

Reviewed by Cursor Bugbot for commit 3631ab0. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Cmd‑P now searches tab titles by default in the switcher, so you can jump to tabs without a separate palette (fixes #3724).
Keeps commandPalette.switcherSearchAllSurfaces as an opt‑out; renames the menu to “Go to Workspace or Tab…”, updates placeholders/empty states, and the setting label to “Command Palette Searches Tabs”; completes translations across supported locales and refreshes search aliases; adds tests for the default, explicit opt‑out, and tab‑title ranking; includes sidebar tools in results.

Written for commit 3631ab0. Summary will update on new commits.

Summary by CodeRabbit

  • Changes

    • Command Palette now searches tabs by default alongside workspaces.
    • Updated UI terminology: "surfaces" replaced with "tabs" throughout the interface.
    • "Go to Workspace..." menu item renamed to "Go to Workspace or Tab..."
  • Tests

    • Added tests for Command Palette search behavior with updated default settings.

Review Change Stack

Cmd-P already uses a shared switcher corpus and TabManager focus path for workspace and surface rows. The missing capability was policy: surface rows were only indexed after users discovered and enabled an opt-in setting. This changes the default so non-empty switcher queries include tab/panel surface rows while preserving the setting as an explicit opt-out.

Constraint: Do not add a parallel go-to-tab mode when the existing switcher/focus owner already handles surface targets.

Rejected: Add a separate tab palette | duplicates command palette search, ranking, and focus routing.

Confidence: high

Scope-risk: narrow

Directive: Keep Cmd-P tab navigation on the shared switcher corpus and TabManager.focusTab(surfaceId:) path.

Tested: git diff --check

Not-tested: Local tests/build not run per instruction; CI will run tests.
@vercel

vercel Bot commented May 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment May 15, 2026 0:33am
cmux-staging Building Building Preview, Comment May 15, 2026 0:33am

@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR updates command palette search UI terminology by replacing "surfaces" with "tabs" across all localized strings and source code, and enables searching all surfaces by default by flipping a static boolean default from false to true.

Changes

Command Palette Terminology and Default Search Scope

Layer / File(s) Summary
Localization string updates (surfaces → tabs)
Resources/Localizable.xcstrings
Updated localized UI strings across en/ja/uk/ko to replace "surfaces" with "tabs" in command palette search messages, switcher placeholder text, keyboard shortcut action label, settings description, help text, and searchable keywords.
Source code UI string updates (surfaces → tabs)
Sources/ContentView.swift, Sources/KeyboardShortcutSettings.swift, Sources/SettingsNavigation.swift, Sources/SettingsSearchAliases.swift, Sources/cmuxApp.swift
Updated default text and label references in source files to match new "tabs" terminology for switcher messages, keyboard shortcut label, settings search entry, search alias keywords, and menu item text.
Default search scope and Settings UI toggle
Sources/cmuxApp.swift
Changed CommandPaletteSwitcherSearchSettings.defaultSearchAllSurfaces from false to true to enable searching all surfaces by default. Updated Settings toggle row title and subtitles from "All Surfaces" to "Tabs" terminology.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • manaflow-ai/cmux#1382: Introduces the same command-palette "all-surfaces" toggle/setting and localized UI strings that this PR updates terminology for.
  • manaflow-ai/cmux#989: Extends the search engine test suite that validates command palette matching mechanics related to the new default search behavior.

Poem

🐰 Surfaces become tabs, the search now sees the light,
Default scopes expanded, finding every sight,
Locale by locale, words are reborn,
From "All Surfaces" to "Tabs" at dawn.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Cmux Swift Actor Isolation ❓ Inconclusive No result was produced after verification. Marking as INCONCLUSIVE. Re-run the check or adjust instructions to produce a final result.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: enabling Cmd-P to search tab titles by default.
Linked Issues check ✅ Passed The PR fully addresses the linked issue #3724 requirements: enables Cmd-P to find tab titles, includes tab-title search globally without a separate palette, and improves tab discoverability.
Out of Scope Changes check ✅ Passed All changes are within scope: UI text updates reflect the tab-search functionality, default behavior changes are necessary for the feature, and unit tests validate the new behavior.
Cmux Swift Blocking Runtime ✅ Passed PR introduces no blocking/timing-based synchronization patterns. Production changes are a boolean assignment and UI strings only. Test additions use deterministic scaffolding.
Cmux No Hacky Sleeps ✅ Passed PR only modifies Swift code and localization files. Check applies to TypeScript, JavaScript, shell, and build scripts only. Swift is explicitly excluded.
Cmux Swift Concurrency ✅ Passed PR introduces no legacy async patterns. Changes are UI text updates, default value changes, and synchronous test additions only.
Cmux Swift @Concurrent ✅ Passed PR contains text updates and a boolean constant change. No new async functions or @concurrent annotations. Three synchronous test methods added. No Swift 6 concurrent rules violated.
Cmux Swift File And Package Boundaries ✅ Passed Incidental changes to existing oversized files (2-5 lines of UI strings/config). No new oversized files, no large additions, no mixed responsibilities, appropriate test coverage.
Cmux Swift Logging ✅ Passed PR introduces no new or materially changed logging statements that would violate swift-logging.md rules. Changes are UI text, settings defaults, and tests only.
Cmux User-Facing Error Privacy ✅ Passed PR is exempt from user-facing error privacy rules. It only modifies UI labels, settings descriptions, and tests—not error messages, alerts, command output, or API error bodies.
Cmux Swiftui State Layout ✅ Passed No state layout violations found. Changes are localization/default values only. @AppStorage pattern used correctly with no new ObservableObject or store refs in lazy lists.
Cmux Architecture Rethink ✅ Passed PR updates UI text, changes default boolean value, and adds tests. No new timing patterns, locks, observers, or split lifecycle ownership. Pre-existing architectural patterns unchanged.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed No window/panel code added or modified. Changes are localization strings, UI text, default settings, and tests only.
Description check ✅ Passed The pull request description includes a clear Summary section and Testing section with git diff check performed, though it omits the Demo Video, Review Trigger, and most Checklist items from the template.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-3724-go-to-tab-palette

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Merging latest origin/main avoids CI running the Cmd-P default change against stale IME and terminal focus updates already landed on the base branch. No conflict resolution was needed; this commit only records the upstream merge.

Constraint: Iterate-PR workflow requires syncing the latest base before CI/feedback iteration.

Confidence: high

Scope-risk: narrow

Directive: Treat this as a base-sync merge; feature behavior remains in the preceding commit.

Tested: merge completed without conflicts

Not-tested: Local tests/build not run per instruction; CI will run tests.
@greptile-apps

greptile-apps Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Flips CommandPaletteSwitcherSearchSettings.defaultSearchAllSurfaces from false to true so Cmd-P searches tab titles by default, while retaining the existing commandPalette.switcherSearchAllSurfaces UserDefaults key as an explicit opt-out for workspace-only search.

  • All user-facing copy is updated from "surfaces" to "tabs/tab titles" across the menu item, command-palette placeholder, empty-state, settings label, subtitle, and keyboard-shortcut settings.
  • Localizable.xcstrings expands the previously 4-locale empty-state and placeholder strings to 15+ locales while updating all existing locales for the menu item rename.
  • Three new unit tests cover the new default, the explicit opt-out path, and tab-title match ranking via the search engine.

Confidence Score: 5/5

Safe to merge — the change is a single default-value flip backed by thorough localization updates and three well-isolated unit tests.

The default flip from false to true is the only behavioral change; existing users who explicitly stored false are unaffected, and the new default is consistent across the settings UI, menu item, placeholder/empty-state copy, and search-alias index. No actor isolation, blocking-runtime, or SwiftUI state concerns are introduced. The new tests use isolated UserDefaults suites and verify the default path, explicit opt-out, and tab-title ranking end-to-end.

No files require special attention.

Important Files Changed

Filename Overview
Sources/cmuxApp.swift Flips defaultSearchAllSurfaces from false to true, updates the settings UI subtitle for the "on" state, and renames the menu item to "Go to Workspace or Tab…"
cmuxTests/CommandPaletteSearchEngineTests.swift Adds three new tests: default-on behavior with isolated UserDefaults, explicit opt-out, and tab-title match ranking; existing coverage unchanged and still valid
Resources/Localizable.xcstrings Expands the empty-state and placeholder switcher strings from 4 to 15+ locales (surfaces→tabs), updates the Go-to-Workspace menu item in all existing locales, and revises the setting label and subtitle strings
Sources/ContentView.swift Updates the defaultValue fallback strings in the switcher placeholder and empty-state helpers to say "tabs" instead of "surfaces"
Sources/KeyboardShortcutSettings.swift Renames .goToWorkspace label to "Go to Workspace or Tab…", consistent with the menu-item and xcstrings updates
Sources/SettingsNavigation.swift Updates the settings-search index entry for the palette toggle: refreshed display string and keyword aliases (tabs/tab titles replacing surfaces)
Sources/SettingsSearchAliases.swift Refreshes the app:palette-search-all alias from "all surfaces" to "tabs/tab titles" to keep settings-search discovery accurate
Sources/CommandPalette/CommandPaletteSettingsToggle.swift Updates the toggle command's title default value and keyword list (surfaces→tabs) to match the new feature description

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens Cmd-P Switcher] --> B{searchAllSurfacesEnabled?}
    B -- "key absent (new default: true)" --> C[includesSurfaces = true]
    B -- "key = true (explicit opt-in)" --> C
    B -- "key = false (explicit opt-out)" --> D[includesSurfaces = false]
    C --> E[Search workspaces + tab titles]
    D --> F[Search workspaces only]
    E --> G["Placeholder: 'Search workspaces and tabs'"]
    F --> H["Placeholder: 'Search workspaces'"]
    E --> I["Empty state: 'No workspaces or tabs match…'"]
    F --> J["Empty state: 'No workspaces match…'"]
Loading

Reviews (13): Last reviewed commit: "fix: complete tab search localization" | Re-trigger Greptile

Comment thread Resources/Localizable.xcstrings
Comment thread Resources/Localizable.xcstrings Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 24037ad. Configure here.

Comment thread Sources/cmuxApp.swift
Comment thread Sources/cmuxApp.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Resources/Localizable.xcstrings`:
- Around line 42790-42874: The ellipsis usage is inconsistent: in the string
unit values for locales zh-Hans, zh-Hant, fr, ru, and th the stringUnit.value
uses three ASCII periods ("...") instead of the single Unicode ellipsis
(U+2026). Update those stringUnit.value entries (the translated values for
zh-Hans, zh-Hant, fr, ru, th) to replace the three periods with the single
ellipsis character “…”, and verify other locales’ stringUnit.value entries
remain unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 75e3d327-879d-41be-8a5f-bea78908615f

📥 Commits

Reviewing files that changed from the base of the PR and between f08f1a2 and 24037ad.

📒 Files selected for processing (6)
  • Resources/Localizable.xcstrings
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/SettingsNavigation.swift
  • Sources/SettingsSearchAliases.swift
  • Sources/cmuxApp.swift

Comment thread Resources/Localizable.xcstrings Outdated

This branch was successfully deployed

1 active deployment
Preview – cmux — 3631ab04 Deployed May 15, 2026 by vercel[bot]
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.

"Go to tab" capability?

2 participants