Context. surface studio · domain design · route /studio/complex-interactions · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/complex-interactions/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body re-derived 2026-06-03 from current source (lane-console architecture); 2026-07-02 studio-design-lane-consoles Playwright pass covers live BFF catalog/resolve, auth/schema gates, error states, focus-order result, quick actions, and mobile no-overflow.
Purpose#
Resolve keyboard focus order with the real resolver: the Focus Order Lane
computes the Tab traversal (positive tabindex first, then DOM order, skipping
disabled/hidden/negative elements) and flags the positive-tabindex anti-pattern.
It is a live admin console wired to /v1/admin/studio/focus-order, not an
in-page simulation.
Entry points#
- Direct URL / bookmark —
/studio/complex-interactions(signed-in + studio entitlement; admin scope required to resolve) - Sibling Studio routes — reached via the quick-action panel on color-system, component-primitives, design-language, and other design/governance pages
Layout regions#
page.tsx mounts <ShellLayout active="studio"> and renders
<StudioComplexInteractionPatternsWorkspace /> followed by a single panel of
quick-action links.
- Shell:
ShellLayoutchrome with the Studio tab active - Workspace heading:
WorkspaceHeadingrenders the page<h1>"Studio Complex Interaction Patterns", followed by thedata-complex-interactions-summaryparagraph - Focus Order Lane: an
<h2>data-fo-lane-heading("Focus Order Lane") section with the load states and, when ready, the resolve form and result table - Quick-actions panel: 16 sibling
quickActionLinks — Navigation/Commands, Search/Discovery, Cross-Domain Entity Model, Workspace Context Switching, Multi-Project Operations, Authentication Architecture, Session and Device Management, RBAC and Permission Policy UX, Enterprise Tenant Isolation, Audit and Compliance Surfaces, Notification Center, Activity and Change Feeds, "Back to Component Primitives workspace", "Back to Spacing/Layout workspace", "Back to Color System workspace", and "Back to Typography workspace". No self-link and no Route Map panel.
States#
- Loading —
data-fo-loading("Loading focus-order resolver…") - Unauthorized —
data-fo-unauthorized("Access restricted.") on 401/403 - Error —
data-fo-error("Could not load the focus-order resolver.") - Ready / form —
data-fo-enums("N issue codes") plus thedata-fo-formresolve form - Result —
data-fo-resultheadline (data-fo-headlinewithdata-fo-order,data-fo-positive-count) and thedata-fo-elementstable ofdata-fo-element-rowrows (data-fo-tab-position,data-fo-element-issues) - Resolve error —
data-fo-resolve-errorfor invalid JSON or a non-200 response
Interactions#
- Elements (JSON) —
textareadata-fo-payload,aria-label="focus elements json", seeded with{ elements[{ elementId, tabIndex, disabled, visible }] } - Resolve focus order —
buttondata-fo-submit(type="submit"); POSTs the parsed JSON to/v1/admin/studio/focus-order/resolve, settingdata-fo-resulton a 200 with a validresult, ordata-fo-resolve-errorotherwise - Quick-action links — each
quickActionLinknavigates to its sibling Studio route (see Layout regions for the 16 targets)
E2E coverage#
Coverage depth: deep.
studio-design-lane-consoles.spec.tsdrives/studio/complex-interactionsthrough the live catalog, malformed-JSON client guard, real BFF 400 validation detail, focus-order resolution with positive-tabindex issue surfacing, exact quick-action href list, loading / unauthorized / malformed-catalog fail-closed states, mobile no-overflow, and direct BFF 401 / 403 / 400 gates.
Data & contracts#
- Reads:
GET /v1/admin/studio/focus-orderon mount — returns the catalog (issues[]) - Writes:
POST /v1/admin/studio/focus-order/resolve— returns{ result: { focusOrder[], elements[], summary{ focusableCount, positiveTabindexCount } } } - Realtime: none
- Caching: client
fetchwithcache: 'no-store';buildBffAuthHeaders()attaches the bearer token - Auth/role check: admin-scoped fail-closed —
admin:*oradmin:studio, 401/403 under the studio workspace gate
Cross-references#
- Parent:
../studio-overview.md - Sibling:
studio-color-system.md,studio-typography.md,studio-spacing-layout.md,studio-component-primitives.md,studio-design-language.md - Component source:
apps/oshun/web/src/components/studio/StudioComplexInteractionPatternsWorkspace.tsx - BFF store:
apps/oshun/bff/src/studio/focus-order-store.tsbehind/v1/admin/studio/focus-order
Known downstream boundaries#
- Current source intentionally uses the flat quick-action panel and no Route Map panel; the 2026-07-02 browser spec asserts the exact target list.
- The current resolver contract is Tab focus order plus the
positive_tabindexissue. Future transition or recovery lanes should get new route contracts and walkthrough rows when they ship.