Skip to content

Normalize Cloud tree machine icon spacing - #13081

Merged
austinywang merged 5 commits into
mainfrom
13072-cloud-icon-spacing
Sep 20, 2026
Merged

austinywang merged 5 commits into
mainfrom
13072-cloud-icon-spacing

Conversation

@austinywang

@austinywang austinywang commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Cloud tree cloud glyph used an unscaled 9-point symbol in a fixed 10-point status-dot slot. Folder and terminal rows used the style’s larger, magnification-aware icon column. The reported screenshot has an 8-pixel cloud-to-name gap versus 12 pixels for the other pairs.

Cloud and local machine headers now use CloudTreeRowIcon and the same style gap as leaf rows. Pending headers reserve that shared column too. Two-line local/pending geometry scales with the glyph and text. Native disclosure geometry, hierarchy indentation, pin decoration, and the Sections preset’s whole-band inset retain their owners. The local row moves to its own file to stay within the Swift file budget.

Closes #13072. Independent of #13074; no naming, directory, or detail-toggle changes.

Testing

  • User-authorized local ./scripts/reload.sh --tag 13072-cloud-icon-spacing --launch succeeded on production commit 71d45e1b47c9b12fafccd106210e3520750226e9; tagged socket responds and auth reports signed in. Zero warnings in changed Swift files. The subsequent 9718b62ddc commit changes only tests; the running app is intentionally preserved.
  • Pin geometry: 24 concrete cases passed. Workspace/disclosure geometry: 7 concrete cases passed.
  • Rendered spacing coverage uses the real outline, widths 220/380, magnification 75/100/150/200%, pinned/unpinned states, and all style presets. Raw glyph ink is measured, not source text or constants.
  • The first hosted rendering run exposed harness issues: fractional tolerance against whole raster pixels, an AppKit 15 internal AX-role assumption, and attempting to measure gaps where labels were fully clipped. Tests now use pixel-aware tolerance, actual native hit/collapse behavior, and explicit clipping/accessibility coverage. Screenshots are captured against the fixture window background.
  • Identical corrected tests are running against original production and the fix. The baseline proof commit contains only the two corrected test files over the pre-fix commit; production is unchanged. Results pending.
  • File-length, test wiring, normalized project, localization catalogs, and whitespace checks pass. Localization audit: no user-facing strings added; extracted keys unchanged; six catalogs/nine locales pass.

Visual evidence and limitations

Before/after PNGs and measurements are attached to the hosted test results. At 220 points and 200% magnification, deeply nested leaf titles are clipped in both implementations; that case records the clipping and verifies full accessible identities, with no claim of a measurable icon-to-label gap.

Trade-off: the shared icon column leaves slightly less horizontal room for machine names. Glyphs follow the chosen style’s size and tint/chip treatment; Compact remains monochrome.

A cloud-Mac interaction video remains blocked by missing controller scheduling support in that provisioner. No retired fleet allocation was used. The local build uses the supplied existing dev-backend URL; the original dogfood app/backend/machine were not restarted or changed.

The original compile-admission checkout DNS failure recovered on retry. Current-head CI and structured review are in progress. Build tag: 13072-cloud-icon-spacing. Do not merge; dogfood approval remains with the user.

Summary by CodeRabbit

  • New Features

    • Added a dedicated “This Mac” row aligned with cloud machine rows.
    • Supports compact single-line and detailed two-line layouts with terminal and browser counts.
  • Improvements

    • Improved icon alignment, spacing, typography, accessibility, and support for larger font sizes.
    • Standardized title-column alignment across cloud, local, locked, and pending machine rows.
  • Tests

    • Added coverage for spacing and alignment across sidebar widths, font scales, pinned states, and machine variants.

@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: 2e7e5319-119b-47c3-b400-24c198ec0d6f

📥 Commits

Reviewing files that changed from the base of the PR and between 71d45e1 and 9718b62.

📒 Files selected for processing (2)
  • cmuxTests/CloudSidebarOrderingTests.swift
  • cmuxTests/CloudTreeCompactLayoutTests.swift

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


