You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: keep Chief Home out of the Option-digit routing suite's windows (main red) - #35296
Chief Home (#21287, 2026-10-20) is on by default (chief.enabled defaults to true). Each new main window's ContentView.onAppear calls ChiefHomeNavigation.restoreConversations → ensureHome, which adds a pinned Home workspace group and moves it to index 0.
Both failing tests do manager.addTab(select: false) and then manager.selectTab(at: 0), expecting index 0 to be the window's initial terminal workspace. Index 0 is now Chief Home, so:
the initial workspace's terminal is hidden and never takes first responder (isSurfaceViewFirstResponder() fails), and
Option+Down/Up move from Home, so the selection lands on the wrong workspaces (the CI log shows a third workspace id, Home, after Option+Up wraps).
The product behavior is intentional; the tests are stale. Assertions are unchanged.
Fix
The suite's withIsolatedShortcutRoutingState wrapper now disables Chief for the duration of each test and restores the prior value afterwards, the same pattern WorkspaceGroupNumberedSelectionTests already uses. The tests are about shortcut routing, not Chief Home.
Related: #27251 changes the same two tests' focus setup to focusTerminalForTesting as part of an unrelated feature; that does not change which workspace selectTab(at: 0) selects.
Testing
Focused app-host run of cmuxTests/AppDelegateOptionDigitShortcutRoutingTests on this head: link in a comment once complete.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes two failing tests in AppDelegateOptionDigitShortcutRoutingTests: Chief Home (on by default) adds a pinned Home workspace at index 0 of every new main window, so the tests' selectTab(at: 0) selected Home instead of the initial terminal workspace, breaking routing and focus assertions.
Disables Chief within the test suite's isolation wrapper and restores the prior setting afterward, matching the pattern WorkspaceGroupNumberedSelectionTests already uses. The import is scoped to ChiefCatalogSection so StoredShortcut stays unambiguous. Product behavior is intentional; test assertions are unchanged.
Written for commit 54e6501. Summary will update on new commits.
Summary by CodeRabbit
Tests
Improved shortcut-routing test isolation by ensuring the Chief Home setting does not affect test results. The setting is restored to its previous value after the tests run, or remains unset if it was unset before. These changes affect test reliability only and do not change user-facing behavior.
Chief Home (#21287, on by default)
adds a pinned Home workspace at index 0 of every new main window. Two tests
in AppDelegateOptionDigitShortcutRoutingTests select `selectTab(at: 0)` and
then expect the window's initial terminal workspace to be selected, so they
selected Home instead: the terminal never took first responder and the
Option+arrow/Option+digit routing assertions saw the wrong workspace.
Disable Chief in the suite's isolation wrapper, the same way
WorkspaceGroupNumberedSelectionTests does, and restore the setting after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewing files that changed from the base of the PR and between b2e391b and 54e6501.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The shortcut-routing test helper disables Chief Home while its tests run. It restores the previously persisted setting afterward, or removes the setting if it was not present.
Changes: Shortcut test isolation
Layer / File(s)
Summary
Chief Home setting setup and restoration cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift
The helper imports ChiefCatalogSection to access the Chief Home setting key. It disables Chief Home before running its body, then restores the previous persisted value or removes the setting if it was unset.
manaflow-ai/cmux#26929: Changes the same shortcut-routing test fixture to disable Chief and restore its prior persisted setting.
manaflow-ai/cmux#32585: Changes Chief availability and enablement, including Chief Home removal when Chief is disabled.
manaflow-ai/cmux#26602: Changes Chief Home removal and protection when chief.enabled is off.
Merge Risk: Minimal · previous review b2e39
The change keeps Chief Home out of shortcut-routing test windows and restores the previous setting afterward. No actionable merge-blocking risk is identified; the reported focused test run remains pending.
Pre-merge checks: 25
Check name
Status
Explanation
Title check
The title clearly identifies the main change: excluding Chief Home from the Option-digit shortcut-routing test windows to fix a main-branch test failure.
Description check
The description explains the failing tests, root cause, scope of the fix, restoration behavior, and related context. It includes a Testing section, but the focused test run is still pending and the Ch…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input
PASS. The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift: it adds a Chief Home import and temporary test-setting isolation. It does not change Cloud terminal creation, cm…
Cmux Swift Actor Isolation
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added code is test isolation and persistence cleanup inside an @MainActor test suite; it introduces no…
Cmux Swift Blocking Runtime
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added ChiefSettings.setEnabled(false, in:) call and defer restoration are deterministic test i…
Cmux Browser Automation Off-Main
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds Chief Home test-state isolation and does not add or route any browser.* socket command. `Sou…
Cmux Expensive Synchronous Load
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a test-only import and temporarily changes the Chief Home user-default setting. The diff does not ad…
Cmux Cache Substitution Correctness
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, which is test code, not production Swift, TypeScript, or JavaScript. The added logic temporarily write…
Cmux No Hacky Sleeps
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, a Swift test file. It adds Chief Home setting isolation and restoration; it does not add sleeps, timer…
Cmux Algorithmic Complexity
PASS: The only changed file is cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds test isolation and restoration for Chief Home plus a test-only import. It adds no production …
Cmux Swift Concurrency
The diff adds only a ChiefCatalogSection import and synchronous UserDefaults/defer state restoration in a test helper. It adds no Dispatch queues, Combine state, completion-handler API, or fire-…
Cmux Swift @Concurrent
PASS: The diff only adds a synchronous Chief setting guard and restoration inside withIsolatedShortcutRoutingState. The helper remains isolated by the enclosing @MainActor test type and runs throu…
Cmux Swift Package Boundaries
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds test isolation and a test-only ChiefCatalogSection import; it adds no production Swift featu…
Cmux Swiftpm Lockfiles
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a Swift import and test-state restoration logic. It does not change Package.swift, any `Pack…
Cmux Swift Logging
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, which is test code. The added import and Chief Home UserDefaults setup add no print, debugPrint, dump,…
Cmux User-Facing Error Privacy
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a test-only import and temporary ChiefSettings state handling inside the test isolation help…
Cmux Full Internationalization
PASS. The only changed file is cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds a test-only import, test-state setup and restoration, and developer comments. It adds no prod…
Cmux Swiftui State Layout
PASS. The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a CmuxSettings.ChiefCatalogSection import and test-scoped UserDefaults setup/cleanup. The diff adds …
Cmux Architecture Rethink
The diff adds a test-only Chief Home setting override inside the existing isolation helper. It uses ChiefSettings.setEnabled(false, in:) and restores or removes the prior UserDefaults value with `…
Cmux Swift Auxiliary Window Close Shortcuts
PASS: The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added code imports ChiefCatalogSection and temporarily changes the Chief setting. It does not add or mater…
Cmux Source Artifacts
The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, a hand-written test source file. The diff adds a scoped Chief Home test setting, restoration logic, and an explicit ty…
Cmux No Test Or Debug Seam In Production Source
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift; it changes no Swift file under a production Sources/ path. Therefore, the production test/debug seam…
Full details: Description check
Explanation
The description explains the failing tests, root cause, scope of the fix, restoration behavior, and related context. It includes a Testing section, but the focused test run is still pending and the Changelog, Proof, and Checklist sections are not included.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
Full details: Cmux Cloud Persistent Session And Early Input
Explanation
PASS. The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift: it adds a Chief Home import and temporary test-setting isolation. It does not change Cloud terminal creation, cmux-tui transport, manual renderers, PTY readiness, input routing, authentication, idempotency, revisions, or leases. No failure condition in the cloud persistent-session rule applies.
Full details: Cmux Swift Actor Isolation
Explanation
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added code is test isolation and persistence cleanup inside an @MainActor test suite; it introduces no production Swift changes. The custom check explicitly passes test changes.
Full details: Cmux Swift Blocking Runtime
Explanation
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added ChiefSettings.setEnabled(false, in:) call and defer restoration are deterministic test isolation scaffolding. The diff adds no semaphore, blocking wait, sleep, delayed dispatch, polling, main-queue sync, or manual lock. The blocking-runtime rule applies to non-test Swift files and explicitly allows test-only scaffolding.
Full details: Cmux Browser Automation Off-Main
Explanation
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds Chief Home test-state isolation and does not add or route any browser.* socket command. Sources/TerminalController.swift, the control-command policy, and policy tests are unchanged.
Full details: Cmux Expensive Synchronous Load
Explanation
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a test-only import and temporarily changes the Chief Home user-default setting. The diff does not add or move RestorableAgentSessionIndex.load(), agent-history stores, transcript or JSONL parsing, directory scans, or synchronous loads onto a production or interactive path.
Full details: Cmux Cache Substitution Correctness
Explanation
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, which is test code, not production Swift, TypeScript, or JavaScript. The added logic temporarily writes the Chief Home setting to UserDefaults and restores the original persisted value; it does not replace an authoritative read with a cache in a persistence, history, undo, or snapshot path. The cache-substitution rule therefore does not apply.
Full details: Cmux No Hacky Sleeps
Explanation
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, a Swift test file. It adds Chief Home setting isolation and restoration; it does not add sleeps, timers, polling, fixed delays, or wall-clock waits. The rule applies to non-Swift app/runtime changes and allows deterministic test scaffolding.
Full details: Cmux Algorithmic Complexity
Explanation
PASS: The only changed file is cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds test isolation and restoration for Chief Home plus a test-only import. It adds no production path, scalable-collection scan, batch rescan, sort/filter hot path, or data-store operation. The rule explicitly excludes test-only scaffolding.
Full details: Cmux Swift Concurrency
Explanation
The diff adds only a ChiefCatalogSection import and synchronous UserDefaults/defer state restoration in a test helper. It adds no Dispatch queues, Combine state, completion-handler API, or fire-and-forget Task. The synchronous ChiefSettings.setEnabled API is confirmed at Sources/ChiefSettingsBridge.swift:59-62, and the pattern matches existing test code.
Full details: Cmux Swift `@Concurrent`
Explanation
PASS: The diff only adds a synchronous Chief setting guard and restoration inside withIsolatedShortcutRoutingState. The helper remains isolated by the enclosing @MainActor test type and runs through AppContextSerialGate.withExclusiveAppContext, whose closure is also @MainActor. The diff introduces no nonisolated async, @concurrent, synchronous @concurrent, or CPU/file/network-heavy async work from UI isolation.
Full details: Cmux Swift Package Boundaries
Explanation
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds test isolation and a test-only ChiefCatalogSection import; it adds no production Swift feature logic. The package-boundary rule explicitly allows test code, so no violation is present.
Full details: Cmux Swiftpm Lockfiles
Explanation
PASS: The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a Swift import and test-state restoration logic. It does not change Package.swift, any Package.resolved, Xcode package references, .gitignore, workflows, or dependency pins. The SwiftPM lockfile policy is therefore not triggered.
Full details: Cmux Swift Logging
Explanation
The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, which is test code. The added import and Chief Home UserDefaults setup add no print, debugPrint, dump, NSLog, file/stdout diagnostics, Logger declaration, or sensitive-data logging. The logging rule does not require new logs for this test setup.
Full details: Cmux User-Facing Error Privacy
Explanation
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a test-only import and temporary ChiefSettings state handling inside the test isolation helper. The applicable rule explicitly allows tests, and the diff adds no user-facing errors, alerts, command output, API bodies, or recovery copy.
Full details: Cmux Full Internationalization
Explanation
PASS. The only changed file is cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The diff adds a test-only import, test-state setup and restoration, and developer comments. It adds no production UI text, localization key, string catalog entry, web message, API response, metadata, markdown, or changelog content. The internationalization rule explicitly allows tests and developer-only comments.
Full details: Cmux Swiftui State Layout
Explanation
PASS. The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. It adds a CmuxSettings.ChiefCatalogSection import and test-scoped UserDefaults setup/cleanup. The diff adds no SwiftUI view, ObservableObject/@Published state, geometry reader, lazy/list row store reference, or render-time state mutation.
Full details: Cmux Architecture Rethink
Explanation
The diff adds a test-only Chief Home setting override inside the existing isolation helper. It uses ChiefSettings.setEnabled(false, in:) and restores or removes the prior UserDefaults value with defer. It introduces no sleeps, delayed dispatch, polling, locks, observers, side channels, duplicate entrypoint wiring, or split UI lifecycle ownership. This is a small local correctness fix with a clear persisted-setting owner and restoration invariant.
Full details: Cmux Swift Auxiliary Window Close Shortcuts
Explanation
PASS: The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift. The added code imports ChiefCatalogSection and temporarily changes the Chief setting. It does not add or materially change standalone cmux-owned window code. The existing test fixture windows are explicitly allowed by the rule.
Full details: Cmux Source Artifacts
Explanation
The PR changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift, a hand-written test source file. The diff adds a scoped Chief Home test setting, restoration logic, and an explicit type import. It adds no logs, screenshots, recordings, temporary or cache directories, dependency checkouts, build output, or other source-control artifacts.
Full details: Cmux No Test Or Debug Seam In Production Source
Explanation
PASS. The pull request changes only cmuxTests/AppDelegateOptionDigitShortcutRoutingTests.swift; it changes no Swift file under a production Sources/ path. Therefore, the production test/debug seam condition does not apply.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
cmux status(one comment, edited in place; each line is updated by the job that owns it)
Not yours:SidebarNewLocalWorkspaceTests.swift:203, CloudMachinesHeaderCountTests.swift:25, CloudMachinesHeaderCountTests.swift:78 and 6 more also fails on main (#21127); merge main once it is fixed there.
also red on mainSidebarNewLocalWorkspaceTests.swift:203commandNWithoutAWindowKeepsTheInitialWorkspace(): Expectation failed: (context.tabManager.tabs.count → 2) == 1 (job)
also red on mainCloudMachinesHeaderCountTests.swift:25A capped plan shows used/limit in the My Devices count slot: Expectation failed: (count.help → "Running and paused machines count toward your plan’s machine limit.") == (Self.generi... (job)
also red on mainCloudMachinesHeaderCountTests.swift:78A paid plan at a ceiling warns without an upgrade prompt: Expectation failed: (count.help → "Running and paused machines count toward your plan’s machine limit.") == (Self.generi... (job)
also red on mainCloudMachinesHeaderCountTests.swift:130Hovering the header shows the plan's help: Expectation failed: (cell.toolTip → "Running and paused machines count toward your plan’s machine limit.") == (help → "M... (job)
also red on mainRemoteTmuxMirrorCloseDetachTests.swift:113socketCloseOfLiveLastMirrorDetachesWithoutKillingSession(): Expectation failed: (harness.manager.tabs.map(\.id) → [43C9C578-0269-46E0-AA5E-C635BE425000, B9FD6C45-2DBD-46F3-B300-529... (job)
also red on mainRemoteTmuxMirrorCloseDetachTests.swift:176explicitDetachOfDedicatedLastMirrorClosesOwningWindow(): Expectation failed: (harness.manager.tabs.map(\.id) → [1A714ECF-66ED-46E8-80EE-E66BF5688F29, B4909560-ADBE-41DA-A50C-EFC... (job)
also red on mainRemoteTmuxMirrorCloseDetachTests.swift:224consolidatingMirrorsClosesAWindowThatHeldNothingElse(): Expectation failed: (source.manager.tabs.map(\.id) → [DF41CF6E-9CB2-4B39-86D8-3785A1E6B38B, 13E8B857-3AAC-4E56-A250-D49B... (job)
also red on mainRemoteTmuxMirrorCloseDetachTests.swift:258consolidatingMirrorsKeepsAWindowWhoseDockHasPanels(): Expectation failed: (source.manager.tabs.map(\.id) → [D68AB87C-A479-4A04-AF91-138139EAD58B, 5B2CF2B8-1FF5-46B9-8F13-3D98... (job)
also red on mainRemoteTmuxMirrorCloseDetachTests.swift:298consolidatingMirrorsLeavesAWindowWithOtherWorkspacesAlone(): Expectation failed: (source.manager.tabs.map(\.id) → [895054EA-425D-4F80-A4BF-B15F7E9728B0, 1F4068B6-6528-4F43-A3A2-8B5B... (job)
Matched log lines
macos / app-host unit tests (1/7): ✘ Test commandNWithoutAWindowKeepsTheInitialWorkspace() recorded an issue at SidebarNewLocalWorkspaceTests.swift:203:9: Expectation failed: (context.tabManager.tabs.count → 2) == 1
macos / app-host unit tests (2/7): ✘ Test "A capped plan shows used/limit in the My Devices count slot" recorded an issue at CloudMachinesHeaderCountTests.swift:25:9: Expectation failed: (count.help → "Running and paused machines count toward your plan’s machine limit.") == (Self.genericHelp → "Machines on your plan. Sleeping machine
macos / app-host unit tests (6/7): ✘ Test socketCloseOfLiveLastMirrorDetachesWithoutKillingSession() recorded an issue at RemoteTmuxMirrorCloseDetachTests.swift:113:9: Expectation failed: (harness.manager.tabs.map(\.id) → [43C9C578-0269-46E0-AA5E-C635BE425000, B9FD6C45-2DBD-46F3-B300-529D3D188BE2]) == ([mirrorWorkspace.id] → [B9FD6C4
Not re-run automatically: macos / app-host unit tests (1/7), macos / app-host unit tests (2/7), macos / app-host unit tests (6/7) are not machine failures.
Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.
Correctness review (fresh subagent) — head e98637d
Verdict: PASS.
Root cause confirmed: ContentView.onAppear → ChiefHomeNavigation.restoreConversations → ensureHome adds a pinned Home workspace (select: false) and moves its group to index 0, so manager.selectTab(at: 0) selects Home. Both CI symptoms match (terminal hidden so never first responder; Option+Down from Home lands on the first workspace; Option+Up wraps to Home). Every other Home creation path (onChange(of: chiefEnabled), conversation changes, open/toggle notifications) goes through ensureHome, which checks ChiefSettings.isEnabled at call time; startChiefIfEnabled never creates a workspace.
API usage matches the existing pattern in WorkspaceGroupNumberedSelectionTests.
Restore order is correct: the flag is set inside AppContextSerialGate.withExclusiveAppContext before createMainWindow, and restored after each test's synchronous closeWindow. Flipping the flag affects pre-existing windows only idempotently, and a closed manager can't regain Home (isFinalizedForWindowClose).
No assertion in the suite becomes wrong, and no routing regression is hidden.
Advisory (low, not blocking):
No test covers Option+Down/Up or Option+digit numbering with Home pinned at index 0. A follow-up could cover the shipping default. Not in scope for this red fix.
selectWorkspace(firstWorkspace) instead of selectTab(at: 0) would also work. Kept the established suite-level pattern.
Resolution
The first head did not compile: import CmuxSettings made StoredShortcut ambiguous with the app's own StoredShortcut (https://github.com/manaflow-ai/cmux/actions/runs/41820447647). Fixed in b2e391b with import struct CmuxSettings.ChiefCatalogSection, the scoped import other cmuxTests files already use. The diff is otherwise the same as the reviewed one.
The CI fast guards red on the first head is test_every_nightly_sign_verify_and_dmg_job_on_blacksmith_macos_is_rescued reading origin/feat-cmux-next's nightly.yml. It does not depend on this PR's diff.
Advisories: left as follow-ups, as explained above.
Merge status: the focused suite is green (https://github.com/manaflow-ai/cmux/actions/runs/41830584293), but gh-merge-green refuses on ci-status / macos / macOS compile admission. Those reds come from a separate base red. CI fast guards fails test_every_nightly_sign_verify_and_dmg_job_on_blacksmith_macos_is_rescued on origin/feat-cmux-next, whose nightly.yml moved off Blacksmith on 2026-11-04, and that holds every macOS lane behind the Linux gate. The same failure shows on #35388, #35212 and #35192. Another session is fixing that guard in its own PR. Once it lands, this branch takes main and re-runs CI before merging.
…unts (#35609)
Swift Testing sometimes prints U+200B before an event line that follows
interleaved app output. SUITE_STARTED and SUITE_ENDED are anchored, so
'✔ Suite "x" passed' never matched. gh-merge-green then called a
passing suite cut short and refused to excuse a base red on
#35296 (app-host shard 2).
lines_of now strips the leading zero-width space.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…5723)
`@Test("A capped plan …")` prints `✘ Test "A capped plan …" recorded an
issue`, with no `()`. The Swift Testing pattern in test_reds and
base_red_excuse needed the parentheses, so a job whose only reds were
display-named tests had no failing tests. base_red_excuse then compared it
by its app log's `error:` lines, whose pointers differ on every run. That
refused to excuse a red that main has too (shard 2 of
#35296, CloudMachinesHeaderCountTests).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merged-unverifiedA judging check was not green at merge; see the merge receipt comment
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a red on
main:AppDelegateOptionDigitShortcutRoutingTestsfailsfileConfiguredOptionOnlyArrowBindingsRouteBeforeTerminalFallbackandterminalKeyEquivalentRoutesActiveOptionDigitWorkspaceShortcut(main CI https://github.com/manaflow-ai/cmux/actions/runs/41756939544, focused run on 0ad82b8 https://github.com/manaflow-ai/cmux/actions/runs/41786859413). It blocks #19082.Root cause
Chief Home (#21287, 2026-10-20) is on by default (
chief.enableddefaults to true). Each new main window'sContentView.onAppearcallsChiefHomeNavigation.restoreConversations→ensureHome, which adds a pinned Home workspace group and moves it to index 0.Both failing tests do
manager.addTab(select: false)and thenmanager.selectTab(at: 0), expecting index 0 to be the window's initial terminal workspace. Index 0 is now Chief Home, so:isSurfaceViewFirstResponder()fails), andThe product behavior is intentional; the tests are stale. Assertions are unchanged.
Fix
The suite's
withIsolatedShortcutRoutingStatewrapper now disables Chief for the duration of each test and restores the prior value afterwards, the same patternWorkspaceGroupNumberedSelectionTestsalready uses. The tests are about shortcut routing, not Chief Home.Related: #27251 changes the same two tests' focus setup to
focusTerminalForTestingas part of an unrelated feature; that does not change which workspaceselectTab(at: 0)selects.Testing
cmuxTests/AppDelegateOptionDigitShortcutRoutingTestson this head: link in a comment once complete.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes two failing tests in
AppDelegateOptionDigitShortcutRoutingTests: Chief Home (on by default) adds a pinned Home workspace at index 0 of every new main window, so the tests'selectTab(at: 0)selected Home instead of the initial terminal workspace, breaking routing and focus assertions.Disables Chief within the test suite's isolation wrapper and restores the prior setting afterward, matching the pattern
WorkspaceGroupNumberedSelectionTestsalready uses. The import is scoped toChiefCatalogSectionsoStoredShortcutstays unambiguous. Product behavior is intentional; test assertions are unchanged.Written for commit 54e6501. Summary will update on new commits.
Summary by CodeRabbit