Skip to content

[trees] cumulative layout shift fixes#495

Merged
SlexAxton merged 5 commits intomainfrom
alex/trees/cumulative-layout-shift-fixes
Apr 10, 2026
Merged

[trees] cumulative layout shift fixes#495
SlexAxton merged 5 commits intomainfrom
alex/trees/cumulative-layout-shift-fixes

Conversation

@SlexAxton
Copy link
Copy Markdown
Contributor

@SlexAxton SlexAxton commented Apr 10, 2026

  • fixed cls vertically and horizontally
  • packages/path-store/src/store.ts
    • when an initialExpandedPaths entry fails to resolve to a directory, the shared-prefix cache is now cleared before
      continuing
    • this prevents a stale invalid path from poisoning the next valid one
  • packages/path-store/src/projection.ts
    • capped projection data no longer derives setSize from only the visited prefix
    • posInSet now comes from the current child offset
    • setSize now comes from the parent directory’s full childIds.length
    • so truncated startup projections keep correct ARIA sibling counts
  • packages/path-store/test/path-store.test.ts
    • added a regression test for:
      - invalid initialExpandedPaths followed by a valid shared-prefix path
      - capped projection data preserving full sibling counts

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Apr 10, 2026 5:50am
pierrejs-docs Ready Ready Preview Apr 10, 2026 5:50am

Request Review

- packages/path-store/src/store.ts
     - when an initialExpandedPaths entry fails to resolve to a directory, the shared-prefix cache is now cleared before
 continuing
     - this prevents a stale invalid path from poisoning the next valid one
 - packages/path-store/src/projection.ts
     - capped projection data no longer derives setSize from only the visited prefix
     - posInSet now comes from the current child offset
     - setSize now comes from the parent directory’s full childIds.length
     - so truncated startup projections keep correct ARIA sibling counts
 - packages/path-store/test/path-store.test.ts
     - added a regression test for:
           - invalid initialExpandedPaths followed by a valid shared-prefix path
           - capped projection data preserving full sibling counts
@SlexAxton SlexAxton merged commit 8ed263b into main Apr 10, 2026
10 checks passed
@SlexAxton SlexAxton deleted the alex/trees/cumulative-layout-shift-fixes branch April 10, 2026 05:51
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