Skip to content

fix(mobile): stop the work log flickering during subagent runs and failing calls - #10273

Merged
juliusmarminge merged 2 commits into
mainfrom
t3code/mobile-work-log-flicker
Sep 6, 2026
Merged

fix(mobile): stop the work log flickering during subagent runs and failing calls#10273
juliusmarminge merged 2 commits into
mainfrom
t3code/mobile-work-log-flicker

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 6, 2026

Copy link
Copy Markdown
Member

Problem

Two kinds of jank in the mobile work log during a working turn, both visible in the reporter's recording of a Claude session:

  1. The subagent row blinked out on every progress tick. Measured at 60 fps: a 5–7 frame blackout followed by a 10-frame fade-in, once per tool call the subagent made (30+ times in 36 s on a long-running agent). The batch row's anchor was the first task.progress activity. The server rewrites that activity in place with a new createdAt on every tick, and the row's activity-group id was the anchor's id — so the anchor flipped between task-progress:… and task-usage:…, LegendList remounted the row, and the "fresh row" entrance fade replayed from opacity 0.
  2. The Thinking row thrashed the layout. In that session every Bash call failed within ~2 s. Each inProgress → failed transition switched the trailing group's shimmer off, which appended a separate Thinking row under it; the next call switched it back on and removed the row. Four insert/remove cycles in ten seconds, each with a layout transition on the list. Web doesn't have this problem because its live tool row and its Thinking row share one row id, so the handoff updates a single mounted row.

Beyond the flicker, the single-line "Kicked off 1 subagent · 1 working" row wasted the one thing a phone has room for: what the agent is doing right now.

Fix

  • Agent task.started rows now anchor their batch (as on web). They have a fixed id and timestamp; progress ticks no longer change the row's identity.
  • Spawn batches present as their own agent-spawn feed entry, keyed by the batch rather than the anchor activity. The card shows the agent's title (or "N subagents"), a status dot, and a status line that follows the newest member's progress detail ("Running Show git commit history") and updates in place; expanding lists the members. A working card is the turn's live activity, so no Thinking row sits under it. The launching Agent tool call folds into the card instead of rendering its own "Locate code" row above it.
  • The trailing tool group's shimmering row and the Thinking row share LIVE_ACTIVITY_ROW_ID (mirrors web's live-activity-row), so a call failing changes that row's content instead of inserting a row.
  • task.completed rows without a status default to completed (failed when error-toned), so a nested agent's terminal row settles its card.

isFreshRow still gates the entrance fade on createdAt; with the anchor fixed at spawn time that fade now plays once.

Verification

  • vp test run apps/mobile/src/lib/threadActivity.test.ts (101 tests; 5 new: batch identity across ticks, card summary, agent tool call folding, single live slot across failing calls, thinking row under a settled card). tsc --noEmit for apps/mobile, targeted lint and format.
  • iPhone 17e simulator, isolated server, one real Claude turn per build with the same prompt (five failing Bash calls, then one Explore subagent running ~25 shell commands). Pixel analysis of the subagent row at 60 fps: main 30 blackouts of 8–13 frames each in 36 s; this branch 0 across 1,595 frames while the agent worked.
  • Also replayed the reporter's exact activity stream (232 activities, real timing) against the branch build; the card stays put through every tick.

Left, main: the batch row is a one-liner that blinks on every subagent tool call. Right, branch: one card with the agent's current activity, no blink.

Side by side during the subagent's run, main on the left:

https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/aa869a4a41b4e297/pair-subagent.mp4

Not addressed here: the message overlap in the reporter's screenshot (a user bubble drawn over the previous message's timestamp). That is a LegendList row-height issue independent of the work log; I could not reproduce it in these runs.

Implemented by Claude Fable 5 in the Claude Code harness.

Note

Fix work log flickering by unifying live-slot identity and rendering spawn batches as cards

  • Replaces the old live-row logic in deriveThreadFeedPresentation and appendToolGroupRows with a single shared live-slot identifier, so a trailing tool group, a failed call, and a Thinking row no longer compete for separate live rows during a working turn.
  • Folds the launcher tool call into the new ThreadAgentSpawnCard via collapseDerivedWorkLogEntries, which discards the matching non-task tool row so the spawn batch represents the launcher.
  • Adds the AgentSpawnSummary model and agentSpawnSummary derivation to produce a batch title, live status from the newest working member, terminal outcome text, and per-member detail.
  • ShimmerWorkContent gains a compact mode that uses caption text and skips the icon slot, fixing shimmer width calculation when no icon is shown.
  • Behavioral Change: appendToolGroupRows now treats only a shimmering trailing group as occupying the live slot; earlier unfinished call groups remain separately grouped but no longer claim the live slot. A working spawn card suppresses the additional Thinking row for the unsettled turn.

