fix(web): make the file lightbox a real scrim viewer#623
Merged
Conversation
The preview overlay was a solid full-screen page: the renderer root did not stretch inside the flex section, so documents sat left-aligned with a dead right half, the wheel only scrolled directly over the text, and nothing about it read as a lightbox. - Root is now a dimmed blurred scrim over the page; header controls, nav arrows, and zoom/pager pills float on it as dark glass. - Renderers stretch to the full section and mark their empty margins with data-lightbox-backdrop: the wheel scrolls from the gutters, and a stationary click there (drags, pans, and scrollbar hits are filtered) dismisses the lightbox. - Text-like content renders as a centered paper card: markdown/notebook at reading width, code/CSV/JSON in wider cards, media fit-to-view with a shadow; edit/conflict modes keep a solid work surface. - Fix the desktop grid row (md:grid-rows-none -> minmax(0,1fr)): tall content used to grow the row past the viewport, so previews taller than the window could not scroll at all.
gbasin
enabled auto-merge
July 21, 2026 00:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The file preview overlay didn't feel like a lightbox: it was a solid full-screen page, documents sat left-aligned with a dead right half, the mouse wheel only scrolled when directly over the text, and previews taller than the window couldn't scroll at all on desktop.
Root causes:
mx-autohad no room to work) and the scroll container was only content-wide.md:grid-rows-noneleft the desktop grid row auto-sized, so tall content grew the row past the viewport instead of scrolling — the scroll container never overflowed.Change
Drive/Slack-style scrim viewer (shared
Lightbox, so it applies to /files, chat attachments, quote cards, and unfurls alike):data-lightbox-backdrop: the wheel scrolls from the side gutters, and a stationary click there closes the lightbox (pans, text-selection drags, and scrollbar clicks are filtered out).minmax(0,1fr)so tall previews actually scroll.Validation
pnpm checkgreen;pnpm e2e119/120 with one unrelated flake (message-action-sheetoverflow popover) that passes in isolation.