Skip to content

Fix custom right-sidebar groups context - #20354

Merged
austinywang merged 4 commits into
mainfrom
issue-20281-sidebar-groups
Oct 16, 2026
Merged

austinywang merged 4 commits into
mainfrom
issue-20281-sidebar-groups

Conversation

@austinywang

@austinywang austinywang commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Custom sidebars opened in the right sidebar received an empty data.groups() list even when the window contained workspace groups. The right-sidebar context now projects the same workspace-group snapshots used by pane and left-sidebar hosts, so data.groups() exposes each group’s identity, name, collapse/pin state, anchor, color, and icon.

Fixes #20281.

Testing

  • Added RightSidebarCommandPaletteTests.testCustomSidebarDataContextIncludesWorkspaceGroups, covering the produced interpreter groups payload.
  • python3 scripts/verify-local.py --affected origin/main — 4/4 affected checks passed.
  • ./scripts/lint-pbxproj-test-wiring.sh — passed.
  • ./scripts/localize-changes --base origin/main — 0 changed keys; catalog parity passed.
  • CI run 38497149053 passed the macOS compile admission and changed app-host unit-test suite, including RightSidebarCommandPaletteTests.
  • The local checkout is Linux without xcodebuild; native compilation and focused test execution were verified by the macOS CI run above.

Changelog

Fixed: Custom sidebars opened in the right sidebar now receive workspace groups.

Proof

No screenshot: this checkout has no macOS runtime. The regression test asserts the exact interpreter payload consumed by custom sidebars.

Checklist

  • Behavior changes have added or updated tests.
  • Localization audit completed; no user-facing strings changed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes custom sidebars opened in the right sidebar receiving an empty data.groups() list even when the window contained workspace groups.

The right-sidebar context now projects the same workspace-group snapshots as the pane and left-sidebar hosts, so data.groups() exposes each group's identity, name, collapse/pin state, anchor, color, and icon. The duplicated group-snapshot mapping was extracted into a shared ContentView.customSidebarDataContext helper used by all three sidebar hosts, with a regression test asserting the produced groups payload.

Fixes #20281.

Written for commit dbc6d73. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features
    • Custom sidebar data now includes workspace group details, including group names, collapsed and pinned states, anchor workspaces, colors, and icons. This gives custom sidebar views access to richer information about how workspaces are organized.
  • Tests
    • Added coverage to verify that workspace group details are included in custom sidebar data.

Merge-main commit by scripts/merge-main.sh.
Merged by scripts/merge-main.sh: origin/main at 5998301.

Merge-main-previous-head: 7fab4ec
Merge-main-base: 5998301
@github-actions

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f8debd1f-b5c2-4d1d-81fd-b26d5c912f46
📥 Commits

Reviewing files that changed from the base of the PR and between 5998301 and 2f2100c.

📒 Files selected for processing: 4
  • Sources/ContentView+RightSidebarCommandPalette.swift
  • Sources/ContentView.swift
  • Sources/Panels/CustomSidebarPanelView.swift
  • cmuxTests/RightSidebarCommandPaletteTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The shared custom sidebar context builder now includes workspace group data. The vertical tabs sidebar and custom sidebar panel pass workspace groups to the builder.

Changes: Right-sidebar custom sidebar groups

Layer / File(s) Summary
Add workspace groups to the shared context
Sources/ContentView+RightSidebarCommandPalette.swift, cmuxTests/RightSidebarCommandPaletteTests.swift
customSidebarDataContext maps workspace group IDs, names, collapsed and pinned state, anchor workspace, color, and icon into the context snapshot. A test checks the serialized group fields.
Route sidebar hosts through the shared builder
Sources/ContentView.swift, Sources/Panels/CustomSidebarPanelView.swift
Both sidebar hosts pass workspace groups and existing context values to ContentView.customSidebarDataContext.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: lawrencecchen

Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity>

Merge Risk: ⚪ Minimal · up to 2f210