Macroscope summarized 57ac2c2.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 6, 2026
Comment thread apps/mobile/src/lib/threadActivity.ts Outdated
Comment thread apps/mobile/src/lib/threadActivity.ts
Comment thread apps/mobile/src/lib/threadActivity.ts Outdated
Comment thread apps/mobile/src/features/threads/thread-work-log.tsx
Comment thread apps/mobile/src/lib/threadActivity.ts
Comment thread apps/mobile/src/lib/threadActivity.ts Outdated
Comment thread apps/mobile/src/lib/threadActivity.ts Outdated
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB +4 B (+0.0%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −3 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB +7 B (+0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 57.1 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB +6 B (+0.0%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB −12 B (−0.2%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.6 KiB +18 B (+0.3%) 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 57.9 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 10 10 0 (0.0%) 21

Baseline: ab67795 · PR result: 57ac2c2 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR makes broad production changes to mobile work-log aggregation, row identity, animations, and nested-agent rendering, including a new expandable agent-spawn card. These changes affect existing subagent and failing-call paths beyond a narrowly isolated fix, so human review is warranted.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge
juliusmarminge merged commit b7465a3 into main Sep 6, 2026
26 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/mobile-work-log-flicker branch September 6, 2026 06:04
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 6, 2026
## What's Changed
* fix(web): keep timestamp tooltip dates in English by @Lucenx9 in pingdotgg/t3code#10256
* fix(web): let authorized clients scrolling reach settings by @flamboh in pingdotgg/t3code#10080
* fix(web): remember usage page selection by @extoci in pingdotgg/t3code#10189
* fix(server): keep the Antigravity Google sign-in across server restarts by @t3dotgg in pingdotgg/t3code#10244
* fix(antigravity): load user skills from ~/.gemini for every project by @t3dotgg in pingdotgg/t3code#10257
* fix(web): respect reduced motion in shared disclosures by @saphid in pingdotgg/t3code#10258
* feat(marketing): add a Windows 95 landing page by @t3dotgg in pingdotgg/t3code#10286
* refactor(web): remove unused runtime wrappers and exports by @juliusmarminge in pingdotgg/t3code#10225
* refactor(web): keep feature component helpers private by @juliusmarminge in pingdotgg/t3code#10226
* refactor(web): keep app utilities private and remove dead helpers by @juliusmarminge in pingdotgg/t3code#10227
* ci: enforce unused runtime exports in the web app by @juliusmarminge in pingdotgg/t3code#10228
* test(desktop): cover Clerk setup through the service by @juliusmarminge in pingdotgg/t3code#10284
* test(desktop): cover WSL hashes through runtime resolution by @juliusmarminge in pingdotgg/t3code#10285
* test(desktop): cover password store through startup by @juliusmarminge in pingdotgg/t3code#10287
* test(desktop): cover WSL paths through public behavior by @juliusmarminge in pingdotgg/t3code#10289
* test(desktop): exercise WSL cache safety through public scripts by @juliusmarminge in pingdotgg/t3code#10301
* test(web): cover file classification through diff ordering by @juliusmarminge in pingdotgg/t3code#10304
* test(web): focus command palette tests on search behavior by @juliusmarminge in pingdotgg/t3code#10302
* fix(web): add project settings to legacy sidebar project menu by @hwanseoc in pingdotgg/t3code#10021
* test(web): keep Markdown gutter styling private by @juliusmarminge in pingdotgg/t3code#10306
* feat(settings): add shared project defaults and scoped overrides by @maria-rcks in pingdotgg/t3code#9754
* feat(connections): balance new threads across connected machines by @maria-rcks in pingdotgg/t3code#9895
* test(web): keep settings viewport comparison private by @juliusmarminge in pingdotgg/t3code#10307
* fix(web): prevent file tree search focus ring clipping by @GuilhermeVieiraDev in pingdotgg/t3code#10175
* fix(mobile): stop the work log flickering during subagent runs and failing calls by @juliusmarminge in pingdotgg/t3code#10273
* fix(mobile): save linked media from chat by @juliusmarminge in pingdotgg/t3code#10271
* feat(markdown): show the GitHub mark for github.com links by @juliusmarminge in pingdotgg/t3code#10324
* fix(marketing): show a real preview card when t3.codes is shared by @t3dotgg in pingdotgg/t3code#10305


**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260906.1292...v0.0.39-nightly.20260906.1293

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260906.1293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant