Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new scroll-owner contract in architecture:list-windowing (FR5–FR19, DEC-5), which no current record states yet. An engineering owner records that decision by commenting /approve-spec cf9e590cb560a021cb819d79f594307b79c370b9 on this pull request, and the author may do so as an engineering owner. These requirements also build on FR1–FR3 and DEC-2 from #10796, which are not on main yet. Two fixes are needed either way:
- The first
FR7 gapline says an engine attached to a ScrollableArea viewport has no change it can subscribe to, butsubscribeScrollGeometryinpackages/core/src/hooks/scrollGeometrySubscriptions.tsalready notifies after every owner publication and Table's runtime uses it, so drop or restate that line and the matching sentence in the description. - FR6 and FR7 contradict FR8 for a scroll area that has not measured yet, because
useScrollableArearegistersisScrollable: falseuntil its first valid measurement and registers the viewport only after the ref attaches, so an engine that follows FR6 or FR7 renders every row where FR8 requires a bounded first window; define the unknown state, say when an element counts as unregistered, and add anFR8 gapline.
[Automated review]
| - **FR7 gap:** ScrollableArea publishes its scrollability only inside its own | ||
| hook call and as data attributes on its viewport; an engine attached to that | ||
| viewport has no change it can subscribe to. |
There was a problem hiding this comment.
This gap does not hold: subscribeScrollGeometry(viewport, listener) in packages/core/src/hooks/scrollGeometrySubscriptions.ts fires after every useScrollableArea publication, which first writes the scroll-owner registry, and Table's runtime already subscribes to it. Drop the line, or restate it as the path an attached engine uses (FR10: it reads the owner's state).
| - **FR8 — Unknown is not fitting.** Before the owner's first measurement, and | ||
| while it is unmeasurable (`spec:AST-025` FR8), the list renders a bounded | ||
| first window from its anchor and reserves the full list's scroll extent. It | ||
| never renders the whole list because no state exists. While a scroll lock | ||
| holds the page, the window stays as it is. |
There was a problem hiding this comment.
FR7 makes isScrollable the only source of truth, but the owner has no unknown value: useScrollableArea registers {isScrollable: false, atStart: true, atEnd: true} and keeps it while the viewport is unmeasurable, and it registers the viewport only in the layout effect after the ref attaches (which FR6 reads as unregistered). An engine that follows FR6 or FR7 therefore renders every row exactly where this clause forbids it. Define the unknown state in FR7, say when FR6 judges an element unregistered, and add an FR8 gap: line.
| once per content-box change, never per scroll. These are the reads | ||
| `architecture:react-component-runtime` INV18 permits on the scroll path. |
There was a problem hiding this comment.
Non-blocking: INV18 names its scroll-path reads one by one, and this windowing read is not among them. Consider saying that FR11 requires these reads, which INV18 allows as "a read a current clause requires there", or add the read to INV18's list as was done for the reorder drag's read.
| | System behavior | One shared internal windowing module owns long-list windowing in Core. Table virtualization is its first consumer, then Selector, then Chat. The module is not public API (INV1, INV2). | | ||
| | End-user impact | None yet: the module does not exist, and Selector renders every option. Once it ships, people opening a long list wait less, and every windowed list behaves the same way. | | ||
| | Builder impact | A Core component that windows a long list calls the one module and attaches it to its scroll area's viewport ref or to the page (FR6). No public windowing hook exists while OQ1 is open. | | ||
| | Compatibility/readiness | Additive and internal. Spec only: no module exists yet (Current-state impact). Table's approved virtualization hook keeps its public shape. | |
There was a problem hiding this comment.
Non-blocking: these re-padded rows still state build status and order ("first consumer, then Selector, then Chat", "None yet: the module does not exist", "Spec only: no module exists yet"). Please drop that status when this rebases on #10795, keeping what the record requires.
| | Builder impact | A Core component that windows a long list calls the one module and attaches it to its scroll area's viewport ref or to the page (FR6). No public windowing hook exists while OQ1 is open. | | ||
| | Compatibility/readiness | Additive and internal. Spec only: no module exists yet (Current-state impact). Table's approved virtualization hook keeps its public shape. | | ||
| | Review checks | Reject a second windowing implementation in Core, a public export of the module, or a change to Table's public virtualization shape made to adopt it. | | ||
| | Governing rules | DEC-1–DEC-5; `spec:AST-025` FR1, FR3, FR5, FR8–FR9, FR12–FR15, FR18, FR20–FR21. | |
There was a problem hiding this comment.
Non-blocking: this projection leaves out spec:AST-025 IR2 and FR19, which the body cites in the Scroll owners paragraph.
Records only. People scrolling a long list get the same windowed list whether it scrolls inside a scroll area or with the page, and a short list that fits renders every row with no windowing. The list-windowing record now sets the contract between a virtualizer and the scroll area or page it scrolls in: the area owns the scroll box and its scrollability decides whether the list windows; the virtualizer attaches through a callback
scrollRefon the area's viewport, or to the page.Stacked on #10796 (INV4, FR1–FR4, INV5), which this extends; it rebases when #10796 does.
Exact decision needed
How a virtualizer attaches to and shares work with the scroll area or page it scrolls in: who owns the scroll box, how the virtualizer attaches, what decides whether it windows, and what each side may do for scroll anchoring, scrollbar gutter, padding and sticky insets, edge state, keyboard and focus, resize observation, programmatic scrolling, nested scrollers, touch momentum and overscroll, and right-to-left text.
Existing authority searched
spec:AST-025: FR1, FR3, FR5, FR8–FR9, FR12–FR15, FR18–FR21, IR2. Owns the scroll area's measurement, keyboard access, chaining, scrollbar presentation and nested ownership; says nothing about a list that renders only part of its content.component:ScrollableArea(FR1: the root is the viewport and takes the publicref; FR4: hook state is the source of truth for edge presentation) andmodule:ScrollableArea/useScrollableArea(ScrollableAreaState, per-axisisScrollable,atStart,atEnd).architecture:list-windowingat docs(windowing): every virtualizer works in container and page scroll; Table windows inside its own scroll area #10796's head: INV1–INV5, FR1–FR4, DEC-1–DEC-4. FR4 and INV4 require container and page scroll but do not say how the engine attaches or what each side owns.component:ChatLayout: its follow-end writes the scroll position and turns anchoring off on the scroller through the scroll-anchoring owner module; its scroller does not adoptspec:AST-025.architecture:react-component-runtimeINV18 (layout reads on the scroll path) andarchitecture:public-component-apiINV23 (the scroll-anchoring attribute has one owner module).module:Table/useTableRowsVirtualization(first-visible-key anchor, focus island, no public scroll API): consistent with this contract.scrollRef,overflow-anchor,scroll anchoring,scrollbar-gutter,scroll-padding,isScrollable,ScrollableAreaState,scroll container,page scroll,momentum,overscroll.Decision
useScrollableArea) or the page owns overflow, size, padding, scrollbar and gutter, keyboard access, chaining and Sticky containment. The engine writes none of them.scrollRefpassed to the viewport's existing ref (<ScrollableArea ref={scrollRef}>orgetViewportProps({ref})), attached outside React render; or'page'. One attachment, never discovered. An unregistered element renders every row with one development diagnostic.isScrollableon the list's axis decides. Fitting renders every row and no spacer; scrolling windows. Page: the root scroller's extent exceeds its client extent by more than 1px. Unknown is not fitting: the first render is a bounded window. A scroll lock freezes the window. Crossing the threshold, mid-stream included, keeps the anchored row in place and never oscillates.scroll-padding; edge state, fades and shadows report only the full list's true ends.overflow-anchor. One writer moves the position; other components scroll through the engine's anchor.cixzhang,2026-11-09. No public scroll-ref API is added (DEC-2 holds).Rejected alternatives
useScrollableArea: it measures what the area already measures, and the owner rejected it for overlapping the area.spec:AST-025FR18 makes same-axis nesting deliberate, and discovery would follow incidental overflow.Claim scope and non-goals
architecture:list-windowingchanges: FR5–FR19, DEC-5, three gap lines, Verification rows, Change coupling, Owning code, two projection cells, one System model sentence, andapplies_togains the ScrollableArea directory and the hook file.scrollRefinput, OQ1, what each consumer renders and announces, ChatLayout's own record, and any change to ScrollableArea's public API.Evidence and implementation relationship
ref;useScrollableAreareturnsScrollableAreaStateand registers it in a private registry with no change notification; ScrollableArea has no imperative scroll API; the chat stream scroll writes the position and toggles anchoring on its scroller. No code changes.Writing rubric results
#followed by digits,/pull/and/issues/finds nothing.<FR> gap: <mismatch>. Text from the base (adoption order, "no module exists yet") is docs(windowing): restore the owner's approval lines and drop adoption order #10795's scope and is left unchanged.Scope
Validation
pnpm check:knowledge: Knowledge templates and records are aligned.git diff --check