Skip to content

Update Cloud sidebar tests for the redesign and deferred workspace selection - #16882

Merged
lawrencecchen merged 1 commit into
mainfrom
fix-main-cloud-sidebar-tests
Oct 2, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
fix-main-cloud-sidebar-tests

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Main's app-host suite could not compile until #16797, so these Cloud sidebar tests never ran against the merges that changed their behavior. They fail on main (full suite on b9ca453, and the changed-suites lane of #16781). Each one is a stale expectation of intended behavior, not a product regression:

  • CloudPortsVPNAffordanceTests "A populated live Ports tree keeps visible VPN setup guidance": Ports became a machine detail tab in cloud sidebar redesign: quieter machine rows, tabs for ports, terminals and resources, one hover system #16768, so there is no Ports group row. The test opens the Ports tab through the coordinator and checks the tab row's rows.
  • CloudTreeHeaderActionsTests "An open menu keeps its row hovered until it closes": cloud sidebar redesign: quieter machine rows, tabs for ports, terminals and resources, one hover system #16768 keeps machine-row buttons visible at rest at restingButtonsAlpha (also asserted in CloudTreeMachineMenuTests). After the menu closes they return to that value, not 0.
  • CloudWorkspaceRowOpenTests "Click and Return publish the same local identity…" and CloudWorkspaceCreationSidebarTests "An existing Cloud workspace row admits one local workspace…": Fix initial Cloud workspace layout restore #16690 keeps the admitted workspace out of view until its remote layout is applied, then selects it. The tests now expect the original workspace selected while the attach is suspended; the existing post-completion checks still require the admitted workspace to be selected.
  • CloudSidebarAttentionLayoutTests "Targeted refresh includes the collapsed folder…" (also run by CloudSidebarAcceptanceTests.pinsAndUnreadState): apply presents the nodes in place through CloudTreeMachineDetailLayout, and CloudTreeRowUpdate pairs rows by position. The test compared a presented tree with a fresh one; it now compares equally built trees. Production computes both signatures from presented trees and only uses the row update when the structure is unchanged.

Testing: the app-host unit tests (changed suites) lane runs the touched suites.

Changelog

No user-facing change.


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

Updates Cloud sidebar tests that were broken by the sidebar redesign and deferred workspace selection, so the app-host suite compiles and passes again on main.

These tests never ran against the merges that changed their behavior, so each one now matches the intended behavior instead of the stale pre-redesign expectation. No product behavior changes.

Written for commit 66dd1c8. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Updated automated checks for Cloud Ports, sidebar updates, menu controls, and workspace opening.
    • Checks now verify that workspace selection and layout updates occur at the expected stages, and that machine-row controls return to their normal appearance after a menu closes.

…lection

The app-host test target could not compile on main until #16797, so
these suites never ran against the changes that broke them:

