Skip to content

feat(keyboard): ride UIKit's keyboard motion in Safari on iOS - #12044

Draft
vjeux wants to merge 5 commits into
meta:perf/defer-touch-runtimefrom
vjeux:keyboard/ios-ride
Draft

vjeux wants to merge 5 commits into
meta:perf/defer-touch-runtimefrom
vjeux:keyboard/ios-ride

Conversation

@vjeux

@vjeux vjeux commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #11450, whose touch runtime carries the schedule. It retargets to main once #11450 lands.

User need

On an iPhone, Core's keyboard-aware surfaces move in one step while UIKit's keyboard slides. ChatLayout's composer jumps up at Safari's report, and drops only once the keyboard is gone. The product owner asked for a ride matched to UIKit's keyboard, for show and hide. That is as Chrome on Android already has with the default virtualKeyboard.overlaysContent (off) (FR8); with overlaysContent on, Core's keyboard module is a separate known gap.

Problem and solution fit

  • The keyboard layout guide gains a UIKit profile. WebKit's -webkit-touch-callout support selects it, never the user agent.
  • The show rides UIKit's keyboard spring from Safari's one report. The hide rides from the blur, as a prediction that Safari's later report confirms.
  • The curve is Astryx's own measurement: KEYBOARD_SPRING, critically damped, cut at keyboardNotificationMs (383.3 ms).
  • The schedule, its spring and its focus rules load with perf(core): SegmentedControl, Switch and BottomSheet load the touch animator after first paint #11450's touch runtime after first paint. Until then, Safari on iOS moves in one step, as before.
  • The runtime exposes the schedule, and the keyboard riders register it with the layout guide. They give it the notification duration and their focus checks. Its value imports are the spring table and the spring solver, which the runtime's animator already holds.
  • ChatLayout loads the touch runtime after first paint under a coarse pointer, for the keyboard ride, through perf(core): SegmentedControl, Switch and BottomSheet load the touch animator after first paint #11450's scheduleTouchRuntimeLoad; it adds no gesture. Under a fine pointer it never loads it.
  • rideKeyboard plays it on the compositor. ChatLayout's dock, a Tall sheet's content and a docked container ride it.
  • Focus moving into a frame, a custom element or an open shadow root predicts no hide. That extends FR3's iOS blur rule to fields the page cannot see (DEC-12).
  • A Tall sheet already open when the touch runtime loads starts riding then.
  • In a page that cannot scroll, Core's keyboard height reads short by Safari's reveal pan. The ride targets that height, so there it is right once that reading is fixed. A fixed-shell Simulator case follows that fix.

Current specification

This draft is the demo for the iOS ride in #12008. It carries its own record change, for the spec owner's decision:

  • spec:AST-099 FR6 and FR8: Safari on iOS rides UIKit's keyboard motion (DEC-12, Decider: pending).
  • FR3's iOS blur rule stays as it is. The sheet's hide now comes through the guide, on the same spring from the blur.
  • DEC-3 stands: the Simulator gates merge, and a physical iPhone gates release.
  • Open for the spec owner: when Safari reports a second height mid-show, does the ride follow the keyboard's one-frame step or keep moving forward? Two pending tests hold both sequences.

Number checked: no open pull request adds AST-099 DEC-12; #12008 takes DEC-7 to DEC-11.

Public delta and caller burden

No public API, prop or CSS custom property changes. In Safari on iOS under a finger:

Surface Before After
ChatLayout's dock lands at Safari's report; drops at the hide report rides up from the report; rides down from the blur
Tall BottomSheet content jumps up at the report rides up from the report; the hide is unchanged

Chrome on Android and Firefox for Android are unchanged. Under Reduce Motion the surface cross-fades (design:reduced-motion DR2).

Design and alternatives

Rejected: a cubic-bézier stand-in, which drifts from the keyboard; landing at the report; reading the user agent.

Evidence

