Skip to content

docs(spec): AppShell region plugins and Focus Mode - #8410

Draft
humbertovirtudes wants to merge 1 commit into
mainfrom
docs/app-shell-region-plugins-4255
Draft

humbertovirtudes wants to merge 1 commit into
mainfrom
docs/app-shell-region-plugins-4255

Conversation

@humbertovirtudes

@humbertovirtudes humbertovirtudes commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR This is a specification-only draft for AppShell region plugins and Focus Mode. The rebase reconciles 3 newer motion/focus contracts. OQ1-OQ4 still need an owner decision; no runtime behavior changes.

Exact decision needed

Refs #4255. This draft does not implement or close the feature.

The caller knows whether otherwise identical page content is part of ordinary navigation or a focused task. Removing navigation slots loses state; styling alone cannot coordinate generated drawers, native modal close, and focus. The candidate keeps that task intent at the shell boundary.

Owner decisions remain explicit in OQ1-OQ4: region descriptor and ordering admission, the single preset, effect lifecycle without React Activity on the supported React floor, and restoration of requested drawer state. In particular, replacing children and padding through descriptors is not approved by this rebase.

Existing authority searched

  • Current component:AppShell, component:MobileNav, family:layout-regions, family:overlay-dismissal, spec:AST-002, spec:AST-013, and the React runtime and component-theming architecture.
  • Current AppShell FR17, MobileNav FR6, design:reduced-motion DR1-DR3, spec:AST-105 FR4/FR8, and spec:AST-108 FR2/FR4a/FR6.
  • AppShell source, public exports, docs and tests; Table plugin ordering/context composition; SideNav collapse ownership; MobileNav's delayed native close and explicit opener restoration.

The distinct system boundary is coordination between AppShell visibility, a cooperating MobileNav's native modal lifecycle, and focus handoff to page content. AppShell remains the aggregate API owner; Focus Mode's independent contract belongs to its module. The current canonical owners must receive the approved projections before build.

Decision

Candidate contract:

  • Optional named plugins with all 6 transforms from the issue, using shell-owned region descriptors rather than requiring particular child components in ReactNode slots.
  • Canonical focusMode first, then custom own-entry order; region writes compose forward and the last write wins. The first context wrapper is outermost, matching Table.
  • One controlled focus preset hides top/side/mobile navigation and preserves banner, content, padding and independent SideNav state.
  • Retained hidden state, settled first paint/hydration, theme-owned coordinated motion and pointer-specific reduced motion.
  • A cooperating drawer releases native modal blocking before the Focus Mode focus handoff. The connected-opener exception is an explicit proposed amendment to MobileNav FR6, not current authority. Independently controlled or portalled custom modals remain caller-owned.
  • Effective public mobile context remains distinct from requested openness. Absent-slot transforms, explicit mobile disable, custom use of the canonical key and reversal cases are specified.

No owner decision is recorded by this draft.

Rebase reconciliation

Review point Resolution in this draft Current owner
Focus handoff versus connected-opener return Current-state impact names the narrow MobileNav FR6 amendment for a suppressed opener. Ordinary closes retain the current return rule; the exception still requires owner admission. component:MobileNav FR6
Immediate reduced motion on every pointer Coarse pointers and touch-drag releases use opacity-only cross-fades of at most 200 ms; other pointers change immediately. Theme reducedMotion: 'always' enforces the same rules. design:reduced-motion DR1-DR3; spec:AST-108 FR4/FR6
Old easing and animated released space Job-named theme curves and one clock govern the transition. Content takes its settled width and swaps its wrap; it never animates its width. Drawer-owned motion keeps its own role and coordinates timing. component:AppShell FR17; spec:AST-105 FR4/FR8; spec:AST-108 FR2/FR4a

The API example, all 4 open questions, and draft authority metadata are unchanged.

Rejected alternatives

A dedicated focus-mode prop or independent hide props creates a second mechanism instead of the selected plugin direction. Child-component props cannot represent arbitrary existing node slots. Conditional removal loses navigation state; a fragment-only visibility fallback leaves navigation interactive. More presets, augmentation, motion tuning and shortcuts need separate caller-need evidence.

