Skip to content

cmux NEXT: Cloud Diagnostics shows one readable line; the JSON report is behind Copy details and returned to the CLI - #23109

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
cloud-team-ready
Oct 21, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
cloud-team-ready

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Cloud Diagnostics' toast, and the text its Copy button put on the clipboard, printed each machine's daemon connection state with Swift's default description. On a connected machine that is a raw DaemonIdentity(..., capabilitySet: Set([...])) dump; Leo hit it on 2026-10-21. A CLI or MCP run (cmux cloud diagnostics) also showed that toast in the person's window and returned only {"ran":true}.

Now:

  • A person sees one line naming the first thing that needs them: Cloud is unavailable, they're signed out, a machine's creation failed, or a machine runs a cmux-tui that needs an update (<machine>: This machine runs cmux-tui 0.1.0 (a9b104f3cb7d). Update it to turn on every feature of this app.). When nothing does, it says Signed in as <email>. No Cloud problems found. Copy details copies the full report as JSON, and only on a click.
  • A CLI or MCP caller gets summary and details (the same JSON) as the run's result, and nothing shows in the window.
  • The per-machine JSON rows come from the same helper as the cloud.machines control method (AppControl.cloudMachineRow), so the two can't drift. The report adds link_pid, the account, the backend, and last_error.

Two new strings (cloud.button.copyDetails, cloud.result.diagnosticsAllWell) are in Cloud.xcstrings for every locale that catalog carries. scripts/localize-changes imported them; the catalog parity count is unchanged from base.

Validation: scripts/cmux-next/prepush-gate.py passes. The Swift compile runs on CI; nothing was built on the Mac.

No capture: the toast only appears when a cloud call a person started fails, and no tour state reaches a failing cmux Cloud call. The change is the toast's text (a one-line summary from CloudStrings) and a "Copy details" button in place of the clipboard dump.

🤖 Generated with Claude Code

Agent session: cosmic-gray


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


Summary by cubic

Fixes Cloud Diagnostics so the toast shows one readable line and the full JSON report is only copied on request. CLI and MCP callers now get summary and details back in the run's result instead of {"ran":true}; nothing shows in their window.

The old toast printed each machine's daemon connection state using Swift's default description, so a connected machine dumped a raw DaemonIdentity(..., capabilitySet: Set([...])) on screen and on the clipboard. Now a person sees the first thing that needs them — Cloud unavailable, signed out, a failed machine, or a machine running a cmux-tui that needs an update — or "Signed in as . No Cloud problems found."

Details

  • Per-machine rows come from the same helper as cloud.machines, so the two reports can't drift.
  • The report now includes link_pid, the account, team_id, the backend, and last_error.
  • Two new strings (cloud.button.copyDetails, cloud.result.diagnosticsAllWell) are translated for every locale in the catalog.

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

View guided diff Turn on auto-fix

… is behind Copy details and returned to the CLI

The toast and its Copy text printed the daemon connection state with Swift's
default description, so a connected machine dumped DaemonIdentity(...,
capabilitySet: Set([...])). A CLI or MCP run also showed that toast in the
person's window and returned nothing.

Now a person sees the first thing that needs them (Cloud unavailable, signed
out, a failed machine, a machine whose cmux-tui needs an update), else
"Signed in as X. No Cloud problems found." Copy details copies the report as
JSON, built from the same per-machine rows as `cloud.machines`. A CLI or MCP
run gets `summary` and `details` back as its result and nothing shows in the
window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review acea1e3: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23109 -f ref=cloud-team-ready -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on acea1e3993; ci-status is green without them.