All numbers in this description come from test runs: the iOS Simulator, unit tests and bundler builds. None comes from production.

  • Red first: against perf(core): SegmentedControl, Switch and BottomSheet load the touch animator after first paint #11450's source, 8 of this pull request's tests fail, and 3 of its test files cannot load the new schedule.
  • f7d7d0a replaces 78baaf4 with two fixes:
    • Focus moving into a frame keeps the keyboard up. Safari names no related target for that blur, and ChatLayout's park takes focus first. So the schedule waits for the window's blur.
    • A reported ride starts no later than the document timeline's time, since Safari can date its report after its frame. A predicted hide after a blur keeps its own start.
    • On 78baaf4's code, 3 of the new cases fail: the two frame cases and the reported ride's start.
  • dd3a0fe fixes review notes on f7d7d0a's comments. It adds a case for focus moving into a custom element with no shadow root, which fails without hidesField's custom-element clause.
  • 5bd3924 rides a hide from a blur that leaves a field inside a shadow root or a custom element. The element that focus settles on decides, as for any field. Its two cases fail without it.
  • 6193bcc times FR8's Safari row from Safari's report. A field inside a frame rides its hide from the report (FR7).
  • b0b18a8 reads a Tall sheet's ride offset from its content box's own rect. WebKit can keep a ridden box's rects from before a long task. So a reveal after one scrolled the body again. Its case fails without the change, at 442 px against 248. A second case keeps the exact translate within a pixel of the rect.
  • iOS Simulator take at this head, b0b18a8: iPhone 11 Simulator, iOS 26.1, Safari 26.1, animations at normal speed, light, portrait. Each of its 80 takes was read frame by frame, tapped 6–9.4 s after the page opened. The build's version file names this head in every take. The surfaces are ChatLayout's dock and a Tall sheet's field, 3 takes each unless noted:
    • Show: pass 6 of 6. The field starts in the frame of Safari's report. The dock is first readable in that frame, already 17–83 px above its resting place. Neither jumps, falls behind the keyboard or goes under it.
    • Hide by a tap outside and by Done: pass 12 of 12. Each starts down 0–2 frames after the keyboard, 35–52 frames before Safari's hide report.
    • A main thread blocked for 250 ms from the frame after the report: pass 6 of 6. Both ride every frame through the block and land with the keyboard. A probe on the sheet's scroll logs one scroll, at the report, and none after the block.
    • Reduce Motion: pass 6 of 6. Nothing travels.
    • Focus moving into a frame, a custom element and an open shadow root, then back: pass 6 of 6. The dock and the field hold their places in every frame. Done then rides down from the blur.
    • The sheet's show, 20 times: pass 20 of 20, each starting in the report's frame. Its event time matches the document timeline in 19 takes and runs 2 ms early once.
    • Done from the open shadow root's field and from the custom element's field: pass 12 of 12. Each rides down 1–2 frames after the keyboard, 40–51 frames before the hide report.
    • Limit: the same block inside the report's own task holds the ride until the task ends. It then catches up, 19–27 frames after the keyboard starts.
    • Limit (FR7): Done from the frame's field waits for Safari's hide report, 50–56 frames after the keyboard starts down.
    • The frame tool marked six takes failed. Read frame by frame, each passes the row. In one blocked take, the keyboard's edge is first readable three frames after the report, so the dock reads two frames ahead of it. In the sheet's three blocked takes, the still frames are in the field's last 2–4 px, where it moves under half a pixel a frame. In two of the sheet's focus takes, the tool's window took in Done's ride.
    • In 34 of the 41 animated shows without a block, the sheet's next reveal writes a sub-pixel scroll within 45 ms of the report. The body's scroll stays at 75 px, so nothing moves.
  • Earlier takes, on this pull request's bases and at its earlier heads:
    • perf(core): SegmentedControl, Switch and BottomSheet load the touch animator after first paint #11450's head: ChatLayout's dock jumps at Safari's report, before the keyboard moves. After a blur it stays up about 390 ms, then drops in one frame.
    • main: the sheet's low field sits under the keyboard for about 180 ms, then scrolls up.
    • At 3923fe6, the touch runtime's chunk loads on both stories, 1.7–2.2 s after navigation.
    • A second, shorter report can come mid-show, when focus moves to a field without QuickType: the viewport reads 403, then 430 px. The dock then jumps 34 px in one frame. How the ride re-aims there waits on the spec owner; two pending tests hold the sequences.
    • Safari's report comes at most 3–6 ms before the keyboard's first moved frame (once at most 45 ms), so the ride starts at the report.

Writing rubric results

  • R1 narration, R2 research, R3 evidence naming a change, R5 pull request references, R6 open options, R7 project status: none.
  • R4 rejected alternatives: one line, in DEC-12.

Scope

Components: keyboard module, ChatLayout, BottomSheet

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

At b0b18a8, on #11450 at ff55fb2:

  • pnpm build, pnpm typecheck, pnpm lint, pnpm check:knowledge, pnpm check:sync: pass. Changeset coverage: pass.
  • vitest run --project ui --maxWorkers=32: 1,046 files; 25,964 tests pass and 2 are pending.
  • vitest run --project node --maxWorkers=32: 1,587 of 1,588 files pass. theme-cut-short fails the same way at ff55fb2, without this change.
  • Playwright in Chromium: the 10 keyboard, Chat and BottomSheet interaction specs pass 67 and skip 1. BottomSheetKeyboard.a11y passes 27. WebKit runs in CI; the test box lacks its system libraries.
  • In Chromium, a Tall sheet's body and content box share an offset parent. There, the content box's rect less its layout place equals its translate.
  • Playwright's WebKit has no -webkit-touch-callout, so those specs cover the Chrome path and the unchanged paths. The unit tests, with the capability stubbed, and the Simulator cover the UIKit ride.
  • uikitKeyboardSchedule.ts has one importer outside tests: touchRuntimeModules.tsx, which gathers the touch runtime. A test holds its value imports to the spring table and the spring solver.
  • Order: this changes the keyboard module, so it merges after the open keyboard pull requests' device runs (spec:AST-094 DEC-31).

At dd3a0fe:

  • Without the riders' registration, 6 tests fail: three BottomSheet and two ChatLayout tests in Safari on iOS, and ChatLayout alone loading the runtime.
  • Without the sheet's re-attach on the runtime's load, 2 tests fail: a sheet that opened first, and the jsdom case below.
  • In jsdom, with Chrome's keyboard profile, a sheet with the keyboard up keeps its room and scroll when the runtime's load re-attaches it.

First-load JavaScript, gzip, at dd3a0fe against #11450 at ff55fb2, with Vite, Rolldown and webpack:

Bundler chat docs form menu table
Vite 8 (Rolldown) +1217 B (1→2 chunks) +279 B +260 B +247 B +318 B
Rolldown, common chunks not inlined +1234 B (1→2 chunks) +254 B +240 B +221 B +245 B
Rolldown, common chunks inlined to 64 KiB +4529 B (3→4 chunks) +263 B +264 B +268 B +234 B
webpack 5 +792 B +265 B +239 B +279 B +280 B
  • The schedule, the touch runtime and the spring table stay out of every first load, in every bundler. The spring solver stays where it was: in ChatLayout's first load with the animator, and out of the others.
  • docs, form, menu and table keep their chunk counts. They carry the guide's slot for the schedule: its profile check, rule calls and one-curve branch.
  • On a ChatLayout page, the ride loads the runtime after first paint. Its chunk imports the spring table, whose motion roles the first load also holds. So Vite and Rolldown move that shared group into a second first-load chunk.
  • With common chunks inlined to 64 KiB, Rolldown splits ChatLayout's first load three ways: the animator's group, the tooltip and layer group, and the rest. The base has one chunk of modules there, so that row grows most.
  • The maintainers accept this cost for ChatLayout's default keyboard ride. The moved modules' code is unchanged; webpack, which keeps one chunk, shows the added code alone.
  • From dd3a0fe to b0b18a8, pnpm size:pages adds 25–33 B gzip to the docs, form, menu and table pages. Against ff55fb2, this head adds 216–260 B there.

