Skip to content

fix(List): a reorder handle's name follows its row's place and label - #10815

Merged
cixzhang merged 9 commits into
meta:mainfrom
vjeux:bank/list-reorder-handle-names
Nov 12, 2026
Merged

cixzhang merged 9 commits into
meta:mainfrom
vjeux:bank/list-reorder-handle-names

Conversation

@vjeux

@vjeux vjeux commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A reorderable List names each row's handle "Reorder" and the row's name, or its place, "Reorder item N", for a nameless row. A passive effect set it, running only when the handle rendered. A screen reader could hear a stale name:

  • A memoized row kept its old place after a row above it went, or the rows reordered.
  • A label gaining or losing text through its own state kept the old name.

Problem and solution fit

The place and the label's content exist only in the DOM, so the effect missed changes made elsewhere.

The reorder session now registers the list's rows and its handles' label elements with Core's observeMutations, across numbering toggles. It keeps each handle's label naming, and the place only for a handle named after it. The handle reads them through useSyncExternalStore, so only a change renders it. The nameless-row warning moves into the session, once per handle.

Expected behavior and authority

spec:AST-103 FR4 names the handle "Reorder" and the row's label. A row with no text takes its place, with a development warning.

Smallest restoration

Evidence

  • Reproduction before the change: three new cases in ListReorderNames.test.tsx fail on main 07e325e. They cover a row above that goes, a reorder, and a label that gains and loses text.
  • Result after the change: all three pass, as does a reorder after numbering turns on. A handle named by its label or aria-label renders once per mount, and once when it hydrates.
  • Representative unchanged path: the List, reorderable and Lab reorder units and specs pass (Testing).
  • Mutation-sensitive proof: each mutant of 8903a22 fails named cases. They are 5161448 (no refresh), abb7770 (labels unwatched), 190bc65 (no notice), fa70c1e (label always names) and 79b16e3 (a replaced list unwatched).
  • Cost on 510 rows, jsdom medians: a reorder of unmemoized rows takes 150 ms here, 4,500 ms on main. Memoized, 77 ms against 42 ms, as nameless rows' names now update.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

Every run below is at 1f32922, on main 31aacff.

  • pnpm exec vitest run packages/core/src/List packages/core/src/reorderable packages/lab/src/ListInput packages/lab/src/TransferList packages/core/src/hooks/useCommittedRef.test.tsx packages/core/src/Layer: 46 files, 951 tests, including the six cases in ListReorderNames.test.tsx.
  • pnpm exec tsc --noEmit -p packages/core/tsconfig.json: 0 errors.
  • pnpm lint:strict: 0 errors, with main's 237 warnings.
  • Playwright, one worker: the ListReorderMode, ListReorderPointer, ListReorderTouch and ListDividers interaction specs pass 56 in Chromium, and 38 in WebKit with 18 skipped. The TransferList and ListInput reorder a11y specs pass 13 in Chromium.
  • pnpm check:knowledge, the Changeset coverage and public text checks pass.

Public and internal API delta

Public: none. No package entry exports anything new, @astryxdesign/core/internal/reorder included.

Internal, in Core's List folder:

  • listReorderEngine.tsx adds the ListReorderHandleName type and the session's registerHandleLabel, handleNameOf, subscribeHandleNames and attachNames, and removes positionOf.
  • ListReorderHandle.tsx exports UNREAD_HANDLE_NAME.

Size: +543/−92 lines in 5 files (31aacff..1f32922).

History

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 12, 2026 4:08pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 9, 2026
@astracat-bot

astracat-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 12, 2026, 4:18 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

Conformance tidy, no visible change. 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
list getter returns the same element. The layer ref's only reader is
the hint's layout effect. It reads the ref at the commit, right after
the committed render wrote it. The cleanup uses the handle it captured.
@vjeux
vjeux force-pushed the bank/list-reorder-handle-names branch from db41faa to fa0e10d Compare November 9, 2026 15:52
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 9, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The handle-name fix itself does what spec:AST-103 FR4 asks: the new cases fail on main and pass here, and Chromium's accessibility tree shows the names following their rows. Two things need to change before approval:

  • The reorder session creates its own MutationObserver (listReorderEngine.tsx:882) instead of registering through observeMutations in utils/sharedMutationObserver.ts, which Core uses as the one owner of DOM mutation observation (INV16 in the React component runtime record); please register the list and each label element through it and drop the session's own observer.
  • The changeset says a handle's name now stays current "when the row moves or its label changes", but on main a row named by its text already kept its name through moves and text edits, so please narrow it to handles named after their place and to labels that gain or lose their text.

