Repository navigation
Description
Outcome
On an Android phone, the app's layout and type follow the space actually available. Scroll caps follow the visible viewport, so they never extend under browser chrome. Fields grow with their text through CSS rather than script measurement. Components size from their own container, and headings wrap evenly. The OS text-size setting and destination-change motion each end with a written answer: either shipped, or a documented "no" that records why.
Why now
These findings come from a review of the PWA against Google Chrome's public modern-web-guidance skill (https://github.com/GoogleChrome/modern-web-guidance). The guides concerned are css/responsive-design, css/size-aware-styling, css/css-layout, forms/form-fields-automatically-fit-contents, visual-design/improve-text-layout-and-legibility, visual-design/typography, accessibility/respect-os-text-scale, ui-atoms/scrollability-affordance-hints and ui-behaviors/same-document-transitions. Most of the work removes script that the platform now does natively, which makes it cheap, low-risk polish. The type-scale and transition items are judgements and are filed for design.
Shared context
Browser-support policy. The targets are typical Android PWA browsers:
- Chrome for Android stable (the installed WebAPK) must keep full function.
- Samsung Internet current (v30, which is Chromium 143 per MDN browser-compat-data) must keep full function.
- Firefox for Android must degrade gracefully.
- Anything missing from either Chromium target needs feature detection and a named fallback. No polyfill dependencies.
The host app owns index.html, the manifest and the viewport meta. brain-kit ships the building blocks.
Support for the features used in this epic, per MDN browser-compat-data:
| Feature | Chrome Android | Samsung | Firefox Android |
|---|---|---|---|
field-sizing |
123 | 27 | 152 |
dvh/svh units |
108 | 21 | 101 |
@container size queries |
105 | yes | 110 |
text-wrap: balance |
114 | 23 | 121 |
text-wrap: pretty |
117 | 24 | no |
@container scroll-state() |
133 | 29 | no |
<meta name="text-scale"> |
146 | no | no |
document.startViewTransition |
111 | 22 | 144 |
Where things live:
- Kit styles are inline
styleobjects inpackages/ui-kit/src/**/*.tsx, plus class rules inpackages/ui-kit/src/tokens.css. - Consumer styles are Tailwind classes plus
packages/ui-react/src/theme.css. - Browser proof runs in the pinned offline Playwright image through
node scripts/visual.mjs:--project=ui-react-layoutrunspackages/ui-react/tests/browser/*.layout.tsx.--project=storybook --filter=<X>.storiesruns kit stories.bun run visualruns the curated baselines, andbun run visual:updaterewrites them.
Prior art. The composer already sizes with field-sizing: content (fieldSizing, packages/ui-kit/src/chrome/Composer.tsx:300). That choice is recorded in the composer follows soft wrap (docs/decisions/design-kit/components-and-interactions.md:794-831), which explicitly refuses both scrollHeight measurement and the stacked-grid mirror.
Constraints and non-goals
- Binding decisions:
- design-kit.md and its subjects.
- D22's "one ambient animation" (
docs/decisions/design-kit/components-and-interactions.md:124). - D54's "Closing is instant" (
docs/decisions/design-kit/overlays.md:9-16). - The overlay heights, which are already stated in
dvh(docs/decisions/design-kit/overlays.md:23,:83).
- No global type or wrapping rules.
text-wrapis applied per element, and no reset setsfont-sizeon:root/html. - Visual baselines that change are re-recorded in the same PR, with before/after captures for review. They are never loosened.
- Out of the epic:
- Host markup (
index.html, the viewport meta,theme-color). The HTMLtheme-colorand text-scale meta are shell: declare theme colour per scheme and OS text scale in the app HTML brain-hosting-template#34; the keyboard viewport meta (interactive-widget) is shell: the on-screen keyboard overlays sheets and the composer instead of resizing the page brain-hosting-template#38. - Tree swaps between phone and desktop layouts, which stay JavaScript media queries.
- Cross-document transitions: the app is a single document.
- Host markup (
Breakdown
- ui-react: remove the dead .composer-grow CSS and retarget the typing benchmark #2597: remove the dead
.composer-growmirror CSS and retarget the typing benchmark at the live composer. - ui-kit: ask-form textareas grow with field-sizing instead of measuring scrollHeight #2598: ask-form textareas grow with
field-sizing: contentinstead of measuringscrollHeight, so the "Other" answer grows too. - ui-kit, ui-react: height caps use dvh so they follow the visible viewport #2599: every
vhheight cap becomesdvh. - ui-react: size-only media queries move to CSS, with a container query for the stats bar #2600: the three JavaScript media queries that only change a size become CSS. The stats bar gets a container query, and the short-screen voice rows get
@media. - ui-kit: balance short headings and wrap captions pretty #2601: short headings get
text-wrap: balance, and captions getpretty. - ui-react: drive the Settings tab-strip overflow cue with a scroll-state container query #2602: the Settings tab-strip overflow cue becomes a
scroll-statecontainer query. - ui-kit: record the accepted OS text-scale type policy and file its implementation briefs #2603 (policy accepted): record root-relative type, the staged exact-value/nine-step scale, icon-only phone tabs above 125% and the verified em-query/container fallback; file the scoped migrations. Host opt-in lands last.
- ui-react: record the accepted destination crossfade and its D54 exception, and file its implementation briefs #2604 (policy accepted): record the 120ms main-region crossfade and explicit D54 view-change-close exception; file the scoped styles/helper/prefetch follow-ups.
Items 1–6 are independent of each other. Item 7 gates the host's text-scale meta in schlessera/brain-hosting-template#34.
Definition of done
grep -rnE '(^|[^a-z0-9.])[0-9.]+vh\b' packages/ui-kit/src packages/ui-react/srcfinds no code.- No component in ui-kit or ui-react reads
scrollHeightto size a field. - Items 7 and 8 have accepted, durably recorded answers and any required scoped implementation follow-ups filed natively under this epic. Those two issues produce decisions/designs rather than carrying the full migrations. An accepted documented no satisfies its branch; an adopted change requires its follow-ups and the stated product outcome to be verified before this epic closes.
- Every changed baseline went through visual review in its PR.
2026-10-22 triage at main aa8c8966b59f031f054f4876dbca84048b40ae4f: reconciled #2603/#2604's supplied proposals and current needs: decision labels with the breakdown. Corrected the definition of done so decision-producing children are not represented as full migrations; adopted implementation outcomes still require their own completed follow-ups before parent closure. No type-unit, motion or breakpoint policy is selected; preserve p3, native children and no epic readiness.
2026-10-22 later-ruling reconciliation: the maintainer accepted #2603’s type policy (comment6338093190) and #2604’s crossfade/D54 amendment (comment6338054075). Their briefs now proceed to durable records and scoped native follow-ups, not full migrations in those two issues. The accepted view-change-close exception must be recorded before its implementation; every ordinary overlay close remains instant. Existing definition-of-done product proof, native scope and no-epic-readiness rule remain. No runtime outcome is inferred.
2026-10-24: the keyboard viewport meta moved from brain-hosting-template#34 to the new brain-hosting-template#38; reference updated.
2026-11-04 triage at main 53b862123d7b8e4c9d039859fabdc9fc6ad4cd36: Refreshed the active named-source navigation after inspecting the current declarations; existing decisions, historical receipts, child prerequisites and readiness remain unchanged. No new runtime qualification or implementation is claimed.
Triage 2026-11-08 at main 8752570331ffebdbb9233196412781f6cd71f3d9: Verified the moved active source anchors and refreshed navigation. Historical measurements and source-bound failure receipts keep their identities; existing scope, rulings, needs, priority, assignment and release attribution are preserved. This source review supplies no new runtime qualification or epic completion.
Triage 2026-11-09 at main 9c7eb25825fdad5f4485db0df472188805edb450: Verified the moved active declaration/use and repaired its navigation. Commit-bound historical failures and source ranges retain their identities; scope, rulings, child prerequisites, priority and no epic readiness are preserved. This source review is not a new runtime result.
2026-11-16 source refresh at main 43d73cbe6: Verified the actual 85dvh dialog and 70dvh sheet-cap passages after the image-editor record insertion. Existing decisions, native outputs and epic readiness remain unchanged; no new runtime proof is claimed.
Activity
schlessera commentedon Oct 22, 2026
2026-10-22 triage at main
aa8c8966b59f031f054f4876dbca84048b40ae4f: reconciled #2603/#2604's supplied proposals and current needs: decision labels with the breakdown. Corrected the definition of done so decision-producing children are not represented as full migrations; adopted implementation outcomes still require their own completed follow-ups before parent closure. No type-unit, motion or breakpoint policy is selected; preserve p3, native children and no epic readiness.schlessera commentedon Oct 22, 2026
2026-10-22 later-ruling reconciliation: the native breakdown now reflects accepted #2603 root-relative type and #2604’s 120ms crossfade, including the explicit view-change-only D54 exception. Their remaining scope is durable records and scoped follow-up issues; the parent still requires delivered and verified implementation outcomes. No migration, animation runtime, baseline approval or epic readiness is claimed.
schlessera commentedon Nov 10, 2026
2026-11-10 triage at main
3aadc8df5: citation drift only: D22's "one ambient animation" is atcomponents-and-interactions.md:124(was 122). All eight children remain open; no merged PR since the 2026-11-04 pass references them. Breakdown, labels and native membership unchanged.