fix(mobile): tick the newest turn's time on the Live Activity's island

Merged
DA
1d ago
+51-18

What

Dean saw the agents' Live Activity's working indicator standing still. The cause: the working mark is drawn as one still frame of the panel's chaser (#10077). ActivityKit draws a Live Activity once per update and runs no animation past two seconds (Animating data updates in widgets and Live Activities; DTS in forum 757696).

A repeating SF Symbol effect (progress.indicator with .variableColor.iterative, .repeat(.continuous)) was tried first on this branch. On a native Release simulator build (iPhone 18 Pro, iOS 27.2) it stood still: stills about 9 s apart show every spoke evenly lit (pr-assets/pr-10759/jla10759/). The only motion ActivityKit advances on its own is timer text.

Dean chose a ticking timer with no spinner:

  • Compact island: while any agent works, the trailing side shows the newest turn's elapsed time with Text(timerInterval:countsDown:false), which the system ticks every second. Once none works, it shows the count again.
  • Working mark: it stays the panel's still mark, unchanged.
  • The count: still shown in the minimal presentation and in the expanded island and Lock Screen headers.
  • The rows' timers: they roll their digits (.contentTransition(.numericText(countsDown: false))).
  • maestro/live-activity.yaml: it also taps "Always Allow", because iOS's "continue to allow Live Activities" prompt covered the activity on the simulator.

Done centering landed separately in #10903.

Tests

  • Swift only, apart from the flow. CI runs typecheck, lint and tests.
  • The native round on the Mac simulator queue records the Lock Screen and both islands with the timer ticking before merge.
  • No test added: the widget's drawing isn't reachable from vitest.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The compact Dynamic Island now displays an elapsed-time timer while agents are running, and continues to show the running count when none are active.
    • The minimal Dynamic Island view continues to show the running count.
    • Timers in agent rows now transition smoothly as their values change.