Skip to content

fix(cloud): recover machine list on app foreground (#15100) - #15104

Merged
austinywang merged 4 commits into
mainfrom
15100-cloud-foreground-recovery
Sep 28, 2026
Merged

austinywang merged 4 commits into
mainfrom
15100-cloud-foreground-recovery

Conversation

@austinywang

@austinywang austinywang commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When the Cloud sidebar returned to the foreground, an automatic machine-list read could leave the prior Can't load the machine list failure and Retry action visible while Cloud workspaces and Devices were already restoring. The request owner preserved that stale error because only explicit recovery reads set the reconnecting state.

Changes

  • Treat automatic list reads as recovery at MachinesPanelViewModel.refresh(), keeping transient failures neutral while the request is in flight and clearing them on success.
  • Keep routine polling actionable when an outage persists, and preserve queued refresh intent, cancellation, generation fences, account/team scope, and offline handling.
  • Observe NSApplication.didBecomeActiveNotification for visible panels and route it through the existing recovery path used by wake and online return.
  • Add deterministic coverage for automatic refresh, foreground activation, and the existing success, failure, stale, cancellation, hidden/visible, network, and account/team transitions.

Issue: #15100

Verification

  • python3 scripts/verify-local.py (4/4 affected static checks passed)
  • python3 scripts/swift_file_length_budget.py
  • python3 scripts/swift_warning_budget.py --log /dev/null
  • git diff --check
  • Local Swift/Xcode tests and builds were not run per the task constraints; the focused native suite is left for CI.

Changelog

  • Fixed: Cloud machine-list recovery now shows a neutral reconnecting state during automatic foreground refresh.

Closes #15100


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

Fixes Cloud machine-list recovery on app foreground so a stale Can't load the machine list error no longer lingers while the list is restoring.

  • Treats automatic list reads as recovery, presenting transient failures as a neutral reconnecting state until the read settles.
  • Observes NSApplication.didBecomeActiveNotification for visible panels and routes it through the existing wake/online recovery path.
  • Keeps routine polling actionable during persistent outages and preserves queued refresh intent, cancellation, generation fences, and account/team scopes.
  • Adds tests for automatic refresh, foreground activation, and existing failure, stale, cancellation, hidden/visible, network, and account/team transitions.

Closes #15100.

Written for commit 711c2ee. Summary will update on new commits.

Review in cubic

The new behavior cases intentionally fail on current main: automatic refresh keeps the stale machine-list failure visible and app activation starts no recovery read.\n\nRefs #15100
Mark automatic list reads as recovery at the request owner so stale transient failures are neutral while the read is in flight. Keep routine polls actionable, and observe app foreground activation alongside existing wake and network recovery.\n\nFixes #15100
@cursor

cursor Bot commented Sep 28, 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.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: eae999c1-30c4-4c3d-8494-a58c80b1b152

📥 Commits

Reviewing files that changed from the base of the PR and between bf8b822 and 711c2ee.

📒 Files selected for processing (3)
  • Sources/Cloud/MachinesPanelViewModel+Refresh.swift
  • Sources/Cloud/MachinesPanelViewModel.swift
  • cmuxTests/VMClientReadCoalescingTests+ListRecovery.swift

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.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

CI failure attribution

CI passes on 711c2ee4b6 (run 36373444966 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's.

@austinywang
austinywang merged commit 10505af into main Sep 28, 2026
60 checks passed
@austinywang
austinywang deleted the 15100-cloud-foreground-recovery branch September 28, 2026 04:02
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 711c2ee4b6: every check was green at merge (16 verified; 15 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
10505af fix(cloud): recover machine list on app foreground (manaflow-ai#15100) (manaflow-ai#15104)
22835e8 Docs: raise search field contrast (manaflow-ai#14365)
18abc85 Report a non-running terminal as surface_unavailable in read_text (manaflow-ai#15101)
b23420c Document and tool in-place cmux-tui upgrades for running Cloud machines (manaflow-ai#15122)
f1c54d0 ci: charge newer runs one root runner each when gui runners are on (manaflow-ai#15124)
b7ce8d0 Bound the Iroh release-gate launcher
3606617 Stop CLI Sentry floods from caller state and unattributed journal failures (manaflow-ai#15103)
446581e ci: send owned gui jobs past a round of the gui queue to Blacksmith (manaflow-ai#15115)
507890c ci: refit the warm-distance model on 741 owned admissions (manaflow-ai#15117)
5bee212 Match the CMUX_NO_GIT_WATCH contract to bash without a PR poller (manaflow-ai#15099)

# Conflicts:
#	.github/workflows/ci-macos.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 sidebar keeps Retry error visible during automatic foreground recovery

1 participant