Claim scope and non-goals

Specification records only. No behavior change. No runtime implementation, exports, stories, changesets, theme targets, consumer-doc changes, SideNav collapse/resize changes, or unrelated shell repairs. Main content and its skip target remain available.

Evidence and implementation relationship

The record is grounded in current source and existing canonical contracts. Its verification matrix describes required future evidence, not completed feature tests. The rebase extends that matrix with connected visible/suppressed openers, theme knobs, coarse/fine reduced-motion paths, shared clocks and the no-animated-width constraint.

Implementation remains held until owner decisions are recorded as current authority. A passing check does not approve the proposed API or the MobileNav focus exception.

Writing rubric results

  • R1 narration: the new clauses state present-tense behavior; current-state impact explicitly identifies the proposed canonical amendment and its admission boundary.
  • R2 research in the record: none; source/reuse analysis remains in this description.
  • R3 evidence naming a change: none; verification identifies observable behavior and failure signals.
  • R4 rejected alternatives: comparisons remain here while no owner decision is recorded.
  • R5 standing change references: no issue or PR links remain in the record.
  • R6 ruled open questions: none; OQ1-OQ4 are unchanged and unanswered.

Scope

  • Specification records only; no implementation.
  • Observable contracts preserve equivalent private implementations.
  • Native modal cooperation has an explicit ownership boundary and proposed amendment.
  • Verification names evidence and failure signals, not workflow topology.
  • Current owners are identified; adjacent features remain outside scope.
  • No private operational context is included.

Validation

  • node scripts/specs-for-file.mjs <path> and --diff origin/main: completed; concern-routed current records read.
  • node scripts/check-knowledge.mjs: passed, "Knowledge templates and records are aligned."
  • Exact-file Prettier and git diff --check: passed.
  • node scripts/pre-review.mjs --head HEAD --json: 0 findings, 0 merge conflicts; only specification records changed.
  • Exact reviewed head: b941f3908fb3592ac6f88a973b805d5265a0a2bf.
  • Base: 824e71ea0123402e44e30f3e989e9052b0c2c709.
  • Exact-base/head global routing: 268 claim/trigger matches; record IDs, claim IDs, reasons and digests retained. Routes do not grant blanket authority or resolve the open owner decisions.
  • Runtime tests and browser captures are not claimed for a specification-only change.

@vercel

vercel Bot commented Oct 25, 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 8, 2026 6:13pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 8, 2026, 6:22 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 25, 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.

This draft spec can't be approved yet. No current spec covers its new AppShell plugins API and Focus Mode (FR1–FR14), so an engineering owner needs to decide OQ1–OQ4, including whether region descriptors should be able to replace children and padding alongside the existing slot props, or carry only isHidden. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, you can do so yourself. Whatever the decision, these points conflict with current records and need fixing:

  • FR7 moves focus to main when the drawer closes, but the current MobileNav contract (FR6) returns focus to an opener that is still connected. Either name that amendment in Current-state impact or make FR7 conform.
  • Under reduced motion the record settles changes immediately, but the current reduced-motion design (DR2) requires an opacity-only cross-fade of 200 ms or less on touch screens.
  • FR9's --ease-standard and the animation of the space navigation releases predate the current theme-motion spec (AST-108) and AppShell's FR17. Please reconcile them when you rebase.

[Automated 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.

This draft spec now agrees with the current MobileNav, reduced-motion and theme-motion contracts it cites, and I found no defects in it. Approval waits on an owner decision: no current spec covers the new AppShell plugins API and Focus Mode (FR1–FR14), and FR7 deliberately amends MobileNav's FR6 focus return. An engineering owner needs to settle OQ1–OQ4, in particular whether region descriptors may replace children and padding beside the existing slot props or carry only isHidden, and to accept the FR6 amendment. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, you may do so yourself.

  • One reading to settle while deciding: with Focus Mode on and no banner, the record does not say whether the shell's header region (its banner landmark and safe-area padding) goes away with the hidden top nav.

[Automated review]

This branch was successfully deployed

1 active deployment
Preview — b941f390 Deployed Nov 8, 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