GeezerVison is showing github.com — fix(web): HTML preview height accounts for the desktop titlebar by Onik97 · Pull Request #19909 · pingdotgg/t3code
Conversation
Onik97
commented
Oct 15, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
Expanded HTML previews size their content against the full window height, leaving too little clearance between the preview close button and native Windows/Linux window controls.
Change
Subtract the native titlebar height when sizing the preview, matching the image viewer’s existing calculation. Keep the media dialog’s titlebar padding and existing p-4. Regular web and macOS use the zero-height fallback, so their layout stays unchanged.
Scope and approval
This is the focused HTML preview control-spacing fix from Onik97 in #19909. Original contributor history is preserved, and reviewed main fb990765a4 is integrated by merge. No provider, contract or native-mobile behavior changes.
Verification
- One new Chromium geometry regression fails on main and passes with the fix; all seven existing cases remain, for eight passing tests. Scoped web typecheck, lint and formatting pass.
- Fresh complete Claude Opus 5.5 and GPT 6.1 Sol reviews approve d0c7c3a8d5.
- Actual Linux Electron 44.4.5 with native window-controls overlay reports 40px. At both 1280×800 and 1280×620, baseline close-button clearance is 2px and the fixed head gives 22px. This is improved clearance; the native 40px baseline did not reproduce a collision. No simulated 52px titlebar is presented as native proof.
- The native pass covered readable HTML, Close/Escape/reopen, zoom/reset and retained iframe identity, plus real minimize/maximize/fullscreen transitions. Ordinary web baseline/head geometry matched at both heights. Native Windows/macOS were not run.
- Verification used owned isolated app/profile/state and neutral synthetic attachment content. No live user data or provider execution. The earlier white-renderer attempt remains recorded as blocked; only the fresh native run is counted as proof.
| Before: actual Linux Electron, 2px clearance |
After: actual Linux Electron, 22px clearance |
 |
 |
Native interaction recording.
Implementation integration: Claude Fable 5.1. Test stage and independent review: Claude Opus 5.5. Coordination, independent review and delegated native verification: GPT 6.1 Sol through T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 8b57eb0
Macroscope's review found this PR approvable — This is a one-file, focused UI bug fix that reuses existing titlebar geometry to keep the HTML preview controls below native window controls. Browser behavior remains effectively unchanged when no titlebar overlay is present, and the change introduces no schema, infrastructure, security, billing, or static-analysis impact.
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
Oct 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. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
661d5714-67a2-499f-a968-fb5922700dc3
📥 Commits
-
Reviewing files that changed from the base of the PR and between 8b57eb0 and d8273d7.
📒 Files selected for processing: 1
-
apps/web/src/components/chat/HtmlRenderDialog.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
📝 Walkthrough
-
HtmlRenderDialog calculates preview height from the viewport height minus the optional native title-bar height. It applies this adjustment to both the 86% height limit and the limit 160px below the adjusted viewport height.
Changes: HTML preview layout
| Layer / File(s) |
Summary |
Titlebar-aware preview height apps/web/src/components/chat/HtmlRenderDialog.tsx |
The preview height limits now use the viewport height minus --native-titlebar-height, which defaults to 0px. The limits are 86% of the adjusted height and 160px below it. |
Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Suggested reviewers: bil0000
Merge Risk: ⚪ Minimal · up to d8273
-
The preview height cap remains valid with or without a native titlebar. No identified issue blocks merging.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| 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. |
| Title check |
 |
The title clearly and concisely describes the main change: adjusting the HTML preview height to account for the desktop titlebar. It uses an appropriate conventional commit format. |
| Description check |
 |
The description covers the problem, implementation, scope and approval, verification results, platform limitations, screenshots, and interaction recording. It provides focused evidence for the UI chan… |
Full details: Description check
-
Explanation
The description covers the problem, implementation, scope and approval, verification results, platform limitations, screenshots, and interaction recording. It provides focused evidence for the UI change and explains the isolated test conditions.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Taking over this one. I’ll reduce the tests to the useful coverage, update the implementation against current main, and verify it before publishing the changes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Resolves the conflict in HtmlRenderDialog.tsx. Main added p-4 padding to the
preview container while the PR shrank the same element below the native
titlebar. The resolution keeps the padding and expresses the titlebar-aware
height through --native-titlebar-height, the CSS variable main's media dialog
viewport already uses, instead of an inline style from useNativeTitlebarHeight.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
juliusmarminge
changed the title
fix(web): keep HTML preview close button clear of window controls
fix(web): HTML preview height accounts for the desktop titlebar
Oct 19, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @Onik97 for identifying the titlebar clearance issue and the focused sizing fix. Replaced by #24581 on origin, as required for this fork takeover. Your one-line implementation matches the existing image viewer pattern and is retained; current main had deleted the old browser suite, so the replacement adds only one geometry regression. I compared the original diff with the replacement: the height calculation and regression are both covered, with fresh Linux Electron and unchanged-browser evidence, two final independent MERGE reviews, and a sufficient proof audit. Native Windows remains unverified.
|
Onik97 reacted with laugh emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
|