No actionable merge-blocking issue is evident. Merge after normal checks; native tests could not run in the reported Linux environment.

Pre-merge checks: Passed 24 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 24 passed
Check name Status Explanation
Linked Issues check Passed Issue #20281 requires workspace groups in the right-sidebar custom-sidebar context. rightSidebarCustomSidebarDataContext(now:) now passes tabManager.workspaceGroups to the shared `ContentView.cust…
Out of Scope Changes check Passed The reviewed changes stay within issue #20281. The shared helper refactor keeps group mapping consistent across the right-sidebar, pane, and left-sidebar hosts. The added test covers the required regr…
Cmux Cloud Persistent Session And Early Input Passed PASS: The pull request changes only right-sidebar custom-sidebar context construction and its test. The diff does not create Cloud terminals, cmux-tui clients, transports, readiness gates, or input/au…
Cmux Swift Actor Isolation Passed PASS. The production diff only centralizes existing snapshot mapping and adds WorkspaceGroup input to ContentView.customSidebarDataContext. WorkspaceGroup, CustomSidebarGroupSnapshot, and `Cus…
Cmux Swift Blocking Runtime Passed The reviewed production diff only centralizes custom-sidebar context construction and adds workspace-group mapping. Under the blocking-runtime rule, it adds no semaphore, blocking wait, sleep, delayed…
Cmux Browser Automation Off-Main Passed The pull request does not change browser socket automation. The two files named by the rule, Sources/TerminalController.swift and ControlCommandExecutionPolicy.swift, are unchanged. The diff only …
Cmux Expensive Synchronous Load Passed PASS. The diff adds only in-memory mapping of tabManager.workspaceGroups into CustomSidebarGroupSnapshot values. WorkspaceGroup exposes value properties, and CustomSidebarDataContextBuilder pe…
Cmux Cache Substitution Correctness Passed No cache substitution is introduced. The diff adds a live tabManager.workspaceGroups read to the right-sidebar context and maps it into CustomSidebarGroupSnapshot values. The refactor keeps the sa…
Cmux No Hacky Sleeps Passed PASS. The pull request changes only Swift production files and a Swift test file. The custom check applies to TypeScript, JavaScript, shell, and non-Swift build/runtime scripts. The diff introduces no…
Cmux Algorithmic Complexity Passed The production change adds one linear workspaceGroups.map in Sources/ContentView+RightSidebarCommandPalette.swift:311-321. It performs no nested collection scan, per-target rescan, sorting, filter…
Cmux Swift Concurrency Passed The PR adds synchronous workspace-group snapshot mapping and delegates both sidebar hosts to it. It introduces no Dispatch queues, DispatchGroup, Combine state, completion-handler API, or fire-and-for…
Cmux Swift @Concurrent Passed PASS. The PR adds only synchronous snapshot projection and delegation. The diff introduces no @concurrent, nonisolated, async, await, or new Task usage. customSidebarDataContext maps value…
Cmux Swift Package Boundaries Passed PASS. The diff adds app-side composition only: it maps live WorkspaceGroup values to CustomSidebarGroupSnapshot values and delegates to CustomSidebarDataContextBuilder. The reusable, independent…
Cmux Swiftpm Lockfiles Passed PASS: The PR changes only Swift source and test files. The authoritative diff contains no Package.swift, Package.resolved, .gitignore, workflow, or Xcode project package-reference changes. It therefor…
Cmux Swift Logging Passed PASS. The reviewed Swift diff adds no print, debugPrint, dump, NSLog, Logger, stdout/stderr, or ad hoc file logging. The production changes only map workspace groups into the sidebar context. The adde…
Cmux User-Facing Error Privacy Passed PASS: The pull request changes data-context construction only. It adds workspace-group snapshots to the custom sidebar context and adds a regression test; it does not add or modify user-facing errors,…
Cmux Full Internationalization Passed PASS. The PR changes only context construction and test coverage. Production Swift adds no user-facing text or localization keys; it forwards existing workspace-group data such as names and icons. The…
Cmux Swiftui State Layout Passed The diff does not introduce any prohibited SwiftUI state or layout pattern. It adds a pure static ContentView.customSidebarDataContext mapper and passes value snapshots into it. The existing view he…
Cmux Architecture Rethink Passed PASS: This is a small correctness fix with a clear owner. The diff reads tabManager.workspaceGroups, maps it to value snapshots, and passes the snapshots through one shared `ContentView.customSideba…
Cmux Swift Auxiliary Window Close Shortcuts Passed PASS. The PR changes only custom-sidebar context mapping and tests in four files. The diff adds no NSWindow, NSPanel, NSWindowController, SwiftUI Window, WindowGroup, window identifier, or close-short…
Cmux Source Artifacts Passed PASS: The PR changes only four intentional Swift source/test files. The diff adds shared source logic and a regression test for workspace-group context. No logs, screenshots, recordings, temp or cache…
Cmux No Test Or Debug Seam In Production Source Passed No test or debug seam was added. The new ContentView.customSidebarDataContext(...) in Sources/ContentView+RightSidebarCommandPalette.swift is an unguarded internal transformation used by productio…
Title check Passed The title clearly and concisely identifies the main change: fixing workspace-group context for custom right-sidebars.
Description check Passed The description includes the required Summary, Testing, Changelog, Proof, and Checklist sections. It explains the defect, resulting behavior, test coverage, verification results, and the environment l…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 too large.)

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • 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.

