Files
DeepTutor/web/components/visualize
Bingxi Zhao (Frank) 46ea5cf33e fix(visualize): fullscreen overlay — portal to body + viewport-fit all types
Fullscreen was broken for every render type, two root causes stacked:

- The overlay used position:fixed but rendered inside the message bubble,
  whose ancestors (streaming animation transforms, chat scroll root) break
  fixed positioning — inset-0 resolved against the bubble and the composer
  stacked above the overlay. Render via createPortal(document.body).
- Content was fit to width only, so figures outgrew the viewport
  vertically, and items-center + overflow made the top edge unreachable.
  Now: m-auto centering (small content centers, oversized content scrolls
  from its start edge); svg (ours + mermaid) clamps max-height and
  letterboxes via the default preserveAspectRatio; Chart.js caps the
  wrapper WIDTH so its own 2:1 aspect scaling lands within the viewport
  (CSS-clamping the canvas would squish the bitmap). The chart wrapper's
  inline maxHeight moved to .dt-chart-wrap so fullscreen can override it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 01:41:24 +08:00
..