fix(collection): make virtual window, reveal and confirmation honest

- Give the verification instance a real constrained scroll owner and a row
  height that matches the rendered row, and feed ListBox the full data schema so
  a row that was never mounted can still be filtered.
- Move reveal validity in front of every side effect and re-check after each
  await: latest token, mounted component, enabled row, still visible and open.
  Waiting for a virtualized row now requires connected DOM, not just a
  registration, and closing the collection cancels pending work.
- Reconcile the shared active key reactively: a removed, disabled, filtered-out
  or closed active row is cleared, while the accepted value stays as history.
  The composite re-validates before confirming, so a stale candidate cannot be
  submitted.
- Read the caller's cancellation before the focus guard so a plain virtual-focus
  press keeps its pressed state, and use one nested-interactive boundary for
  both pointer and click, covering contenteditable variants and custom roles.
- Render the empty channel for static slot collections too, keeping hidden
  members mounted.

Adds the seven-case round-two probe and twelve regressions; browser checks cover
the real virtual window, remote filtering, viewport-contained navigation and
filter restoration.
This commit is contained in:
maoyingjie
2026-10-25 16:40:00 +08:00
parent 50ad3ca180
commit c8b0aa26c3
8 changed files with 522 additions and 44 deletions
@@ -22,6 +22,8 @@ export interface CollectionView {
* there is one source instead of a second copy.
*/
keyboardIntent?: Ref<boolean>;
/** The composite's disclosure state; closed collections cancel pending reveals. */
isOpen?: () => boolean;
}
export interface OwnedCollection {
items: () => CollectionRecord[];