Skip to main content

ImbatranimOS UI conventions — the house style, as rules

Rendered from corpus/wiki/ui-conventions.md · updated 2026-11-03

This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.

Derived by reading the code, 2026-07-31. Identity is locked: Win7-classic layout, drawn in one of two themes (2026-11-02, decisions-themes.md): Apricot, the default (cream, pastel accents, soft token radii, Figtree), and Classic (B&W + crimson, square, Space Grotesk), each in a light and a dark mode, light by default. Implement inside it, in tokens, so one component works in all four combinations. A marketplace kit app follows every rule here exactly as an add-on does (2026-10-21): it renders in the desktop's tree with the shared kit; only its imports are read from globalThis.__imbatranimShared and its utilities come from its own stylesheet, compiled against packages/ui/src/theme.css (marketplace/README.md).

Copy apps/add-ons/clock — the best-behaved app: pure SDK kit, correct tokens, honest minSize, notify() for async events. file-manager is the richest but violates §8. sticky-notes was the inherited counter-example; the sticky-notes work (2026-08-05) (2026-08-05) rewrote it to the rules below, so it is now safe to read — and it is the only worked example of a desktop layer (§47).

1. The import rule​

  1. Import only @imbatranim/ui, lucide-react, react, @tanstack/react-query, and your own declared deps. Since the system-handle seam (2026-08-06) the split is absolute (apps/add-ons/calculator/eslint.config.js:37-61): @imbatranim/core is type-only — a value import from it is an eslint error, since values are what would couple an app bundle to the OS; in practice you import it once, for AddonManifest/AppConfig. Deep paths, sibling add-ons and ../../core/* escapes are blocked too.
  2. Never re-implement anything on the SDK surface — read packages/ui/src/index.ts, don't trust a copy of the list: cn; the kit (Button, Checkbox, Dialog, Input, ScrollArea, Select, Separator, Tooltip, ContextMenu, ConfirmDialog/useConfirm, PromptDialog/usePrompt, UnsavedChangesDialog, FileConflictDialog/useFileConflict); pure hooks (useVirtualList, useElementSize); the shared queryClient; the save/open spine (useSaveHotkey, useUnsavedGuard, useOpenIntent, useFileDialog, useTopWindowKeydown, useDocumentedShortcuts, useRegisteredHotkeys, useWindowVisible, useSystemAppearance); file helpers (fileName, UploadTooLargeError, FileConflictError, describeFileFailure, reportFileFailure). Anything that touches the OS comes off the injected handle instead, never an import: const system = useSystem(), then system.fs / .http / .window / .intents / .shortcuts / .appearance / .schedule / .notify() / .on(). packages/ui/src/system.ts is the protocol spec — read it before inventing a call; glossary.md has capability vs library.
  3. One import statement per specifier: import { Button, Input, cn } from '@imbatranim/ui' (calculator/src/BasicPad.tsx:2 right; file-manager/src/FileManager.tsx:12-19 wrong — nine statements, same specifier).
  4. Missing from the kit — propose adding it to @imbatranim/ui, don't grow a private copy. (Shipped since: ContextMenu, the context-menu kit (2026-08-07) → §27; the file-open picker as the system.fs.pick* portal capability + useFileDialog, the system-handle seam (2026-08-06); useTopWindowKeydown, now an SDK hook.) Still missing: Tabs (hand-rolled 3×: Calculator.tsx:31-52, clock/src/Clock.tsx:67-81, markdown-editor/src/MarkdownEditor.tsx:129-147); an EmptyState; a Tooltip that can render as a non-button (§8).

2. Tokens and colour​

  1. Only semantic token classes. Real names, the @theme static block in packages/ui/src/theme.css (in apps/core/src/index.css until the shared kit (2026-10-21)) — surfaces surface, surface-dim, surface-bright, surface-container-lowest/-low/surface-container/-high/-highest; text on-surface (primary), on-surface-variant (muted), inverse-surface/inverse-on-surface (tooltips); borders outline-variant (default hairline) and outline (stronger); accent primary + on-primary, primary-container + on-primary-container; error, on-error, error-container, on-error-container; and secondary / on-secondary / secondary-container / on-secondary-container, which are aliases of on-surface-variant / surface / surface-container-high / on-surface (theme.css) — real classes, but prefer the surface names, because text-secondary reads like a second accent and there isn't one. As utilities: bg-surface-container-low, text-on-surface-variant, border-outline-variant, bg-primary text-on-primary.

  2. The accent is a runtime CSS var, never a literal. applyAppearance() (appearanceStore.ts) stamps it on <html>, and theme.css maps primary to it. So bg-primary tracks the user's accent choice; a hex does not. Each theme has its own presets (ACCENT_PRESETS): Classic's four (crimson default), Apricot's five pastels (Apricot default), and the accent is saved per theme.

    Strong and soft (2026-11-03). Each accent has two pairs, both stamped by applyAppearance(): strong primary / on-primary (--accent) and soft primary-container / on-primary-container (--accent-soft). In Classic the two are the same colour. In Apricot light, strong is a deep shade with white on it and soft is the pastel with dark text, which fails as text or a border on cream. So:

    • A selected, current or chosen state is soft: bg-primary-container text-on-primary-container. Examples: the selected file row (FileList.tsx), the highlighted Start menu or context-menu item, the chosen option of a segmented control, a toggle or tab that is on (<Button variant="selected">).
    • An action or an indicator is strong: a primary action (<Button variant="primary"> for Install, Save, OK), a progress fill (bg-primary, StorageSettings.tsx), an unread badge, a thin indicator such as the taskbar's current-task line, and the calendar's today marker.
    • Text, focus rings and borders stay primary, including the border around a selected chip: the pastel fill alone sits under 3:1 against cream, the border keeps the state visible.
  3. Themes and modes are the same token names with other values: four blocks in index.css, keyed on [data-os-theme] and [data-theme] (which keeps its name and means the mode). Tokens alone buy you all four. Never add a dark: variant or branch on the theme in component code; theme-only chrome uses apricot:.

  4. Forbidden: hex, Tailwind palette colours (bg-red-500, text-slate-400), gradients, and numeric rounded-*. Corners are the six token radii (2026-11-03): rounded-window (frames, dialogs), rounded-menu (Start, context menus, popups, toasts), rounded-control (buttons, inputs, tooltips), rounded-item (list rows, menu items, in a list padded by px-(--k-list-inset)), rounded-tile (desktop icons, widgets), rounded-small (checkboxes, swatches, key caps) — soft in Apricot, 0px in Classic, where index.css also forces border-radius: 0 !important. In Apricot, bordered boxes and cards inside windows take rounded-control too; edge-to-edge panels stay square. A maximised or snapped window drops rounded-window. Theme-only styling uses the apricot: variant.

  5. Shadows only on floating layers, and only the shadow variables (index.css), as shadow-(--k-shadow-…): window / window-focused (frames), menu (Start), popup (context menus, Select), dialog (dialogs, Alt+Tab), tile (desktop icons, Apricot only). Classic keeps the old recipes as their values; Apricot's are warm-tinted. Also toast, tooltip, tray (the tray's popovers) and card (the sign-in card), 2026-11-03. In-window content is flat (no shadow) — separation is a 1px border-outline-variant plus a surface-container step, with the corners of rule 8.

  6. Never invent a colour to mean a state. Levels are told apart by icon shape; only error gets colour (notifications/levelStyle.ts:11-18). Success is text-primary, not green.

3. Typography and spacing​

  1. font-ui follows the theme — Figtree in Apricot, Space Grotesk in Classic (--k-font-ui) — for chrome, labels, numbers; never name either family. font-content = Inter (user-authored prose) in both; font-mono for code panes (MarkdownEditor.tsx:179). A canvas reads --font-ui from <html> at draw time.
  2. Root is 13px (index.css:141); the scale is explicit arbitrary sizes — text-[11px] labels/meta/status bars/toolbars/tabs · text-[12px] buttons/list rows/menu items/dialog titles · text-[13px] body, inputs, checkbox labels · text-[10px]/text-[9px] shell chrome only (taskbar/StartMenu.tsx:103,132). Larger type only for a real display value: text-3xl calculator readout (calculator/src/BasicPad.tsx:106), text-[36px] timer (clock/src/tabs/Timer.tsx:36), both with tabular-nums.
  3. Weights: font-medium for controls, font-semibold for titles/labels, font-bold only in the taskbar brand (taskbar/Taskbar.tsx:78). Never font-light.
  4. The house field label is font-ui text-on-surface-variant text-[11px] font-semibold tracking-wider uppercase (ui/Input.tsx:15, ui/Select.tsx:30, modules/settings/Settings.tsx:66).
  5. Compact density. Toolbar px-2 py-1 + gap-1 (FileManager.tsx:325); status bar px-2 py-0.5 (:524); list row px-2 py-1 (FileList.tsx:163); menu item px-3 py-1 (ContextMenu.tsx:65); dialog body p-3 (ui/Dialog.tsx:48); icon-only button className="h-5 w-5 p-0" (FileManager.tsx:398). Gaps are gap-0.5/1/2/3; mb-3/mb-4 inside dialogs. p-6+ belongs to Settings-style full pages (Settings.tsx:83), not to an app toolbar.

4. Layout inside a window​

  1. Core hands you a flex column whose body is min-h-0 flex-1 (window/Window.tsx:316), so your root is always <div className="bg-surface-container-lowest flex h-full flex-col"> (FileManager.tsx:323, clock/src/Clock.tsx:62, calculator/src/Calculator.tsx:29). h-full — never h-screen, never 100vh (snipping-tool/src/components/AnnotationStage.tsx:415 uses calc(100vh - 140px): wrong, the window is not the viewport).
  2. Chrome order is toolbar → optional breadcrumb/tabs → body → status bar. Toolbar: border-outline-variant bg-surface-container-low flex items-center gap-1 border-b px-2 py-1. Status bar: the same with border-t px-2 py-0.5 and text-[11px]. Both shrink-0/flex-none; only the body flexes.
  3. Every intermediate flex wrapper needs min-h-0 (plus min-w-0 horizontally) or the body pushes past the window and clips controls (FileManager.tsx:445, MarkdownEditor.tsx:163,174).
  4. Scroll containment: ScrollArea goes inside the flexed body, never around the whole app — <ScrollArea className="h-full w-full" viewportRef={ref}> (FileManager.tsx:460). Virtualizing? pass viewportRef and feed it to useVirtualList({ getScrollElement: () => viewportRef.current }) (FileManager.tsx:292,306-311); never query base-ui's internal DOM. Prefer ScrollArea to raw overflow-y-auto — 17 add-on files still use the raw version and get the browser scrollbar instead of the themed one.
  5. Content must survive a short window. apps/core/src/shared/store/windowStore.ts:211 sets size from defaultSize verbatim, with no viewport clamp, and the taskbar eats 44px (windowStore.ts:27, taskbar/Taskbar.tsx:11). Therefore: (a) defaultSize.height must fit a 720px-tall viewport with room to spare — ≤620 is safe, code-editor 680 and norpdf 720 are already too tall; (b) minSize must be honest — the measured smallest height at which every control is still reachable, not a round number, and you must test at exactly minSize; (c) never put a control in a flex-none block below an unbounded flex-1 block, because the primary action must survive first — Calculator's keypad is flex-none under a flex-1 display (BasicPad.tsx:103,115), which is why 0 . = vanishes; (d) never rely on window-level scrolling to reach a button.

5. Interaction patterns — the one canonical answer each​

  1. Confirm → useConfirm(): const { confirm, confirmDialog } = useConfirm(), await confirm({ title, message, destructive: true }), render {confirmDialog} (ui/ConfirmDialog.tsx:68-114; use at sticky-notes/src/StickyNotes.tsx:197,200-207). Never a bespoke <Dialog> + two buttons; never window.confirm.
  2. Text prompt → usePrompt() — resolves the trimmed string or null, Enter confirms, empty disables confirm (ui/PromptDialog.tsx:202-250; use at notepad/src/components/FileBrowser.tsx:24,147).
  3. Toast / error / async completion → notify({ title, body?, appId, level }), level info|success|warning|error (apps/core/src/shared/store/notificationStore.ts:122). Errors are sticky, others auto-dismiss at 6s (ToastHost.tsx:10,16). Always pass appId so the item gets your icon and click-to-open (clock/src/useClockNotifications.ts). A console.error is never a user-facing signal. The clean shape for a mutation-heavy app is one private reportFailure() wired into every onError (sticky-notes/src/queries/stickyNotesQueries.ts:20-27, todo/src/queries/todosQueries.ts). An inline banner is acceptable only for errors bound to the visible view (FileManager.tsx:430-442); a toast is the default. As of the sticky-notes work (2026-08-05) no add-on ships a console-only failure path — the two remaining console.error calls (pdf-viewer/src/PdfViewer.tsx:81, code-editor/src/CodeEditor.tsx:322) each sit beside a visible banner, which this rule allows.
  4. Destructive action → variant="destructive" (ui/Button.tsx:24-27) and destructive: true on the confirm. Both, always.
  5. Empty state → centred column, one big thin glyph, one 12px line — <div className="text-on-surface-variant flex flex-col items-center justify-center gap-2 py-12"><Folder size={32} strokeWidth={1} /><span className="font-ui text-[12px]">Empty folder</span></div> (file-manager/src/components/FileList.tsx:105-112; 40/1 variant at docs/src/Docs.tsx:146). Say what is empty; do not apologise.
  6. Loading → centred text-on-surface-variant font-ui text-[12px] "Loading…", plus <Loader2 size={16} className="animate-spin" /> when the wait can exceed ~1s (MarkdownEditor.tsx:165-167; text-only at FileManager.tsx:462). An in-place refresh spins the existing icon instead: <RefreshCw className={cn(isFetching && 'animate-spin')} /> (FileManager.tsx:411). No skeleton shimmers.
  7. Context menu → never hand-roll one (the context-menu kit (2026-08-07) promoted the third copy). onContextMenu={e => { e.preventDefault(); setMenu({x: e.clientX, y: e.clientY}) }} — raw VIEWPORT coords — then {menu && <ContextMenu x={menu.x} y={menu.y} items={items} onClose={…} label="…"/>} from @imbatranim/ui. Items are data: {label, icon?, onSelect, danger?, disabled?, checked?}, {type:'separator'}, {type:'custom', key, children} for a one-off row (file-manager/src/lib/buildMenuItems.tsx is the worked example). Positioning, edge-flipping, portalling above the taskbar, outside-press/Escape/scroll dismissal and the whole role="menu" keyboard contract come from the kit — do not re-implement any of them, and do not pass container-relative coordinates. Right-click must also select the row it opened on (FileList.tsx:150-155). Button-anchored menu bars (code-editor's MenuButton) are a different idiom with its own promote counter.
  8. Keyboard shortcut → scope it to the top-most window or two instances fight over keystrokes. Ctrl/⌘+S is useSaveHotkey(windowId, onSave) (hooks/useSaveHotkey.ts:16); other keys follow the capture-phase + isTopWindow guard in calculator/src/hooks/useTopWindowKeydown.ts:16. Never bind a bare window keydown.
  9. Dirty / unsaved → useUnsavedGuard(windowId, dirty, name) (hooks/useUnsavedGuard.ts:47) appends • to the window + taskbar title and registers a close guard. Mirror it in your toolbar as {name}{dirty ? ' •' : ''} at text-[11px] text-on-surface-variant (MarkdownEditor.tsx:156-159).
  10. File/save spine, in this order (markdown-editor/src/MarkdownEditor.tsx:25-99): const source = useOpenIntent(windowId) → const name = source ? fileName(source.path, 'untitled.md') : '' → await fetchFileBytes(source.root, source.path) → await uploadFileBytes(source.root, source.path, out, name) (catch UploadTooLargeError) → useSaveHotkey(windowId, handleSave) + useUnsavedGuard(windowId, dirty, name). downloadUrl() is unauthed by design, only for a real <a download> (lib/fileBytes.ts:75); every in-app byte read goes through fetchFileBytes (:21). Per-window state → createOpenedFileStore(). Cross-app handoff → openApp(appId, { openPath, root }) (FileManager.tsx:159). A save over the file you opened sends the version you read (2026-10-03): system.fs.readWithVersion, keep the token with your saved baseline (not the latest refetch), upload(..., { expected }); on FileConflictError ask with useFileConflict() (Overwrite = upload without expected, Reload from disk, Cancel). Save As elsewhere sends none. The office editors do not do this yet.
  11. Form → Input with the label prop (renders the house label and wires htmlFor to your id; ui/Input.tsx:9-19); Select with options={[{value,label}]} value onValueChange placeholder (clock/src/tabs/ClockTab.tsx:23-29); Checkbox with label. Select now shows the option's label on its trigger — until the bookmarks model (2026-08-05) it rendered the raw value, because base-ui can only look a label up when Select.Root is given an items map, so every Select whose value differed from its label (an id, a minute offset, a timezone) displayed the value. Fixed once in ui/Select.tsx for all callers; the lookup is by String(value), so a numeric value still resolves. Actions right-aligned in <div className="flex justify-end gap-2">, Cancel variant="default" first, then primary/destructive, disabled while invalid or pending (FileManager.tsx:553-565).

6. Icons​

  1. lucide-react only — no hand-written SVG (ui/Checkbox.tsx:25-27 is the one sanctioned existing exception), no icon fonts, no emoji as UI.
  2. Size by context: 11–12 in buttons/rows/tabs (FileManager.tsx:348, FileList.tsx:197, Clock.tsx:36) · 13 window controls (window/Window.tsx:297) · 14–16 menus and toasts (StartMenu.tsx:119, ToastHost.tsx:32) · 18–22 section headers and desktop icons (Settings.tsx:57, DesktopIcon.tsx:68) · 32–40 empty states. strokeWidth: 2 on controls, 1.75 in shell chrome, 1.5 on file-type glyphs, 1 on empty-state glyphs.
  3. The manifest icon is a lucide component reference, typed ComponentType<{size?, strokeWidth?, className?}> (contract.ts:15). Pick the most literal glyph and alias on collision (import { Calculator as CalculatorIcon }, calculator/src/index.ts:2). No baked-in size or colour — core renders it at several sizes.

7. Accessibility floor (minimum, not aspiration)​

  1. Everything clickable is a real <button type="button">, an <a>, or a kit component. A <div onClick> row is a defect — the last one in an add-on list is system-monitor/src/components/ProcessTable.tsx:141-147 (sortable column headers, keyboard-unreachable). If a row must be a <tr>/<div>, give it tabIndex, a key handler, and a role. When a row carries its own controls, make them siblings of the row button rather than nesting them inside it (sticky-notes/src/StickyNotes.tsx:298-354) — nesting forces a stopPropagation on every control and produces <button>-in-<button> (§42).
  2. Focus must be visible, as a ring not an outline: outline-none focus-visible:ring-primary focus-visible:ring-2 focus-visible:ring-inset (ui/Select.tsx:39, StartMenu.tsx:117, Settings.tsx:106). Button ships it per variant — do not override it away. No control falls back to the browser's outline (audited 2026-11-03); native checkboxes, radios, colour and range inputs take focus-visible:outline-2 outline-primary outline-offset-2 instead. Exception (owner, 2026-11-03): a Linux window's surface has no ring; the app draws its own focus.
  3. Icon-only controls need an accessible name: aria-label (ToastHost.tsx:44, Settings.tsx:131) or a Tooltip, plus title when it is also a mouse affordance (window/Window.tsx:296). Never ship a bare glyph button.
  4. Toggles carry aria-pressed (MarkdownEditor.tsx:135, Settings.tsx:132); grouped toggles get role="group" (MarkdownEditor.tsx:129).
  5. Lists and menus carry roles: role="listbox"/option/aria-selected (CommandPalette.tsx:183,199-200), role="menu"/menuitem/aria-label (StartMenu.tsx:61-62,87); virtualizer spacer rows get aria-hidden (FileList.tsx:127,247).
  6. Dialogs: use core Dialog so you inherit base-ui's focus trap, Escape, and backdrop dismissal (ui/Dialog.tsx:25-37), and autoFocus the first field (ui/PromptDialog.tsx:163). Never portal your own modal.
  7. Anything the mouse can do the keyboard must do — Enter opens, arrows move, Escape cancels (file-manager/src/hooks/useListKeyboardNav.ts). Never encode meaning in colour alone (§10). Keep the pairs: text-on-primary on bg-primary.

8. Anti-patterns in the code today — copy around these​

  1. <Tooltip> around a <Button> emits <button> inside <button>. ui/Tooltip.tsx:15 renders BaseTooltip.Trigger with no render prop, and base-ui defaults that trigger to a button (node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.js:220). file-manager/src/components/FileList.tsx:190-240 does it five times per row, plus FileManager.tsx:414 and MarkdownEditor.tsx:116,131. This is the source of the walkthrough's console errors — invalid HTML, and the inner button can swallow clicks. Until core's Tooltip forwards render, use title= on an icon-only Button. Add no new Tooltip-around-Button sites.
  2. There are no native dialogs — every dialog is the kit's (2026-08-07). useUnsavedGuard returns the themed UnsavedChangesDialog (Save / Don't Save / Cancel — render the node, packages/ui/src/hooks/systemHooks.tsx); everything else asks with useConfirm/usePrompt. window.confirm/alert/prompt grep to zero under apps/ and packages/ source, and any new hit is a regression: a native modal names the host browser and freezes every window's JS, the two hardest breaks of the "this is an OS" illusion.
  3. file-manager hand-rolls what core exports: a bespoke delete confirm (FileManager.tsx:569-596) instead of useConfirm, and a custom error banner whose comment at :104 still claims "no toast system here" though notify() shipped in the notification center work (2026-07-18). Copy its layout (toolbar / body / status bar), not its dialogs.
  4. sticky-notes was off-style — fixed by the sticky-notes work (2026-08-05) (2026-08-05), kept here because the four defects are the ones an inherited app most often has and this is the shape of the fix. It had: <div onClick> rows (keyboard-unreachable), a raw overflow-y-auto instead of ScrollArea, console.error as the only failure signal, and a raw <button> where a ghost Button belongs. Now: rows are real <button>s with the controls as siblings (StickyNotes.tsx:298-354), ScrollArea (:261), a private reportFailure() on every mutation's onError (queries/stickyNotesQueries.ts:20-27), and kit Buttons throughout. useConfirm was always right (:197) and stayed.
  5. Literal colour: norpdf/src/editor/SignatureDialog.tsx:186 (kept deliberately — it previews ink on paper and must match the PDF). The Terminal's bg-[#0d0d0e] is fixed (2026-08-04): its xterm theme now comes from --k-surface/--k-on-surface/--accent and is re-applied on theme or accent change. Note that a light terminal needs its own ANSI 16 palette too — xterm's dark-tuned defaults are unreadable on a near-white surface, so repl-interpreter/src/lib/xtermTheme.ts carries one per mode, contrast-tested. Dead radius classes: code-editor/src/CodeEditor.tsx:345,350, norpdf/src/editor/AnnotateToolbar.tsx:109,157. TASKBAR_HEIGHT = 44 is declared twice (windowStore.ts:27, taskbar/Taskbar.tsx:11) and is not exported to add-ons — do not add a third copy; size with h-full.

9. Painting on the desktop​

Rules 47 and 48 (the desktopLayer seam, and a way back for desktop objects) are on ui-desktop-layer.md, split out 2026-11-03.

10. Pre-flight checklist — all fourteen must be "yes"​

  1. Does the add-on import only @imbatranim/core + lucide-react + its declared deps, with no deep path into core?
  2. Did I reuse every applicable core export (Button, Input, Select, Checkbox, Dialog, ScrollArea, useConfirm, usePrompt, notify, useVirtualList) instead of hand-rolling one?
  3. Are all colours semantic token classes — zero hex, zero Tailwind palette colours, zero gradients, zero dark: variants, no numeric rounded-*?
  4. Does the accent appear only via primary/on-primary/primary-container, so switching accent in Settings restyles it with no code change?
  5. Did I open it in Apricot light and Classic dark and confirm nothing is invisible, unreadable or clipped, and selection uses the soft fill?
  6. Is type inside the 11/12/13px scale, font-ui for chrome and font-content for user prose, at toolbar density (px-2 py-1, gap-1)?
  7. Is the root flex h-full flex-col with min-h-0 on every flexed wrapper, and no h-screen/100vh anywhere?
  8. Does scrolling happen inside a ScrollArea in the body — never on the window itself — with viewportRef wired if the list is virtualized?
  9. At exactly minSize, is every control still visible and clickable without resizing, and does defaultSize.height fit a 720px-tall viewport minus the 44px taskbar?
  10. Is every destructive action both variant="destructive" and gated by confirm({ destructive: true })?
  11. Do async successes and failures reach the user through notify({ …, appId }) rather than only a console log or a silent no-op?
  12. Can I complete every task keyboard-only — tab to each control, visible focus-visible ring, Enter/Escape working, no <div onClick> as the only path?
  13. Does every icon-only button have an aria-label or title, and does every list/menu/tree carry its role + aria-selected/aria-label?
  14. Does the console stay clean on mount, interaction, and unmount — in particular no nested-<button> warning (§42) — and are turbo typecheck, lint, format, and turbo build green?