feat(mobile): adopt upstream video, image, and PDF media chain - #241
Merged
Conversation
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. |
This was referenced Sep 2, 2026
Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: Julius Marminge <julius@mac.lan>
Review follow-ups on the media chain. onSendMessage grew an upload block guard from #8978 but onQueueFollowUp did not, and upstream has no onQueueFollowUp to carry the change. Both UI entry points gate on canSend today, so this is currently unreachable — but a future caller would queue a follow-up mid-upload and start a second transfer of the same bytes alongside the background worker's. The collapsed queue pill also hardcoded its accessibility label while its send sibling and the toolbar button both surface the block reason, so a failed upload disabled the pill with nothing for VoiceOver to read.
rynfar
force-pushed
the
upstream/2026-09-02-mobile-media
branch
from
September 2, 2026 17:55
5ba0143 to
d9a3bdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts three upstream mobile media commits as a chain, hand-merged to keep Pylon's composer.
#8919video playback with native iOS controls#8959native image and PDF previews#8978upload attachments while composingTogether these give mobile inline video playback, a native image/PDF viewer, and
uploads that start as soon as you attach rather than at send — so queued
messages no longer hold their bytes hostage until delivery.
Carve-outs
Upstream moved
videoMimeTypeinto a newpackages/shared/src/video.ts, but theversion they moved is the MIME-first one Pylon corrected in
f9eb4230d. Hosts mapa TypeScript
.tssource tovideo/mp2t, which turned source files into unnamedblack play tiles. The move is adopted; the body is Pylon's extension-first
implementation, and upstream's test that asserted the opposite ordering was
rewritten to Pylon's contract with the
.tsregression cases added.Pylon's composer diverges from upstream's and was preserved:
ControlPillandComposerToolbarButtoncall sites kept — upstream's hunksare written against
ComposerActionButton, which Pylon no longer uses here.#8978folds it into anelse-if chain with Send; Pylon keeps an agent stoppable for the whole recording
and transcription window.
voicePresentation.showsSend, so the dictation error phasedoes not strand the user without a send button.
QuickQuestionModal,SessionResourcesModal,SessionAgentLiveActivityModal,and the agent-message sheet all sit in a block upstream replaces wholesale with
a single
VideoPreviewModal. Both sides are kept.read
voiceInputabout 800 lines before it exists. It was trimmed to the newuploadStates/attachmentBlockReasonand reseated next to Pylon'scanSend.NewTaskDraftScreenkeeps Pylon's stricterworkspaceRootstart condition andits richer unavailability messages, with the upload block reason folded in.
useThreadOutboxDrain's dep array keeps Pylon's list plusserverConfigs;upstream's three extra deps name symbols Pylon's refactor removed.
Branding:
NSPhotoLibraryAddUsageDescriptionand the composer docs arrived saying"T3 Code" and "T3 Connect" and now say Pylon.
Behavior change worth naming
The collapsed send pill moves from
disabled={!hasContent}todisabled={!canSend}, matching upstream and the expanded toolbar. This is widerthan "attachment uploads": the pill previously rendered enabled and then no-opped
when
projectCwd === nullor provider admission was unavailable, becausehandleSendearly-returns on!canSend. It now reflects that state instead oflying about it.
Verification
@t3tools/mobiletypecheck clean,@t3tools/sharedand@t3tools/webtypecheckclean, lint clean, 1163 mobile tests passing. No user-visible
T3 Codestring inany added line.
Native rebuild and device pass still to come — this chain adds
expo-video,expo-document-picker, and three new Swift files, so the JS-only checks above donot cover it.
Model: Claude Opus 5 in Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.