❤️ Share

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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

CI fast guards passes on dbc6d7339c (https://github.com/manaflow-ai/cmux/actions/runs/38497149053). This covers only the fast guards, not CI: CI's result is the ci-status check, and the CI failure attribution comment names any failing test.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Dogfood tours of dbc6d733

sidebar-and-chrome-tour at dbc6d733: not run

skipped: CI built this head on a runner pool whose products the UI test Macs cannot load, and media never compiles one; gh workflow run pr-media.yml -f pr=&lt;n&gt; -f allow_compile=true does

Tours are picked by the paths globs in dogfood/scenarios/*.json; a Dogfood-tours: a, b line in the description picks them instead (none turns this off). Look at every frame before merging: a green tour only means no step failed.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Passes: CI passes on dbc6d7339c.

CI passes on dbc6d7339c (run 38497149053 attempt 1).

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.

@austinywang
austinywang merged commit e4844d8 into main Oct 16, 2026
71 checks passed
@austinywang
austinywang deleted the issue-20281-sidebar-groups branch October 16, 2026 04:15
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for dbc6d7339c: every check was green at merge (15 verified; 19 skipped by policy). Full suite runs on main after merge.

teamleaderleo pushed a commit to teamleaderleo/cmux that referenced this pull request Oct 16, 2026
…cx-q1lnl)

15 main commits since the last sync (ec21dd9). Full rename detection
(merge.renameLimit=30000). Priority: main's signing commits.

Signing (one version per script):
- scripts/ci/signing-keychain.sh, scripts/import-apple-developer-id-intermediates.sh,
  scripts/ci/finalize-release.py, scripts/ci/publish-release-assets.py,
  tests/test_github_release_publication.py: identical on both sides after
  feat's ports (5f8d2ce, b0c33eb, fad7929, a2380e7); the
  .p12 + `-f pkcs12` import and the SHA-1 fingerprint check stay.
- tests/test_signing_keychain_real_import.sh: main's version (manaflow-ai#21151: the
  G2 intermediate from the .p12 must be met in the keychain; openssl error
  text). signing-keychain-macos.yml: identical.
- scripts/ci/notarize-nightly-dmg.sh, resume-nightly-notarization.sh,
  scripts/ci/smoke-dmg.sh: main's CMUX_DEFER_LAUNCH_SMOKES (manaflow-ai#21024) on feat's
  script.
- .github/workflows/nightly.yml (manaflow-ai#21024, manaflow-ai#21049, manaflow-ai#21140): the signing job is
  split three ways: secret-free prepare-nightly-variant (helper, cmux-tui
  client, regressions, thinning, sidecar handshake; takes feat's
  build-nightly-app output), build-sign-notarize-nightly (runs no bundle
  code; smokes deferred), secret-free verify-signed-nightly (signed app,
  CLI, sidecar, SSH daemon contract, feat's 15 s crash-checking launch smoke,
  smoke-dmg.sh on the final DMG). Recovery keeps feat's find/recover jobs;
  recover defers smokes to a new secret-free verify-recovered-nightly-next.
  publish-nightly needs both verify jobs and publishes only tested digests.
  Literal Blacksmith labels on secret-holding jobs (incl. sign-release-notes).
  Promote guard (manaflow-ai#21049) merged without conflict. Feat's .publish-tooling
  recheck (manaflow-ai#21144 port), publish-by-id (manaflow-ai#21140, feat already had it),
  nightly-next notary pause/hold, signed-unnotarized zip, 20m wait,
  publish-nightly-identity-legacy and legacy-identity-target are kept.
  Not ported: main's CMUX_NOTARY_SUBMIT_ONLY async notarization (feat keeps
  its in-job wait + recovery); publish-nightly-identity-legacy defers its
  launch smokes and has no secret-free smoke of the re-signed NIGHTLY DMG
  yet (it re-signs the build verify-signed-nightly smoked).
- .github/workflows/release.yml: feat's job (90 min, universal app only) with
  main's literal blacksmith-12vcpu-macos-26 signing label (manaflow-ai#21024); feat's
  single-appcast resume and MDM asset list (manaflow-ai#21140 resume).
- tests/test_nightly_universal_build.sh: feat's in-job wait contract and
  pin-cmux-tui.sh resolver, main's prepare-nightly-variant job name.
  tests/test_nightly_next_recovery.py, test_nightly_cmux_tui_resolve.py,
  test_nightly_next_computer_use_helper.py,
  test_nightly_signed_unnotarized_artifact.py: updated for the new jobs.

Other conflict choices:
- 128 modify/delete in the legacy app, CLI, iOS/macOS legacy packages,
  cmuxTests, legacy resources and legacy docs: kept deleted.
- cmux.xcodeproj/project.pbxproj: feat-cmux-next's side.
- .github/test-determinism-allowlist.txt: feat's side (main's entries name
  deleted tests).
- cmux-tui (manaflow-ai#20570, Cloud terminal cwd): mux.rs feat's split file;
  publish_resource_event (mux/journal.rs) now publishes pending terminal
  directories; terminal_directory.rs notifies with publish_journal_event and
  keeps feat's emit_terminal_tabs_changed; cmux-tui-platform platform.rs:
  case-insensitive kitty-shell-cwd scheme and the Windows drive slash strip
  ported into feat's existing parser. Main's new unit tests dropped.
- cmux-browser-host JS, plans/cmux-next/browser-repl, tests/browser-parity:
  feat's side. manaflow-ai#18380 (browser repl hardening) NOT ported: feat has its own
  earlier port (cx-2y2, cx-p9mu, cx-wj2w); main's later version targets the
  WebKit/Swift host and conflicts in ~100 hunks; it needs a port lane gated
  by the browser-parity harness. Main's new unit tests, scenarios 40/41 and
  async-owner.js dropped.
- CmuxNextDesign Localizable.xcstrings: feat's side (rename detection mapped
  main's legacy Resources/Localizable.xcstrings keys there).

Not ported (legacy-only code paths): manaflow-ai#20346, manaflow-ai#21128, manaflow-ai#20354, manaflow-ai#18641, manaflow-ai#21135.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 sidebars in the right sidebar get an empty groups list

1 participant