feat(mobile): pick, share, and receive files in threads - #8237
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: 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: Not approved Macroscope's review found this PR not approvable — This PR adds a substantial mobile file workflow across native sharing, local persistence, uploads, queued delivery, and received-file sharing. It also changes native product defaults and requires new iOS/Android builds, so the scope and runtime impact warrant human review. You can add or adjust custom eligibility rules. Learn more. |
06b5157 to
37945fe
Compare
e99ece8 to
eb637e6
Compare
eb637e6 to
9ae4de9
Compare
c88f3df to
33d67f9
Compare
9ae4de9 to
330b66c
Compare
7abf833 to
1dd3cc0
Compare
330b66c to
959a32f
Compare
959a32f to
1974134
Compare
1974134 to
ddb9bef
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove the temporary image-only filter now that each attachment type has a dedicated renderer. Original work by Theo Browne <me@t3.gg> with Claude Fable 5 in the Claude Code harness. Modernized by GPT-5.6 Sol in the Codex harness.
Capture the queued revision before draft persistence, keep newer edits and open editor state, and retry persistence or removal failures through the existing drain backoff. Recovery also skips attachment ids already present in the draft. Modernized by GPT-5.6 Sol in the Codex harness.
Chain editor saves for the same queued task so each reopened editor writes from its predecessor's accepted revision. Preserve that known revision through a failed editor write, while still rejecting the failed save. Keep the draft and drain hold when another queue write wins or a newer editor changes the draft before an older save finishes. Original work by Theo Browne <me@t3.gg> with Claude Fable 5 in the Claude Code harness. Modernized by GPT-5.6 Sol in the Codex harness.
Treat persisted incoming shares as attachment owners before cleanup deletes files. Stop the cleanup batch when the inbox cannot be read or decoded. Keep text appended after a recovery merge when rollback removes the merged content. Changes authored by GPT-5.6 Sol in the Codex harness.
Clear cached pending-task editor drafts only after their queued creation leaves the outbox. Persist draft removal before scheduling one combined attachment cleanup, and leave drafts for retained or requeued messages. Keep outbox removal successful when the secondary draft cleanup fails. Changes authored by GPT-5.6 Sol in the Codex harness.
c7b48be to
e42c5fd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 470c8d5. Configure here.
Intent: Expose the generic-file backend shipped in v0.0.36 through the web and desktop composer while following the official client implementation closely enough for its upstream PR to replace this patch cleanly. Behavior: - Accept images and generic files through the paperclip button, paste, and drag-and-drop; share the eight-attachment limit and use the server-advertised generic-file limit, currently 50 MB. - Upload while the user composes, show progress/retry/reattach states, and render sent files as signed downloads with their original names. - Preserve file drafts and stashes as server upload references or explicit needs-reattach markers instead of storing generic-file bytes in localStorage. - Keep upload verification, cleanup, retry, environment moves, and unknown attachment rendering explicit. - Show file names in the current mobile feed and include attachment names in transcript bootstrap context. Design constraints: - Backport official upstream PR pingdotgg#8236 at 129f2ad, rebased onto v0.0.36, rather than maintaining a parallel client upload architecture. - Use packages/client-runtime for the shared upload lifecycle and clamp file sizes to the server capability and contract maximum. - Require direct-upload support for generic files. Do not retain the fork inline-file protocol or serialize generic-file bytes into drafts and stashes. - Upload local workspace drops like the official client; do not retain the competing desktop-only drop-to-mention behavior. - Keep images on their established compression and compatibility path. Integration: - Shared client-runtime upload lifecycle and web environment atoms. - Web composer, drafts, prompt stashes, upload queue, message timeline, signed asset downloads, sidebar counts, project cleanup, and user documentation. - Minimal current mobile feed visibility and transcript bootstrap naming remain fork-only until the official follow-up covers them. Verification: - Official attachment-focused web and client-runtime tests pass (7 files, 196 tests). - Targeted client-runtime, web, and mobile typechecks pass; the existing client-runtime Effect diagnostic remains advisory. Rebase notes: - Upstream PR pingdotgg#8236 should supersede the web/client-runtime implementation wholesale once merged. - Upstream PR pingdotgg#8237 should supersede the temporary mobile filename row with signed mobile downloads and full mobile file picking/sharing. - Recheck only the transcript-bootstrap filename summary after both PRs land. - The v0.0.36 stashShortcutLabel test fixture is the only adaptation to the rebased official PR tree.
Intent: Expose the generic-file backend shipped in v0.0.36 through the web and desktop composer while following the official client implementation closely enough for its upstream PR to replace this patch cleanly. Behavior: - Accept images and generic files through the paperclip button, paste, and drag-and-drop; share the eight-attachment limit and use the server-advertised generic-file limit, currently 50 MB. - Upload while the user composes, show progress/retry/reattach states, and render sent files as signed downloads with their original names. - Preserve file drafts and stashes as server upload references or explicit needs-reattach markers instead of storing generic-file bytes in localStorage. - Keep upload verification, cleanup, retry, environment moves, and unknown attachment rendering explicit. - Show file names in the current mobile feed and include attachment names in transcript bootstrap context. Design constraints: - Backport official upstream PR pingdotgg#8236 at 129f2ad, rebased onto v0.0.36, rather than maintaining a parallel client upload architecture. - Use packages/client-runtime for the shared upload lifecycle and clamp file sizes to the server capability and contract maximum. - Require direct-upload support for generic files. Do not retain the fork inline-file protocol or serialize generic-file bytes into drafts and stashes. - Upload local workspace drops like the official client; do not retain the competing desktop-only drop-to-mention behavior. - Keep images on their established compression and compatibility path. Integration: - Shared client-runtime upload lifecycle and web environment atoms. - Web composer, drafts, prompt stashes, upload queue, message timeline, signed asset downloads, sidebar counts, project cleanup, and user documentation. - Minimal current mobile feed visibility and transcript bootstrap naming remain fork-only until the official follow-up covers them. Verification: - Official attachment-focused web and client-runtime tests pass (7 files, 196 tests). - Targeted client-runtime, web, and mobile typechecks pass; the existing client-runtime Effect diagnostic remains advisory. Rebase notes: - Upstream PR pingdotgg#8236 should supersede the web/client-runtime implementation wholesale once merged. - Upstream PR pingdotgg#8237 should supersede the temporary mobile filename row with signed mobile downloads and full mobile file picking/sharing. - Recheck only the transcript-bootstrap filename summary after both PRs land. - The v0.0.36 stashShortcutLabel test fixture is the only adaptation to the rebased official PR tree.
|
@juliusmarminge you down to push this one over the finish line? |
## What's Changed * feat(mobile): update tool summaries and chat transitions by @juliusmarminge in pingdotgg/t3code#8793 * feat(web): play video attachments in chat by @Bil0000 in pingdotgg/t3code#8688 * fix(web,mobile): snooze menu no longer offers the same wake time twice by @vitalyiegorov in pingdotgg/t3code#8741 * fix(grok): allow model changes in existing threads by @ahmed-besic in pingdotgg/t3code#8392 * feat(mobile): pick, share, and receive files in threads by @t3dotgg in pingdotgg/t3code#8237 ## New Contributors * @ahmed-besic made their first contribution in pingdotgg/t3code#8392 **Full Changelog**: pingdotgg/t3code@v0.0.37-nightly.20260830.1227...v0.0.37-nightly.20260830.1232 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.37-nightly.20260830.1232
Intent: Keep transcript bootstrap context aware of generic file attachments now that upstream web and mobile clients support their full upload and rendering lifecycle. Behavior: - Count every message attachment in transcript bootstrap context, not only images. - Include up to three attachment names plus an additional-count suffix. - Preserve image/images wording when every attachment is an image; otherwise use file/files. Design constraints: - Rely entirely on upstream attachment upload, draft, stash, rendering, download, and mobile behavior. - Keep this patch limited to the text supplied to transcript bootstrap. Integration: - Web transcript bootstrap summary only. No client upload, server, contract, mobile, or storage changes. Verification: - Upstream PRs pingdotgg#8236 and pingdotgg#8237 were audited as superseding the former attachment backport except for this summary behavior. - Targeted web verification is rerun after the complete patch stack rebases. Rebase notes: - Drop this patch only when upstream transcript bootstrap includes generic attachment names rather than filtering to images.
## What's Changed * Remove Messages Glass Lab experiment by @juliusmarminge in pingdotgg/t3code#8599 * Require human review for pull requests changing product defaults by @juliusmarminge in pingdotgg/t3code#8603 * fix(codex): avoid quadratic app-server input buffering by @juliusmarminge in pingdotgg/t3code#8605 * fix(mobile): stabilize iOS header item transitions by @juliusmarminge in pingdotgg/t3code#8607 * chore(mobile): upgrade to Expo SDK 57 by @juliusmarminge in pingdotgg/t3code#8609 * fix(mobile): harden native header toolbar items by @juliusmarminge in pingdotgg/t3code#8611 * fix(server): stop querying Claude context usage after turns by @t3dotgg in pingdotgg/t3code#8610 * chore: vouch ryanrhughes by @t3dotgg in pingdotgg/t3code#8613 * feat(web): attach PDFs, ZIPs, and other files to a turn by @t3dotgg in pingdotgg/t3code#8236 * feat(web): keybinding settings as settings rows by @StiensWout in pingdotgg/t3code#8532 * feat: let an environment publish themes as a file by @ryanrhughes in pingdotgg/t3code#8569 * fix(web): clean up provider settings list and editor by @StiensWout in pingdotgg/t3code#8504 * fix(web): keep project picker popup inside the sidebar by @SunkenInTime in pingdotgg/t3code#8627 * fix(mobile): prevent header overflow and back-button artifacts by @juliusmarminge in pingdotgg/t3code#8624 * fix(server): retry automatic thread title generation by @Bil0000 in pingdotgg/t3code#8087 * fix(client-runtime): refresh edited pull request comments by @Bil0000 in pingdotgg/t3code#8094 * fix(web): four composer spacing defects by @Bil0000 in pingdotgg/t3code#8090 * perf(desktop): skip duplicate browser updates by @Bil0000 in pingdotgg/t3code#8018 * fix(web): render nested markdown images correctly by @flamboh in pingdotgg/t3code#8501 * fix(web): unify activity logs and composer banners by @juliusmarminge in pingdotgg/t3code#8693 * fix(mobile): reduce dev-client reload and Metro startup cost by @juliusmarminge in pingdotgg/t3code#8694 * revert(web): restore previous composer banners by @t3dotgg in pingdotgg/t3code#8733 * test(web): remove tests for unreachable helpers by @t3-code[bot] in pingdotgg/t3code#8738 * feat(mobile): update tool summaries and chat transitions by @juliusmarminge in pingdotgg/t3code#8793 * feat(web): play video attachments in chat by @Bil0000 in pingdotgg/t3code#8688 * fix(web,mobile): snooze menu no longer offers the same wake time twice by @vitalyiegorov in pingdotgg/t3code#8741 * fix(grok): allow model changes in existing threads by @ahmed-besic in pingdotgg/t3code#8392 * feat(mobile): pick, share, and receive files in threads by @t3dotgg in pingdotgg/t3code#8237 * fix(web): reduce title bar scroll fade height by @maria-rcks in pingdotgg/t3code#8799 * fix(windows): strip quotes from repaired PATH by @UtkarshUsername in pingdotgg/t3code#8746 * fix(web): open agent images in expanded preview by @maria-rcks in pingdotgg/t3code#8807 * fix(git): follow repository instructions in generated source control text by @maria-rcks in pingdotgg/t3code#8804 * fix(server): stop overpricing cached Claude tokens by @SunkenInTime in pingdotgg/t3code#8806 * fix(web): keep image preview above sidebar control by @maria-rcks in pingdotgg/t3code#8811 * fix(web): keep right panel synced with agent edits by @maria-rcks in pingdotgg/t3code#8803 * fix(web,mobile): render Codex citations and artifact templates by @Yash-Singh1 in pingdotgg/t3code#8584 * chore: add Windows setup script to t3.json by @UtkarshUsername in pingdotgg/t3code#8814 * fix(web): fold interim turn responses by @maria-rcks in pingdotgg/t3code#8828 * fix(web): use circle alert for failed tool calls by @maria-rcks in pingdotgg/t3code#8840 * feat(mobile): add offline iPhone voice input by @t3dotgg in pingdotgg/t3code#8614 * fix(web): prevent pull request metadata overlap by @MatthewFeroz in pingdotgg/t3code#8790 ## New Contributors * @ryanrhughes made their first contribution in pingdotgg/t3code#8569 * @ahmed-besic made their first contribution in pingdotgg/t3code#8392 * @MatthewFeroz made their first contribution in pingdotgg/t3code#8790 **Full Changelog**: pingdotgg/t3code@v0.0.36...v0.0.37 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.37

Mobile can attach photos today, but it cannot pick documents or retain files shared from other apps. This adds Photos and Files controls when the connected environment supports file uploads, plus native share targets for documents, audio, and video.
Files stay with drafts and queued messages until delivery. Uploads reuse verified pending references, rejected sends restore the draft, and cleanup waits until no draft, outbox message, or incoming share owns the file. Saved iOS attachments continue working when an app update moves the data container. Picker and open-in-place source documents are never deleted.
Received files download from the selected environment and open in the native save/share sheet with their filenames preserved. Leaving the thread cancels unfinished downloads. Files handed to another app remain cached long enough for the recipient to read them. Unknown attachment types remain visible as inert rows.
Validation: 210 focused mobile tests pass, along with mobile typechecking, targeted lint and formatting, and Expo native configuration introspection for iOS and Android.
The native share registration and Expo SDK 57 Android sharing patch require new iOS and Android builds. Device verification is still required for native sharing, file picking, and save/share behavior before shipping those builds. No simulator or device session was run for this update. The tolerant attachment contract from #8235 must ship to older mobile clients before they receive threads containing files.
Original work by Theo Browne with Claude Fable 5 in the Claude Code harness. Prior modernization by GPT-5.6 Sol in the Codex harness. This update by nathree in the Codex harness.
Note
Medium Risk
Touches share ingestion, local file lifecycle, and server pending-upload paths with many edge cases (Android content URIs, iOS container moves); mistakes could leak files or block sends, but ownership checks and rollback paths mitigate the worst outcomes.
Overview
Extends the mobile composer and thread experience from image-only attachments to generic files, gated on each server’s file-upload capabilities and size limits.
Attach and send: Drafts now use a
DraftComposerAttachmentunion. The composer can pick documents viapickComposerFiles/persistComposerAttachmentFile(app-owned copies, enforced counts and byte limits), upload file bytes through newprepareTurnAttachments(reuse pending uploads, persist ids on drafts/outbox), and show non-image thumbnails inComposerAttachmentStrip. New-task and thread composers offer Photos vs Files when the server supports files.Share into the app: Native share registration accepts files on iOS/Android. Incoming shares ingest
file/audio/videopayloads without base64, persist copies, filter attachments by destination server config, and roll back persisted files if durable inbox writes fail. Temporary share cleanup only deletes URIs under app-owned roots so open-in-place shares cannot wipe the sender’s document.Read in threads: The feed renders file attachments as tappable rows that resolve a signed URL and download + share via
downloadAndShareAttachment; unknown attachment types render inert rows.Supporting changes include stricter incoming-share storage loading (
strictmode), unused attachment cleanup sweeps on import/cancel/send, and moving some outbox removal imports tothread-outbox-removal.Reviewed by Cursor Bugbot for commit 85b91ca. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add file picking, sharing, and receiving to mobile threads
DraftComposerAttachmentfrom image-only to a union of image and file types across composer drafts, outbox models, and incoming share drafts.pickComposerFilesfor selecting files,downloadAndShareAttachmentfor downloading and sharing received files, and renders file attachments with icons in the composer strip and thread feed.expo-sharingon Android to support simultaneous text and file payloads and preserve original filenames fromDISPLAY_NAME.removeThreadOutboxMessageandclearThreadOutboxEnvironmentexports are removed from thread-outbox.ts and moved to thread-outbox-removal.ts; out-of-tree callers importing from the old module will break.Macroscope summarized 85b91ca.