Skip to content

test: compare Cloud tree title columns on the backing-pixel grid - #16092

Merged
austinywang merged 1 commit into
mainfrom
15488-cloud-tree-icon-column-pixels
Sep 30, 2026
Merged

austinywang merged 1 commit into
mainfrom
15488-cloud-tree-icon-column-pixels

Conversation

@austinywang

@austinywang austinywang commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

CloudTreeCompactLayoutTests "Cloud, locked, local and pending machine titles share the folder icon column" has failed on main since #16004, on the 1x fleet runners. It fails in the sections style at 150%, with title starts [33, 39, 39, 38, 37] against a 1.5pt allowance. The layout didn't move: one title's raster moved by one backing pixel, and the allowance can't absorb that. This is one of the #15488 failures.

Cause

  • Titles sit between pixels. In the sections style at 150%, every machine title is laid out at 6 + 22.5 + 9 = 37.5pt inside its cell (CloudTreeMachineBand, CloudTreeStyle). The CI windows render at 1x (380×620pt screenshots are 380×620px), so each title snaps to one of the two neighbouring pixels.
  • design(cloud): give the machine name and the team name their width back #16004 flipped one snap. It changed the trailing padding from 12 to 8 and the band's trailing inset from 10 to 6. The pending row's hosted content grew from 255 to 263pt, and its title now snaps one pixel left.
  • One pixel was already used. The local-machine row's semibold title crosses the test's 0.2 ink threshold a pixel before the medium titles do: its faint edge pixel is 0.21, theirs 0.18.
  • Together that is 2px. An allowance of 1.5pt, measured in whole pixels, permits 1px at 1x.

Evidence

Change

The allowance is rounded to the backing-pixel grid, as iconLabelSpacing in the same file already does ("rather than rejecting a 2px delta against 1.875px").

  • At 1x it allows 2px at 150% and 1px at 75%. 100% and 200% are unchanged.
  • At 2x only 75% changes, from 1px to 2px.

What still fails:

  • A missing band inset: a fixed 6pt, so it fails in every sections case.
  • An unscaled icon slot: at least 2.75pt off at every percent but 100%.
  • An unscaled icon gap: fails at 200% in every style, and at 150% in sections. In compact at 1x it is 2pt off at 150% and 1pt at 75%, which the pixel grid now allows.
  • A column drift: anything past 1pt at 100%, or past 2pt at 150% and 200%.

This changes an assertion's precision, deliberately. The assertion compared ink edges, which are whole pixels, against a fractional-point allowance, so a half-point layout position failed or passed depending on which way the rasterizer rounded.

Verification

Run 36744359319 runs the suite twice, on the validation build (which includes #16004), with this change and against the unmodified bundle as a baseline. It ran on cmux14, a 1x fleet mini. With this change the test passed all 20 cases in both iterations. The unmodified bundle failed the sections case in both iterations, as it does on main. This PR's changed-suites job also passed all 20 cases on the head commit.

Overlaps

Changelog

  • none

🤖 Generated with Claude Code

"Cloud, locked, local and pending machine titles share the folder icon
column" has failed on main since #16004 on 1x runners, sections style at
150%: title starts [33, 39, 39, 38, 37] against a 1.5pt allowance. Every
machine title there is laid out at 37.5pt, between two backing pixels.
#16004 widened the rows (trailing padding 12 to 8), which flipped the
pending row's snap one pixel left; the local row's semibold title already
crossed the 0.2 ink threshold a pixel before the medium ones. The layout
did not move: before and after screenshots from the same runner differ only
in that one title's raster, shifted by exactly one pixel.

Ink edges are whole pixels, so express the allowance on that grid, as
iconLabelSpacing in the same file already does. At 1x this allows 2px at
150% and 1px at 75%; 100% and 200% are unchanged, and a missing band inset
(6pt) or an unscaled gap (3pt at 150%) still fails.

Refs #15488

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: a1daefd9-ff33-4d10-846f-fa214f87c614

📥 Commits

Reviewing files that changed from the base of the PR and between 7e39c92 and e3db1e8.

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

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


📝 Walkthrough

Walkthrough

The compact layout test now rounds its title-alignment tolerance to a whole backing pixel, using the window’s backing scale.

Changes

Compact layout test

Layer / File(s) Summary
Backing-pixel alignment tolerance
cmuxTests/CloudTreeCompactLayoutTests.swift
machineVariants derives the title-alignment tolerance from the window’s backing scale and rounds it to a whole backing pixel.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: teamleaderleo

Merge Risk: ⚪ Minimal · up to e3db1

No concrete regression is evident in this test-only tolerance change; the threshold remains pixel-aligned while staying below the stated layout differences.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 1 functions across 1 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 Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS. The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It adjusts a test tolerance to the window backing-pixel grid and does not change Cloud terminal creation, transport, …
Cmux Swift Actor Isolation ✅ Passed PASS. The PR changes only cmuxTests/CloudTreeCompactLayoutTests.swift. The change adjusts a test assertion tolerance. No production Swift declarations change. The file defines an @MainActor test s…
Cmux Swift Blocking Runtime ✅ Passed PASS. The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It adds backing-pixel tolerance arithmetic and updates an assertion. It does not add semaphores, blocking waits, slee…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It adjusts a pixel-grid tolerance in a layout test and adds no browser.* socket command, worker routing, WebKit/App…
Cmux Expensive Synchronous Load ✅ Passed PASS: The authoritative PR diff changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It adjusts a test tolerance using backingScaleFactor; it adds no production Swift code, agent-history load…
Cmux Cache Substitution Correctness ✅ Passed PASS: The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift, a test file. It does not change production Swift, TypeScript, or JavaScript, and it does not replace an authoritative…
Cmux No Hacky Sleeps ✅ Passed PASS. The PR changes only cmuxTests/CloudTreeCompactLayoutTests.swift, a Swift test file. The diff adjusts a pixel-grid tolerance and adds explanatory comments. It introduces no TypeScript, JavaScri…
Cmux Algorithmic Complexity ✅ Passed PASS. The only changed file is cmuxTests/CloudTreeCompactLayoutTests.swift, and the change adjusts a test assertion tolerance. The algorithmic-complexity rule explicitly passes test-only code and ti…
Cmux Swift Concurrency ✅ Passed PASS. The PR changes only the tolerance calculation in cmuxTests/CloudTreeCompactLayoutTests.swift. The added code uses CGFloat, backingScaleFactor, and rounding. It does not add Dispatch, Combi…
Cmux Swift @Concurrent ✅ Passed The pull request changes only a synchronous tolerance calculation and assertion in machineVariants. The diff adds no async, await, nonisolated, or @concurrent code and does not change actor …
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It adjusts test tolerance logic and adds comments; it does not add or move production Swift feature logic. The bounda…
Cmux Swiftpm Lockfiles ✅ Passed PASS: The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It does not change a SwiftPM package, Package.swift, Package.resolved, .gitignore, workflow, Xcode project pack…
Cmux Swift Logging ✅ Passed PASS. The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift, which is test code. The diff adds backing-pixel tolerance calculations and comments; it does not add or materially ch…
Cmux User-Facing Error Privacy ✅ Passed PASS. The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. The change updates a test tolerance and adds developer-only comments. The file belongs to the cmuxTests unit-test t…
Cmux Full Internationalization ✅ Passed The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. The diff updates test tolerance calculations and test comments. It adds no production user-facing text, localization catalo…
Cmux Swiftui State Layout ✅ Passed The PR changes only numeric tolerance logic in cmuxTests/CloudTreeCompactLayoutTests.swift. It adds no ObservableObject, @Published, geometry measurement, lazy/list row store reference, or rende…
Cmux Architecture Rethink ✅ Passed PASS. The PR changes only cmuxTests/CloudTreeCompactLayoutTests.swift. It rounds a test tolerance to fixture.window.backingScaleFactor, matching the existing iconLabelSpacing test pattern. The d…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The PR changes only the test file cmuxTests/CloudTreeCompactLayoutTests.swift. The diff adjusts a pixel-grid tolerance and comments in machineVariants; it does not add or materially change a…
Cmux Source Artifacts ✅ Passed PASS. The PR changes only cmuxTests/CloudTreeCompactLayoutTests.swift, a hand-written Swift test source. The diff adds test tolerance logic and comments; it adds no logs, screenshots, recordings, ca…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The pull request changes only cmuxTests/CloudTreeCompactLayoutTests.swift. The authoritative diff contains no Swift file under a production Sources/ path, and it adds no production debug or test s…
Title check ✅ Passed The title clearly and concisely describes the main test change: comparing Cloud tree title columns on the backing-pixel grid.
Description check ✅ Passed The description explains the failure, cause, implementation change, expected remaining failures, verification approach, and changelog entry. It omits the template headings and checklist, but the requi…
  • 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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@austinywang
austinywang merged commit 086f637 into main Sep 30, 2026
58 of 59 checks passed
@austinywang
austinywang deleted the 15488-cloud-tree-icon-column-pixels branch September 30, 2026 17:25
@github-actions

Copy link
Copy Markdown
Contributor

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

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.

1 participant