Skip to content

test: pin font magnification in the Cloud outline attention test - #15213

Merged
teamleaderleo merged 1 commit into
mainfrom
fix/cloud-attention-magnification
Sep 28, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
fix/cloud-attention-magnification

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

CloudSidebarAttentionLayoutTests/outlineAttentionTransitions(width:) checks geometry against the 100% leading slot, but it never set the font magnification. Cloud rows read GlobalFontMagnification from UserDefaults.standard when they render, so the test depended on whatever the app-host process had stored. In main run 36373808820 the measured offsets (dot center off by about 1.02, content shift off by about 2.05 and 3.05) match an 80% magnification to the pixel.

The suite's other test, attentionPlacement, already saves, sets and restores the percent. This moves that into a withMagnification helper and runs outlineAttentionTransitions at 100%. Tolerances are unchanged.

Testing

  • Test-only change. No local build; CI runs the app-host suite.

Changelog

none

🤖 Generated with Claude Code


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


Summary by cubic

Pins font magnification in the Cloud outline attention test so its geometry assertions no longer depend on leftover app-host defaults.

Cloud rows read GlobalFontMagnification from UserDefaults.standard when they render; a leftover 80% made the measured dot and content offsets come out exactly 1–3 points off. Extracts the save/set/restore logic attentionPlacement already used into a shared withMagnification helper and runs the test at 100%. Tolerances are unchanged.

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

Review in cubic

Summary by CodeRabbit

  • Tests
    • Updated attention-layout checks to verify row placement at the requested font magnification and at 100% during unread and cleared states.

outlineAttentionTransitions measures the 100% leading slot, but Cloud
rows read the global font magnification from UserDefaults.standard when
they render. With a leftover 80% in the app-host defaults the dot and
content offsets came out exactly 1 to 3 points off. Pin 100% for the
test the way attentionPlacement already pins its own percent.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 28, 2026 07:50
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

Dogfood build of c15231cc182af4333a4f04590e72dc2046670046

cmux DEV pr-15213-c15231cc.app

The link opens this exact commit in the cmux dev menu bar app. The build starts on each push and the page waits until it is ready; a newer push replaces it. It signs in against production, so Cloud or backend changes still need a tagged build with a development backend.

@coderabbitai

coderabbitai Bot commented Sep 28, 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: fb305d03-3fae-42d8-a6e0-c25627488219

📥 Commits

Reviewing files that changed from the base of the PR and between 454f191 and c15231c.

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

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


📝 Walkthrough

Walkthrough

The attention-layout tests now set font magnification for rendering and restore the prior preference afterward. The outline-transition test renders at 100% magnification.

Changes

Sidebar attention layout

Layer / File(s) Summary
Magnification-scoped rendering
cmuxTests/CloudSidebarAttentionLayoutTests.swift
A shared helper sets magnification for a test body and restores or removes the prior preference. Attention-placement and outline-transition rendering use separate helpers. The outline-transition test uses 100% magnification.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: austinywang

Merge Risk: ⚪ Minimal · up to c1523

The outline test now renders with the intended 100% magnification and restores the prior setting. No remaining merge-blocking risk is established.

🚥 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 6 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: pinning font magnification in the Cloud outline attention test.
Description check ✅ Passed The description includes a clear problem statement, implementation summary, testing status, and changelog entry. The omitted checklist and demo video are non-critical because this is a test-only chang…
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 PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift (+18/-1). It adds test-only magnification scoping and delegates existing rendering/assertions. The diff introduces no Cloud…
Cmux Swift Actor Isolation ✅ Passed PASS. The PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. It adds test helpers and runs the existing @MainActor test suite with pinned UserDefaults magnification. No production…
Cmux Swift Blocking Runtime ✅ Passed The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff adds a synchronous withMagnification test helper that sets and restores UserDefaults, and wraps existing …
Cmux Browser Automation Off-Main ✅ Passed PASS. The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff adds a test helper that pins and restores UserDefaults magnification and updates test rendering. It d…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff refactors test helpers and pins UserDefaults magnification for test rendering; it does not change pro…
Cmux Cache Substitution Correctness ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff adds test setup and rendering helpers and pins UserDefaults during tests. It does not change producti…
Cmux No Hacky Sleeps ✅ Passed PASS. The authoritative diff changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift, which is Swift test code. It adds a withMagnification helper and runs geometry assertions at 100%; it ad…
Cmux Algorithmic Complexity ✅ Passed PASS. The PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The added helper and refactoring are test-only scaffolding. The custom rule explicitly passes test-only code, and the diff…
Cmux Swift Concurrency ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The added withMagnification helper uses a synchronous throwing closure and UserDefaults; it adds no `Dispatc…
Cmux Swift @Concurrent ✅ Passed The diff changes only synchronous, throwing test helpers in an @MainActor test suite. It adds no async, nonisolated, @concurrent, Task, or actor-hop code. The changed withMagnification hel…
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff adds test-only magnification setup and rendering helpers. It does not add or expand production feature …
Cmux Swiftpm Lockfiles ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. It does not change a Package.swift dependency, Package.resolved, an Xcode project package reference, `.gitig…
Cmux Swift Logging ✅ Passed PASS — The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift, which is test code. The diff adds no print, debugPrint, dump, NSLog, file/stdout logging, Logger, or …
Cmux User-Facing Error Privacy ✅ Passed PASS: The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff adds test helpers and test-only comments; it does not add or modify user-facing errors, alerts, command…
Cmux Full Internationalization ✅ Passed PASS — The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. It updates test setup and rendering helpers to pin and restore GlobalFontMagnification; it adds no production…
Cmux Swiftui State Layout ✅ Passed PASS. The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift, which imports AppKit and contains AppKit test fixtures and NSView/NSWindow rendering. The diff adds no Swi…
Cmux Architecture Rethink ✅ Passed PASS. The PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. It extracts the existing UserDefaults save/set/restore logic into withMagnification and applies it to the outline test…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. It refactors test magnification setup and wraps the existing outline test in a test helper. The only NSWindow usage is a…
Cmux Source Artifacts ✅ Passed PASS. The PR changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. The diff contains hand-written Swift test code that adds a magnification helper and test rendering logic. It does not add …
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The pull request changes only cmuxTests/CloudSidebarAttentionLayoutTests.swift. No Swift file under a production Sources/ path changed, and the added helper and refactoring remain in the tes…
  • 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.

@teamleaderleo
teamleaderleo merged commit a98c560 into main Sep 28, 2026
54 of 55 checks passed
@teamleaderleo
teamleaderleo deleted the fix/cloud-attention-magnification branch September 28, 2026 08:10
@github-actions

Copy link
Copy Markdown
Contributor

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

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 28, 2026
ba94a13 CI: let Iroh release gate reuse unchanged TUI artifact
71a921c fix(web): stop orphaned Cloud VM alert pages (manaflow-ai#15138)
9971c2c Keep newer iOS connections alive when a recovery is superseded (manaflow-ai#15141)
c307ab0 cmux-tui: only connect to derived local sockets served by this user (manaflow-ai#15144)
1220252 codex-teams: keep the watcher's socket password out of its arguments (manaflow-ai#15140)
b3a73f0 chatmux-relay: keep cmux-tui sockets and journal cursors private to this user (manaflow-ai#15156)
b0d5083 ci: dispatch UI tests from a default-branch workflow; PR CI keeps no write token (manaflow-ai#15226)
1255448 test: fix three app-host tests that keep main red (manaflow-ai#15204)
0fc4975 test: pin the fixture PATH inside the zsh watcher sleep test (manaflow-ai#15237)
758aaeb fix(ios): clear read notifications on foreground return (manaflow-ai#14725)
4c15bb3 cmux-browser: stop requiring GPL for web/package.json (manaflow-ai#15231)
97fe6b4 test: keep the Cloud notification harness workspace unselected (manaflow-ai#15215)
61083e3 test: keep workspace cwd inheritance tests off the shared standard defaults (manaflow-ai#15227)
eae4994 Pin password badge actions to their source runtime (manaflow-ai#14921)
fd96369 Check the owner of the Claude shim directory in the app, workspace commands and nushell (manaflow-ai#15185)
0ebf8d7 Fix main-thread freeze during SSH paste detection (manaflow-ai#15113)
a98c560 test: pin font magnification in the Cloud outline attention test (manaflow-ai#15213)
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