Optional: move the new helpers below rowsOf's doc comment so it stays on rowsOf, and remove positionOf, which no longer has a caller.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one sentence in the changeset needs narrowing. The handle-name fix itself does what spec:AST-103 FR4 asks, and both points from the last review are addressed.

  • The changeset's first sentence (.changeset/list-reorder-handle-name-follows-row.md:5) says a place-named handle now follows its place when rows above it go or the rows reorder, but rows that render again already did that on main, so scope it to rows that do not render again (wording suggested inline).

The new cases fail on main and pass here, and the names follow memoized rows in Chromium's accessibility tree. One non-blocking comment suggestion is inline.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one regression in the new name refresh. The handle-name fix itself does what spec:AST-103 FR4 asks, and the points from the last review are addressed.

  • Miss: after a List's listStyle switches to or from 'decimal', the reorder session keeps observing the replaced list element (listReorderEngine.tsx:886), so a later reorder leaves every place-named handle with its old place, also on rows that render again, which main names correctly; re-observe when getList() returns a new element, and add a test that turns numbering on and then reorders.

The new cases fail on main and pass here. Details and a suggested fix are inline.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one lint fix in the new tests. The handle-name fix itself does what spec:AST-103 FR4 and FR1 ask, and place names now keep following reorders after the list's numbering switches, which settles the earlier finding.

  • Miss: ListReorderNames.test.tsx:28 types keys as readonly string[], and the new numbering case repeats it at :83; the repository's ESLint config makes @typescript-eslint/array-type an error whenever CI is set, so the required Lint job fails once this pull request leaves draft, and writing ReadonlyArray<string> on both lines (or running eslint --fix) clears it.

[Automated review]

A reorder handle named itself from the DOM in a passive effect: after
Item's label element when that element shows a name, else after the
row's place ("Reorder item N"). The effect ran only when the handle
rendered. A memoized row whose place changed, because a row above it
went or the rows reordered, kept the old place in its handle's name. A
label that gained or lost its text through its own state left the
handle named the old way.

The reorder session now reads both from the DOM, outside React. It
registers the list's rows and its handles' label elements with Core's
shared mutation observer, and releases them with the list. It keeps
each handle's label naming, and the place only for a handle named after
it. The handle reads them through useSyncExternalStore, as it reads
reorder mode, and renders its name from them. Only a change renders
the handle again, so its passive effect is gone. A row named after its
place still warns in development, once, from the session. positionOf
loses its last caller and goes.

The session follows the list element the List renders, which changes
when its numbering turns on or off.

ListReorderNames.test.tsx covers a row above that goes, a reorder, and
a label that gains and loses text: each fails on main and passes here.
A reorder after the numbering turns on passes on both.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is a draft; it runs once the pull request leaves draft.

The handle-name fix does what spec:AST-103 FR4 and FR1 ask: the new cases fail on main and pass here, and every point from the last review is addressed, including the test file's lint errors.

  • Miss (non-blocking, inherited from main): move announcements still use the label text read when the handle registers, so a row whose icon-only label shows "Starred" through its own state is announced as "Item 2, position 2 of 3, …" while its handle says "Reorder Starred"; refreshNames could refresh that name in a follow-up.

[Automated review]

return controller?.registerName(ref.current, spoken);
}, [controller, callerLabel, text, labelID]);
(text !== '' ? text : labelTextOf(handle, labelID ?? null));
const unname = controller?.registerName(handle, spoken);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Miss (non-blocking, inherited from main): the announcement name registered here is the label text read when this Effect runs. When the row's icon-only label later shows "Starred" through its own state, the handle says "Reorder Starred", but a move announces "Item 2, position 2 of 3, after Inbox, before Item 3" (main announces the same). refreshNames already reads this label element, so it could update the row's announcement name too, in a follow-up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Left for a follow-up after this lands; main reads the announcement name the same way.