ChatLayout page, minified bytes per changed module (Vite 8):

Module Base Head
utils/touchRuntime 0 655
keyboard/keyboardLayoutGuide 1,904 2,395
keyboard/keyboardTarget 669 992
motion/animator 34,924 35,080
keyboard/keyboardModel 1,561 1,711
utils/flatTree 184 307
motion/roles 1,907 1,866
keyboard/rideKeyboard 488 600

The loader's schedule-and-load path (touchRuntime) and animatorFor, which the runtime's chunk reads from the first load, come with ChatLayout's trigger. The riders' focus check (mayKeepKeyboard) reads the deep active element. This pull request leaves the motion modules' source unchanged; their minified sizes shift slightly with the chunk they land in.

Overlaps with open pull requests; whichever lands second merges by hand:

Shared with #12044 Open pull requests
AST-099 #8080, #8217, #9983, #10462, #10474, #10690, #11450, #11540, #11846, #11859, #12008, #12179 and #12216
architecture:react-component-runtime #8201, #8485, #9769, #10126, #10312, #10943, #11087, #11205, #11283, #11450, #11463, #11466, #11476, #11478, #11508, #11518, #11525, #11530, #11536, #11540, #11544, #12008 and #12213
touchRuntimeModules.tsx #11450, #11463, #11466, #11476, #11478, #11536 and #11544
The keyboard README #8080, #8217, #9983, #10462, #10474, #10690, #11859, #12179, #12216 and #12479
useMobileKeyboard.ts #8080, #8217, #9983, #10462, #10474, #11450, #11859, #12179, #12216 and #12479
keyboardTarget.ts #8080, #8217, #9983, #10462, #10690, #11450, #11859, #12179, #12216 and #12479
useChatKeyboard.ts #8217, #9983, #10690, #11540, #12365 and #12479
useChatKeyboard.test.tsx #8217, #10690 and #11540
BottomSheet.test.tsx #10462, #10474, #11156, #11450, #11611, #12265 and #12355
BottomSheet.doc.mjs #8080, #8217, #10462, #11859, #12081, #12179, #12216 and #12487
ChatLayout.doc.mjs #8217 and #10690
rideKeyboard.ts #8217
rideKeyboard.test.ts #8217
browser-support.doc.mjs #10690
The docs-topics golden file #11445, #11658, #12186, #12291 and #12505

@vercel

vercel Bot commented Nov 16, 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 18, 2026 5:20am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 6:46 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 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

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 9fc73e7

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 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. An engineering owner has approved the iOS keyboard ride's record changes at this head, so the direction is settled; what remains are fixes in the code, the record and the evidence.

  • keyboard/uikitKeyboardSchedule.ts is a new internal module that utils/touchRuntimeModules.tsx imports from outside the keyboard folder, and no current record names it: name it in a record with its usage, why it is needed and why existing modules are not enough, for an owner API decision.
  • uikitKeyboardSchedule.ts re-implements solveSpring (motion/spring.ts), copies mayKeepKeyboard from useMobileKeyboard.ts:153-156 and copies isElement from utils/nodeType.ts, so a fix to one copy misses the other surface: reuse the shared code, passing it in the way deepActiveElement already is.
  • AST-099 FR9's Docked containers clause still says docked containers in Safari on iOS follow the visual-viewport height, which contradicts the approved FR8 and keyboardTarget.ts:698: amend FR9 to match.
  • The description says focus into a frame, custom element or open shadow root predicts no hide "as FR3 already says", but FR3 names none of these and covers only the sheet: reword it as an extension of FR3's condition.
  • The Simulator results are stated at an earlier commit on the base pull request's earlier head, and the code and base have changed since, so they no longer count for this head: state a Simulator take at this head in the description.

Two smaller points: a Tall sheet already open when the touch runtime loads does not start riding until it re-attaches (useMobileKeyboard.ts:1065 leaves out hasTouchRuntime), and rideKeyboard.ts:39 cites a file that does not exist.

Claims and files checked
  • Review mode: same-head; reason: none
  • Claims:
    • Core changeset: the composer and a Tall sheet ride UIKit's keyboard motion from Safari's report: verified (ChatLayout and BottomSheet iOS tests, red on the base).
    • Core changeset: the composer goes down from the blur: verified (ChatLayout iOS blur test).
    • Core changeset: the ride starts once touch support has loaded, one step before: partly; a sheet already attached keeps the one-step show (useMobileKeyboard.ts:1065).
    • Core changeset: Chrome and Firefox for Android unchanged: verified for behavior (Chrome and Firefox cases pass); ChatLayout pages there now also load the touch runtime chunk.
    • Core changeset: nothing travels under Reduce Motion: verified (cross-fade path unchanged; sheet reduced-motion case).
    • CLI changeset: the guide describes the iOS ride and the scroll room stays until Safari's report: verified (sheet test keeps the inset through the ride).
    • Profile selected by -webkit-touch-callout, never the user agent: verified (uikitKeyboardSchedule.ts:71-77).
    • Show from the report, hide from the blur, confirmed by the report: verified (keyboardUIKit.test.ts).
    • The curve is a critically damped spring cut at 383.3 ms: verified (motion/uikit/springs.ts, motion/uikit/timing.ts).
    • The schedule loads with the touch runtime and its one value import is the spring table: verified (keyboardTarget.ts, import test).
    • ChatLayout loads the touch runtime only under a coarse pointer: verified (useChatKeyboard.ts:332-338, runtime test).
    • The dock, a Tall sheet and a docked container ride: verified in code; no iOS test covers a docked container.
    • Frame, custom element and shadow-root focus predicts no hide as FR3 already says: false (FR3 names none of these).
    • No public API change: verified (API surface comparison: no rows).
    • The new tests fail on the base: verified in substance (6 failing tests and 3 suites that cannot load); the exact count was not reproduced.
    • Without the riders' registration, 5 tests fail: not checked.
    • Simulator results: stated at an earlier commit; they do not carry to this head.
    • First-load size table: reported; not rebuilt.
  • Files:
    • .changeset/browser-support-ios-keyboard-ride.md: clear
    • .changeset/keyboard-ride-ios.md: partly broad (sheet already open)
    • docs/architecture/react-component-runtime.md: clear (owner-approved)
    • docs/specs/AST-099-mobile-keyboard/spec.md: FR9 contradicts FR8
    • packages/cli/assets/docs/browser-support.doc.mjs: clear
    • packages/cli/test/__golden__/no-icon-set/docs-topics.json: clear (regenerated hash)
    • packages/core/src/BottomSheet/BottomSheet.doc.mjs: clear
    • packages/core/src/BottomSheet/BottomSheet.test.tsx: clear
    • packages/core/src/Chat/ChatLayout.doc.mjs: clear
    • packages/core/src/Chat/useChatKeyboard.runtime.test.tsx: clear
    • packages/core/src/Chat/useChatKeyboard.test.tsx: clear
    • packages/core/src/Chat/useChatKeyboard.ts: clear
    • packages/core/src/keyboard/README.md: clear
    • packages/core/src/keyboard/keyboardLayoutGuide.ts: stale doc comment at 201-203 (non-blocking)
    • packages/core/src/keyboard/keyboardModel.test.ts: clear
    • packages/core/src/keyboard/keyboardModel.ts: clear
    • packages/core/src/keyboard/keyboardTarget.ts: clear
    • packages/core/src/keyboard/keyboardUIKit.test.ts: clear
    • packages/core/src/keyboard/rideKeyboard.test.ts: clear
    • packages/core/src/keyboard/rideKeyboard.ts: stale file reference at 39 (non-blocking)
    • packages/core/src/keyboard/uikitKeyboardSchedule.ts: unrecorded shared module; three copies
    • packages/core/src/keyboard/useMobileKeyboard.ts: sheet attachment key (non-blocking)
    • packages/core/src/utils/touchRuntimeModules.tsx: imports the unrecorded module

Automated review (maintainer link)

@vjeux
vjeux force-pushed the keyboard/ios-ride branch from 9fc73e7 to 78baaf4 Compare November 17, 2026 00:04
@vjeux

vjeux commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Fixed in 78baaf4, with the inline points answered on their threads. The description now treats the frame and shadow-root rule as an extension of FR3's iOS blur rule. It states a Simulator take at this code. A Tall sheet already open when the touch runtime loads now re-attaches and rides.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 78baaf4

@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: an engineering owner approved the iOS keyboard ride's record changes at this head and the code has no blocking finding, so one evidence fix in the description remains.

  • No Simulator take is stated at this head: the stated takes ran at an earlier commit, and this head also changes packages/core/src/keyboard/README.md, which AST-094 DEC-31's evidence-carry rule does not cover, so please state a take at this head (simulator, browser, head, animation scale and result) that covers every case of AST-099's FR8 Simulator row, including the blocked main thread and focus moving into a frame, a custom element and an open shadow root.

The earlier note about #11544 in the overlap list is withdrawn: its branch stacks on #11540 and carries those AST-099 and test changes. Smaller points, not blocking: AST-099 Gap 12 still says Firefox's sheet takes Safari on iOS's path, the guide's doc comment in keyboardLayoutGuide.ts still says only the VirtualKeyboard API rides it, and the keyboard README says the riders pass the deep active element. Any new commit needs a new /approve-spec on its head.

Claims and files checked

Review mode: same-head; reason: none

  • Claims:
    • Core release note: the composer and a Tall sheet's field ride UIKit's keyboard motion from Safari's report: verified (ChatLayout and sheet iOS tests, red on the base).
    • Core release note: the composer goes down from the blur: verified (ChatLayout blur test).
    • Core release note: the ride starts once touch support loads, with one step before: verified (runtime test; the sheet that opens before the load).
    • Core release note: Chrome and Firefox for Android are unchanged: verified (their suites pass at the head).
    • Core release note: nothing travels under Reduce Motion: verified (the animator's default cross-fade path is unchanged).
    • CLI release note: the guide describes the iOS ride, and the scroll room stays until Safari's report: verified (sheet test keeps the room through the ride; the docs snapshot matches).
    • A capability, never the user agent, selects the profile: verified (uikitKeyboardSchedule.ts:44-52).
    • The show rides from the one report; the hide rides from the blur and the later report confirms it: verified (keyboardUIKit.test.ts, keyboardModel.test.ts).
    • The curve is the measured, critically damped spring, cut at 383.3 ms: verified (motion/uikit/springs.ts:466-470, whose damping is twice the square root of stiffness times mass; motion/uikit/timing.ts:173).
    • The schedule loads with the touch runtime, and its value imports are the spring table and the solver the animator already holds: verified (touchRuntimeModules.tsx:18, import test, motion/animator.ts:194).
    • ChatLayout schedules the runtime only under a coarse pointer: verified (useChatKeyboard.ts:332-335, runtime test).
    • The dock, a Tall sheet and a docked container ride: verified in code; no iOS test covers a docked container.
    • Focus into a frame, a custom element or an open shadow root predicts no hide: verified for a frame and an open shadow root (tests); a custom element by code only.
    • A Tall sheet already open when the runtime loads starts riding: verified (useMobileKeyboard.ts:1054, sheet test).
    • In a page that cannot scroll, the ride inherits a short keyboard height: stated as a known limit; not checked.
    • The mid-show second report stays open, with two pending tests: verified (two it.todo cases).
    • No public API, prop or CSS custom property changes: verified (no package export reaches the keyboard module).
    • The new tests fail on the base: verified in substance (8 tests fail and 3 suites cannot load); the exact counts were not reproduced.
    • The Simulator takes ran at an earlier commit, and this head adds only record and README text and one test: taken as stated, since that commit is not on the branch; the README change stops the take from carrying.
    • Without the riders' registration 5 tests fail, and without the sheet's re-attach one fails: not checked.
    • The schedule's one importer outside tests is the runtime module: verified (search).
    • Build, typecheck, lint and knowledge checks pass: verified for the Core typecheck, lint of the changed files (no errors) and the knowledge check; the full build and full suites were not rerun.
    • First-load size tables: reported; not rebuilt.
    • Maintainers accept the chat page's first-load cost: partly; the owner approved the record sentence that ChatLayout loads the runtime, with no statement on the bytes.
    • No open pull request adds DEC-12, and another takes DEC-7 to DEC-11: verified for the listed overlaps.
    • The overlap list: verified for every line, #11544 through its stacked branch.
  • Files:
    • .changeset/browser-support-ios-keyboard-ride.md: clear
    • .changeset/keyboard-ride-ios.md: clear
    • docs/architecture/react-component-runtime.md: clear (owner-approved)
    • docs/specs/AST-099-mobile-keyboard/spec.md: clear (owner-approved); FR8 Simulator row has no take at this head; Gap 12 stale (non-blocking)
    • packages/cli/assets/docs/browser-support.doc.mjs: clear
    • packages/cli/test/__golden__/no-icon-set/docs-topics.json: clear (regenerated hash)
    • packages/core/src/BottomSheet/BottomSheet.doc.mjs: clear
    • packages/core/src/BottomSheet/BottomSheet.test.tsx: clear
    • packages/core/src/Chat/ChatLayout.doc.mjs: clear
    • packages/core/src/Chat/useChatKeyboard.runtime.test.tsx: clear
    • packages/core/src/Chat/useChatKeyboard.test.tsx: clear
    • packages/core/src/Chat/useChatKeyboard.ts: clear
    • packages/core/src/keyboard/README.md: stale input list at 278 (non-blocking)
    • packages/core/src/keyboard/keyboardLayoutGuide.ts: stale doc comment at 200-202 and 211-213, a long sentence at 90-92 (non-blocking)
    • packages/core/src/keyboard/keyboardModel.test.ts: clear
    • packages/core/src/keyboard/keyboardModel.ts: clear
    • packages/core/src/keyboard/keyboardTarget.ts: clear
    • packages/core/src/keyboard/keyboardUIKit.test.ts: clear
    • packages/core/src/keyboard/rideKeyboard.test.ts: clear
    • packages/core/src/keyboard/rideKeyboard.ts: long comment line at 39 (non-blocking)
    • packages/core/src/keyboard/uikitKeyboardSchedule.ts: clear
    • packages/core/src/keyboard/useMobileKeyboard.ts: clear
    • packages/core/src/utils/touchRuntimeModules.tsx: clear

Automated review (maintainer link)

Comment thread packages/core/src/keyboard/README.md Resolved
The keyboard layout guide reads UIKit's keyboard schedule where WebKit
on iOS runs. Core's surfaces ride UIKit's measured keyboard spring: the
show from Safari's one report, the hide from the blur.

Records: AST-099 FR6, FR8, DEC-12.
@vjeux
vjeux force-pushed the keyboard/ios-ride branch from 78baaf4 to f7d7d0a Compare November 17, 2026 18:24
@vjeux

vjeux commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

The review's smaller points are fixed in f7d7d0a. AST-099 Gap 12 now says Firefox's sheet follows the visual viewport's reports, since Firefox has no keyboard schedule. The guide's doc comment names UIKit's schedule beside the VirtualKeyboard API.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec f7d7d0a

@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 record's own merge gate has no evidence at this head. The code, the records and the docs check out, and an engineering owner has approved the record changes at this head.

  • spec:AST-099 DEC-3 and the new FR8 Safari row make a Simulator take the merge gate, but the description states its takes at an earlier commit and says takes at this head are pending, and the row's "focus moving into a frame, a custom element or an open shadow root" case has no stated take at any head; please state in the description, in text, a take at this head that covers every case of the row (simulator, browser, head, animation scale and result).

Smaller points, none blocking: the new timelineTime helper in rideKeyboard.ts sits between rideKeyboard's JSDoc and the function; the layout guide's doc comment says focus into a frame, shadow host or custom element "predicts no hide, and the report decides", which holds only under the UIKit profile; no unit case drives a light-DOM custom element through the guide; and the description's overlap list names #11544 under AST-099, though #11544 changes the react-component-runtime record and touchRuntimeModules.tsx instead.

Claims and files checked

Review mode: same-head; reason: none

Claims

  • Both changesets: the composer and a Tall sheet's field ride UIKit's keyboard motion, rising from the browser's report where they moved in one step, the composer going down from the blur, the ride starting once touch support has loaded, Android unchanged, nothing travelling under Reduce Motion — verified against the code and the unit cases.
  • The spring is critically damped and cut at the keyboard notification's duration — verified against the measured table and the solver.
  • A capability, not the user agent, selects the schedule — verified.
  • The schedule ships only in the deferred touch runtime, with one importer outside tests, and takes its duration and focus checks from the riders — verified.
  • ChatLayout loads the touch runtime after first paint only under a coarse pointer — verified by its unit cases.
  • Focus into a frame or an open shadow root predicts no hide, including a blur that names no related target and a page that parks focus first — verified by tests; the light-DOM custom-element case is code only.
  • A reported ride starts no later than the document timeline's time, while a predicted hide keeps its start — verified.
  • A sheet already open when the runtime loads re-attaches and rides — verified.
  • Red-first counts on the base branch — reproduced.
  • No public API changes — verified by comparing the generated surfaces of both trees.
  • Unit tests for the keyboard module, ChatLayout's keyboard hook, BottomSheet and the touch runtime pass — re-run: 377 pass, 2 pending.
  • Build, typecheck, lint and knowledge checks pass — re-run at this head.
  • DEC-12 is the next free decision number beside the open record change that takes DEC-7 to DEC-11 — verified.
  • Overlap list — #11544 is listed under AST-099 but does not touch it (non-blocking).
  • First-load gzip table — reported, not re-measured.
  • Simulator takes at this head — stated as pending: the blocking gap above.

Files

  • Both changesets; the browser-support docs topic and its golden snapshot; BottomSheet and ChatLayout docs — clear.
  • The keyboard module: the layout guide, the model, the target and the new UIKit schedule — clear; the ride — one non-blocking doc placement note; the README — clear.
  • ChatLayout's keyboard hook, BottomSheet's mobile-keyboard hook, the touch runtime's module list — clear.
  • The six test files — clear, with the light-DOM custom-element gap noted.
  • The on-screen keyboard record and the react-component-runtime record — owner-approved; the Simulator gate above.

Automated review (maintainer link)

The timeline helper moves above rideKeyboard's doc comment, and the
start rule's comment gives each topic its own sentence. The guide's
comment names the profile each focus rule belongs to. A unit case drives
focus into a custom element with no shadow root through the guide.
@vjeux

vjeux commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

The smaller points are fixed in dd3a0fe. A unit case now drives focus into a custom element with no shadow root through the guide; it fails with hidesField's custom-element clause removed.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec dd3a0fe

@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 record's own merge gate still has no evidence at this head. An engineering owner has approved the record changes at this head, and the code and docs check out.

  • spec:AST-099 (its Platform support and DEC-3) makes a Simulator take the merge gate, and the new FR8 Safari row lists its cases, but the description states its takes at an earlier commit and says takes at this head are pending, and the row's "focus moving into a frame, a custom element or an open shadow root" case has no stated take at any head; please state in the description, in text, a take at this head that covers every case of the row (simulator, browser, head, animation scale and result).

One smaller point, not blocking: the description's overlap list still names #11544 under AST-099, though #11544 changes the react-component-runtime record and touchRuntimeModules.tsx instead.

Claims and files checked

Review mode: same-head; reason: none

Claims

  • Both release notes: the composer and a Tall sheet's field ride the keyboard's own iOS motion, rising from the browser's report where they moved in one step, the composer going down from the blur, the ride starting once touch support has loaded, Android unchanged, nothing travelling under Reduce Motion — verified against the code and the unit cases.
  • The spring is critically damped and cut at the keyboard notification's duration — verified against the measured table (damping equals twice the square root of stiffness) and the solver.
  • A capability, not the user agent, selects the schedule — verified.
  • The schedule ships only in the deferred touch runtime, with one importer outside tests, takes its duration and focus checks from the riders, and imports values only from the spring table and the solver — verified.
  • The chat layout loads the touch runtime after first paint only under a coarse pointer — verified by its unit cases.
  • Focus into a frame, a custom element or an open shadow root predicts no hide, including a blur that names no related target and a page that parks focus first — verified by tests.
  • The custom-element case fails without the field check's custom-element clause — verified at this head.
  • A reported ride starts no later than the document timeline's time, while a predicted hide keeps its start — verified.
  • A sheet already open when the runtime loads re-attaches and rides — verified.
  • The second height mid-show is left open with two pending tests — verified; that report still lands in one frame.
  • Red-first counts on the base branch — consistent: the new schedule module does not exist there, so the files that import it cannot load.
  • No public API changes — verified.
  • Unit tests for the keyboard module, the chat keyboard hook, the bottom sheet and the touch runtime pass — verified at this head.
  • Full-suite, build, typecheck, lint and first-load size figures, and the maintainers' acceptance of the chat page's cost — reported, not re-run; the reference-page deltas the shared-module rule asks for are stated.
  • The new decision takes the next free number beside the open record change that takes the five before it — verified on the open pull requests.
  • Overlap list — #11544 is listed under the keyboard record but does not touch it (non-blocking).
  • Simulator takes at this head — stated as pending: the blocking gap above.

Files

  • Both release notes; the browser-support docs topic and its golden snapshot; the bottom sheet and chat layout docs — clear.
  • The keyboard module: the layout guide, the model, the target, the ride and the new iOS schedule — clear; its README — clear.
  • The chat keyboard hook, the bottom sheet's mobile-keyboard hook, the touch runtime's module list — clear.
  • The six test files — clear.
  • The on-screen keyboard record and the component runtime record — owner-approved; the Simulator gate above.

Automated review (maintainer link)

A field in a shadow root or a custom element blurs with its host as the
focusout target. The guide judged that blur by the host, which brings up
no keyboard, so Done in such a field rode only at Safari's later report.
Under UIKit's rules the host's blur now waits as a field's does, and the
element that focus settles on decides.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 6193bcc

@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 keyboard record's merge gate still has no Simulator evidence at this head. An engineering owner has approved the record changes at this head, and the code checks out.

  • spec:AST-099 (its Platform support and DEC-3, repeated in the FR8 Safari row and DEC-12) makes a Simulator take the merge gate, but the description states its takes at an earlier commit and says takes at this head are pending, and the row's case of focus moving into a frame, a custom element or an open shadow root has no stated take at any head; please state in the description, in text, a take at this head that covers every case of the row (simulator, browser, head, animation scale and result).

Not blocking: the description's overlap list leaves out #11846, #12179 and #12479, which change the keyboard record or the same keyboard files.

Claims and files checked

Review mode: same-head; reason: none

Claims

  • Both release notes: in Safari on iOS the composer and a Tall sheet's field ride the keyboard's own motion, rising from the browser's report where they moved in one step, the composer going down from the blur, the ride starting once touch support has loaded, Android unchanged, nothing travelling under Reduce Motion — verified against the code and the unit cases.
  • A capability, not the user agent, selects the schedule — verified.
  • The show rides from the browser's one report and the hide from the blur, as a prediction the later report confirms — verified.
  • The spring is critically damped and cut at the keyboard notification's duration — verified against the measured table and the solver.
  • The schedule ships only in the deferred touch runtime, has one importer outside tests, takes its duration and focus checks from the riders, and imports values only from the spring table and the solver — verified.
  • The chat layout loads the touch runtime after first paint only under a coarse pointer and adds no gesture — verified by its unit cases.
  • The composer, a Tall sheet's content and a docked container ride the curve on the compositor — verified.
  • Focus into a frame, a custom element or an open shadow root predicts no hide — verified by tests.
  • A sheet already open when the runtime loads re-attaches and rides — verified.
  • In a page that cannot scroll the keyboard height reads short, and the ride targets that height — stated as a known limitation; not checkable without a device.
  • The record's existing iOS blur rule for the sheet keeps its text, the merge and release gates stand, and the second height mid-show is left open with two pending tests — verified.
  • The new decision takes a number no open pull request uses — verified on the open pull requests that edit the keyboard record.
  • No public API, prop or CSS custom property changes — verified by comparing the built package surfaces.
  • Red-first counts on the base branch — consistent: the new schedule module does not exist there.
  • Full-suite, build, typecheck, lint and first-load size figures, stated at an earlier commit — reported, not re-run; the reference-page deltas the shared-module rule asks for are stated.
  • The maintainers accept the chat page's first-load cost — consistent with the engineering owner's approval of the runtime record's sentence that the chat layout loads the touch runtime.
  • Overlap list — leaves out three open pull requests (non-blocking).
  • Simulator takes at this head — stated as pending: the blocking gap above.

Files

  • Both release notes; the browser-support docs topic and its golden snapshot; the bottom sheet and chat layout docs — clear.
  • The keyboard module: the layout guide, the model, the target, the ride and the new iOS schedule — clear; its README — clear.
  • The chat keyboard hook, the bottom sheet's mobile-keyboard hook, the touch runtime's module list — clear.
  • The six test files — clear.
  • The on-screen keyboard record and the component runtime record — owner-approved at this head; the Simulator gate above.

Automated review (maintainer link)

WebKit can keep a composited element's rects from its last style
resolution while its computed translate follows the ride. A reveal that
ran late in the slide, as after a long task, then judged the field
below its resting place and scrolled the body further. The sheet now
reads the ride's offset from the content box's own rect, against its
layout place, so it moves with the field's rect.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec b0b18a8

@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 keyboard record's merge gate still has no Simulator evidence at this head. An engineering owner has approved the record changes at this head, and the code checks out in unit tests.

  • spec:AST-099 (its Platform support and DEC-3, repeated in the FR8 Safari row and DEC-12) makes a Simulator take the merge gate, but the description states its takes at an earlier commit and says takes at this head are pending, while the commits since change the keyboard code that row exercises; please state in the description, in text, a take at this head that covers every case of the row, including focus into a frame, a custom element or an open shadow root and the sheet's reveal after a long task (simulator, browser, head, animation scale and result).

Not blocking: the description's overlap list still leaves out #11846, #12179 and #12479, which change the keyboard record or the same keyboard files.

Claims and files checked

Review mode: same-head; reason: none

Claims

  • Both release notes: in Safari on iOS the composer and a Tall sheet's field ride the keyboard's own motion from the browser's report, the composer also going down from the blur, once touch support has loaded; Android unchanged; nothing travels under Reduce Motion — verified against the code and the unit cases.
  • A capability, not the user agent, selects the schedule — verified.
  • The show rides from the browser's one report and the hide from the blur, as a prediction the later report confirms — verified.
  • The spring is critically damped and cut at the keyboard notification's duration — verified against the measured table and the solver.
  • The schedule ships only in the deferred touch runtime, has one importer outside tests, takes its duration and focus checks from the riders, and imports values only from the spring table and the solver — verified.
  • The chat layout loads the touch runtime after first paint only under a coarse pointer and adds no gesture — verified by its unit cases.
  • The composer, a Tall sheet's content and a docked container ride the curve on the compositor — verified.
  • Focus into a frame, a custom element or an open shadow root predicts no hide — verified by tests.
  • A sheet already open when the runtime loads re-attaches and rides — verified.
  • In a page that cannot scroll the keyboard height reads short, and the ride targets that height — stated as a known limitation; not checkable without a device.
  • The record's existing iOS blur rule for the sheet keeps its text, the merge and release gates stand, and the second height mid-show is left open with two pending tests — verified.
  • The new decision takes a number no open pull request uses — verified on the open pull requests that edit the keyboard record.
  • No public API, prop or CSS custom property changes — verified by comparing the built package surfaces.
  • Red first: against the base branch's source, 8 of the new tests fail and 3 test files cannot load — verified by running them.
  • The fixes for focus into a frame, the reported ride's start and a custom element with no shadow root — verified by their cases.
  • The sheet's reveal after a long task mid-ride keeps the body's scroll — verified red-first in unit tests (the body overscrolls to 442 px instead of 248 px without it); the device behavior it answers needs the Simulator take above.
  • Full-suite, build, typecheck, lint, browser-spec and first-load size figures, stated at an earlier commit — reported, not re-run; the reference-page deltas the shared-module rule asks for are stated.
  • The maintainers accept the chat page's first-load cost — consistent with the engineering owner's approval of the runtime record's sentence that the chat layout loads the touch runtime.
  • Overlap list — leaves out three open pull requests (non-blocking).
  • Simulator takes at this head — stated as pending: the blocking gap above.

Files

  • Both release notes; the browser-support docs topic and its golden snapshot; the bottom sheet and chat layout docs — clear.
  • The keyboard module: the layout guide, the model, the target, the ride and the new iOS schedule — clear; its README — clear.
  • The bottom sheet's mobile-keyboard hook, including the rect-based ride offset — clear; the chat keyboard hook and the touch runtime's module list — clear.
  • The six test files — clear.
  • The on-screen keyboard record and the component runtime record — owner-approved at this head; the Simulator gate above.

Automated review (maintainer link)

@vjeux

vjeux commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

The description now states a Simulator take at b0b18a8, this head, for every case of the FR8 Safari row. That includes focus into a frame, a custom element or an open shadow root, and the sheet's reveal after a long task. Its overlap list now names every open pull request that shares a file with this one, #11846, #12179 and #12479 included.

@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 branch lives in a fork, a maintainer adds the ci:run label so CI runs, and marking the pull request ready for review then starts it; it lands after #11450.

An engineering owner approved the keyboard and runtime record changes at this head, and the description now states a Simulator take at this head for every case of the record's iOS ride row.

Claims and files checked

Review mode: same-head; reason: none

Claims

  • Both release notes: in Safari on iOS the composer and a Tall sheet's field ride the keyboard's own motion from the browser's report, the composer also going down from the blur, once touch support has loaded; Android unchanged; nothing travels under Reduce Motion — verified against the code and the unit cases.
  • A capability, not the user agent, selects the schedule — verified.
  • The show rides from the browser's one report, and the hide rides from the blur as a prediction that the later report confirms — verified.
  • The spring is critically damped and cut at the keyboard notification's duration — verified against the measured table and the solver.
  • The schedule ships only in the deferred touch runtime and has one importer outside tests. It takes its duration and focus checks from the riders, and imports values only from the spring table and the solver — verified.
  • The chat layout loads the touch runtime after first paint only under a coarse pointer and adds no gesture — verified by its unit cases.
  • The composer, a Tall sheet's content and a docked container ride the curve on the compositor — verified.
  • Focus into a frame, a custom element or an open shadow root predicts no hide — verified by tests.
  • A sheet already open when the runtime loads re-attaches and rides — verified.
  • The sheet's reveal after a long task mid-ride keeps the body's scroll — verified red-first in unit tests.
  • In a page that cannot scroll, the keyboard height reads short, and the ride targets that height — stated as a known limitation; not checkable without a device.
  • The record's existing iOS blur rule for the sheet keeps its text. The merge and release gates stand. The second height mid-show stays open, with two pending tests — verified.
  • The new decision takes a number no open pull request uses — verified on the open pull requests that edit the keyboard record.
  • No public API, prop or CSS custom property changes — verified by comparing the built package surfaces.
  • Red first: against the base branch's source, 8 of the new tests fail and 3 test files cannot load — verified by running them.
  • The fixes for focus into a frame, the reported ride's start, a custom element with no shadow root and a shadow root's field — verified by their cases.
  • Simulator takes at this head for every case of the iOS ride row, with simulator, browser, head, animation speed and pass counts — stated in text, as the record's merge gate asks.
  • Reference-page first-load deltas against the base — verified: re-measured at +215 to +260 B gzip, against the stated 216 to 260 B.
  • Full-suite, build, typecheck, lint, browser-spec and per-bundler size figures — reported, not re-run here.
  • The maintainers accept the chat page's first-load cost — consistent with the engineering owner's approval of the runtime record's sentence that the chat layout loads the touch runtime.
  • The overlap list names every open pull request that shares a file — verified for the three it earlier left out.

Files

  • Both release notes, the browser-support docs topic and its golden snapshot, and the bottom sheet and chat layout docs — clear.
  • The keyboard module (the layout guide, the model, the target, the ride and the new iOS schedule) and its README — clear.
  • The bottom sheet's mobile-keyboard hook, including the rect-based ride offset, the chat keyboard hook and the touch runtime's module list — clear.
  • The six test files — clear.
  • The on-screen keyboard record and the component runtime record — owner-approved at this head.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — b0b18a8a Deployed Nov 18, 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.

2 participants