Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The mobile thread outbox now reuses the shared queue implementation while preserving operation ordering and recovery after failures. Queue state remains local to each manager, with no changes to storage behavior or product defaults. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Delegate mutations to SerializedAsyncQueue apps/mobile/src/state/thread-outbox-manager.ts |
ThreadOutboxManager replaces its local promise-chain queue with a SerializedAsyncQueue instance. The serialize wrapper delegates each mutation to run. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- pingdotgg/t3code#26013: This PR introduced the mobile thread outbox manager and its mutation paths. This change updates that manager’s serialization mechanism.
Suggested reviewers: maria-rcks, juliusmarminge
Merge Risk: 
Minimal · up to e0959
-
The serializer refactor preserves outbox mutation behavior, so no actionable merge-blocking risk remains.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description includes all required sections. It explains the problem, the implementation, scope rationale, verification results, limitations, and agent attribution. The scope section explains why prior approval is not required for this focused maintenance refactor.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
The mobile thread outbox keeps its own copy of a promise-tail serializer in
thread-outbox-manager.ts.SerializedAsyncQueueinapps/mobile/src/lib/serialized-async-queue.tsalready does the same thing: it runs work in order, and a failed operation does not block the next one. Composer drafts, the PR review draft and the share inbox already use it. The outbox is the last hand-rolled copy of this pattern among those queues.Change
The outbox manager now creates one
SerializedAsyncQueueper manager, andserializecalls itsrun. The deleted code had the same body asrun, so ordering, rejection handling and timing do not change.serializestays in the manager's API, becauseflushThreadOutboxand the outbox tests call it. Enqueue rollback, load recovery and environment clears are untouched.This is one file, +3/-9.
Scope and approval
This is a maintenance refactor with no intended behavior change and no screen change, so it needs no prior issue or discussion under CONTRIBUTING. Please confirm that reusing the shared helper here is the direction you want.
Verification
vp test run src/state/thread-outbox.test.ts src/state/thread-outbox-removal.test.ts src/state/threadOutboxDelivery.test.ts src/state/threadOutboxDelivery.permissions.test.ts src/lib/serialized-async-queue.test.tsfromapps/mobile: 5 files, 81 tests passed.SerializedAsyncQueue.runtemporarily, then reverted it:vp run check:changed 1d626d02d95f9a2343553f6498037ee82290d304: format, lint, knip, typecheck and react compiler passed.Not checked:
apps/mobile/src/features/diffs/nativeReviewDiffSource.tshas a similar tail with abort and request-sharing behavior. It is left out to keep this PR to one change.Prior PRs
Generated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly