Skip to content

docs(architecture): the layer runtime's keyboard cap in INV11 and INV12 - #10143

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:docs/layer-runtime-keyboard-cap
Nov 5, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:docs/layer-runtime-keyboard-cap

Conversation

@vjeux

@vjeux vjeux commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Reader impact

architecture:layer-runtime does not state the software keyboard's cap, though every anchor-mode layer ships it. A reviewer of a cap change has no invariant to check it against. The cap's one change per keyboard movement reads as a paint-then-shift defect under INV12 as written.

Source of truth

spec:AST-059 FR9 and FR10, and its current-state impact list for architecture:layer-runtime. The runtime's Layer/useLayerKeyboardClearance.ts, Layer/layerKeyboardClearance.ts, Layer/settledBox.ts and the keyboard cap style in Layer/useLayer.tsx match it, as shipped in #8208.

Correction

  • INV11: the keyboard's cap is one of the viewport caps. It keeps a layer's block-start edge and ends the layer 10 px above the keyboard, on each layer's own element. Beside the cap, each layer carries the overflow its surface takes under it, so a capped surface's content never paints past its box. A layer clear of the keyboard, one placed above its trigger, and one in custom or fixed mode stay as they are.
  • INV12: the cap is the second permitted change after paint, once per keyboard movement and after a press's click. The record names where the cap reads the layer's box.
  • Change coupling, owning code and verification: the cap's checks, its modules and its tests.

Evidence

  • pnpm check:knowledge: templates and records are aligned.
  • pnpm specs:for --diff origin/main routes no claim beyond the record's own.
  • Each file the record names exists at this head. That covers the three modules, Layer/LayerTouch.ts, and the verification row's unit test and two browser specs.

Writing rubric results

  • R1 narration: none; every added sentence states what the runtime does.
  • R2 research in the record: none.
  • R3 evidence naming a change: none; the new verification row names tests and browser proofs.
  • R4 rejected alternatives over one line or outside a decision: none added.
  • R5 pull request or issue references remaining: none added.
  • R6 ruled open questions still listing options: none added.

Scope

  • This PR changes documentation only, or names every necessary generated artifact.
  • Runtime, API, visual, and policy changes were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm check:knowledge
  • Prettier on the record, and git diff --check

INV11 names the software keyboard's cap among the viewport caps, and
the overflow each layer carries beside it. INV12 names the cap as the
second change permitted after paint: once per keyboard movement, and
after a press's click. It also names where the cap reads the layer's
box. The change coupling, owning code and verification sections name
the cap's checks, its modules and its tests.
@astracat-bot

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 5, 2026, 6:37 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 5, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b88b025

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 9 rows, core 8 rows; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@cixzhang

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b88b025

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

vercel Bot commented Nov 5, 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 5, 2026 6:50pm UTC

Request Review

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet. It runs once the pull request leaves draft and a maintainer adds the ci:run label.

The new INV11 and INV12 text in the layer runtime record matches the keyboard-cap rules of the Layer viewport inset spec (AST-059 FR8-FR10) and the runtime as it ships. An engineering owner has approved the one sentence that goes beyond that spec, the overflow each layer carries beside the cap. Every file the record names exists at this head.

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 5, 2026 18:42
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 5, 2026
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 19:14
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 19:15
@cixzhang
cixzhang merged commit 992e28c into meta:main Nov 5, 2026
146 of 151 checks passed
@vjeux
vjeux deleted the docs/layer-runtime-keyboard-cap branch November 5, 2026 22:59
cixzhang added a commit to vjeux/astryx that referenced this pull request Nov 5, 2026
cixzhang added a commit that referenced this pull request Nov 6, 2026
…and keeps its top (#10169)

* docs(architecture): the layer runtime's keyboard cap in INV11 and INV12

INV11 names the software keyboard's cap among the viewport caps, and
the overflow each layer carries beside it. INV12 names the cap as the
second change permitted after paint: once per keyboard movement, and
after a press's click. It also names where the cap reads the layer's
box. The change coupling, owning code and verification sections name
the cap's checks, its modules and its tests.

* fix(Layer, Selector): the overlay slides above the software keyboard

The layer runtime now writes the software keyboard's block-end inset
on each open anchor-mode layer, beside its keyboard cap: the keyboard's
height and the 10 px clearance. It is a private custom property that
only the runtime writes. It goes out in the commit that lifts the cap,
before the cap reads the layer's box.

Selector's selected-item overlay reads it as a CSS term of its
block-start margin. With a keyboard up, the list ends above the
keyboard instead of shrinking to a sliver or opening under it. Without
one, the measured shift stands.

* Merge #10143 into the keyboard inset

The layer-runtime record's keyboard cap text comes with #10143.

* fix(Layer, Selector): the overlay keeps its top until it closes

The runtime now keeps the keyboard inset at its largest value until the
layer closes. Selector's overlay reads it, so it keeps its top when the
keyboard's report ends: a list the cap held grows downward in place. A
keyboard that rises while it is open still moves it up above it, and a
shorter keyboard then leaves it there. Every other anchored layer keeps
its timing: its cap still lifts at once as the keyboard goes down.

The layer-runtime record states this beside the keyboard cap.

* docs(Selector): trim two overlay comments

The overlay margin property's comment keeps only its constraint, and
the margin field drops a note that restated its name and type.

* docs(layer-runtime): the held inset covers any reported keyboard

The INV11 line about layers that read the keyboard inset now says a
layer placed while a keyboard is reported, which is what the runtime
does: it cannot tell a lingering report from a keyboard that was up.

* Merge main into the layer keyboard inset branch (#10143 landed)

* Merge main into the layer keyboard inset branch

Main brought the exit copy's INV13 row (#8186), the searchable
Selector trigger's name (#10170) and AST-059's scroll placement
(#10255, #10257, #10289). Their verification tables re-padded, so each
conflicted as a whole table. Resolved row by row: the layer-runtime
table keeps this branch's INV11, INV12 row, then main's INV13 row.
AST-059's table keeps main's FR4 tooltip row and new scroll row, with
this branch's FR9 row. Selector's table keeps main's AR1, AV2 row and
this branch's FR2 row.

* Merge branch 'main' into uikit/layer-keyboard-inset

Co-authored-by: Cindy Zhang <cindyxz@meta.com>

This branch was successfully deployed

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants