Make the preview pane the only scrolling preview #46

Merged
weichen merged 2 commits from feature/preview-scroll-consolidate into main 2026-10-05 04:42:25 +00:00
Owner

Summary

  • Let .preview-pane-body own scrolling by replacing the pinned .ui-fp { height: 100% } with min-height: 100%, and recompute docx fit height when the page wrapper grows.
  • Remove the DocViewer overlay. Expand/restore lives on the preview pane, and text edit/save moves there with it.

Test plan

  • npx vitest run (17 files, 82 tests), including the new page-height refit case
  • npx tsc --noEmit
  • Headless Chromium: 1400px docx host scrolls inside a 764px pane; pdf iframe fills that pane
  • Logged-in manual pass across docx / xlsx / pptx / pdf / md / code in both pane widths
## Summary - Let `.preview-pane-body` own scrolling by replacing the pinned `.ui-fp { height: 100% }` with `min-height: 100%`, and recompute docx fit height when the page wrapper grows. - Remove the DocViewer overlay. Expand/restore lives on the preview pane, and text edit/save moves there with it. ## Test plan - [x] `npx vitest run` (17 files, 82 tests), including the new page-height refit case - [x] `npx tsc --noEmit` - [x] Headless Chromium: 1400px docx host scrolls inside a 764px pane; pdf iframe fills that pane - [ ] Logged-in manual pass across docx / xlsx / pptx / pdf / md / code in both pane widths
weichen added 1 commit 2026-10-05 04:41:25 +00:00
Why: The pane pinned .ui-fp to the column height, and the docx fit host then clipped overflow, so the right-hand preview could not scroll. The fullscreen DocViewer was a second shell around the same FilePreview.
Evidence: npx vitest run (17 files, 82 tests) and npx tsc --noEmit passed. Headless Chromium laid out a 1400px docx host inside a 764px pane (body scrollHeight 1400) and a pdf iframe that filled that pane.
Impact: .preview-pane-body is the scroll owner. Docx refit also watches page height. The overlay viewer is gone; expand/restore and text edit/save live on the pane.
Refs: Agent-System-Dev#196, Agent-System-Frontend#44
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-05 04:42:20 +00:00
weichen merged commit 0a0b55612c into main 2026-10-05 04:42:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#46