Skip to content

render cache web#74

Open
jacob314 wants to merge 2 commits into
masterfrom
render_cache_web
Open

render cache web#74
jacob314 wants to merge 2 commits into
masterfrom
render_cache_web

Conversation

@jacob314

Copy link
Copy Markdown
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.
@jacob314 jacob314 closed this Mar 30, 2026
@jacob314 jacob314 deleted the render_cache_web branch March 30, 2026 07:20
@jacob314 jacob314 restored the render_cache_web branch March 30, 2026 07:20
@jacob314 jacob314 reopened this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant