render cache web#74
Open
jacob314 wants to merge 2 commits into
Open
Conversation
jacob314
commented
Mar 25, 2026
Owner
- This PR resolves multiple rendering issues in the new rendering worker architecture related to nested scroll regions and sticky headers.
- Checkpoint of web renderer support
…r architecture related to nested scroll regions and sticky headers. 1. **Nested Scroll Box Backbuffer Bleeding**: Fixed a bug where nested scroll containers (like a fixed-height `<Box overflowY="scroll">`) would incorrectly expand vertically and visually "bleed" into the parent's backbuffer output during hardware scroll events. 2. **Missing Nested Sticky Headers**: Fixed an issue where sticky headers inside nested scroll regions were incorrectly skipped when generating the backbuffer content, causing them to disappear entirely from the scrollback history. 3. **Ghost Sticky Headers**: Fixed a bug where sticky headers tied to the root viewport were incorrectly stuck to the *top* of the visible viewport even if `stickyHeadersInBackbuffer` was disabled, because the check was indiscriminately targeting the entire render instead of just off-screen (`absY < 0`) coordinates. - **`src/worker/render-worker.ts`**: Updated the UI composite phase. When composing descendant nodes, `isExpanded: true` is now exclusively passed to regions that *actually* have `overflowToBackbuffer` enabled. This guarantees that nested containers retain their fixed layout constraints when scrolled off-screen. - **`src/worker/compositor.ts`**: Refined the `isHeaderStuck` and `drawStickyHeaders` checks. `skipStickyHeaders` now strictly evaluates the current region's backbuffer capability (`overflowToBackbuffer`) *and* its position relative to the viewport boundary (`absY < 0`). This ensures local sticky headers stick correctly to local containers, while global viewport headers only stamp into history if explicitly requested by the developer (`stickyHeadersInBackbuffer: true`). - Re-generated SVG snapshots for the `sticky-fullwidth` and `sticky-bug` replays using headless terminal (`UPDATE_SNAPSHOTS=1`). - Verified zero layout regressions via `npm test` across the full AVA suite.
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.