Skip to content

fix(web): keep fullscreen visualization zoom within its frame - #29350

Closed
PixPMusic wants to merge 1 commit into
pingdotgg:mainfrom
PixPMusic:fix/visualization-fullscreen-zoom
Closed

PixPMusic wants to merge 1 commit into
pingdotgg:mainfrom
PixPMusic:fix/visualization-fullscreen-zoom

Conversation

@PixPMusic

@PixPMusic PixPMusic commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Fullscreen visualization zoom scales the iframe's visible viewport. Zooming out leaves empty space below and to the right; zooming in overflows the dialog instead of reflowing the page.

Change

Divide the iframe wrapper's layout dimensions by the zoom factor so its screen dimensions stay fixed. Content scales and reflows within the frame, and scrolling stays inside the document. This also works with already-saved visualizations.

Scope and approval

Focused correction to the existing zoom controls for an obvious layout bug, requested by Alex. Only the shared web/desktop fullscreen HTML dialog changes. Mobile uses a separate viewer; providers, contracts, and connection modes need no changes.

Related: #22349 also addresses zoom reflow as part of a broader fullscreen width and content-height fitting change.

Verification

  • vp run check:changed passed format, lint, both knip checks, affected typechecks, and React Compiler coverage.
  • Existing BrowserDocumentFrame.browser.test.tsx and HtmlRenderFrame.browser.test.tsx: 3 tests passed.
  • A temporary Chromium geometry probe failed on the original viewport sizing and passed after the fix. Checked every 25% step from 50–200%, fixed screen dimensions, text reflow, reset, zoom limits, and retention of an edited input. The probe and demo fixtures stay out of this layout-only code change.
  • Exercised the real web viewer with a generic demo and checked a private copy of the reported diagram at 100% and 75%. Electron and non-Chromium engines were not separately exercised.

Before recording · After recording

Matched demo, theme, and viewport; no work-related content or device hostnames.

Zoom Before After
75% Before: the page shrinks into the top left of the frame After: smaller content reflows across the full frame
125% Before: larger content overflows horizontally After: larger content wraps within the fixed frame

Model: GPT-6.1 Sol (xhigh reasoning) | Harness: Codex in T3 Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 2, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1853f22

Macroscope's review found this PR approvable — The fullscreen preview now compensates its frame dimensions for zoom and clips outer overflow. The change is limited to presentation, with existing zoom controls and document isolation unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 701e13c and 1853f22.

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; 9 remain after this review.

Walkthrough

The HTML preview container now clips overflow. Its inner width and height use container-query units scaled inversely to the zoom value. The zoom style remains applied.

Changes: HTML preview sizing

Layer / File(s) Summary
Preview frame sizing
apps/web/src/components/chat/HtmlRenderDialog.tsx
The preview container clips overflow instead of scrolling. The inner content width and height are set to 100 / zoom container-query units.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

  • pingdotgg/t3code#22349 — This PR changes the same dialog’s zoom sizing by dividing frame width by zoom. This PR also scales height and clips the outer frame.

Suggested labels: bugfix, size:XS

Suggested reviewers: macroscopeapp

Merge Risk: Minimal · up to 1853f

No actionable merge-blocking risk is identified in this change.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly describes the main change: keeping fullscreen visualization zoom within its frame. It is concise and uses the repository's conventional commit format.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is thorough and follows the template. It states the problem (zoom scales the iframe's visible viewport, leaving empty space when zoomed out and overflow when zoomed in), the change (di…
Full details: Description check

Explanation

The description is thorough and follows the template. It states the problem (zoom scales the iframe's visible viewport, leaving empty space when zoomed out and overflow when zoomed in), the change (divide the iframe wrapper's layout dimensions by the zoom factor), and the scope (shared web/desktop fullscreen HTML dialog only; mobile and providers untouched, requested by Alex). Verification lists the commands run, test results, a geometry probe, manual checks on the web viewer, and before/after screenshots and recordings. Gaps: the Scope and approval section cites no linked triaged issue or maintainer discussion, relying instead on a verbal request from Alex and a related PR. The template's 'Change' section is brief but adequate. Unverified areas (Electron, non-Chromium engines) are disclosed.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@maria-rcks

maria-rcks commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

Verified as-is at 1853f224db0a3440711e80e74628461c77926661 on a disposable Linux VM, using repository Playwright and /usr/bin/google-chrome. No source changes or pushes.

Reproduced on github/main (9bcf75335f9b2a8af877e1317c809b72a070b280) in a separate worktree, then stopped that dev server before starting the exact PR head. Both used vp i and background vp run dev, with isolated state. Created a project through the web UI pointing at a real git repository and used real Codex gpt-6.1-sol turns to publish the report through html_render. Checked both the saved report and fresh publication through the PR server. No mocks or seeded demo data.

  • Main: at 75%, iframe screen bounds were 970 × 606 within a 1293 × 808 area, leaving blank space. At 125%, bounds grew to 1616 × 1010 and clipped content.
  • PR: bounds stayed 1293 × 808 at every 25% step from 50–200%, while document width changed and text reflowed.
  • Nearby behavior passed: zoom limits, reset, editable input and counter state across zoom changes, vertical access to the bottom marker, horizontal scrolling inside the document, resize to 1100 × 800, light/dark themes, inline viewing after closing, and reopening at 100%.
  • Blacksmith: existing HtmlRenderFrame.browser.test.tsx and BrowserDocumentFrame.browser.test.tsx, 3 tests passed. Existing head CI has no failing or pending checks.

Same saved report, viewport, and theme in each before/after pair.

main at 75%, unused frame space

pr at 75%, report fills the frame

main at 125%, content overflows the frame

pr at 125%, content reflows inside the frame

recording: zoom range, retained input and count, reset and bottom scrolling

Not verified

Electron, native iOS/Android, Firefox/WebKit, and relay/tunnel connections were not exercised on this Linux Chromium pass. Native mobile has a separate unchanged viewer. html_preview timed out twice on the baseline; html_render publication and the resulting interactive report worked and were exercised directly.

Copy link
Copy Markdown
Member

Thanks @PixPMusic for the focused fix and thorough verification. #22349 by @Zeus-Deus also fixes fullscreen zoom reflow and includes committed regression coverage, so I’m closing this as a duplicate. Please add any further findings to that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants