Skip to content

Fix sidebar surface targets and cross-workspace focus - #14284

Merged
austinywang merged 3 commits into
mainfrom
issue-14027-sidebar-tmux-focus
Sep 24, 2026
Merged

austinywang merged 3 commits into
mainfrom
issue-14027-sidebar-tmux-focus

Conversation

@austinywang

@austinywang austinywang commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Custom sidebar tabs now expose identifiers accepted by surface.focus: local panel IDs and remote tmux active-pane IDs. Stable tab IDs remain unchanged, and mirrors without a projected pane omit the optional focus target.

Explicit local and remote surface focus now uses the shared focusTab path, which records the target before workspace selection restores focus. This fixes the second-click requirement when targeting another workspace without adding delays.

Closes #14027. Builds on Matheus Cavallini’s projected-pane approach in #14029, with attribution in both commits.

Validation:

  • Test-only revision 44fd840eeaefcaaf2537b0d1384f6e33dd4efb7e reproduced both new sidebar identity regressions (four failing assertions): https://github.com/manaflow-ai/cmux/actions/runs/36056874844.
  • Fixed production/test source passed all 35 tests in two suites: https://github.com/manaflow-ai/cmux/actions/runs/36057449491. Final commit changes documentation only. A final-head reused-product attempt failed before tests because native dependencies were missing; the redundant full-build retry was cancelled while queued.
  • Exact pushed SHA 1670d11882d88a76949bf475deed7fa7df2fd228 built successfully in controller job 5ee3420064bd106409ac1319. Artifact SHA256: 74ae98f4227bfce9c505537227406de16b3ff3070d7d4e07f21765808b30f06c.
  • Published build: 14027-sidebar-tmux-focus. Normal published-link reopen verified.
  • Runtime used only /tmp/cmux-debug-14027-sidebar-tmux-focus.sock, with real SSH/tmux. surface.focus {workspace_id, surface_id} followed by global surface.current passed same-workspace remote, cross-workspace remote, and cross-workspace local focus, three repetitions each. Each result remained stable across twelve samples. Real tmux confirmed Beta pane %2; terminal output and debug.window.screenshot confirmed BETA SECOND PANE. No default socket or GUI automation used for these checks.
  • Commands, responses, screenshot, and receipts: /Users/cmux/manaflow/cmuxterm-hq/artifacts/issue-14027/. Native mouse callback was not exercised; the sidebar's shared socket action was exercised end to end.

Impact: sidebar snapshot projection and explicit socket focus only. Existing mirror topology owns remote identities; TabManager.focusTab owns selection and remembered focus. No persistence, transport, relay-policy, or user-facing string changes. Asynchronous remote focus reconciliation is covered by repeated runtime stability assertions.

Pickup: #14027 (comment). Resolution pending merge.

Conflict-only check passed against base 616cd44d03b8e6ea55a41e9871bb81d8d67df281, head 1670d11882d88a76949bf475deed7fa7df2fd228, no conflicts. PR checks pass; no actionable review comments. Automated reviewer was rate-limited, so no independent review is claimed.

austinywang and others added 2 commits September 24, 2026 13:43
Co-authored-by: Matheus Cavallini <nascimentocavallini@hotmail.com>
Co-authored-by: Matheus Cavallini <nascimentocavallini@hotmail.com>
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3a95b5fe-940f-443c-947e-925fc63900c7

📥 Commits

Reviewing files that changed from the base of the PR and between 150ba9f and 1670d11.

📒 Files selected for processing (6)
  • Sources/TerminalController+ControlSurfaceContext.swift
  • Sources/TerminalController+RemoteTmuxControlMutations.swift
  • Sources/Workspace+CustomSidebarSnapshot.swift
  • cmuxTests/RemoteTmuxMirrorCLIObservabilityTests.swift
  • cmuxTests/RemoteTmuxMirrorLayoutIdentityTests.swift
  • docs/custom-sidebars.md

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@austinywang
austinywang merged commit 5f01b36 into main Sep 24, 2026
61 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 24, 2026
fb1759a Merge pull request manaflow-ai#14116 from manaflow-ai/issue-13251-display-session-flicker
4bcfbdb ci: keep compile admission's build state on an owned Mac between jobs (manaflow-ai#14285)
5f01b36 Merge pull request manaflow-ai#14284 from manaflow-ai/issue-14027-sidebar-tmux-focus
2062c82 Merge pull request manaflow-ai#14045 from manaflow-ai/14024-hook-prompt-length
616cd44 ci: let a dispatched seed save the SwiftPM manifest cache (manaflow-ai#14288)
c4dcf65 iOS: rebuild the workspace list table engine (manaflow-ai#14040)
1670d11 Document focusable sidebar IDs and remote readiness
cff83c2 Expose focusable sidebar surfaces and preserve explicit focus
44fd840 Test sidebar surface identities and cross-workspace focus
8c5a1c7 docs: bound display-change rationale to observed code path
900b55d Merge remote-tracking branch 'origin/main' into issue-13251-display-session-flicker
a530c4c test: retry expected event-stream disconnects while collecting telemetry
9250404 test: inspect app exit status only after process termination
072809c test: clean socket probe process diagnostics
4098af4 test: launch the socket-only probe without expected activation failures
c3771e6 Merge commit '169cd1af66b1e96cdedf9d30b415a370574948bf' into 14024-hook-prompt-length
169cd1a fix: split the SSH session-list merge so it type-checks on slow runners
2b713cc test: resolve probe Python from the selected Xcode installation
570412f Merge branch 'main' into 14024-hook-prompt-length
f4d8ac2 fix(terminal): avoid redraw on display topology changes
2e42f86 test: assert each hook entrypoint retains its existing attribution contract
024965f test: collect event frames separately from Debug CLI diagnostics
3ce127f test: isolate hook probe app storage under the shared fixture home
a276c01 test: keep hook probe socket in the runner-owned temporary directory
5482f48 test: launch hook probe app outside the runner sandbox
857c953 test: retain isolated app startup evidence for hook probe
7dab194 test: use Xcode Python directly inside the UI test sandbox
0bf8cb2 test: launch socket-only hook probe without foreground activation
5181aed test: wait for hook delivery and handle event stream timeouts
8f21fac chore: refresh generated schema after upstream word-wrap shortcut
cfe5ed7 Merge remote-tracking branch 'origin/main' into 14024-hook-prompt-length
2adae62 fix: keep legacy prompt length fallback bound to its message
80cffee fix: preserve original prompt length in hook event telemetry
cfcb3fd test: reproduce original hook prompt length loss through events

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
#	.github/workflows/seed-derived-data.yml
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.

Custom sidebar: ssh-tmux mirror tabs can't be focused (tab id is the mirror container, surface.focus rejects it)

1 participant