Repository navigation
fix(mobile): return finished threads from the Working shelf - #25400
juliusmarminge wants to merge 3 commits into
Conversation
The React Compiler keys useThreadListV2's inbox observe cache on threads and workingShelfEnabled only, dropping the tracker version, so an expired working grace never re-observes and the thread stays in the Working shelf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The React Compiler keys useThreadListV2's inbox memo only on values its callback reads, so it dropped the tracker version and an expired working grace never re-observed. Pass the version to observe so it stays a key. Fixes #24901 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped mobile bug fix that reconnects the existing inbox timer notification to the memoized thread-list calculation, so finished threads leave the Working shelf after the established grace period. The accompanying compiler regression test verifies the dependency, with no product-default, schema, or deployment changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Version-aware tracker observation packages/client-runtime/src/state/threadInbox.ts, apps/mobile/src/features/threads/useThreadListV2.ts, apps/mobile/src/reactCompilerCoverage.test.ts |
The tracker’s observe method accepts an optional version. useThreadListV2 passes inboxVersion, and a compiler coverage test checks that the call guard includes it. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- pingdotgg/t3code#24907: Implements the same Working-shelf fix and includes the version argument and React Compiler coverage.
- pingdotgg/t3code#24760: Introduced the grace period and tracker notifications consumed by this change.
- pingdotgg/t3code#24646: Introduced
useThreadListV2and the inbox observation contract updated here.
Suggested labels: bugfix, size:S
Suggested reviewers: t3dotgg
Merge Risk: 
Minimal · up to d3de3
-
No actionable merge-blocking issue is established for this change; it is ready for normal merge checks.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 warning Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The PR changes only the mobile thread-list observation, the client-runtime tracker API needed to expose the version read, and a focused React Compiler regression test. These changes directly support issue
#24901. No unrelated settings, persistence, protocol, or provider changes are present.
-
Full details: Linked Issues check
-
Explanation
Issue
#24901requires a finished thread to leave the Working shelf after the two-second grace period while Home remains visible. The change invalidates the memo wheninboxVersionchanges, butobservethen recomputesactualfrom the suppliedthreads. The timer first sets the tracker state toworking: false, then the rerun can receive the same stale thread with an active runtime and setworkingback totrue. The added test checks only the compiled cache guard. It does not verify the finished-thread behavior with an unchanged stale thread list. The input and attention rules remain supported by the existing tracker logic, but the finished-thread requirement is not established and the shown state flow can reintroduce the reported bug.Resolution
Update the tracker or observation flow so a timer expiry remains authoritative when the next observation receives the unchanged stale thread snapshot. Add a runtime regression test that keeps the thread list unchanged, advances past
WORKING_EXIT_GRACE_MS, and verifies that the thread is no longer working and is returned to the normal section.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Problem
A completed thread can remain in the mobile Working shelf after its two-second grace period. Reproduce by starting a run, keeping Home visible while it finishes, and leaving the list untouched: the row reads Done but stays under Working until a later list rebuild.
Change
Pass the inbox tracker version into the memoized observation so React Compiler includes it in the cache key. The timer notification now refreshes shelf placement. The tracker accepts an optional version argument; existing callers and grace/attention rules retain their behavior.
Scope and approval
Fixes #24901
Triaged bug via the automated issue flow. GitCafe: #24901. This restores the existing completion behavior without adding settings, persisted state, or protocol changes.
Verification
inboxVersion; it passes with the fix.vp run check:changed: passed formatting, lint, both knip checks, all seven affected-package typechecks, and 980 tests across compiler coverage and inbox tracking. The final rerun confirmed the cached passing result with exit 0.--home-dir. Native fingerprint0328f4ec326e7e4bf1bf87625118f3ff2f7a18d7; no release-build claim.Evidence
Proof audit and independent rebuild addendum found the Android proof sufficient. The independent head phone run repeated the automatic return; its settled frame differs by 2,746 pixels (0.105%) in clock, cellular indicator, and the older control's later status label. Independent recording, rebuild script, and transcript are public. Cold-start blank UI and local persistence warnings were observed during setup; the verified transition used a loaded, live connection.
Fixture matrix, full evidence index and capture recipe, server completion transcript, diff generator, and compiler reproduction helper.
For each recording, send
Run sleep 30 in shell then reply Done. Do not edit files., observe the thread working, then leave the list visible across completion and grace without tapping or navigating. Exact UTC milestones, raw recordings, narrated derivatives, scripts, and device details are in the index.bfc7177f
d3de380d
Android tablet sidebar, Pixel Tablet landscape, light, 2560×1600 captured pixels: head recording. The collapsed shelf retains the selected target during work, then returns it automatically and removes the zero-count header. The final reselection recording ends with the conversation still loading; loaded content and identity after that action are supported by the linked accessibility transcript, not by a settled final video frame.
What else changed in the captures: wall clock/status-bar indicators differ, the target has one additional real turn at head, and the client/Metro restarted between revisions. Intended visible differences are shelf removal and fresh return ordering. No style change or pixel-identical claim is made. Android stops encoding a static tail: the base recording covers the running-to-Done transition, while the linked later unmodified still and persisted completion show it remained stuck 31 seconds after completion.
Unverified: native iOS tablet sidebar (A3). Its cached client installed, but pool orientation/launch/snapshot operations repeatedly timed out. No iOS runtime pass is claimed. Unchanged attention, placement, and continuation rules remain covered by existing tracker tests; no broader provider or transport sweep was performed.
Models and harnesses: Claude Opus 5.5 through Claude Code; GPT-6.1-Sol through Codex in T3 Code.