Skip to content

feat(mobile): show the device driver once per workspace row - #1563

Merged
janicduplessis merged 1 commit into
feat/1548-mobile-screens-tokensfrom
feat/1555-mobile-driver-pill
Sep 26, 2026
Merged

janicduplessis merged 1 commit into
feat/1548-mobile-screens-tokensfrom
feat/1555-mobile-driver-pill

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Stacked on #1562 (screens on the design tokens); this diff is against that branch.

The home workspace row showed a "Driven by · " pill after each driven device's platform pill. With two driven devices the row wrapped to three lines.

Solution

  • Driver pill: the row shows one driver pill: each driving tool once, joined with commas when there are several ("agent-device, claude"), plus the time since the most recently started driver. It comes from driversSummary in lib/format.ts.
  • Driven platform pills: they turn to the accent tone with a dot, matching the driver pill, instead of being followed by their own pill. Idle and "Activity unknown" pills stay per device.
  • Accessibility: VoiceOver and TalkBack read the whole row as one element, so the row's label now names each driven device: "iOS, driven by agent-device for 53 minutes" (drivenLabel).
  • Device tiles: the workspace screen's device tiles and the device grid tiles show one device each, so they keep their single activity pill. The workspace screen's summary card has no device pills.

Before (left) and after (right):

Home rows before and after

The screenshots use a local mock-fixture edit with two driven devices, which is not in this diff.

Test plan

  • Unit tests: driversSummary names a tool once with the most recent start, lists distinct tools, and ignores devices that are not driven. drivenLabel spells out minutes and hours.
  • Checks: pnpm run format:check, pnpm run lint, pnpm run typecheck and pnpm test pass.
  • Simulator: on the iOS simulator the row goes from three lines to two, and agent-device's snapshot shows the row label Workspace vince/polish-chatting-experience on Mock Mac, iOS, driven by agent-device for 55 minutes, iOS · ios18, driven by agent-device for 8 minutes.

Fixes #1555

@janicduplessis janicduplessis left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fresh review of the diff against feat/1562 (the stack parent).

No blocking bugs found.

Checked:

  • Dedupe and most recent start. driversSummary dedupes tools through a Set in device order and takes Math.max over the parseable since values. A driven device with no since still contributes its tool name. The tests cover both cases.
  • Offline frozen time. activityAt = offline ? (lastSeenAt ?? now) : now matches the frozenAt the remaining ActivityChips receive, so the driver pill and the row label freeze the same way the per-device chip did. The row's now comes from useNow(30_000) in home.tsx, so the pill ticks at the same rate as ActivityChip.
  • Accessibility label. The row's Touch is one accessible element. [title, lastSeen, ...drivenLabels].filter(Boolean).join(', ') gives the composition shown in the test plan, and drivenLabel reuses platformName, so the slot suffix matches the visible pill.
  • Pill tones. A driven platform pill is accent with a dot online and neutral with a dot offline. The summary pill follows the same rule, and a device that is not driven keeps success/neutral plus its idle or unknown chip.

Minor, non-blocking:

  • apps/mobile/src/lib/format.ts (driversSummary): a driver with no tool shows the visible pill text "an unknown tool · 5m". That fallback reads well after "Driven by" but awkwardly on its own. Something like "unknown tool" in the summary would read better. This is rare, since activity.driver.tool is normally set.

@janicduplessis
janicduplessis force-pushed the feat/1555-mobile-driver-pill branch from 74fa33b to fb77913 Compare September 26, 2026 18:42
@janicduplessis
janicduplessis marked this pull request as ready for review September 26, 2026 18:45
@janicduplessis
janicduplessis merged commit 4837819 into main Sep 26, 2026
1 of 2 checks passed
@janicduplessis
janicduplessis deleted the feat/1555-mobile-driver-pill branch September 26, 2026 18:48
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.

mobile: show the device driver once per workspace row

1 participant