📝 Walkthrough

Walkthrough

The change extracts the local machine row, standardizes machine and pending row icon spacing and scaling, registers the new source file, and adds compact layout tests for spacing and alignment.

Changes

Cloud tree layout

Layer / File(s) Summary
Local machine row extraction
Sources/Cloud/CloudTreeLocalMachineRowContent.swift, Sources/Cloud/CloudTreeRowContentView.swift, cmux.xcodeproj/project.pbxproj
The local machine row now uses a separate view with single-line and two-line layouts. Its terminal and browser summary remains localized. The project registers the new source file, and the old inline implementation and dotSlot constant are removed.
Shared machine row icon layout
Sources/Cloud/CloudTreeMachineRowContent.swift, Sources/Cloud/CloudTreePendingMachineRowContent.swift, Sources/Cloud/CloudTreeMachineBand.swift
Machine and pending rows use shared style spacing, dimensions, icon rendering, and font magnification values. Comments document the machine-band inset.
Compact layout validation
cmuxTests/CloudTreeCompactLayoutTests.swift, cmuxTests/CloudSidebarOrderingTests.swift
Tests compare icon-to-label gaps and title-column alignment across row types, sidebar widths, font scales, and pin states. Screenshot helpers now encode an opaque bitmap, and disclosure verification uses hit testing.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #13072 requires consistent icon-to-label spacing across machine, workspace/folder, and terminal rows. CloudTreeMachineRowContent, CloudTreeLocalMachineRowContent, and `CloudTreePendingMachin…
Out of Scope Changes check ✅ Passed The changed source files implement shared Cloud tree spacing or preserve required row geometry. Moving CloudTreeLocalMachineRowContent preserves the Swift file-size budget and includes the required …
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS. The PR changes only Cloud tree row rendering, layout tests, screenshot compositing, and Xcode file registration. The implementation uses CloudTreeRowIcon, spacing, and magnification values; it…
Cmux Swift Actor Isolation ✅ Passed PASS: The production diff only changes SwiftUI row views and moves CloudTreeLocalMachineRowContent to a new file. SwiftUI view types are explicitly allowed by the actor-isolation policy. The added c…
Cmux Swift Blocking Runtime ✅ Passed PASS: The reviewed production Swift changes only adjust Cloud tree view layout, icon rendering, and font scaling. The new local-machine view, machine-row changes, pending-row changes, and machine-band…
Cmux Browser Automation Off-Main ✅ Passed The policy does not apply to this patch. The authoritative diff changes only Cloud tree views, the Xcode project, and Cloud layout tests. Sources/TerminalController.swift and `ControlCommandExecutio…
Cmux Expensive Synchronous Load ✅ Passed PASS: The production diff only changes Cloud tree SwiftUI layout and moves CloudTreeLocalMachineRowContent to a new file. It adds no RestorableAgentSessionIndex.load(), agent store access, transcr…
Cmux Cache Substitution Correctness ✅ Passed PASS. The review range changes only Cloud tree SwiftUI layout and test/project wiring. The production diff replaces inline icon rendering with CloudTreeRowIcon, adjusts style-based spacing and magni…
Cmux No Hacky Sleeps ✅ Passed PASS. The review-scoped diff changes only Swift files, Swift tests, and Xcode project metadata. It introduces no TypeScript, JavaScript, shell, or non-Swift runtime changes. The added-line scan found …
Cmux Algorithmic Complexity ✅ Passed PASS. The production diff only changes SwiftUI row layout and adds the local-machine view. It does not add nested scans, per-target rescans, sorting, filtering, joins, or batch processing. The only ne…
Cmux Swift Concurrency ✅ Passed The pull-request diff does not introduce or expand any flagged legacy concurrency pattern. Added app code only changes SwiftUI row layout, font scaling, and accessibility composition. Added Swift line…
Cmux Swift @Concurrent ✅ Passed PASS. The Swift diff adds or changes only synchronous SwiftUI views, helpers, and synchronous test methods. The exact patch adds no async, nonisolated, @concurrent, Task, or new actor-isolatio…
Cmux Swift Package Boundaries ✅ Passed PASS: The production diff contains only Cloud tree SwiftUI view and layout changes. CloudTreeLocalMachineRowContent, CloudTreeMachineRowContent, and CloudTreePendingMachineRowContent are View …
Cmux Swiftpm Lockfiles ✅ Passed PASS. The PR changes cmux.xcodeproj/project.pbxproj only to register CloudTreeLocalMachineRowContent.swift. No SwiftPM package reference, Package.swift, .gitignore, workflow, or dependency pin…
Cmux Swift Logging ✅ Passed The pull request changes Cloud row layout code and test code only. The authoritative diff adds no print, debugPrint, dump, NSLog, Logger, stdout/stderr, or ad hoc file-logging calls. No chan…
Cmux User-Facing Error Privacy ✅ Passed PASS — The production diff changes Cloud tree icon layout, spacing, scaling, and file organization. It does not add or materially change a user-facing error, alert, command output, API error body, or …
Cmux Full Internationalization ✅ Passed No internationalization failure is introduced. The only user-facing summary text in the new production file was moved unchanged from CloudTreeRowContentView.swift; its terminal and browser strings a…
Cmux Swiftui State Layout ✅ Passed No stated SwiftUI state-layout violation is introduced. The changed views use immutable value inputs (MachineSnapshot, MachineCreateOperation, CloudTreeLocalMachineRow, and CloudTreeStyle) plu…
Cmux Architecture Rethink ✅ Passed PASS. The diff is a local Cloud tree layout correction. It replaces the machine rows' fixed slot with the existing style-owned CloudTreeRowIcon, iconSlot, and iconGap values. The local row moved…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The production diff only changes SwiftUI Cloud tree row views and registers the new row source file. It adds no NSWindow, NSPanel, NSWindowController, Window, WindowGroup, window identifier, or …
Cmux Source Artifacts ✅ Passed PASS. The pull request changes only Swift source, Swift tests, and the Xcode project file. These paths are intentional product, test, and build-configuration files. The tests create screenshots and te…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The review-scoped diff changes five production Swift files, but it adds no #if DEBUG, test-build guard, debug/test seam name, or widened visibility with a wrapper accessor. The new scaled he…
Title check ✅ Passed The title clearly and concisely describes the main change: normalizing Cloud tree machine icon spacing.
Description check ✅ Passed The description provides detailed summary, rationale, testing results, limitations, and linked issue context. The Demo Video, Review Trigger, and Checklist template sections are absent, but the core P…
  • 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, with no outstanding correctness or repository-rule violations identified.

Summary

This PR normalizes Cloud tree machine-row icon geometry by using the same magnification-aware icon slot and gap as leaf rows.

  • Moves the local-machine row into a dedicated production source file and registers it with the Xcode project.
  • Aligns cloud, locked, local, and pending machine glyphs across styles and font magnifications.
  • Adds rendered spacing, title-column, accessibility, disclosure-interaction, and screenshot-artifact coverage.

Reviews (4) · Last reviewed commit: "test: account for raster precision and p..."

@austinywang
austinywang merged commit 974c2c4 into main Sep 20, 2026
34 of 36 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 20, 2026
e3f22bd ci: run slow and history-dependent guards beside workflow-guard-tests (manaflow-ai#13097)
974c2c4 Normalize Cloud tree machine icon spacing (manaflow-ai#13081)
10d13a6 test: align cloud rename parity with optimistic tree (manaflow-ai#13092)
be7692c ci: start the agent notification lane only for the suites it runs (manaflow-ai#13067)
2bda736 ci: run web validation for the merge queue (manaflow-ai#13069)
39f1328 ci: cancel superseded pull request runs in three macOS workflows (manaflow-ai#13064)
80ee5dc ci: skip blocked internal TestFlight polls (manaflow-ai#13062)
cbb3477 ci: stop routing workflow plumbing changes to macOS (manaflow-ai#13083)
22d913e Quiet cloud terminal creation tabs (manaflow-ai#12979)
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 tree: normalize icon-to-label spacing for machine, workspace, and terminal rows

1 participant