feat(ui-native): draw the panel's working mark wherever an agent is at work
What
The developer: "Can we use our desktop's working indicator instead of generic spinners where it's appropriate?"
@repo/ui-native's WorkingMark was the system's spinner, tinted blue, and the transcript's running calls and Working line used React Native's ActivityIndicator. Both now draw the desktop's mark.
The mark
It's copied from @repo/ui's working-mark.tsx source:
- Geometry: a 3Ć3 grid of 3 pt cells on a 5 pt pitch, centered in a 16 pt side. The track's eight cells stand at 0.3 opacity, with corners of a quarter cell.
- The chase: two chasers, each with a tail at 0.6 one cell behind, resting on cells 1/0 and 5/4. That's the panel's mid-lap resting frame, so a still mark lights four cells.
- The beat: a cell a step on one 200 ms beat that every mark on screen shares (
working-beat.ts), lapping in 1.6 s. The timer runs only while a mark listens, so a screen with no agent at work keeps none. - Ink: the muted ink, as the panel's gray.
- Reduce Motion: the mark holds its resting frame and never subscribes to the beat.
- Dynamic Type: the 16 pt side scales with the reader's text size (
useScaledSize), as every mark here does.
It's drawn as SwiftUI RoundedRectangles offset in a ZStack, with no native code. Each mark reads the beat itself through useSyncExternalStore, so a step redraws only the mark, never the row it stands in. It's heard as "Working".
Where it stands
Wherever the panel draws its mark:
- an agent row's status (
AgentRow); - a task row's end while an agent works (
TaskRow), which replaces the blue spinner; - an Inbox row while its agent works, and a row's preview;
- a running call or group in the transcript, as the panel's
StateGlyphstands in a running tool's row, in a smallInlineHost.
The transcript's Working line is plain words, as the panel's line draws no mark (the orchestrator, Nov 18). The panel shimmers its words, which @expo/ui can't draw cheaply, so they stay plain.
The panel's WorkingCount marks only agents nesting the agents they started, which the iPhone doesn't list, so it has no twin here.
Kept
The system's spinner, and React Native's, stay for loading: a read in flight, older pages, pull to refresh, Send's Stopping, a video or a page loading, as the panel keeps its Spinner. The Live Activity's working mark is Swift and is left as it is.
Tests
- Typecheck (
apps/mobile,tsc -b), oxlint and biome pass onpackages/ui-native/src; the rest is left to CI. - No unit test: the beat and the drawing are checked by the flows' shots.
- JS only. Mac shots after the first native build, in light and dark, on the iPhone 18 Pro and the 27.2 iPad: an agent at work in the Tasks list, an agent row on a task's page, and the agent page's running call and Working line.
š¤ Generated with Claude Code
Summary by CodeRabbit
- New Features
- Replaced the working-state spinner with a subtle animated grid mark that scales with text size and pauses when Reduce Motion is enabled.
- Running call rows now display the same working mark; waiting transcript rows retain their existing text and attention color.