fix(mobile): stop alerting that shared content vanished after sending it - #11487
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped mobile bug fix that suppresses a false “shared content unavailable” alert during deferred send navigation. It preserves the existing import and send flow without schema, infrastructure, security, billing, default, or static-analysis changes. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Since #10435, sending a new task clears the composer draft synchronously but defers the navigation by a frame. The share import effect re-ran in that frame: the draft's importedShareIds receipt was gone, the inbox entry had already been consumed, so the share looked unavailable and the screen raised "Shared content unavailable" over a task that had just sent fine. Remember the share this screen consumed and treat it as imported for the rest of the screen's life, independent of the draft's receipt. Co-Authored-By: Claude Code <noreply@anthropic.com>
99e8209 to
3444b8a
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughNew-task drafts now handle native text paste. The screen inserts text directly within limits or creates a uniquely named file attachment when supported. It also preserves asynchronous insertion state, blocks submission during attachment creation, cleans stale files, and preserves incoming-share state. ChangesNative paste and draft attachment handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ComposerEditor
participant NewTaskDraftScreen
participant AttachmentStorage
ComposerEditor->>NewTaskDraftScreen: native text paste event
NewTaskDraftScreen->>NewTaskDraftScreen: validate text and draft limits
NewTaskDraftScreen->>AttachmentStorage: create pasted-text attachment
AttachmentStorage-->>NewTaskDraftScreen: attachment result or error
NewTaskDraftScreen->>ComposerEditor: insert text or attachment at captured selection
Merge Risk: ⚪ Minimal · up to The updated draft, paste, and share handling has no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
After sending a task that came in through the share sheet, the app raised "Shared content unavailable — the shared content is no longer in the inbox" even though the task had sent fine.
Since #10435, sending clears the composer draft synchronously but defers the navigation by a frame. The share import effect re-runs in that frame: the draft's
importedShareIdsreceipt is gone with the draft, the inbox entry was consumed during the import, so the share reads as unavailable.The screen now remembers the share it consumed and treats it as imported for the rest of its life, independent of the draft receipt.
Verification
Behavioral, no visual change (an alert that no longer appears). The trigger lives in the interaction between
clearComposerDraftContentand the deferredsubmitNavigationActioneffect insideNewTaskDraftScreen; the repo's testing rules exclude rendering the screen to assert it, so the proof is the trace above plustsc --noEmitand lint clean forapps/mobile. Not exercised on a device in this PR; see the top of the stack.Claude Fable 5 via Claude Code.
Summary by CodeRabbit
New Features
Bug Fixes