Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Mobile now invalidates earlier Undo offers only after archive or delete succeeds. The reported pending-request Undo issue remains subject to the separate correctness gate; no additional material risk requires human judgment. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Findings
|
| Layer / File(s) | Summary |
|---|---|
Action invalidation and regression test apps/mobile/src/features/home/useThreadListActions.ts, apps/mobile/src/features/home/useThreadListActions.test.ts |
Archive and delete actions invalidate settle, snooze, and pin undo claims only after success. A regression test verifies that a failed archive preserves the Settled notice and a successful archive clears it. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#27174— The change preserves Undo state after failed Archive actions, which relates to keeping Undo reachable after Archive and Delete actions.pingdotgg/t3code#26533— The change affects when the Settled Undo notice is cleared.
Suggested reviewers: maria-rcks
Merge Risk: 
Low · up to 9c91c
-
A narrow race can remove an earlier Undo after a failed archive or delete; preserve the claim until the undo operation succeeds or fails.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the bug, implementation, approval exemption, test results, limitations, and review context.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
On mobile, archiving or deleting a thread throws away that thread's earlier Undo (Settled, Snoozed, or Unpinned) before the request goes out. If the server rejects the archive or delete, the app shows the error and the thread stays in the list, but the Undo the user still had a few seconds left on is gone. So a user who settles a thread by mistake and then fails to archive it can no longer undo the settle.
Change
executeActioninapps/mobile/src/features/home/useThreadListActions.tsnow expires those Undos only after the archive or delete succeeds. Web already works this way: #25444 expires them after the Failure early return inuseThreadActions.ts, anduseThreadActions.undo.test.tscovers it with "keeps the earlier Undo when the request fails". Un-settle still expires the Settled Undo before its request, the same as on web.Scope and approval
This is a very small fix for an obvious bug, so there is no prior issue. It moves one existing block to after the failure return so mobile matches the behavior web already tests. Overlap search: the local PR index and
gh search prsfor "mobile undo archive" anduseThreadListActionsturned up nothing on these lines. Open #29564, #26578, #24917, #24522, and #26826 touch the same file, but none of them changes the archive/delete expiry.Verification
thread action undo > keeps the earlier Undo until archiving succeedsfails withAssertionError: expected undefined to be 'Settled'right after the failed archive.cd apps/mobile && vp test run src/features/home/useThreadListActions.test.tspasses 42/42.vp run check:changedpasses: format, lint, knip, typecheck (2 packages), tests, react compiler.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code