Main brings in meta#11199, whose controller reads a collection's rows
through a reader, and meta#11352's committed-ref hook. meta#11199 edits
positionOf, which this branch removes; it stays removed. One hand edit:
refreshNames reads this.rows.read(list) instead of rowsOf(list), as
meta#11199's positionOf did, so a collection's own reader numbers its rows.

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one fix in the new name refresh. The handle-name fix itself follows spec:AST-103 FR4 and FR1, and the earlier points on the rows watch and the stored places stay fixed.

  • Miss: refreshNames compares with this.handleNames.get(handle) (listReorderEngine.tsx:990-997) and the handle keeps its own UNREAD_NAME as the server snapshot (ListReorderHandle.tsx:398-401), so a handle named by its row's aria-label or aria-labelledby, or by ListInput's text, gets a new snapshot with the same values after mounting, and again after hydration because the server snapshot is a different object, which renders it again against INV9 of the React component runtime record; comparing through this.handleNameOf(handle) and using the engine's UNREAD_NAME in the handle fixes both, and a render-count case would hold it.

CI has not run on this head yet because the pull request is a draft. Non-blocking, inherited from main: move announcements still use the label text read when the handle registers, so an icon-only label that later shows text is announced as "Item N" while its handle says "Reorder" and the label.

Claims and files checked
  • Changeset, a handle's name follows its row when the row does not render again: verified by reading (listReorderEngine.tsx:944-1029, ListReorderHandle.tsx:291-335; new cases 1, 2 and 4).
  • Changeset, a place-named handle follows its place when rows above go or the rows reorder: verified (listReorderEngine.tsx:949-997; cases 1 and 2).
  • Changeset, a label that gains or loses its text renames the handle: verified (listReorderEngine.tsx:973-982; case 4).
  • Description, main names a handle after its row, else after its place, from a passive Effect that ran only when the handle rendered: verified (the removed Effect in ListReorderHandle.tsx).
  • Description, memoized rows and labels changing through their own state kept stale names on main: verified by reading the base code; the failing runs were not reproduced.
  • Description, the session watches the rows and the label elements through the shared mutation observer and follows the list across numbering toggles: verified (listReorderEngine.tsx:903-907, :956-964, :978).
  • Description, the session keeps the place only for a handle named after it: verified (listReorderEngine.tsx:988).
  • Description, only a change renders the handle again: false, see the finding above.
  • Description, the nameless-row warning moves into the session, once per handle: verified (listReorderEngine.tsx:998-1010).
  • Description, the specification names the handle "Reorder" and the row's label, and a nameless row takes its place with a development warning: the names match FR4 and FR1; the warning is existing behavior the specification does not state for List rows.
  • Description, two latest-value refs move onto the committed-ref hook, superseding an earlier closed pull request, with no reachable discriminating test: verified (listReorderContext.ts:194, listReorderEngine.tsx:2543; both List getters read one list ref).
  • Description, the old position helper loses its last caller and goes: verified (no caller left in Core or Lab).
  • Description, the merge of main brings the rows reader and the committed-ref hook with one hand edit: verified (the merge's only two-parent difference is this.rows.read(list)).
  • Description, test, type-check, lint, browser, mutant and timing results: not reproduced.
  • Description, no hidden public API, visual, default or interaction change, and no internal context in public text: verified.
  • Files: listReorderEngine.tsx (finding: snapshot comparison), ListReorderHandle.tsx (finding: second UNREAD_NAME; inherited announcement note), listReorderContext.ts (clear), ListReorderNames.test.tsx (clear), .changeset/list-reorder-handle-name-follows-row.md (clear).

Automated review (maintainer link)

The names refresh compared each handle's name with the session's own
entry, which a handle named some other way has none of before the
first read. So it stored a new {position: null, labelNamesRow: null}
and the handle rendered again with the same name on every mount
(architecture:react-component-runtime INV9). It now compares with
handleNameOf, whose shared unread name has the same fields.

A test counts the handle's renders through the verb it reads each
render: once per handle on mount, and once for a row that mounts later.
The handle's server snapshot was its own unread name, and the session
answered an unread handle with another object with the same fields.
So after hydration React saw a new snapshot, and each handle rendered
again with the same name (architecture:react-component-runtime INV9).
The handle now exports one unread name, and the session answers with
it.

A test hydrates server markup and counts the handle's renders through
the verb it reads each render: once per handle.
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Nov 12, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 1205c61

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one fix left in the handle-name snapshot. The handle-name fix follows spec:AST-103 FR4 and FR1, and a handle named by aria-label, aria-labelledby or ListInput's text now keeps one snapshot through mount and hydration.

  • Miss: a row named by its text label (<ListItem itemKey="inbox" label="Inbox" />) gets a new handle snapshot on the first read, because refreshNames moves labelNamesRow from null to true (listReorderEngine.tsx:979, :987-994) though the handle and the session both treat the two values alike, so every such handle renders again with the same name after mounting and after hydrating, against INV9 of the React component runtime record and against the description's "only a change renders it" and "a hydrated handle renders once"; giving "unread" and "the label names the row" one value (for example label?.labelId == null || namesRow(element) ? null : false) and adding a text-labelled row to the two render-count cases fixes it.

Non-blocking, inherited from main: move announcements still use the label text read when the handle registers, which you have already planned as a follow-up. CI has not run on this head yet because the pull request is a draft.

Claims and files checked
  • Changeset, a handle's name follows its row when the row does not render again: verified (listReorderEngine.tsx:941-1026, ListReorderHandle.tsx:291-335; test cases at lines 45, 73 and 133).
  • Changeset, a place-named handle follows its place when rows above go or the rows reorder: verified (listReorderEngine.tsx:946-948, :985-986; cases at lines 45, 73 and 103).
  • Changeset, a label that gains or loses its text renames the handle: verified (listReorderEngine.tsx:970-982; case at line 133).
  • Description, main named the handle from a passive Effect that ran only when the handle rendered: verified (the removed Effect in ListReorderHandle.tsx).
  • Description, memoized rows and labels changing through their own state kept stale names on main: verified by reading the base code; the failing runs were not reproduced.
  • Description, the session watches the rows and the label elements through the shared mutation observer, across numbering toggles: verified (listReorderEngine.tsx:898-904, :953-961, :970-977).
  • Description, the session keeps the place only for a handle named after it: verified (listReorderEngine.tsx:985).
  • Description, the handle reads the names through an external store, so only a change renders it: false for rows named by their text label, see the finding; true for handles named some other way.
  • Description, the nameless-row warning moves into the session, once per handle: verified (listReorderEngine.tsx:995-1007).
  • Description, the specification names the handle "Reorder" and the row's label, and a nameless row takes its place with a development warning: the names match FR4 and FR1; the warning is existing behavior the specification does not state for List rows.
  • Description, two latest-value refs move onto the committed-ref hook, superseding an earlier closed pull request, with no reachable discriminating test: verified (listReorderContext.ts:194, listReorderEngine.tsx:2540; both List getters read one list ref).
  • Description, the old position helper loses its last caller and goes: verified (no caller left in Core or Lab).
  • Description, the merge of main brings the rows reader and the committed-ref hook with one hand edit: verified (the merge's only two-parent difference reads the rows through the rows reader).
  • Description, the follow-up commits keep an unchanged name's snapshot: verified for handles named by aria-label, aria-labelledby or ListInput's text (listReorderEngine.tsx:987); false for a text-labelled row's first read.
  • Description, the server snapshot and the session's unread answer are one object, so a hydrated handle renders once: the shared object is verified (ListReorderHandle.tsx:294, :403); "renders once" is false for rows named by their text label.
  • Description, a handle named by aria-label renders once per mount and once when it hydrates: verified by reading (cases at lines 161 and 196), not executed.
  • Description, test, type-check, lint, browser, mutant and timing results: not reproduced.
  • Description, no hidden public API, visual, default or interaction change, and no internal context in public text: verified.
  • Files: listReorderEngine.tsx (finding: first-read snapshot), ListReorderHandle.tsx (same finding: its unread snapshot comment; inherited announcement note), listReorderContext.ts (clear), ListReorderNames.test.tsx (clear; its render-count cases cover aria-label rows only), .changeset/list-reorder-handle-name-follows-row.md (clear).

Automated review (maintainer link)

The names refresh stored whether Item's label element names the row:
null before the first read, and true after it, though the handle and
the session read both alike. So a handle named by its row's text label
rendered again with the same name after mounting and after hydrating
(architecture:react-component-runtime INV9). The snapshot now records
whether the label shows no name, which stays false until a read finds
the label blank.

Both render-count cases add a row named by its text label.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 2c1fdb4

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request leaves draft.

The handle-name fix follows spec:AST-103 FR4 and FR1: a place-named handle now follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. The remaining snapshot point from the last review is fixed: a handle named by its text label keeps the unread snapshot, so it renders once per mount and once when it hydrates. The announcement name for a label that changes through its own state stays the follow-up you already noted.

Claims and files checked
  • Changeset: a handle's name follows a row that does not render again, a place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and the new cases.
  • The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name derivation and the English catalog.
  • Main wrote these names in an Effect that ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified by tracing main's handle, which ListItem memoizes.
  • The session registers the rows and label elements with the shared mutation observer, across numbering toggles, and keeps the place only for place-named handles. Verified.
  • The handle reads a snapshot through useSyncExternalStore that changes only with its payload, including the first read and hydration. Verified.
  • The nameless-row warning moves into the session, once per handle. Verified; it is the existing warning, unchanged.
  • The two ref swaps follow the committed-ref hook rule and change no behavior, and no test can tell them apart. Verified.
  • The unused positionOf is removed. Verified: nothing references it.
  • The three new cases fail on main and pass here, with the numbering case and the render-count cases. Verified by tracing; not run here.
  • The reported suite counts, typecheck, lint, Playwright results and 510-row timings were not reproduced here and are left to CI. Fifteen test files were confirmed in the listed paths, and the timing direction matches the code.
  • The mutation-sensitivity commits are not in the repository. The same mutations, reasoned on this head, each fail a named case.
  • The merge's one hand edit and each later commit match the history the description gives. Verified.
  • Files, all clear: the changeset, ListReorderHandle.tsx, listReorderEngine.tsx, listReorderContext.ts and ListReorderNames.test.tsx, which agree on the shared snapshot type and its unread value.

Automated review (maintainer link)

@vjeux
vjeux marked this pull request as ready for review November 12, 2026 13:44
@vjeux
vjeux marked this pull request as draft November 12, 2026 14:06
Main brings in meta#10912, which changes Layer/useLayer.tsx, the layer the
mode hint shows. The merge needs no hand edit.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec a09b127

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request leaves draft.

The merge of main leaves the handle-name fix unchanged. It still follows spec:AST-103 FR4 and FR1: a place-named handle follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. Miss, non-blocking: the ListReorderHandleName comment says position is null only until the session reads it, but it also stays null for a handle that is not named after its place (inline suggestion). The announcement name for a label that changes through its own state stays the follow-up you already noted.

Claims and files checked
  • Changeset: a handle's name follows a row that does not render again. A place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and new cases 1, 2 and 4.
  • The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name logic and the English catalog.
  • On main, a passive Effect set these names and ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified in main's handle code and in ListItem's memoized handle element.
  • The session registers the rows and label elements with the shared mutation observer across numbering toggles. It keeps each handle's label naming, and the place only for place-named handles. Verified.
  • The handle reads a snapshot through useSyncExternalStore, so only a change renders it. Verified, including the first read and hydration.
  • The nameless-row warning moves into the session, once per handle. Verified: the message and the condition are unchanged.
  • The reorderable record names the handle "Reorder" plus the row's label, and a row with no text takes its place. Verified. The development warning is existing behavior; the record states one only for attached plain elements.
  • The two ref moves follow the committed-ref rule, change no behavior and leave no test that can tell them apart. Verified by reading both sites.
  • The fix removes the unused positionOf. Verified: nothing else references it.
  • Later commits keep an unchanged name's snapshot. Verified in refreshNames and the shared unread value.
  • The three new cases fail on main and pass here, as do the numbering case and the render-count cases. Verified by tracing on main and the head; not run here.
  • Each listed mutant fails named cases. The mutant commits are not in the repository. The same mutations, reasoned on this head, each fail a named case.
  • The 510-row timings were not reproduced here. Their direction matches the code: one pass per change instead of one list read per handle.
  • The scope boxes say one defect, no hidden public API, default or interaction change, and no internal context. Verified. The ref moves are a no-behavior conformance change that the description names.
  • The reported test, typecheck, lint, Playwright and knowledge-check runs were not reproduced here and are left to CI.
  • No public API changes, and the internal additions and the removal are as listed. Verified: no package entry, ./internal/reorder included, exports any of them.
  • The size is 543 added and 92 deleted lines in 5 files. Verified.
  • The history matches. The last merge of main needs no hand edit and leaves the pull request's own patch unchanged. Verified: the patch is byte-identical to the one at the last reviewed revision.
  • Files, .changeset/list-reorder-handle-name-follows-row.md: clear.
  • Files, packages/core/src/List/ListReorderHandle.tsx: clear.
  • Files, packages/core/src/List/listReorderEngine.tsx: one non-blocking comment suggestion (ListReorderHandleName).
  • Files, packages/core/src/List/listReorderContext.ts: clear.
  • Files, packages/core/src/List/__tests__/ListReorderNames.test.tsx: clear. It agrees with the engine and the handle on the shared snapshot type and its unread value.

Automated review (maintainer link)

Comment on lines +256 to +259
* What names a handle besides its own text, as the list last showed it. Its
* row's 1-based place among the list's rows, null until the session reads
* it. And whether Item's label element shows no name: an unread label counts
* as one that shows a name, so a first read that finds a name changes nothing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Miss (non-blocking, INV29): this says position is null until the session reads it, but refreshNames also keeps it null for every handle that is not named after its place (line 986). A shorter version keeps only the facts:

/**
 * A handle's place and label naming, as the list last showed them.
 * `position` is the row's 1-based place. It is null before the first read
 * and for a handle that is not named after its place.
 * `labelShowsNoName` starts false, so a first read that finds a name
 * changes nothing.
 */

@vjeux
vjeux marked this pull request as ready for review November 12, 2026 15:07
@vjeux
vjeux marked this pull request as draft November 12, 2026 15:47
Main brings in meta#11336, which changes List/ListItem.tsx, the row that
renders the reorder handle. The merge needs no hand edit.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 1f32922

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request leaves draft.

The merge of main leaves the handle-name fix unchanged, and it still follows spec:AST-103 FR4 and FR1: a place-named handle follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. Two non-blocking points stay open: the ListReorderHandleName comment still says position is null only until the session reads it, though it also stays null for a handle not named after its place (inline suggestion), and the announcement name for a label that changes through its own state is the follow-up you already noted.

Claims and files checked
  • Changeset: a handle's name follows a row that does not render again; a place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and new cases 1, 2 and 4.
  • The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name logic and the English catalog.
  • On main, a passive Effect set these names and ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified in main's handle code, ListItem's memoized handle element and List's memoized context.
  • The session registers the rows and label elements with the shared mutation observer across numbering toggles, keeping each handle's label naming and the place only for place-named handles. Verified.
  • The handle reads a snapshot through useSyncExternalStore, so only a change renders it. Verified, including the first read and hydration.
  • The nameless-row warning moves into the session, once per handle. Verified: the message and the condition are unchanged.
  • The reorderable record names the handle "Reorder" plus the row's label, and a row with no text takes its place. Verified; the development warning is existing behavior, which the record states only for attached plain elements.
  • The two ref moves follow the committed-ref rule, change no behavior and leave no test that can tell them apart. Verified by reading both sites.
  • The fix removes the unused positionOf. Verified: nothing else references it.
  • Later commits keep an unchanged name's snapshot. Verified in refreshNames and the shared unread value.
  • The three new cases fail on main and pass here, as do the numbering case and the render-count cases. Verified by tracing on main and the head; not run here.
  • Each listed mutant fails named cases. The mutant commits are not in the repository; the same mutations, reasoned on this head, each fail a named case.
  • The 510-row timings were not reproduced here; their direction matches the code, one pass per change instead of one list read per handle.
  • The scope boxes say one defect, no hidden public API, default or interaction change, and no internal context. Verified; the ref moves are a no-behavior conformance change that the description names.
  • The reported test, typecheck, lint, Playwright and knowledge-check runs at this head were not reproduced here and are left to CI.
  • No public API changes, and the internal additions and the removal are as listed. Verified: no package entry, the internal reorder entry included, exports any of them.
  • The size is 543 added and 92 deleted lines in 5 files. Verified.
  • The history matches, and the latest merge of main, which brings a documentation-only change to ListItem, needs no hand edit and leaves the pull request's own patch unchanged. Verified: the patch is byte-identical to the one at the last reviewed revision.
  • Files, .changeset/list-reorder-handle-name-follows-row.md: clear.
  • Files, packages/core/src/List/ListReorderHandle.tsx: clear.
  • Files, packages/core/src/List/listReorderEngine.tsx: one non-blocking comment suggestion (ListReorderHandleName).
  • Files, packages/core/src/List/listReorderContext.ts: clear.
  • Files, packages/core/src/List/__tests__/ListReorderNames.test.tsx: clear; it agrees with the engine and the handle on the shared snapshot type and its unread value.

Automated review (maintainer link)

@vjeux
vjeux marked this pull request as ready for review November 12, 2026 16:37
@cixzhang
cixzhang merged commit 4d1cb82 into meta:main Nov 12, 2026
129 checks passed
@vjeux
vjeux deleted the bank/list-reorder-handle-names branch November 13, 2026 04:36

This branch was successfully deployed

1 active deployment
Preview — 1f32922a Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants