Repository navigation
fix(desktop): align the git, memory and driver labels with the phone - #1579
Conversation
janicduplessis
left a comment
There was a problem hiding this comment.
Fresh review of the diff against feat/1554-desktop-views (3 commits). swift build, swift build -c release and swift test (169 swift-testing tests + XCTest) pass locally.
Nothing blocking. ActivityBadge.driversSummary matches the phone's driversSummary: it keeps only driven activities, lists each tool once in first-seen order, takes the latest parseable since, clamps at 0, and falls back to the tools alone. The only difference is "an unknown tool" against the phone's "unknown tool", which matches the desktop tile's existing wording. The test covers real failure modes: a repeated tool, and choosing the latest start over the first. namesDriver: false is passed only on the wall, where WorkspaceHeader always renders above the tiles. The workspace view keeps the full text, as the PR describes. Each commit holds one change.
Should fix
-
README is stale for device tile activity.
apps/desktop/README.md:147-150still says every device tile shows "Driven by · 12m". On the wall, a driven tile now shows "Driven" with a dot, and the workspace header and inspector name the tools once with the time since the latest driver started. The workspace view's tile keeps the full text. Fix: update that paragraph to say this. The git paragraph atREADME.md:76-80("The workspace header shows the same as chips") could also say that the inspector spells out "↑N unpushed" and "↓N behind". -
The inspector's outer
.helpcovers the new per-pill help.WorkspaceDetail.swift:318still hasGitIndicator(git:, chips: true).help(env.worktree?.git?.summary ?? ""). Withchips: true, the body is a flat group of pills inside theFlowLayout, so the outer.helpreaches each pill, including the "unpushed" and "behind" pills that now carry their own.help..helpalso becomes the VoiceOver hint, so VoiceOver reads "4 commits not pushed to origin/feat/x" and then the whole summary again. I did not check on hardware which tooltip macOS shows when both are set. Fix: remove the outer.helpat:318, and give the uncommitted and merged chips insideGitIndicatortheir own.help(for examplegit.summary, or "N uncommitted changes" and "merged into X"). Each pill then has exactly one tooltip.
Minor
-
The drivers pill counts devices the wall does not show.
WallView.swift:110-111andWorkspaceDetail.swift:315-316passenv.orderedDevices.map(\.activity), which includes devices that are not running. The phone passes onlyrunningdevices (workspace-row.tsx:41). The wall shows tiles only forisRunning || runningBuild. The CLI can attachactivityto an Android device whose state is not "detected", becausestatus.ts:526checks onlyserial. In that case the header says "Driven by …" and no tile on the wall has the dot. Fix: useenv.devices.filter(\.isRunning).map(\.activity)for both thecontainsguard and the pill. -
DriversPill(Components.swift:78) has no tooltip or accessibility label. VoiceOver reads the raw text, including the middle dot. The phone speaks a per-devicedrivenLabel, such as "iOS, driven by maestro for 12 minutes". Optional: add.accessibilityElement(children: .ignore)and a spoken label, for example "Driven by maestro and agent-device, latest started 12 minutes ago", plus a.help. -
Comment policy.
Status.swift:157and:162(/// "3 commits not pushed to origin/feat/x".,/// "1 commit behind origin/feat/x".) only restate the string the function builds. Delete them.
a6af656 to
93dd090
Compare
Description
The phone app clarified three workspace labels (#1563, #1565). Desktop still showed the old forms: bare
↑4 ↓3arrows in the workspace header, an unlabeled3.6 GBmemory estimate that reads like disk, and a "Driven by · " pill on every driven device tile, which repeats the driver on the wall when an agent drives several devices of one workspace.Depends on #1570 (stacked on
feat/1554-desktop-views). Polish only: no change to the commands Desktop runs or the data it reads.Solution
One commit per change:
WorktreeGit.summary, which the sidebar's compact arrows use for their tooltip and accessibility label, uses the same wording. The sidebar keeps its compact arrows, like the phone's home row.stim statusgets the memory-chip icon and the spoken label "Estimated to use about 3.6 GB of memory", on the wall and in the inspector.ActivityBadge.driversSummary, the same rule as the phone'sdriversSummary), counting running devices only, like the phone's row. On the wall, a driven tile shows a compact "Driven" pill with a dot, with the full text in its tooltip and accessibility label. The workspace view's single device tile keeps the full "Driven by maestro · 40m", because its header may be hidden with the inspector. Idle and "Activity unknown" pills are unchanged.Test plan
driversSummaryNamesEachToolOnceWithTheLatestStartcovers distinct tools, the latest start, a driver without a start time, and no driven device;decodesAWorktreeGitSummarycovers the new git wording.stimExecutableserved an editedstim statuspayload (two devices driven by maestro and agent-device, a branch 4 ahead and 3 behind, a 3.6 GB estimate) and forwarded every other command to the real CLI. refactor(desktop): move view fonts, spacing and radii onto the design tokens #1570's build (left) and this branch (right):This branch with the inspector open, and the wall and workspace in dark:
Fixes #1571