Repository navigation
Conversation
The reorder session's list getter and the mode hint's layer handle were copied into refs during render. Each is now written in a one-line layout effect, so a render React discards leaves nothing behind. No failure is reachable today: every getter reads a stable ref, and the layer's methods keep their identity.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Moving the reorder session's list getter and the mode hint's layer handle into one-line layout effects changes no behavior, and the List, ListInput and TransferList unit tests and the core typecheck pass on this head.
Next step: mark the pull request ready for review, then a maintainer adds the ci:run label because the branch is in a fork; the label takes effect on the next push or a close and reopen.
[Automated review]
|
Closed per the spec owners: folded into the next List PR as a conformance tidy. |
Maintainer impact
The List reorder copied two values into refs during render: the session's list getter, and the mode hint's layer handle. A render React discards would leave its values there. No failure is reachable today, but the write breaks the render-purity rule, and a future caller could make it real.
Intended invariant
useRefcontract: do not writeref.currentduring rendering, except to initialize it.architecture:react-component-runtimeINV3 and INV4.Change
Each ref is now written in a one-line layout effect, with a note naming what it syncs. The layer handle's effect comes before the hint effect that reads it, so that effect still reads the committed handle.
Evidence
Scope
Testing
All runs below are at this PR's tree: head e452200, the same tree as 289f247, where they ran.
listReorderContext.tsgetListRef() => listRef.current, so every render's getter returns the same element.listReorderEngine.tsxlayerRefuseLayermemoizes its handle, andref,showandhidekeep their identity.pnpm exec vitest run packages/core/src/List packages/lab/src/ListInput packages/lab/src/TransferList --project ui: 12 files, 276 tests pass.@astryxdesign/coretypecheck: 0 errors. ESLint and Prettier on the changed files: clean.