CI passes on acea1e3993 (run 39615708111 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

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; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

web and size checks: green

Tour of acea1e3993 (run): no media. The tour job failed before the tour ran (build or setup); the run log has the output.

@teamleaderleo

teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by projects-fa on cosmic-gray · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-yuafw created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent): BLOCK at 88028ce

  • Compile error (blocking): CloudHandlers+Account.swift now imports both CmuxNextDaemon and CmuxNextSettings, and both modules declare a top-level public enum JSONValue. Neither module imports the other, so neither shadows the other. The bare type annotations at CloudHandlers+Account.swift:104 (var rows: [JSONValue] = []) and :110 (let report: JSONValue = .object(...)) will fail with "'JSONValue' is ambiguous for type lookup in this context". Base has hit this three times: 49eb59f (InputInvariantMonitor, same two imports, had to qualify), 644bcbc (HomeChannelsPage) and 92723b0 (FilePageService). Files that import both, such as PageProviders.swift and CloudPageProvider.swift, spell it CmuxNextSettings.JSONValue. Fix: qualify those two annotations, and to be safe also the JSONValue.string uses at :114-117. A file-scope private typealias or moving diagnostics to a file without the daemon import would also work. The Mac compile jobs were still pending when I checked, so this is a static finding.
  • Everything else checks out:
    • Concurrency: the module is defaultIsolation(MainActor), so AppControl.cloudMachineRow, diagnostics and the nested Diagnostics struct are all MainActor, and they are called from Task { @MainActor in }. .string(await session.link?.pid...) is the same expression as before.
    • The ActionResultWork construction and context.services.registry.track(result:) match ScreenshotHandlers.start.
    • struct Diagnostics collides with no other Diagnostics type in Sources or Tests.
    • CloudStrings.copyDetails and diagnosticsAllWell are public. Foundation is imported for String(format:).
    • The new CloudPresenter.show(_:summary:details:in:) overload is distinct from the existing show(_:_:copyable:in:).
  • Behavior:
    • Gating on origin == .user is right: ActionOrigin.user covers palette, menu, keyboard and click, while CLI, MCP, script, remote and page origins get only the result.
    • track(result:) is a no-op when nothing is capturing, so the menu path is unaffected.
    • The cloud.machines row fields are identical to the old inline code: the same 17 keys and expressions.
  • Localization: both new keys (cloud.button.copyDetails, cloud.result.diagnosticsAllWell) have all 21 locales, the same set as cloud.button.copy, all translated, and every %@ placeholder is preserved. localization_catalog.py check reports 41320 parity errors on both head and base, so the PR adds none. The Cloud.xcstrings JSON parses.
  • Tests: nothing in Tests/ references the old diagnostics(_:) -> String.
  • scripts/cmux-next/prepush-gate.py: no new violations.
  • Nit (not blocking): when signed in with no email and no team, the summary reads "Signed in as . No Cloud problems found."
  • CI at this head: cmux-next crash-class rules (Unrecognized-selector super calls) is red. This PR touches no super calls, so it is likely a base red, but I did not confirm that.

@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent): SHIP at f62d011

  • The previous blocker is fixed. f62d011 changes only CloudHandlers+Account.swift, which now has no bare JSONValue. Lines 104 and 110, and the four .map(...JSONValue.string) calls at 114-117, are all CmuxNextSettings.JSONValue. The leading-dot .object, .array, .null and .bool all infer from the annotated type, and foundationObject exists on the Settings JSONValue.
  • Nothing else in the diff is ambiguous:
    • AppControl+Cloud.swift imports CmuxNextActions, Foundation, CmuxNextControl and CmuxNextSettings, but not CmuxNextDaemon, and CmuxNextControl has no @_exported re-export.
    • On base, this same file already uses bare [JSONValue] and [String: JSONValue], in the cloud.machines row and in auth.status. The extracted cloudMachineRow keeps those imports and expressions unchanged, and its return type [String: JSONValue] resolves to the same Settings type the caller annotates.
    • CloudPresenter.swift and CloudStrings.swift use no JSONValue.
  • The rest of my review at 88028ce still holds:
    • MainActor isolation, the track(result:) and ActionResultWork pattern, and the origin == .user gating are correct.
    • The cloud.machines fields are unchanged.
    • Both new xcstrings keys have all 21 locales, translated, with %@ kept.
    • No test uses the old diagnostics(_:) -> String.
    • prepush-gate.py reports no new violations at f62d011.
  • The cmux-next crash-class rules red is a base red, not this PR's.
    • The failing step is check-objc-selectors.py: CmuxNextBrowser/UI/BrowserToolbarButtonsView.swift:115: super.viewDidHide (NSStackView call:viewDidHide/0): probe needed.
    • That line is on origin/feat-cmux-next at d7303a6, from 28649e1 (browser.toolbarPosition). Running the script on a git archive of that tip gives the identical single failure (886 super calls, 1 failure).
    • The PR's own merge base (233cc81) passes the check, and this PR touches neither the browser file nor the selector table. The CI merge ref picks the failure up from the base tip.
  • I have not seen a Mac compile yet. The Release compile and swift test jobs were cancelled at 88028ce and are queued at f62d011, so the fix is verified statically only.
  • Nit (not blocking, unchanged): when signed in with no email and no team, the summary reads "Signed in as . No Cloud problems found."

