GeezerVison is showing github.com — fix: PR description videos keep their own aspect ratio by bartlomiejbloniarz · Pull Request #37172 · pingdotgg/t3code
Conversation
Problem
Videos in PR descriptions always play in a 16:9 frame on web and mobile. Screen recordings are usually portrait, so they show as a narrow strip between wide black bars. On mobile the same fixed slot is used for videos in chat replies.
To reproduce on main: open a PR whose description embeds a portrait recording, such as #32196, and look at its Before/After table.
Change
- Web: a PR description video takes the shape of the loaded video. It is at most as wide as the column and at most 70% of the window height. Until the video's metadata loads it keeps the 16:9 placeholder.
- Mobile: an inline player sizes its frame to the video once the first frame is extracted, within the existing 480pt limit on both sides. It reuses the first-frame extraction that the Files preview already uses for its size (fix(mobile): file preview videos keep their own aspect ratio #21894). Extraction is cached per video, so the poster and the size share one decode. Players hidden in a scrolled-away feed do not extract.
Scope
A small fix of an obvious bug: portrait videos are letterboxed into a fraction of their slot. #32195 announced it as the follow-up to #32196.
#32589 fixes chat videos with a size the server reads from local files. It leaves PR description videos at 16:9, and GitHub-hosted videos have no server-side size. On mobile both PRs touch the inline player's frame for chat videos. They compose: a known size can set the first frame, and the loaded frame confirms it.
The iOS crop from #37168 is fixed separately by #37186. This PR does not depend on it and does not conflict with it.
Verification
vp test run for useMediaVideoPlayback.test.tsx, videoFrameFit.test.ts and filePreview.test.ts in apps/mobile: passes. The thumbnail request test now expects inline PR players to extract a frame for their size, and still expects none while hidden. That expectation fails on main.
vp run check:changed: passes.
- Web, local dev server, PR fix(mobile): video previews survive re-signed URLs and a late-attached player item #32196 description. The two 590x1282 recordings went from 314x176 to 290x630.
- iOS simulator (iPhone 17 Pro, iOS 26.3), same PR. Checked on a cold start and on reopening the PR.
Not checked: Android, and a landscape video in the running app. The landscape sizing is covered by the fitVideoFrame tests.
Claude Opus 5.5 in Claude Code, running in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 061c114
Macroscope's review found this PR approvable — PR-description videos retain their intrinsic proportions, with bounded sizing on web and mobile. The changes are limited to media presentation and introduce no material data or access risk.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Mobile video players measure layout bounds to size fitting and inline frames. Web video players use valid video metadata to set aspect ratios. Pull-request video elements use a shared responsive sizing class.
Changes: Video sizing
| Layer / File(s) |
Summary |
Mobile video sizing apps/mobile/src/components/MediaVideoPlayer.tsx, apps/mobile/src/lib/useMediaVideoPlayback.test.tsx |
Mobile players measure layout bounds and use video dimensions to size fitting and inline frames. The thumbnail-request test bases its expected count on compact mode. |
Web video sizing apps/web/src/components/media/MediaVideoPlayer.tsx, apps/web/src/components/pullRequest/PullRequestMarkdown.tsx |
The media player sets the video aspect ratio from positive metadata dimensions. Pull-request video elements use a shared class with responsive width and aspect-ratio rules. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk: Minimal · up to 821ed
-
Portrait videos in PR descriptions now size to their own aspect ratio on web and mobile. No actionable merge-blocking risk was found; Android and landscape playback were not manually checked.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title "fix: PR description videos keep their own aspect ratio" names the main change: PR description videos (web and mobile) now size to the video's own aspect ratio instead of a fixed 16:9 frame.… |
| Description check |
 |
The description follows the template's sections: Problem, Change, Scope, and Verification. Problem and Change are clear and specific. Scope justifies the fix as a small bug fix and links the related P… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title "fix: PR description videos keep their own aspect ratio" names the main change: PR description videos (web and mobile) now size to the video's own aspect ratio instead of a fixed 16:9 frame. It follows the conventional commit style and is specific enough for a teammate scanning history. The title does not mention mobile chat videos, which the PR also touches, but it covers the primary change.
Full details: Description check
-
Explanation
The description follows the template's sections: Problem, Change, Scope, and Verification. Problem and Change are clear and specific. Scope justifies the fix as a small bug fix and links the related PRs (#32196, #32195, #32589, #37168, #37186). Verification lists focused tests, a web check, and iOS simulator checks with observed results, and it states what was not checked (Android, landscape playback in the app). The description includes before/after screenshots for web and iOS, as the template requires for UI changes. The Scope section cites a follow-up issue (#32195) and a prior PR rather than a linked bug issue, which a reviewer may want to confirm. The closing line names the model and harness, as the template asks.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 43a48de and 821ed18.
Files selected for processing: 2
-
apps/mobile/src/lib/useMediaVideoPlayback.test.tsx
apps/web/src/components/pullRequest/PullRequestMarkdown.tsx
Files skipped from review as they are similar to previous changes: 1
-
- apps/web/src/components/pullRequest/PullRequestMarkdown.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
maria-rcks
commented
Nov 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
verified the web behavior as-is at 061c114972906bebd39768e1f4e892beb37c9715 on linux with the real dev server, repository Playwright, and /usr/bin/google-chrome.
- reproduced on
github/main (03822a8312) in a separate installed worktree before starting the pr server. the same 590×1282 recording in pr fix(mobile): video previews survive re-signed URLs and a late-attached player item #32196 rendered at 232×129 with a 16:9 frame on main, then 232×505 with its native portrait ratio on this head. both recordings stayed side by side.
- created the project and threads through the app and completed real Codex
gpt-6.1-sol turns. opened the reference from the assistant reply into the pr panel. media loaded through the server asset endpoint; no mocked responses or seeded fixtures.
- clicked the native video controls: playback advanced, pause worked, seeking reached 9.76s of 15s, and fullscreen opened. a page reload loaded the portrait frame again. dark appearance and a 1000px-wide window retained the ratio. a 700px-high window bounded the frame at 490px, matching 70vh.
- blacksmith: 104 focused mobile tests and 4 web player browser tests passed.
vp run check:changed 0afd8c0295d6dafce602bc808ec123baf37c6dc1 passed format, lint, knip, affected typechecks, adjacent tests, and react compiler checks. no code changes needed.
main, before:

pr head, after:

Not verified
native iOS and Android playback, extraction, and scrolled-away-player behavior were not exercised on this linux vm. the mobile tests passed, but they do not prove native integration. no separate Electron, macOS, Windows, relay/tunnel, or landscape-video run. other providers were not exercised; the real turns here used Codex.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for checking the web side. For native: I checked iOS on an iPhone 17 Pro simulator (iOS 26.3) with the same PR #32196, on a cold start and on reopening it. The before/after screenshots are in the description. Android is still unchecked.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|