- Ports is a machine detail tab since the sidebar redesign (#16768), so
  the VPN guidance test opens the Ports tab instead of looking for a
  Ports group row.
- Machine rows keep their buttons at rest at restingButtonsAlpha
  (#16768), so a closed menu leaves them dimmed, not hidden.
- #16690 keeps an opened existing Cloud workspace out of view until its
  remote layout is applied, so the two open tests expect the original
  workspace selected while the attach is suspended.
- The coordinator presents applied nodes in place
  (CloudTreeMachineDetailLayout), and row updates pair rows by position,
  so the attention test compares equally built trees.
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

🧰 Additional context used
📚 Code guidelines (3)
.github/review-bot-rules/test-determinism.md — configured
.github/review-bot-rules/swift-architectural-rethink.md — configured
.github/review-bot-rules/source-control-artifacts.md — configured

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: 423b522d-5f47-4ec3-b750-529648b6dbc8

📥 Commits

Reviewing files that changed from the base of the PR and between 9a332ec and 66dd1c8.

📒 Files selected for processing (5)
  • cmuxTests/CloudPortsVPNAffordanceTests.swift
  • cmuxTests/CloudSidebarAttentionLayoutTests.swift
  • cmuxTests/CloudTreeHeaderActionsTests.swift
  • cmuxTests/CloudWorkspaceCreationSidebarTests.swift
  • cmuxTests/CloudWorkspaceRowOpenTests.swift

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


📝 Walkthrough

Walkthrough

This PR updates five cloud sidebar test files. Assertions now cover Ports-tab selection, attention-tree signatures, button alpha after menu tracking, and workspace selection while remote attachment is pending.

Changes

Ports Detail Tab

Layer / File(s) Summary
Ports tab test
cmuxTests/CloudPortsVPNAffordanceTests.swift
The test selects the machine’s Ports detail tab and verifies that the selected detail node contains the discovered port.

Sidebar Attention Layout

Layer / File(s) Summary
Attention update assertions
cmuxTests/CloudSidebarAttentionLayoutTests.swift
The test compares separately built read and unread tree signatures for arrival and clear updates. The pin update uses the presented read tree’s signature.

Tree Header Actions

Layer / File(s) Summary
Post-menu button alpha
cmuxTests/CloudTreeHeaderActionsTests.swift
The test expects machine-row buttons to use CloudTreeCellView.restingButtonsAlpha after menu tracking ends.

Workspace Attachment Selection

Layer / File(s) Summary
Selection during pending attachment
cmuxTests/CloudWorkspaceCreationSidebarTests.swift, cmuxTests/CloudWorkspaceRowOpenTests.swift
The tests expect the original workspace to remain selected while attachment is pending. The row-open test description states that the new workspace is selected once attached.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to 66dd1

This PR updates sidebar regression tests without changing product behavior. Deferred workspace selection is checked after attachment through the shared open path, and no actionable current-head risk remains.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 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 identifies the main change: updating Cloud sidebar tests for the redesign and deferred workspace selection.
Description check ✅ Passed The description explains the stale test expectations, affected behavior, testing performed, and lack of user-facing changes. The omitted demo video and checklist are not material for this internal tes…
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 five Swift test files. It does not change Cloud terminal creation, cmux-tui transport, authentication, input routing, leases, revisions, or runtime admission code. The update…
Cmux Swift Actor Isolation ✅ Passed PASS. The pull request changes only five files under cmuxTests/; no production Swift file changes are present. The edits update test setup and expectations, and each changed test type is explicitly …
Cmux Swift Blocking Runtime ✅ Passed PASS. The pull request changes only five files under cmuxTests/; it adds no production Swift changes. The diff adds test setup and expectation updates only, with no new semaphores, blocking waits, s…
Cmux Browser Automation Off-Main ✅ Passed PASS. The pull request changes only five Cloud sidebar test files. It does not change Sources/TerminalController.swift, the control-socket execution policy, or policy tests. The patch contains no `b…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only five files under cmuxTests/. It adds or updates test expectations and test setup; it does not change production Swift code or add synchronous agent-history loadin…
Cmux Cache Substitution Correctness ✅ Passed PASS. The pull request changes only five files under cmuxTests/, and the diff updates test setup and expectations. It does not change production Swift, TypeScript, or JavaScript code, and it does no…
Cmux No Hacky Sleeps ✅ Passed PASS: The pull request changes only five Swift test files under cmuxTests. It introduces no TypeScript, JavaScript, shell, or build/runtime changes, so the runtime-no-hacky-sleeps rule does not ap…
Cmux Algorithmic Complexity ✅ Passed The pull request changes only five files under cmuxTests/, all Swift test code. It introduces no production Swift, TypeScript, JavaScript, shell, or runtime code. The algorithmic-complexity check ex…
Cmux Swift Concurrency ✅ Passed PASS: The PR changes only five cmuxTests Swift files. The added lines update test setup, tree signatures, UI expectations, and comments. The added-code scan found no new Dispatch, Task, Combine, publi…
Cmux Swift @Concurrent ✅ Passed The reviewed diff changes only test expectations, tree-signature setup, and a synchronous Ports-tab test call. It adds no @concurrent, nonisolated, Task.detached, or new async function/call-site…
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only five files under cmuxTests/. The diff adds or updates test expectations and test setup; it introduces no production Swift, package target, or app-target feature l…
Cmux Swiftpm Lockfiles ✅ Passed The authoritative PR diff changes only five Swift test files. It contains no Package.swift, Package.resolved, .gitignore, Xcode project/workspace, workflow, or dependency changes. Therefore, none of t…
Cmux Swift Logging ✅ Passed PASS. The PR changes only five files under cmuxTests/. The diff adds no print, debugPrint, dump, NSLog, file/stdout logging, Logger declarations, or sensitive logging. The changed comments a…
Cmux User-Facing Error Privacy ✅ Passed PASS: The pull request changes only five files under cmuxTests/. The diff updates test setup, assertions, and developer comments. It introduces no production user-facing errors, alerts, command outp…
Cmux Full Internationalization ✅ Passed PASS. The authoritative diff changes only five files under cmuxTests/. The changes update test expectations, test descriptions, and test comments; they do not add or modify production UI text, local…
Cmux Swiftui State Layout ✅ Passed PASS — The PR changes only five existing test files. The additions update test setup, assertions, and comments. They do not add ObservableObject, @Published, @StateObject, @EnvironmentObject, Geometry…
Cmux Architecture Rethink ✅ Passed PASS. The PR changes only five files under cmuxTests/. The diff updates test setup, tree signatures, and expectations. It adds no production Swift code, timing workaround, polling, lock, observer, s…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The PR changes only five files under cmuxTests/ and updates test assertions, tree setup, and comments. The added Swift lines introduce no NSWindow, NSPanel, NSWindowController, SwiftUI `…
Cmux Source Artifacts ✅ Passed All five changed paths are existing hand-written Swift test files under cmuxTests/. The diff contains only test expectations, test setup, and explanatory comments. It adds no logs, screenshots, reco…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The authoritative PR diff contains only five modified files under cmuxTests/. It contains no Swift file under a production Sources/ path, so it introduces no production test/debug seam.
  • 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.

@lawrencecchen
lawrencecchen merged commit 67001f1 into main Oct 2, 2026
67 of 68 checks passed
@lawrencecchen
lawrencecchen deleted the fix-main-cloud-sidebar-tests branch October 2, 2026 15:05
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

rustybret pushed a commit to rustybret/bmux that referenced this pull request Oct 2, 2026
67001f1 Update Cloud sidebar tests for the redesign and deferred workspace selection (manaflow-ai#16882)
9a332ec cmux-tui: terminal host accept loop blocks on events (idle host woke 50x/s) (manaflow-ai#16864)
7ba85b7 Merge pull request manaflow-ai#16781 from manaflow-ai/cloud-sidebar-followups
d6a22e7 Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
a3e78a6 refresh hidden cloud detail pools
6cac783 Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
396571d Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
6e324f4 Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
b053083 remove obsolete fleet freshness argument
9f49df6 Merge remote-tracking branch 'origin/cloud-sidebar-followups' into repair-pr16781
08c1463 remove duplicate fork monitor helper
77181d7 fix: remove duplicate fork monitor argument builder
ee62151 use shared fork monitor contract in CLI
bbccaec Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
8cd5139 merge cloud row cleanup
4765a31 Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
d649d29 restore cloud sidebar locale translations
1452e4c Merge remote-tracking branch 'origin/cloud-sidebar-followups' into repair-pr16781
45c2cbd Merge remote-tracking branch 'origin/cloud-new-machine-top' into repair-pr16781
dd52822 fix(localization): avoid stacked merge duplicate locales
09ed71b fix tab density enum conformance
f6595f5 merge cloud machine creation gate
dc7dd14 merge cloud sidebar base and preserve follow-ups
1b83129 fix(ci): restore shared Codex fork monitor helper
a713a66 review fixes: a wide tab floor narrows the other mode bar tabs instead of overflowing, new strings in all 20 locales
969516b refresh cloud machines back to the bottom right of the panel
04331c1 right sidebar min (and opening) width 295, just enough for the machine tabs with counts
c4240cf cloud sidebar follow-ups: displays tab, new workspace on top, refresh row above my devices, tabs never clip
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