@blacksmith-sh

This comment has been minimized.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 17 of 17 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo
teamleaderleo merged commit 71ced91 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cloud-team-ready branch October 21, 2026 19:19
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
The base merge brought +1103 more App lines from 26 commits since fee17be;
the cap is the count at the merged head, and the baseline names the largest
(#23651 +305, #23155 +285, #23527 +132, #23324 +92, #23638 +82, #23492 +57,
#23588 +53, #23109 +48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…h (app size base red) (#23540)

* cmux-next: raise the CmuxNextApp size cap to 134745, naming the growth (app size base red)

check-app-size.sh is red on every feat-cmux-next push: "CmuxNextApp is capped
at 128667 lines (now 134745, +6078)". The cap was set at 7817f10; since
then 203 first-parent commits changed the target, net +6078. None of it is
generated or dead (types checked for references across Packages/macOS); it is
feature code, +4040 of it direct pushes (Files and Find +1795) and +2038 from
PRs. The baseline comment names the largest.

Follow-ups that would pay it back (SW14): FileExplorer/ (22 files, 1647 lines)
into its own target with CmuxNextFiles.FolderWatcher instead of its own FSEvents
stream, and BrowserDownloadsPopup.swift (468) out of the App target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray

* cmux-next: the App size cap is the count at ae0d9b7 (135848)

The base merge brought +1103 more App lines from 26 commits since fee17be;
the cap is the count at the merged head, and the baseline names the largest
(#23651 +305, #23155 +285, #23527 +132, #23324 +92, #23638 +82, #23492 +57,
#23588 +53, #23109 +48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 22, 2026
…ndshake again, and the team's name (#24114)

* cmux NEXT: Cloud Diagnostics' copied details carry the whole daemon handshake again, and the team's name

#23109 made the toast one line with the report as JSON behind Copy details,
but the JSON lost what the old text dump had: the ghostty commit, the full
capability list (only the missing ones stayed), the daemon pid, registry id
and generation. Each Cloud machine's row now carries the daemon's whole
`identify` under its wire names (the connected one, else the last that
answered, with the reason the link is down). The account half adds
team_name from the team list the app already holds; team_id stays the UUID,
and the all-well line names the team instead of its UUID.

The diagnostics move out of CloudHandlers into CloudDiagnostics, so the
CloudHandlers type stays under its god-type limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray

* Cloud Diagnostics: the report's JSON lives in CmuxNextControl, so CmuxNextApp does not grow

The details builder (account fields, the daemon handshake fields) is pure
data over DaemonIdentity and JSONValue, so it moves to
CmuxNextControl/Diagnostics/CloudDiagnosticsReport.swift. CloudHandlers keeps
only the glue that reads the live services. CmuxNextApp's source lines end
below the base (check-app-size.sh --base), and CloudHandlers stays under
its god-type limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray

* Cloud Diagnostics: CloudDiagnosticsReport in CmuxNextControl, the glue in CloudHandlers

The rest of the previous commit, whose staging stopped at the deleted path:
the details builder (account fields, the daemon handshake fields) as
CmuxNextControl/Diagnostics/CloudDiagnosticsReport.swift, CloudHandlers
reading the live services into it, and the tests on the new names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d3e-acc6-7a03-a574-453e3de27340&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant