Repository navigation
fix(mobile): video previews survive re-signed URLs and a late-attached player item - #32196
bartlomiejbloniarz wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Video previews now wait for player attachment and preserve in-flight thumbnail extraction across URL refreshes or navigation. The change is limited to transient preview handling, with bounded work and existing cleanup retained. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
On mobile, video previews in PR descriptions often never appear. The video plays, but its first-frame preview stays black until the app restarts. Two bugs in the preview loader cause it:
replaceAsyncresolves before the item is attached to the player. A frame requested before then comes back empty, without an error.Change
sourceChangeevent before requesting the frame. Both platforms emit it once the item is attached.This adds no retries and lowers the number of requests.
Related PRs
This follows #25988, which kept before/after video tables intact in PR descriptions. #32195 fixes a separate iOS bug where a preview that does load is drawn cropped; the two PRs are independent. A fix for videos keeping their own aspect ratio will follow once these merge.
Scope and approval
A focused fix of an obvious bug: previews for attached videos fail to load. It changes only the mobile thumbnail loader.
Verification
vp test run src/lib/videoThumbnails.test.ts src/lib/filePreview.test.ts src/componentsinapps/mobile: passes. The new tests cover reusing a started extraction for a re-signed URL, waiting for the item to attach, and a clean timeout that does not block the next request. All three fail on currentmain.vp run typecheckinapps/mobile,vp lintandvp fmt --checkon the changed files: pass.mainand with this change: below. Android emulator, checked on an earliermain: previews already loaded there, and still do.iOS — cold start, opening a PR with three attached videos (the two in the table are still drawn cropped; #32195 fixes that)
loader-ios-before.mp4
loader-ios-after.mp4
Claude Opus 5.5 in Claude Code, running in T3 Code.