Skip to content

fix(core): shadow-aware incremental damage bounds#49

Merged
RtlZeroMemory merged 2 commits intomainfrom
feat/shadow-damage-bounds
Feb 13, 2026
Merged

fix(core): shadow-aware incremental damage bounds#49
RtlZeroMemory merged 2 commits intomainfrom
feat/shadow-damage-bounds

Conversation

@RtlZeroMemory
Copy link
Copy Markdown
Owner

Summary

  • fix incremental redraw culling to use shadow-aware bounds for box widgets
  • include shadow extents when building per-instance and per-id damage rect indexes
  • preserve previous-frame shadow-aware bounds so removals/toggles clean up correctly
  • add regression coverage ensuring partial redraw matches full frame when updates hit shadow-only overlap regions

Root Cause

Incremental redraw used layout rects (box body only) for damage intersection and child culling. Box shadows are rendered outside those rects (right/bottom), so shadow-only intersections were skipped and stale artifacts could remain until a full redraw/resize.

Validation

  • npm run lint
  • npm run typecheck
  • npm run build
  • npm run test

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7144acb8c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


private appendDamageRectForInstanceId(instanceId: InstanceId): boolean {
const current = this._pooledRectByInstanceId.get(instanceId);
const current = this._pooledDamageRectByInstanceId.get(instanceId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute shadow damage bounds on layout-skipped commits

appendDamageRectForInstanceId now pulls from _pooledDamageRectByInstanceId, but that map is only rebuilt during the layout-index pass (buildLayoutRectIndexes), so commits that skip layout can use stale shadow-aware bounds. Because shadow changes are not layout-driving, toggling a box shadow on (or increasing offsets) in a commit with layout: false can produce an undersized damage region, so incremental redraw clips away part of the newly visible shadow until a later full/layout render.

Useful? React with 👍 / 👎.

@RtlZeroMemory RtlZeroMemory merged commit c11f8e0 into main Feb 13, 2026
15 checks passed
@RtlZeroMemory RtlZeroMemory deleted the feat/shadow-damage-bounds branch February 13, 2026 08:15
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