Skip to content

perf(core): Lightbox's pager comes with the touch runtime - #11476

Draft
cixzhang wants to merge 14 commits into
perf/defer-touch-action-groupsfrom
perf/defer-touch-pager
Draft

cixzhang wants to merge 14 commits into
perf/defer-touch-action-groupsfrom
perf/defer-touch-pager

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Performance, stacked on #11466 (then #11463 and #11450): Lightbox stops importing the pager (hooks/usePager, which builds on the animator and the gesture host) statically. It renders the pager as a touch-runtime part once the shared loader has loaded the runtime. It is not a bug fix or a feature: nothing changes after the load, and there's no API change.

User or maintainer impact

  • People loading a page with a Lightbox download less JavaScript before first paint. Lightbox still carries its zoom code until the next PR in the stack. The page-level numbers come at the end of the stack.
  • Before the runtime loads (first paint, then idle, at most 2 s): a gallery's Next and Previous buttons and the arrow keys page at once, as they do today under a fine pointer. No drag pages and no slide plays. Once the runtime loads, the pager takes the track from the page it rests on.
  • Date and time fields no longer reach the pager: the wheels read its index arithmetic from a small module.

Problem and solution fit

  • Lightbox.tsx called usePager, so every page with a Lightbox shipped the pager, the animator and the gesture host.
  • The pager is now the runtime part LightboxPager, which calls the unchanged hook. Lightbox renders it after its content, so the viewport's and track's nodes are attached when it attaches.
  • Before the load, the track rests on the current page through logical insets (insetInlineStart/insetInlineEnd, so RTL holds) set from index. That's the same stride the pages use (100% + the page gap). The pager moves the track by translate once it mounts, and the inset style goes away in the same render, so the two never stack.
  • mod and nearestLoopCopy hold no motion code. They move to hooks/pagerIndex.ts (INV13 names why), and usePager re-exports them.

Authority

architecture:react-component-runtime INV13 and spec:AST-080 DEC-5, as amended in #11450 (with the per-component clarification). INV13's gap line drops hooks/usePager, and the record names hooks/pagerIndex.ts.

Change and evidence

  • Lightbox/Lightbox.tsx, hooks/pagerIndex.ts (new), hooks/usePager.ts, DateInput/PickerWheel.tsx, utils/touchRuntimeModules.tsx, plus INV13.
  • With this change, no static path from the Lightbox, DateInput, TimeInput or DateTimeInput entries reaches hooks/usePager.

Scope

