Repository navigation
feat(cloud): show who made a machine on its sidebar row - #15341
teamleaderleo wants to merge 10 commits into
Conversation
A Cloud team's fleet reads as a pile of generated three-word names with no way to tell whose machine is whose. cmux#15261 made `/api/vm` publish the author; nothing on the client reads it yet. These cover the three author shapes the backend can send (a named account, an account with no recorded name, and no author at all on a control plane that predates the field) at each place the value has to survive: the list decode, the create receipt, the status read, the snapshot a row renders from, and the socket payload. The create receipt and the status read are here because the review of the backend change found exactly this bug on that side: a client that appends a create response to its list, or merges a detail read into a listed row, drops the author it had and shows a machine as unauthored to the person who just made it. The same hole exists on this side of the wire. The `vm.list` socket payload is how the CLI and remote clients see the fleet. Dropping the author there would leave `cmux` on the command line unable to answer a question the sidebar beside it can. The `userId` is kept even when no name is known, so rows by the same person still group together while they read as unnamed. Red here is a build failure rather than failing assertions: `VMCreator` does not exist yet, so the suite cannot compile. Recorded as such rather than dressed up as a behavioral red. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…napshot `VMCreator` is the client's view of `/api/vm`'s `createdBy`: an account id that is always there and a display name that often is not. The id is kept without a name so rows by the same person still group together instead of collapsing into one anonymous bucket, and the name never falls back to the raw id, since an opaque id in place of a name is the same unreadable list this is meant to fix. Decoded on all three endpoints that return a machine, not just the list. The panel appends a create receipt to the list it is showing and replaces a listed row with a status read, so decoding only the list would make the machine you just made the one row with no author, and would make any machine go anonymous the moment something polled it. A malformed or absent author is dropped rather than failing the decode, unlike a missing `id` or `provider`. An author is decoration on a row; a control plane that does not send one must still list. `socketWorkerVMSummaryPayload` re-publishes it in the response's own shape, explicit null and all, so a socket client decodes one payload rather than two. It stops being private so the test can check that the CLI is sent the same machine facts the sidebar gets. No display surface yet: this is the plumbing, and the row's tooltip that will show it is in cmux#15225. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The review of this PR caught three comments asserting things the code does not do. The create and status sites claimed the panel appends a create receipt to the list it is showing and replaces a listed row with a status read. It does neither: `MachinesPanelViewModel.machines` is only ever assigned a whole `listPage()` result, and both endpoints have exactly one caller each, the matching socket method. So a created machine shows its author on the next list refresh, not immediately, and what these two decodes really feed is `cmux vm new --json` and `cmux vm status --json`. The socket payload claimed the backend omits `createdBy` when there is no author. It does not; it sends an explicit null. The payload's shape is the narrower of the two, which is fine because both readers treat absent and null alike, but the comment said they were identical and was backwards on the one case it named. Also adds `.serialized` to the new suite, matching the other consumer of the same process-global stub. No behavior change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The author now survives every hop from `/api/vm` to `MachineSnapshot` and the sidebar still does not show it, which is the complaint: on a team the fleet reads as a list of generated three-word names with no way to tell whose is whose. These fail on the row's second line, which already carries the machine's other identity facts and is what the tooltip repeats. The unnamed-account case is pinned in the same pass: an account id is not a name, and "by 7f3a91c2" is one more opaque token in the pile this is meant to clear. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (14)
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. Comment |
|
I have read the CLA Document v2.2 and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
The row's second line already carries the machine's identity facts, and
the tooltip repeats that line, so the author goes there: "vm-1 · Base ·
by Ada Lovelace · 3 hours ago". Before the age, so who made it and when
read as one thought.
Nothing is shown when there is no name. A known account with no recorded
name gets silence rather than "by 7f3a91c2": an opaque id is one more
generated token in the pile this is meant to clear, so it is not used as
a fallback.
`CloudMachineCreatorLabel` sits in its own file because
`scripts/localize-changes` cannot parse a `defaultValue` holding a
`\u{...}` escape and `CloudTreeMachineRowContent` has several, so a new
string added there is invisible to the tool. Nine locales landed through
the normal packet from here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Stack note: this branch is built on #15309's head, so it carries that PR's two mis-authored commits ( |
Catch-up merge by scripts/ci/catch_up_pr.py (RFC manaflow-ai#14631). Merged by scripts/merge-main.sh: origin/main at 0c753fe. Resolved conflicts: - Resources/Localizable.xcstrings: xcstrings key-level union - cmux.xcodeproj/project.pbxproj: union of added entries, then normalize-pbxproj.py Catch-up-previous-head: ba6b200 Catch-up-base: 0c753fe
|
@teamleaderleo is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
Red receiptRun: https://github.com/manaflow-ai/cmux/actions/runs/36414896188 Two things worth reading off this rather than just "it went red". It fails on assertions, not on a build. The run compiled and executed all eight tests. That The six passing tests are the point. The author survives the list decode, the
Green receipt to follow on Skipped verification, disclosed: |
Green receiptRun: https://github.com/manaflow-ai/cmux/actions/runs/36415201990 Nine tests here against eight in the red run. The ninth is The two tests that were red are green, and the two negative tests that passed trivially in red Still open on this PR: CLA Assistant is red because two commits inherited from the branch this Skipped verification, disclosed: |
…tour The author only renders on the second line, which the default compact preset does not draw, so the change is invisible in every frame a tour could take. Switching preset was the one thing the lab could not be driven to do: `labelsHidden()` leaves its Preset picker with no identifier to aim at. Give the picker one, put a creator on the lab's machine fixture, and add a tour that walks Compact then Aero. The fixture name is long on purpose: the lab's job is to show the crowded case, where the id, the author and the age all compete for one line. Debug-only. The lab window is the only caller. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`clickMenu` walked the path with an app-wide `app.menuItems[item]`. A DEBUG
build lists "Cloud Sidebar Spacing Lab…" in the Debug menu and again in the
Help menu, so the query matched more than one element and XCUITest refused
the click:
Failed to click "Cloud Sidebar Spacing Lab…" MenuItem:
Find single matching element. Multiple matching elements found.
Recorded in run 36425167799, step 28. The item is unambiguous inside the menu
the tour just opened, so scope the lookup to it, and carry the scope forward
so a submenu path stays anchored to its parent rather than re-searching the
whole app at every level.
The error message now names the path it was walking; "no menu item Zoom" on
its own did not say which menu was open.
No unit test: this is the UI test harness itself, and the behaviour it fixes
is only observable against a running app on a CI runner. The failing tour run
above is the repro.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Three commits added on top of the feature so the design call can have shots. The author renders on the machine row's second line. The default compact preset does not draw that line, so on the default preset this change is invisible and only reaches the pointer through the hover text and assistive technology. It is visible in the Aero preset, which lives in the Cloud Sidebar Spacing Lab (Help menu, DEBUG builds).
Both tours are dispatched. The design call goes to #13742 when they land. Note on the earlier CI receipt: run 36421630940 was dispatched at |
|
CI receipt,
Disclosure: |
A SwiftUI Picker builds its popup from NSMenuItems that carry their text
as `title`. The accessibility tree for the Spacing Lab preset menu shows
`MenuItem, identifier: 'menuAction:', title: 'Aero'` with no `label`
attribute, so the tour's `{"click": {"label": "Aero"}}` matched nothing
and the run failed at that step.
Use NSMenu type-select instead: press the item's first letter, then
Return. That is order-independent, so it keeps working if a preset is
added or reordered, and it needs no change to the scenario runner.
Also give the tour a `paths` list so PR media picks it up for Cloud
sidebar changes without a `Dogfood-tours:` line in the PR body.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tour fix at
|
Unit tests green: run 36429408451 @
|
The evidence tour ran green on both branches and produced identical frames. The accessibility trees differ only by a window UUID, and the screenshots are indistinguishable, so the tour proved nothing about the change it exists to show. The cause is the fixture the author was added to. Its id is 49 characters, the subtitle is `id · kind · by <name> · <age>`, and at the lab's 360pt preview the line truncates inside the id. "by Ada Lovelace" never reaches the screen. The crowded case was chosen on purpose, but crowded turned out to mean absent. Add a second machine with a short id, so the lab shows both: one row where the author is truncated away and one where it fits. The design call needs a picture, and until now there was nothing to look at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The evidence tour went green and proved nothing. Fixed at
|
|
Out of draft. The before and after evidence is in, from two CI dogfood tour runs on the same This one shows new metadata on a row by default, so it is a team call rather than a fix, and |
Bugbot is paused — on-demand spend limit reachedBugbot 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. |
|
Closing this in favour of #15948, which carries the same change on a branch that can actually land. This branch is 371 commits behind main and conflicts with it, and the conflict is not worth resolving because most of the diff is already on main. cmux#15309 landed the machine-author work as Two of the commits here are also authored #15948 re-lands the remaining eight files on a fresh branch off main: the creator label view, its row and debug-lab call sites, the part of The creator design call itself is still open on cmux#13742, so #15948 stays unmerged until that is answered. |
* test(cloud): pin the machine creator label on the row Add the remaining row-label behavior tests from #15341 after the metadata coverage landed in #15309. The focused app tests are not run locally; this environment prohibits app builds and execution. CI must establish the red/green runtime evidence. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(cloud): show machine creator on sidebar rows Add the creator display name to the machine row identity facts, with localized copy, debug-lab fixtures, and a dogfood tour. Keep menu traversal scoped to the opened menu so the new tour is deterministic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>




Stacked on #15309, which carries the author from
/api/vmtoMachineSnapshotand stops there. Nothing renders it. This is the part you can see.The Cloud sidebar's complaint (hq audit item D2): on a team-scoped sidebar you see your teammates' machines as a list of generated three-word names with no way to tell who made any of them. The backend has known the answer the whole time.
What changes
The machine row's second line gains
by <name>, beside the facts it already carries:The default preset is single-line, so most users meet this through the tooltip, which repeats the same line. Whether the compact row should show the author inline without hovering is a taste call and goes to cmux#13742, not here.
Nothing is shown when there is no name to show. A known account with no recorded name gets silence rather than
by 7f3a91c2: an opaque account id is one more generated token in the pile this is meant to clear, so it is deliberately not a fallback.CloudMachineCreatorLabelis its own file for a dull reason worth stating:scripts/localize-changescannot parse adefaultValuecontaining a\u{...}escape, andCloudTreeMachineRowContenthas several, so a new string added there is invisible to the tool.Tests
Red and green from the same focused command, recorded below as they land.
Changelog
Added: Cloud sidebar machine rows show who created the machine.
🤖 Generated with Claude Code
Summary by cubic
Makes the Cloud sidebar say who created each machine on its row, so a team fleet stops reading as a pile of generated three-word names.
createdByfrom/api/vmthroughVMSummaryandMachineSnapshotand rendersby <name>on the row's second line and tooltip.cmux vm new --jsonandcmux vm status --jsonstay consistent, and re-publishes it in thevm.listsocket payload for the CLI and remote clients.Written for commit 738f4e4. Summary will update on new commits.