Repository navigation
fix(web,mobile): explain missing file access for host videos - #24637
Draft
juliusmarminge wants to merge 3 commits into
Draft
juliusmarminge wants to merge 3 commits into
juliusmarminge wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of offering a retry A chat video pointing at a host file over a connection without file access showed "Video unavailable" with a Retry button that could never succeed. Show the existing missing-file-access reason, as images already do, and drop the retry for that case. Mobile inline tiles and the video link preview (Android modal and iOS native alert) get the same reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Host videos blocked by missing file access now explain how to recover instead of offering a retry that cannot succeed. Reachable videos and ordinary failure retries retain their existing behavior. Generated video failure labels are also excluded from thread-find, matching image placeholders. Fixes #21087.
This is a draft: Android resource-link reopen and actual URI-null retention still lack required paired proof.
Takeover
Credits @BGD-1DAY00 and #21088. Rebuilt on current main because the web renderer and test file moved; retained the original approach and shared explanation.
Added the same explanation to mobile video-link previews, including the iOS native alert. Replaced the obsolete assets test with one regression in the existing renderer suite.
Evidence
Fixture matrix · Web index and recordings · Reproduction sources and full output.
Before 3cc31ed27c; after 0b086662f3. Chromium 148 on Linux/Xvfb, DPR1, reduced motion, fixed clock; every still pixel-identical to a second frame 500ms later. Diff0 amplified ×8; DiffT16/255, no masks. Each Before/After column below uses these SHAs.
What else changed: the denied video text and Retry visibility. The denied image and settled reachable/generic/file-panel controls have zero pixel differences. Interaction narration and timestamps are in the linked recordings.
Supplemental web index · Supplement sources/output. W5 uses a disclosed synthetic signing failure and real fallback video; W6 PR uses synthetic cached PR data in the real shell. W7 removes placeholder highlights while authored text remains findable. One desktop-dark fallback pair differs by two shadow pixels at 1/255 (zero above 16); no pixel-zero claim for that pair.
Android index, recordings, accessibility and reproduction sources. Android16/API36 Pixel7, 1080×2400 physical, density420 (~411×914dp), fontscale1, light, animations disabled. Same native APK and synthetic fixtures on both revisions; two settled frames 500ms apart. Diff0 amplified and DiffT20/255. Only denied text changes; generic control has minor raster differences. Android direct playback advances on both revisions; pause/resume after remains unverified in this first capture.
M2 scripted open, tap unavailable, close, reopen, close: Before recording · After recording. M1 accessibility remains disabled and replaces “Play” with the name plus explanation. M5 unchanged shared callers have source assertions; remaining mobile lifecycle/route controls are listed explicitly in the index.
Android supplementary index: paired generic/disconnected, direct pause/resume and local draft loading/reopen. The index includes before/after recordings, observed steps, stability pairs, both diffs, reproducible drivers and explicit rejected captures. Resource-link reopen and actual URI-null retention remain unproved.
Verification log
Original description by @BGD-1DAY00
Problem
On a connection without the
filesystem:readgrant, a host video in chat () shows "Video unavailable · Demo" and a "Retry video" button. The client blocks the asset before it asks the server, so Retry can never succeed, and nothing says why. A host image in the same state already says "This connection cannot read host files. Pair again with a new link to view it." Fixes https://git.cafe/pingdotgg/t3code/issues/21087.Change
ChatMarkdownAssetImageworks out the missing-file-access state once and passes the existingMISSING_FILE_ACCESS_MESSAGEto the video as well as the image.MediaVideoPlayertakes an optionalunavailableDetailand shows it in its unavailable label, asChatMarkdownMediaUnavailableLabelalready does for images, and the label is markeddata-thread-find-ignorelike the image one. In that state the video gets no retry handler, so the button goes away. Pairing again grants the scope and the video loads as before.Mobile had the same gap:
ThreadMarkdownVideonow passes the same message, and the mobile tile shows "Video unavailable. ", the wordingThreadMarkdownImageuses. Its accessibility label carries the same text while it is unavailable, so screen readers announce the reason instead of "Play ". The mobile tile never had a retry.Scope and approval
A small fix for an obvious bug, reported in https://git.cafe/pingdotgg/t3code/issues/21087: the video branch dropped the reason its image sibling shows, and offered an action that cannot succeed. The web and mobile video paths, plus one test.
Verification
filesystem:read, and the server trace showed no asset request for the video.ChatMarkdown.assets.browser.test.tsx: a host video on a connection without file access shows the message and no "Retry video". On main it fails withVideo unavailable · DemoRetry video; with this change it passes.vp test run --project browser src/components/ChatMarkdown.assets.browser.test.tsx: 2 passed.vp lintandvp fmt --checkon the changed files, andtsc-rs --noEmitinapps/webandapps/mobile: clean (lint shows two existing warnings inLoadedMediaVideo, which this PR does not touch).vp run dev, seeded withmigrate-dev-db), with the browser paired bynode apps/server/src/bin.ts pair --scope orchestration:read --scope orchestration:operate --scope terminal:operate --scope relay:read, on a thread whose prompt and reply both embed a host video:Claude Opus 5.5 via Claude Code, running in T3 Code.
🤖 Generated with Claude Code