Components: Lightbox, hooks/usePager, DateInput (PickerWheel import only)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split (Lightbox's zoom is the next PR).
  • Public text and artifacts contain no internal Meta context.

Testing

Red first, each failing on #11466's head:

  • utils/touchRuntime.boundary.test.ts: the Lightbox, DateInput, TimeInput and DateTimeInput entries reach no pager statically.
  • Lightbox.test.tsx: "pages at once by its button before the touch runtime loads, the track resting on the page".

Also:

  • Lightbox.test.tsx loads the runtime in beforeAll.
  • Lightbox, DateInput, usePager, SnapPaging and touchRuntime suites, with the rest of the stack's suites: 1,610 passed.
  • Core typecheck and check:knowledge pass.

Writing rubric results

  • R1 present tense: pass; INV13 states what the module holds.
  • R2–R7: none in the record.

Owner and land path

Owner: the Astryx fix loop, lane 3. Lands after #8690 merges, in stack order (#11450, #11463, #11466, #11476, #11478, #11508, #11518, #11525, #11530, #11536, #11540, #11544), each after Specs, CodeBunny at its head and green CI; the drain merges.

Lightbox no longer imports the pager statically: the pager is a runtime part it renders once the runtime has loaded. Until then the gallery's track rests on the current page by its insets, the buttons and the arrow keys page at once, and no drag pages. The looping index helpers move to hooks/pagerIndex.ts, so the date and time wheels read them without the pager. INV13 names the module and its gap line drops hooks/usePager.
@vercel

vercel Bot commented Nov 13, 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 14, 2026 8:12pm UTC

Request Review

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

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Nov 14, 2026, 8:55 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9b90405

@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.

Lightbox's pager now comes with the shared touch runtime, matching INV13 and Lightbox FR7 as approved at this head. It relies on the loader and the AST-080 DEC-5 amendment from the pull requests it is stacked on, so it lands after them. Two non-blocking suggestions:

  • Extend .changeset/touch-runtime-after-first-paint.md to mention Lightbox's before-load paging; changeset coverage asks for it once this targets main.
  • Drop the export {mod, nearestLoopCopy} re-export in usePager.ts; nothing imports them from there any more.
Claims and files checked
  • Claim: Lightbox no longer imports the pager statically and renders it once the runtime loads. Verified (Lightbox.tsx, boundary test).
  • Claim: nothing changes after the load, and no API changes. Verified (the same slide in a browser; the generated API surface is unchanged).
  • Claim: pages with a Lightbox ship less JavaScript in their first load, though the zoom code stays. Verified (four modules leave Lightbox's static graph).
  • Claim: before the load, Next, Previous and the arrow keys page at once, with no drag or slide, as under a fine pointer today. Verified (new test, browser probe). The 2 s cap bounds when the load starts.
  • Claim: once loaded, the pager takes the track from the page it rests on. Verified (browser probe; no jump).
  • Claim: the track rests by logical insets, so right-to-left holds. Verified (right-to-left browser probe).
  • Claim: the inset style and the pager's translate never stack. Verified (one render swaps them).
  • Claim: mod and nearestLoopCopy move to hooks/pagerIndex.ts, and usePager re-exports them. Verified; the re-export has no importer.
  • Claim: date and time fields no longer reach the pager. Verified (boundary test).
  • Claim: both new tests fail on the base first. Verified.
  • Claim: core typecheck and check:knowledge pass. Verified.
  • Claim: the stack's suites pass. Verified for the suites this change touches; the stack-wide tally was not rerun.
  • File docs/architecture/react-component-runtime.md: clear
  • File docs/specs/components/Lightbox/Lightbox.spec.md: clear
  • File packages/core/src/DateInput/PickerWheel.tsx: clear
  • File packages/core/src/Lightbox/Lightbox.test.tsx: clear
  • File packages/core/src/Lightbox/Lightbox.tsx: clear
  • File packages/core/src/hooks/pagerIndex.ts: clear
  • File packages/core/src/hooks/usePager.ts: non-blocking (unused re-export)
  • File packages/core/src/utils/touchRuntime.boundary.test.ts: clear
  • File packages/core/src/utils/touchRuntimeModules.tsx: clear

Automated review (maintainer link)

import {paging, registerPagingTable} from '../motion/uikit/paging';
import {observeResize} from '../utils/sharedResizeObserver';

export {mod, nearestLoopCopy};

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.

Non-blocking: nothing imports mod or nearestLoopCopy from usePager any more (PickerWheel now imports hooks/pagerIndex), and this statement sits between two imports. Consider deleting the re-export.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2498ae9

@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.

Lightbox's pager now comes with the shared touch runtime, matching INV13 and Lightbox FR7 as approved at this head. It relies on the loader and the AST-080 DEC-5 amendment from the pull requests it is stacked on, so it lands after them. Two non-blocking suggestions:

  • Extend .changeset/touch-runtime-after-first-paint.md to mention Lightbox's before-load paging; changeset coverage asks for it once this targets main.
  • Drop the export {mod, nearestLoopCopy} re-export in usePager.ts; nothing imports them from there any more.
Claims and files checked
  • Claim: Lightbox no longer imports the pager statically and renders it once the runtime loads. Verified (Lightbox.tsx, boundary test).
  • Claim: nothing changes after the load, and no API changes. Verified (the same slide in a browser; the generated API surface is unchanged).
  • Claim: pages with a Lightbox ship less JavaScript in their first load, though the zoom code stays. Verified (four modules leave Lightbox's static graph).
  • Claim: before the load, Next, Previous and the arrow keys page at once, with no drag or slide, as under a fine pointer today. Verified (new test, browser probe). The 2 s cap bounds when the load starts.
  • Claim: once loaded, the pager takes the track from the page it rests on. Verified (browser probe; no jump).
  • Claim: the track rests by logical insets, so right-to-left holds. Verified (right-to-left browser probe).
  • Claim: the inset style and the pager's translate never stack. Verified (one render swaps them).
  • Claim: mod and nearestLoopCopy move to hooks/pagerIndex.ts, and usePager re-exports them. Verified; the re-export has no importer.
  • Claim: date and time fields no longer reach the pager. Verified (boundary test).
  • Claim: both new tests fail on the base first. Verified.
  • Claim: core typecheck and check:knowledge pass. Verified.
  • Claim: the stack's suites pass. Verified for the suites this change touches; the stack-wide tally was not rerun.
  • File docs/architecture/react-component-runtime.md: clear
  • File docs/specs/components/Lightbox/Lightbox.spec.md: clear
  • File packages/core/src/DateInput/PickerWheel.tsx: clear
  • File packages/core/src/Lightbox/Lightbox.test.tsx: clear
  • File packages/core/src/Lightbox/Lightbox.tsx: clear
  • File packages/core/src/hooks/pagerIndex.ts: clear
  • File packages/core/src/hooks/usePager.ts: non-blocking (unused re-export)
  • File packages/core/src/utils/touchRuntime.boundary.test.ts: clear
  • File packages/core/src/utils/touchRuntimeModules.tsx: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 4f17dcb

@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 blocking issue in Lightbox's paging before the touch runtime loads. Every other delta matches INV13 and Lightbox FR7 as approved at this head.

  • Miss: a photo zoomed and then left with Next, Previous or an arrow key before the touch runtime loads keeps its zoom off screen, because the onSettle reset (Lightbox.tsx:1619-1629) now runs only once LightboxPager mounts, so on a touch screen the first drag after the load slides that photo back in at 2×; run the same reset from the page-change callbacks while there is no pager, and add a test that holds the loader, zooms, presses Next, loads the runtime and expects the left photo's inline translate and scale cleared.

This pull request builds on the loader and the AST-080 DEC-5 amendment from the pull requests it is stacked on, so it lands after them. Two optional cleanups: drop the unused export {mod, nearestLoopCopy} in usePager.ts (and point the wheelPhysics.ts:118 comment at hooks/pagerIndex.ts), and mention Lightbox's before-load paging in the touch-runtime changeset.

Claims and files checked
  • Claim: Lightbox no longer imports the pager statically and renders it once the shared touch runtime loads. Verified (Lightbox.tsx, boundary test fails on the base and passes here).
  • Claim: nothing changes after the load, and there is no API change. API verified unchanged (generated surface identical); "nothing changes after the load" is false for a photo zoomed and left before the load (the blocking finding).
  • Claim: pages with a Lightbox download less JavaScript before first paint, while the zoom code stays. Verified for the pager (boundary test); the byte saving is not measured.
  • Claim: before the load, Next, Previous and the arrow keys page at once, as under a fine pointer today, with no drag or slide. Verified (new test; touch browser capture).
  • Claim: once loaded, the pager takes the track from the page it rests on. Verified (browser capture: no jump).
  • Claim: the track rests by logical insets, so right-to-left holds. Verified (right-to-left browser capture matches the base).
  • Claim: the inset style and the pager's translate never stack. Verified (one render swaps them).
  • Claim: mod and nearestLoopCopy move to hooks/pagerIndex.ts and usePager re-exports them. Verified; the re-export has no importer.
  • Claim: date and time fields no longer reach the pager, and no static path from the four entries reaches it. Verified (boundary test).
  • Claim: both new tests fail first on the branch below. Verified (five cases fail on the base).
  • Claim: the Lightbox suite loads the runtime before its tests. Verified (Lightbox.test.tsx).
  • Claim: the touched suites pass. Verified (1,677 tests in 39 files); the stack-wide tally was not rerun.
  • Claim: Core typecheck and the knowledge check pass. Verified.
  • File docs/architecture/react-component-runtime.md: clear
  • File docs/specs/components/Lightbox/Lightbox.spec.md: clear
  • File packages/core/src/DateInput/PickerWheel.tsx: clear
  • File packages/core/src/Lightbox/Lightbox.test.tsx: clear (no test covers the zoom reset before the load)
  • File packages/core/src/Lightbox/Lightbox.tsx: blocking (zoom reset for photos left before the load)
  • File packages/core/src/hooks/pagerIndex.ts: clear
  • File packages/core/src/hooks/usePager.ts: non-blocking (unused re-export)
  • File packages/core/src/utils/touchRuntime.boundary.test.ts: clear
  • File packages/core/src/utils/touchRuntimeModules.tsx: clear

Automated review (maintainer link)

Comment on lines +1631 to +1634
const pagerPart =
touchRuntime == null ? null : (
<touchRuntime.LightboxPager {...pagerOptions} />
);

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.

Blocking (missed in earlier reviews): the zoom reset in onSettle above (lines 1619-1629) now runs only once this part mounts, and a fresh pager reports no settle on attach. So on a touch screen, a photo zoomed and then left with Next before the runtime loads keeps translate/scale off screen, and the first drag after the load slides it back in still zoomed (it snaps to fit only when the drag settles). Run the same reset when the page changes without the pager, for example from goToPrev/goToNext and the arrow keys, or for the resting page when LightboxPager mounts, and add a test: zoom page 0, Next before the load, load the runtime, expect page 0's image to have no translate or scale.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec cfc04c5

@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261113-272

Records the owner's answer that the touch runtime loads once per page after first paint, never on demand, at cfc04c5. Until it loads, Lightbox pages by its buttons and arrow keys at once, with no drag or slide; this head adds only a test fix. It waives nothing.

@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 blocking issue in Lightbox's paging before the touch runtime loads. Every other change matches INV13 and Lightbox FR7 as approved at this head.

  • Miss: a photo that is zoomed and then left with Next, Previous or an arrow key before the touch runtime loads keeps its zoom off screen, because the onSettle reset (Lightbox.tsx:1619-1629) runs only once LightboxPager mounts, so on a touch screen the first drag after the load slides that photo back in at 2×; while there is no pager, clear the left page's translate and scale in goToPrev and goToNext, and add a test that holds the loader, zooms, presses Next, loads the runtime and expects the left photo's inline translate and scale to be cleared.

There are also two non-blocking suggestions: delete or move the export {mod, nearestLoopCopy} re-export in usePager.ts, since nothing imports them from there and it sits between two imports, and mention Lightbox's paging before the load in .changeset/touch-runtime-after-first-paint.md before the stack reaches main.

Claims and files checked
  • Claim: Lightbox no longer imports the pager statically. Verified: the import is type-only (Lightbox.tsx:80), and a bundle of the Lightbox entry has usePager only in the runtime's dynamic chunk.
  • Claim: the pager renders as a touch-runtime part once the runtime has loaded. Verified (Lightbox.tsx:1631-1634, touchRuntimeModules.tsx:153-161).
  • Claim: nothing changes after the load. False: see the blocking issue (a photo zoomed and left before the load comes back zoomed in Chromium).
  • Claim: no API change. Verified: the API surface generator reports no added, changed or removed rows for Core or the themes.
  • Claim: pages with a Lightbox download less JavaScript before first paint. Verified, but the saving is small: the zoom code still brings in the gesture recognizers and the animator.
  • Claim: before the load, Previous, Next and the arrow keys page at once, with no drag and no slide. Verified: the new test fails on the base and passes here, and a Chromium probe shows the track resting by its insets.
  • Claim: once the runtime loads, the pager takes the track from the page it rests on, and the inset style goes away in the same render. Verified (Lightbox.tsx:2000; Chromium shows only translate after the load).
  • Claim: the pager renders after the content, so its nodes are attached first. Verified (Lightbox.tsx:2215).
  • Claim: the resting insets are logical, so right-to-left holds. Verified (Lightbox.tsx:610-618; a right-to-left probe rests where the base does).
  • Claim: the date and time fields no longer reach the pager. Verified: the four boundary tests fail on the base and pass here.
  • Claim: mod and nearestLoopCopy move to hooks/pagerIndex.ts, and usePager re-exports them. Verified.
  • Claim: INV13 names the new module and its gap line drops the pager. Verified.
  • Claim: the Lightbox suite loads the runtime before its tests, and the touched suites, the core typecheck and the knowledge check pass. Verified.
  • Changesets: this pull request adds none.
  • docs/architecture/react-component-runtime.md: clear.
  • docs/specs/components/Lightbox/Lightbox.spec.md: clear.
  • packages/core/src/DateInput/PickerWheel.tsx: clear.
  • packages/core/src/Lightbox/Lightbox.test.tsx: clear (no case for a photo zoomed before the load).
  • packages/core/src/Lightbox/Lightbox.tsx: blocking issue above.
  • packages/core/src/hooks/pagerIndex.ts: clear.
  • packages/core/src/hooks/usePager.ts: non-blocking suggestion above.
  • packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
  • packages/core/src/utils/touchRuntimeModules.tsx: clear.
  • scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

# Conflicts:
#	packages/core/src/Lightbox/Lightbox.tsx
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 32c05da

@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 blocking issue remains in Lightbox's paging before the touch runtime loads. An engineering owner has approved this head's record edits, which also settles the earlier point about hooks/pagerIndex.ts.

  • Miss: a photo that is zoomed and then left with Next or Previous before the touch runtime loads keeps its 2× zoom off screen, so the first drag back after the load slides it in still zoomed (Lightbox.tsx:1526-1536); while no pager is mounted, clear translate and scale on the page being left in goToPrev/goToNext, as onSettle does, and add a test that zooms page 0, presses Next before the load, loads the runtime and expects page 0's photo to carry neither.

Non-blocking: the mod/nearestLoopCopy re-export in usePager.ts has no importer, a split build of a Lightbox-only page keeps its first-load gzip about flat (so the description could say the pager's code moves to the deferred chunk), and the stack's touch-runtime changeset does not mention Lightbox's paging before the load.

Claims and files checked
  • Claim: Lightbox no longer imports the pager statically and renders it once the shared loader has loaded the touch runtime. Verified (Lightbox.tsx:77-78, :1494-1541, :2084; touchRuntimeModules.tsx:158-168; boundary test).
  • Claim: nothing changes after the load. False: a photo zoomed and left before the load stays zoomed after it (unit probe).
  • Claim: there is no API change. Verified (built API surfaces of Core and the themes: no rows).
  • Claim: pages with a Lightbox download less JavaScript before first paint. Partly verified: the pager's code leaves Lightbox's first load, but the first-load gzip of a Lightbox-only split build stays flat.
  • Claim: Lightbox still carries its zoom code until a later change. Verified (useZoomCore and useZoomStage stay static; the architecture record's gap line lists them).
  • Claim: before the load, Next, Previous and the arrow keys page at once with no drag or slide, as under a fine pointer. Verified (new Lightbox test; Lightbox.tsx:1505-1509 apply only through the pager).
  • Claim: once the runtime loads, the pager takes the track from the page it rests on. Verified (probe: the track moves from insets to translate at the same page).
  • Claim: the date and time fields no longer reach the pager. Verified (boundary tests for DateInput, TimeInput and DateTimeInput; PickerWheel.tsx:47).
  • Claim: the pager part renders after the content, so its nodes are attached when it attaches. Verified (Lightbox.tsx:2084).
  • Claim: the resting track uses logical insets with the pages' stride, so right-to-left holds, and the inset style goes away in the render that mounts the pager. Verified (Lightbox.tsx:578-583, :1538-1541, :1886).
  • Claim: the index helpers hold no motion code, move to a small module, and the pager re-exports them. Verified (pagerIndex.ts; usePager.ts:24, :54).
  • Claim: the architecture record drops the pager from its gap list and names the new module, under the runtime and stylesheet records as amended lower in the stack. Verified at this head, with an engineering owner's approval for this head.
  • Claim: the new boundary and Lightbox tests fail before this change. Verified (5 fail on the base).
  • Claim: the Lightbox suite loads the runtime before its tests. Verified (Lightbox.test.tsx:28-30).
  • Claim: the named suites, Core typecheck and the knowledge check pass. Verified (40 files, 1,780 tests; typecheck and knowledge check exit 0).
  • Claim: public text holds no internal context. Verified.
  • File docs/architecture/react-component-runtime.md: clear (approved at this head).
  • File docs/specs/components/Lightbox/Lightbox.spec.md: clear (approved at this head).
  • File packages/core/src/DateInput/PickerWheel.tsx: clear.
  • File packages/core/src/Lightbox/Lightbox.test.tsx: clear.
  • File packages/core/src/Lightbox/Lightbox.tsx: blocking zoom reset.
  • File packages/core/src/hooks/pagerIndex.ts: clear (named by the approved record).
  • File packages/core/src/hooks/usePager.ts: non-blocking unused re-export.
  • File packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
  • File packages/core/src/utils/touchRuntimeModules.tsx: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

# Conflicts:
#	docs/architecture/react-component-runtime.md
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 24e8eb3

@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 touch-only defect in Lightbox's paging before the touch runtime loads needs fixing.

  • Miss: a photo that is zoomed and then left with Next or Previous before the touch runtime loads keeps its 2× zoom off screen, so the first drag back after the load slides it in still zoomed (Lightbox.tsx:1526-1536); while no pager is mounted, clear translate and scale on the page being left in goToPrev/goToNext, as onSettle does, and add a test that zooms page 0, presses Next before the load, loads the runtime and expects page 0's photo to carry neither.

The earlier finding about the smaller-download claim is withdrawn: measured the way the repository's size report measures an import, a Lightbox-only page's first-load JavaScript drops from 148,726 B to 148,308 B gzip. The architecture:react-component-runtime INV13 and component:Lightbox FR7 edits are approved by an engineering owner at this head, and that approval also names hooks/pagerIndex.ts, so no spec decision is pending. Non-blocking: the mod/nearestLoopCopy re-export in usePager.ts has no importer, and the stack's touch-runtime changeset does not mention Lightbox's paging before the load.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: Lightbox no longer imports the pager statically and renders it once the shared loader has loaded the touch runtime. Verified (Lightbox.tsx:77-78, :1494-1541, :2084; touchRuntimeModules.tsx:153-168; boundary test).
  • Claim: the change is neither a bug fix nor a feature, and nothing changes after the load. False: a photo zoomed and left before the load stays zoomed after it (unit probe; phone-emulation capture).
  • Claim: there is no API change. Verified (no new export, prop, data attribute or event; the built API surfaces show no rows).
  • Claim: people loading a page with a Lightbox download less JavaScript before first paint. Verified: a Lightbox-only page's first-load JavaScript drops from 148,726 B to 148,308 B gzip under the repository's size-report measure.
  • Claim: Lightbox still carries its zoom code until a later change. Verified (useZoomCore and useZoomStage stay static; the architecture record's gap line lists them).
  • Claim: before the load, Next, Previous and the arrow keys page at once with no drag or slide, as under a fine pointer. Verified (new Lightbox test; phone-emulation receipt; Lightbox.tsx:1505-1509 apply only through the pager).
  • Claim: once the runtime loads, the pager takes the track from the page it rests on. Verified (capture receipt: the track moves from its inset to translate at the same page).
  • Claim: the date and time fields no longer reach the pager. Verified (boundary tests for DateInput, TimeInput and DateTimeInput; PickerWheel.tsx:47).
  • Claim: the pager part renders after the content, so its nodes are attached when it attaches. Verified (Lightbox.tsx:2084).
  • Claim: the resting track uses logical insets with the pages' stride, so right-to-left holds, and the inset style goes away in the render that mounts the pager. Verified (Lightbox.tsx:578-583, :1538-1541, :1886).
  • Claim: the index helpers hold no motion code, move to a small module, and the pager re-exports them. Verified (pagerIndex.ts; usePager.ts:24, :54).
  • Claim: the architecture record drops the pager from its gap list and names the new module. Verified in the text; approved by an engineering owner at this head.
  • Claim: no static path from the Lightbox, DateInput, TimeInput or DateTimeInput entries reaches the pager. Verified (boundary tests).
  • Claim: the new boundary and Lightbox tests fail before this change. Verified (5 fail on the base).
  • Claim: the Lightbox suite loads the runtime before its tests. Verified (Lightbox.test.tsx:28-30).
  • Claim: the named suites, Core typecheck and the knowledge check pass. Verified (40 files, 1,779 tests; typecheck and the knowledge check pass).
  • Claim: the record is written in the present tense. Verified (the INV13 and FR7 additions).
  • Claim: public text holds no internal context. Verified.
  • File docs/architecture/react-component-runtime.md: clear (approved by an engineering owner at this head).
  • File docs/specs/components/Lightbox/Lightbox.spec.md: clear (approved by an engineering owner at this head).
  • File packages/core/src/DateInput/PickerWheel.tsx: clear.
  • File packages/core/src/Lightbox/Lightbox.test.tsx: clear.
  • File packages/core/src/Lightbox/Lightbox.tsx: blocking zoom reset.
  • File packages/core/src/hooks/pagerIndex.ts: clear (the approved record names it).
  • File packages/core/src/hooks/usePager.ts: non-blocking unused re-export.
  • File packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
  • File packages/core/src/utils/touchRuntimeModules.tsx: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

This branch was successfully deployed

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

Labels

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.

1 participant