Skip to content

Show Cloud machine names once and honor sidebar detail settings - #13082

Merged
austinywang merged 10 commits into
mainfrom
13074-cloud-machine-names
Sep 20, 2026
Merged

austinywang merged 10 commits into
mainfrom
13074-cloud-machine-names

Conversation

@austinywang

@austinywang austinywang commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Cloud workspace rows in the left sidebar now use the machine’s friendly name at every width (label → generated slug → ID fallback). Directories are grouped by stable machine ID: Build server · /a, /b shows the machine once. Only distinct visible machines sharing a name get an ID suffix to disambiguate them. Routing and persisted identities are unchanged.

The existing Settings → Sidebar → Show Branch + Directory in Sidebar and Hide All Sidebar Details controls hide the visible Cloud badge and directory summary while preserving accessibility identity. The setting description now explicitly covers Cloud info, with all 19 existing translations updated. Remote paths also remain absolute when no remote home directory is known.

Fixes #13074.

Execution proof from 449ff0ce6a927fecc4469e049939466d69e524ec (new merge-head CI is pending):

  • Current name/grouping suite passed in CI shard 5, including fallback precedence, compact paths, mixed machines, hidden collisions, and unchanged routing IDs.
  • The repaired geometry test, all four hide/show settings cases, and the full badge suite passed on this commit in CI shard 4.
  • The standalone focused run timed out at 35 minutes; its artifact has no completed test results and is not counted as a pass. The passing proof above comes from the main CI shards.
  • The separate test-only baseline executes 12 tests and fails 16 assertions on the original mapping as expected.
  • Canonical autoreview --mode branch --base origin/main exited 0 with no findings; conflict and Aziz policy gates are clean. Swift parse, file-length budgets, test wiring, whitespace, and localization parity checks passed.

Updated with origin/main in b2a847bf8e4cd363bb64c39aa7c37c3a9f7b1274. The sole conflict was the duplicate Cloud rename-test correction; the merge adopts main’s stronger #13092 coverage in full. The naming/grouping/settings feature files are unchanged by the merge. Swift parse, file-length, localization, test-wiring, and whitespace checks passed. GitHub reports the PR mergeable; current-head CI and canonical review are continuing. No held test patch remains.

No dev build is being handed off: the local tagged reload was canceled before completion at the user’s request. No app/backend/machine or runner configuration changes, and no merge.

@github-actions

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Review Change StackReview 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: dabd4398-e412-4b3c-8286-23bf70cab2a1

📥 Commits

Reviewing files that changed from the base of the PR and between 35bc5df and 449ff0c.

📒 Files selected for processing (8)
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/SidebarSection.swift
  • Resources/Localizable.xcstrings
  • Sources/Cloud/CloudWorkspaceSidebarPresentation.swift
  • Sources/ContentView.swift
  • Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCellView.swift
  • Sources/Sidebar/SidebarPathFormatter.swift
  • cmuxTests/CloudDirectoryLifecycleTests.swift
  • cmuxTests/SidebarCloudWorkspaceBadgeTests.swift

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The Cloud sidebar now displays normalized machine names, groups directories by machine, disambiguates duplicate names, and hides Cloud badges when branch-directory details are disabled. Tests cover fallbacks, grouping, settings, badge visibility, and path handling.

Changes

Cloud sidebar machine information

Layer / File(s) Summary
Group and present machine directories
Sources/Cloud/CloudWorkspaceSidebarPresentation.swift, cmuxTests/CloudDirectoryLifecycleTests.swift
Machine names are trimmed with ID fallback. Multiple directories for one machine are grouped. Duplicate display names include machine IDs. Full and compact rows use the resolved display name.
Control Cloud detail visibility
Sources/ContentView.swift, Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCellView.swift, Sources/Sidebar/SidebarPathFormatter.swift, cmuxTests/SidebarCloudWorkspaceBadgeTests.swift
Cloud badges follow branch-directory detail settings. Empty home paths are not abbreviated. Badge tests cover hidden and compact states.
Update sidebar detail copy
Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/SidebarSection.swift, Resources/Localizable.xcstrings
The settings subtitle and localized strings describe git branches, Cloud machine information, and working directories.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: lawrencecchen


Important

Pre-merge checks failed

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

❌ Failed checks (2 errors, 1 warning)

Check name Status Explanation Resolution
Cmux Swift Package Boundaries ❌ Error The PR materially expands Sources/Cloud/CloudWorkspaceSidebarPresentation.swift with non-UI logic for machine-name fallback, grouping, collision disambiguation, and path-candidate rendering. The typ… Extract the pure Cloud sidebar projection from the app target. Use the existing CmuxCloudMachines SwiftPM target (or a small dedicated Cloud-sidebar target) and expose a value API whose first public type is `CloudWorkspaceSidebarPresentat…
Cmux Full Internationalization ❌ Error The PR materially changes settings.app.showBranchDirectory.subtitle in Resources/Localizable.xcstrings, but the changed entry has translations for 19 locales and no km entry. The catalog already… Add a translated km value for settings.app.showBranchDirectory.subtitle in Resources/Localizable.xcstrings. Verify that the changed entry contains translated values for every locale code already supported by the catalog.
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 6 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (22 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #13074 requires Cloud sidebar rows and related summaries to use label, generated slug, then VM ID fallback. CloudWorkspaceSidebarPresentation uses the resolved machine names, groups paths by m…
Out of Scope Changes check ✅ Passed The changes remain connected to issue #13074. Path handling, grouping, accessibility IDs, and regression tests support Cloud sidebar presentation. The settings and localization changes make existing s…
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS: The reviewed range changes Cloud sidebar presentation, path formatting, settings text, badge visibility, and regression tests only. The authoritative diff contains no Cloud terminal creation or …
Cmux Swift Actor Isolation ✅ Passed No new actor-isolation failure is introduced. The Cloud presentation changes add only local synchronous dictionaries, arrays, and a closure inside the existing @MainActor initializer. `SidebarPathFo…
Cmux Swift Blocking Runtime ✅ Passed PASS. The production Swift additions only transform Cloud names and paths, update settings text, and gate badge visibility. They add no semaphores, waits, sleeps, delayed dispatch, polling, main-queue…
Cmux Browser Automation Off-Main ✅ Passed The PR does not change browser socket automation. The authoritative diff changes eight sidebar, Cloud presentation, localization, and test files. Sources/TerminalController.swift and `Packages/macOS…
Cmux Expensive Synchronous Load ✅ Passed PASS. The production diff adds only in-memory Cloud name resolution, grouping, path formatting, and badge visibility checks. It does not add or move RestorableAgentSessionIndex.load(), agent stores,…
Cmux Cache Substitution Correctness ✅ Passed The production diff does not replace a fresh authoritative read with a cache. It changes Cloud sidebar presentation grouping and name formatting, gates badge visibility, updates localization, and hand…
Cmux No Hacky Sleeps ✅ Passed PASS. The pull request changes only Swift, localization, and Swift test files. It introduces no TypeScript, JavaScript, shell, or non-Swift build/runtime script changes. The authoritative diff contain…
Cmux Algorithmic Complexity ✅ Passed PASS: The production change in Sources/Cloud/CloudWorkspaceSidebarPresentation.swift uses one-pass dictionary/Set lookups and linear grouping over the per-workspace panel entries. The `group.paths.m…
Cmux Swift Concurrency ✅ Passed PASS: The pull request does not introduce or materially expand the listed legacy async patterns. The production changes are synchronous Cloud presentation, path formatting, SwiftUI/AppKit visibility, …
Cmux Swift @Concurrent ✅ Passed PASS. The PR adds no async or nonisolated work and adds no @concurrent annotations. The changed Cloud presentation initializer remains synchronous and @MainActor; its new grouping and name-resolution …
Cmux Swiftpm Lockfiles ✅ Passed PASS. The authoritative pull-request diff changes eight Swift source, test, and localization files only. It contains no Package.swift, Package.resolved, .gitignore, workflow, Xcode project, or depende…
Cmux Swift Logging ✅ Passed PASS — The reviewed Swift diff adds or changes Cloud sidebar presentation, UI visibility, settings text, and path formatting only. It adds no print, debugPrint, dump, NSLog, ad hoc file/stdout…
Cmux User-Facing Error Privacy ✅ Passed The scoped diff does not add or materially change a user-facing error, alert, API error body, command output, or recovery message. Production changes update ordinary sidebar/settings UI: Cloud machine…
Cmux Swiftui State Layout ✅ Passed PASS: The PR does not introduce any prohibited SwiftUI state or layout pattern. The production changes only adjust existing view arguments/text and presentation logic. The changed ContentView line g…
Cmux Architecture Rethink ✅ Passed PASS. The reviewed diff adds no sleeps, delayed dispatch, polling, locks, observers, blocking synchronization, mutable shared flags, caches, singletons, or side channels. Cloud grouping and name resol…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request does not add or materially change a standalone cmux-owned window. The authoritative diff changes Cloud sidebar presentation, settings text, badge visibility, path formatting, an…
Cmux Source Artifacts ✅ Passed PASS. The review range changes only eight existing, intentionally named source, test, settings, and localization files. The diff contains Swift production code, Swift regression tests, a settings subt…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The PR adds no test/debug seam in production Swift source. The changed Sources/** files add Cloud presentation logic, settings text, badge visibility, and path handling only. The added lines contain…
Description check ✅ Passed The description clearly explains the Cloud sidebar naming, grouping, settings, fallback behavior, and testing results. It does not include the template’s Demo Video, Review Trigger, or Checklist secti…
Title check ✅ Passed The title concisely describes the primary changes: displaying Cloud machine names once and honoring sidebar detail settings.
Full details: Docstring Coverage

Explanation

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

Full details: Cmux Swift Package Boundaries

Explanation

The PR materially expands Sources/Cloud/CloudWorkspaceSidebarPresentation.swift with non-UI logic for machine-name fallback, grouping, collision disambiguation, and path-candidate rendering. The type is compiled into the cmux app target, while the added algorithm uses only value transformations plus Foundation and has no AppKit, SwiftUI view state, Ghostty global, or process-wide singleton dependency. The new tests call this presentation directly, confirming an independently testable boundary. The diff adds no package target or package extraction; the only changed package source is a settings subtitle. This matches the rule's first package-boundary failure condition. The one-line SidebarPathFormatter guard and the badge/settings glue do not change that finding.

Resolution

Extract the pure Cloud sidebar projection from the app target. Use the existing CmuxCloudMachines SwiftPM target (or a small dedicated Cloud-sidebar target) and expose a value API whose first public type is CloudWorkspaceSidebarPresentation. Pass machine IDs, resolved-name candidates, and ordered directory path candidates into that API. Move name fallback, stable-ID grouping, duplicate-name disambiguation, and full/compact row construction into the package, with focused package tests. Keep the Workspace/@MainActor data collection and sidebar view wiring in Sources/Cloud and the UI files.

Full details: Cmux Full Internationalization

Explanation

The PR materially changes settings.app.showBranchDirectory.subtitle in Resources/Localizable.xcstrings, but the changed entry has translations for 19 locales and no km entry. The catalog already contains km translations for 1,000 other keys, so km is an existing locale in the touched catalog. The new Swift default value correctly uses String(localized:defaultValue:), but the changed catalog key is incomplete under the full-internationalization rule.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@greptile-apps

greptile-apps Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, localization, or repository-rule issue remains.

Summary

The PR improves Cloud workspace sidebar presentation without changing persisted machine or routing identities.

  • Uses friendly machine names consistently, with stable fallbacks and visible collision disambiguation.
  • Groups multiple directories belonging to the same machine into one summary.
  • Hides visual Cloud details according to existing sidebar settings while preserving accessibility identity.
  • Keeps remote paths absolute when the remote home directory is unavailable.
  • Updates the settings description and all supported translations.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    CloudState[Cloud binding and projected resources] --> Presentation[CloudWorkspaceSidebarPresentation]
    Presentation --> MachineLabel[Stable accessibility and help label]
    Presentation --> Groups[Visible directories grouped by machine ID]
    Groups --> Names[Friendly name or slug or ID fallback]
    Names --> Collision[Add ID only for visible name collisions]
    Collision --> Snapshot[Sidebar workspace snapshot]
    Snapshot --> Visibility{Show sidebar details?}
    Visibility -->|Yes| Badge[Cloud badge and directory summary]
    Visibility -->|No| Hidden[Hide visual Cloud details]
    Snapshot --> Accessibility[Preserve Cloud accessibility identity]
Loading

Reviews (8) · Last reviewed commit: "Merge origin/main into 13074-cloud-machi..."

Comment thread Sources/Cloud/CloudWorkspaceSidebarPresentation.swift Outdated
Comment thread Sources/Cloud/CloudWorkspaceSidebarPresentation.swift Outdated
Comment thread Sources/SidebarWorkspaceSnapshotFactory.swift Outdated
@cursor

cursor Bot commented Sep 19, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@austinywang austinywang changed the title Show friendly Cloud machine names in workspace sidebar rows Show Cloud machine names once and honor sidebar detail settings Sep 20, 2026
@austinywang
austinywang merged commit 498c154 into main Sep 20, 2026
33 of 34 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 20, 2026
957ac0b ci: seed the Debug compilation cache from main for compile admission (manaflow-ai#13060)
498c154 Show Cloud machine names once and honor sidebar detail settings (manaflow-ai#13082)
5fd0f13 Prepare Cloud tunnels before first use and avoid LAN permission (manaflow-ai#13085)
e232470 reload: CMUX_DEV_BACKEND_MODE=local for checkouts without the shared dev backend (manaflow-ai#12973)

# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/cli-pipe-regressions.yml
#	.github/workflows/nightly.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.

Cloud workspace sidebar should show machine names instead of IDs

1 participant