Repository navigation
feat(console-ui): one vocabulary, tokens beyond colour, ConsoleShell and consistency checks - #5279
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review Automated re-review request for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4465626ced
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4465626 to
8920b65
Compare
cceb28a to
aa57803
Compare
241fb86 to
6a20eb1
Compare
…and consistency checks Why console-ui held two looks: the chosen design and a page kit (#5151) that copied the old Hub (uppercase eyebrow, big title, stat cards, 36px controls, mono uppercase tables, pill badges). Only colour was tokenised, so spacing, type, radii and breakpoints were hard-coded per app, and the package contradicted itself (two focus rings, two backdrops, ten radii, 600 vs 650 weights, four breakpoints). Apps patched shared classes and four carried their own phone top bar. Nothing stopped the old vocabulary coming back. What - tokens.json gains spacing, type, weights, radii, sizes (28px controls, 44px hit areas on touch), layers, motion, translucent backdrop and shadows per theme, phone gutter, and breakpoints (also BREAKPOINTS and SIDEBAR_QUERY in TS). tokens.css is generated from it. - components.css is split into one file per piece under styles/components/, all on tokens: one focus ring, one backdrop, one radius scale, weights 400/500/600, breakpoints 600 and 900 in range syntax. - New pieces: ConsoleShell (nav declared once for sidebar and drawer, skip link, switcher, palette button, theme row), NavTabs, Banner, State, Section and .ui-columns, Dialog/DialogClose and ui-dialog classes, ICONS. HeaderBar gains lead, titleId, focusOnMount and phone wrapping; FigureStrip gains label, layout, href and glyphs; StatusGlyph gains icon and rich labels; Chip takes children or label/value plus href with no margin; Button gains danger; SearchField is 28px on the field look. .ui-table absorbs the apps' patches (row headers, current row, sticky head, mono .ui-num, tfoot, caption, empty row, truncation, row links) and one phone rule (scroll, or data-stack label/value lines). - createThemeStore() defaults to the shared ops-theme key, works without a DOM and keeps theme-color metas equal to the bg token. - Page kit, TopBar, ThemeToggle, SeverityBadge and size="page" are @deprecated; page.css keeps their look (Go link renders unchanged) and is held to a frozen allowlist. Go link's uses sit in eslint-suppressions.json. - Checks: vocabulary.test.ts (shared CSS), the per-app scan (@shepherdjerred/console-ui/testing) with a conformance.test.ts and an exact-count allowlist in all ten consoles, and consumers.test.ts. - Hub /kit and /kit/detail gallery, reachable from the palette only, with a Playwright spec (axe light/dark, overflow 375/1280, dialog focus). - README and wiki reference rewritten. Verification - bunx turbo run build typecheck test lint for console-ui, alert-dashboard, ops-model, golink, delivery, tracker, errors, mail, flags, feeds, charts, ci-cache: 65/65 tasks pass. - bun run jscpd: ratchet passed. bun scripts/tools/knip.ts: exit 0. - Hub Playwright (full suite) and the new kit.spec.ts pass locally. - Go link before/after pixel diff: identical except 49px of the workspace mark letter (weight 700 to 600). - Not run: exact-head Woodpecker CI, deployment, live acceptance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…formance Why Flags restyle (#5163) landed on the old page kit, which CU1 deprecates. What Generate packages/flags/eslint-suppressions.json for no-deprecated and regenerate the Flags conformance allowlist from main's real code. Verification turbo typecheck lint test on flags, console-ui and the other consoles pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why #5272 added Hub's Renovate ranking page after the CU1 baseline was taken. Its queue filter uses the deprecated `ui-select` class, so the restacked conformance scan fails Hub's tests. console-ui has no Select until CU4. What - One `deprecated-class` allowlist entry for renovate-ranking.tsx (count 1), with the reason and the PRs that remove it (CU4 Select, then H3/H4). Verification - `bun --bun vitest run src/client/conformance.test.ts` in alert-dashboard: 1 passed (failed before the entry). - turbo build typecheck test lint over console-ui's dependents and Go link on the restacked branch: 216/217, the one failure being this test. - `scripts/checks/check-directory-file-counts.ts` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why #5325 (flag history, archive) merged after CU1's Flags baseline. Its new archive page and history panel import page-kit pieces that CU1 deprecates, and its test harness builds a theme store with Flags' own key. Merged onto main as it was, CU1 failed Flags' lint (no-deprecated) and conformance tests. What - eslint-suppressions.json: no-deprecated counts for archive-page.tsx (6) and history-panel.tsx (1), regenerated with `eslint --suppress-rule`. - Conformance allowlist: deprecated-import for archive-page.tsx (4) and history-panel.tsx (1), theme-store-key for app-harness.test-support.tsx (1), each to be removed by FL1. Verification - Found by merging CU1's head into current main in a scratch worktree: Flags conformance and lint failed there. - After this commit: `bunx eslint --cache . --max-warnings=0` clean; conformance test 1 passed; turbo build typecheck test lint over flags, console-ui, alert-dashboard, errors and golink 39/39. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6a20eb1 to
f8f9804
Compare
Why Review of CU1 (#5279, codex P2): `.ui-lead` is `position: relative` for its unread dot, so it became the containing block of the `.ui-row-link` cover and only the lead cell navigated, although the whole row shows a pointer. What - In a linked row the lead cell is static, so the positioned row contains the cover; the unread dot then measures from the row edge, which is why the README now says the link sits in the row's first, lead cell. - Hub /kit e2e: clicking the last cell of a linked row opens the detail page. Verification - The new test fails with the old CSS (no navigation) and passes with this change. - `bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts` against the built Hub: 35 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ated imports Why #5331 added artifacts as a console-ui consumer after #5279 required every consumer to run the per-app conformance scan and flagged page-kit pieces as deprecated. On main, console-ui's consumers test and artifacts' lint fail; main's own pipeline did not select them, but any console-ui change does. What - packages/artifacts/src/client/conformance.test.ts, the 7-line scan every console carries, with a conformance-allowlist.json baseline of its current 29 findings (theme-color, deprecated imports and props, colour literals, local copies, shared-class patches). - eslint-suppressions.json records the two @typescript-eslint/no-deprecated uses (ThemeToggle, Segmented), as Go link and the alert dashboard do. Verification - bunx turbo run typecheck test lint --filter=@shepherdjerred/artifacts --filter=@shepherdjerred/console-ui - Not run: Woodpecker CI, deployment (artifacts is prepared and inactive). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) Why - #5279 deprecated `ThemeToggle` and `Segmented`; #5331 landed using both, so `@shepherdjerred/artifacts` lint (`@typescript-eslint/no-deprecated`) is red on main. What - `Segmented` becomes `Tabs` (identical props and, in the focused header, identical rendering). - `ThemeToggle` becomes the `ThemeButton` it wraps, imported from console-ui's shell module; the markup is unchanged. Verification - bunx turbo run build typecheck test lint --filter=@shepherdjerred/artifacts: pass. - bun run test:e2e in packages/artifacts: 103 passed (chromium and webkit). - bunx lefthook run pre-commit: pass. - Not run: extended tier (no workspace with extended steps depends on this change), live checks (artifacts is not deployed). Claude-Session: https://claude.ai/code/session_011u9pQkmfQzZFyzPbpimoiT Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Why #5331 added artifacts as a console-ui consumer after #5279 required every consumer to run the per-app conformance scan. Main's verify fails on console-ui's consumers test ("every console-ui consumer runs the conformance scan or is exempt"), which also holds back image publication. What - packages/artifacts/src/client/conformance.test.ts, the per-app scan, taken from 41754d7 (FM-356 / #5268). - conformance-allowlist.json baseline of the current findings. The two deprecated-import entries are dropped because #5431 removed those imports; the ESLint suppressions from 41754d7 are not needed for the same reason. Verification - vitest src/client/conformance.test.ts (artifacts): 1 passed. - vitest src/consumers.test.ts (console-ui): 2 passed. - bunx turbo run typecheck test lint --filter=@shepherdjerred/artifacts --filter=@shepherdjerred/console-ui: 15/15. - Not run: Woodpecker CI (admin merge, authorized), deployment. Claude-Session: https://claude.ai/code/session_011u9pQkmfQzZFyzPbpimoiT Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Why Review of CU1 (#5279, codex P2): `.ui-lead` is `position: relative` for its unread dot, so it became the containing block of the `.ui-row-link` cover and only the lead cell navigated, although the whole row shows a pointer. What - In a linked row the lead cell is static, so the positioned row contains the cover; the unread dot then measures from the row edge, which is why the README now says the link sits in the row's first, lead cell. - Hub /kit e2e: clicking the last cell of a linked row opens the detail page. Verification - The new test fails with the old CSS (no navigation) and passes with this change. - `bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts` against the built Hub: 35 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why Review of CU1 (#5279, codex P2): `.ui-lead` is `position: relative` for its unread dot, so it became the containing block of the `.ui-row-link` cover and only the lead cell navigated, although the whole row shows a pointer. What - In a linked row the lead cell is static, so the positioned row contains the cover; the unread dot then measures from the row edge, which is why the README now says the link sits in the row's first, lead cell. - Hub /kit e2e: clicking the last cell of a linked row opens the detail page. Verification - The new test fails with the old CSS (no navigation) and passes with this change. - `bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts` against the built Hub: 35 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why Review of CU1 (#5279, codex P2): `.ui-lead` is `position: relative` for its unread dot, so it became the containing block of the `.ui-row-link` cover and only the lead cell navigated, although the whole row shows a pointer. What - In a linked row the lead cell is static, so the positioned row contains the cover; the unread dot then measures from the row edge, which is why the README now says the link sits in the row's first, lead cell. - Hub /kit e2e: clicking the last cell of a linked row opens the detail page. Verification - The new test fails with the old CSS (no navigation) and passes with this change. - `bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts` against the built Hub: 35 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(console-ui): detail, form, time and feedback pieces Why The mockup never drew detail pages, forms, timestamps or loading states, so every console invented its own. CU2 of the console-ui plan settles them once. What - Detail: DescriptionList, Disclosure, CodeBlock, CopyButton, Pager, ListToggle and useCapped (promoted from Hub), BackLink. - Forms on TanStack Form + Zod: Checkbox, RadioGroup, Switch (Base UI), Fieldset, Textarea, InputAddon, FormActions, ErrorSummary, and the fieldErrorMessage / collectErrorSummary binding. Field gains an optional id. - Time and formatting: RelativeTime, ExactTime, Duration on one 30s ticker (useNow); formatBytes (binary), formatCount, formatPercent, formatDuration, formatRelative, formatExact (Pacific). Temporal for math, Intl for display. - Feedback: Kbd, useSearchShortcut and isEditableTarget, StatusDot, SavedStatus, Skeleton, EmailPreview (sandboxed iframe). - Hub /kit gains a "Detail and forms" section; Hub's capped-list now takes useCapped and cappedCount from console-ui. - README and wiki reference entries; conventions for timestamps, bytes, titles. Verification - console-ui: typecheck, lint, 483 tests (formatters with fixed clocks and explicit Pacific output); Hub: 400 unit tests, lint clean. - Hub Playwright full run: 97 passed (kit axe light/dark, overflow 375/1280, validation summary, copy and "/" shortcut, email preview). - The ten consoles' unit tests unchanged and passing; jscpd and knip pass. - Not run: PR CI, deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(console-ui): DataTable on TanStack Table, filters, timeline, bulk bar and charts Why Only Hub can sort, filter or export a table today, and every console hand-builds its tables, activity feeds and small charts. The plan (FM-263, CU3) moves the data pieces into console-ui on the stack standard: TanStack Table for tables, TanStack Virtual for long lists. What - DataTable<T>, promoted from Hub and rebuilt on @tanstack/react-table 9.3 (sorting, search as a global filter over a hidden column, row selection, expansion) with @tanstack/react-virtual 3 past 200 rows, against the page or in its own box. Keeps Hub's props (caption, rows, rowKey, rowLabel, columns with sortValue/exportValue, defaultSort, search, Tabs filters, Copy CSV/JSON, renderExpanded, initialCap "Showing N of M · Show all", emptyMessage) and adds groupBy (groupBySeverity, worst first), selection with select-all and bulkActions, aria-sort button headers, sticky head, currentRowKey and j/k navigation, and the phone stack layout. No frame: it sits flush in a Section. Hub's severity-buckets is promoted with it. - FilterBar (search, filters slot, polite "N of M", Clear filters, end slot) with describeCount and filtersActive; BulkBar; Timeline (Pacific times with exact time on hover, day groups, compact density); useRowNavigation; Sparkline and StatusMatrix promoted from Hub on severities and StatusGlyph; Meter gains projected, detail, format, an inferred severity and block, plus StackedMeter on token tones. - One stylesheet per piece under styles/components/data/; the vocabulary and layer checks now scan component subfolders. ICONS gains sortable, sortAscending and sortDescending. - Hub /kit gains a Data section (kit-data.tsx): 300 generated signals, virtualized, grouped, selectable, expandable and exportable, plus a FilterBar, timelines, sparklines, a status matrix and meters. - README "Data pieces" and the wiki's data table contract. - .jscpd-baseline.json pins the nine Hub/console-ui pairs these promoted copies create; Hub deletes its copies in H4, which tightens them. Verification - bunx turbo run build typecheck test lint for console-ui and alert-dashboard: green. console-ui: 437 tests, including jsdom tests for sort, search, clear, cap, expand, selection, groups, copy, j/k and the virtualized window. - Tests of all ten consoles and ops-model pass; conformance counts unchanged. - Hub Playwright full run: 97 passed (kit: axe light/dark at 375 and 1280, no overflow, keyboard sort, 300-row windowing with a stuck head and j/k, select-all and the bulk bar). - test:extended for delivery, errors and golink: green. No other affected workspace has extended steps. - bun run jscpd: green with the baseline above. knip: only the unresolved generated Prisma clients of starlight-karma-bot and tasknotes-server, which were not generated locally. - Not run: Vitest browser mode (#5268 has not landed), live deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(console-ui): menus, popovers, select, combobox, toasts, sheets and shortcuts Why Tracker has the only complete overlays in the consoles; Delivery, Errors and the rest need menus, pickers, toasts and a shortcut registry and each would otherwise grow its own. This promotes generic versions into console-ui (FM-263, CU4) so T2 and the other app PRs can import them, and gives the command palette async results and multi-step commands so Errors and Tracker can drop their own palettes. Additive: no app is migrated. What - Menu, ContextMenu (right-click, long press, Shift+F10, Menu key) with shared items: icon, description, shortcut hint, danger, checkbox and radio items, groups, separators, submenus. - Popover; Sheet (right, left, bottom); Avatar and ActorChip. - Select at 28px on Base UI Select in every browser (the customizable native <select> is Limited Availability and not used). Combobox: single or multiple with chips, groups, check marks, debounced and aborted loadOptions with "Searching…", optional "Create …" row. - toast.notify/error/undo/dismiss/undoLatest under ToastProvider (Base UI manager, limit 4, F6, polite or assertive, glyph + word + text). - createShortcutRegistry (keys, sequences, Mod chords, scopes, anywhere, editable targets and open dialogs ignored), ShortcutSheet, KeyHint. - CommandPaletteSearch gains breadcrumb/onBack/keepOpen, checks and hints; Escape inside a step goes back. New CommandPaletteCommands: filtered static sections, loadSections, steps, run(context), recent. Hub's existing palette API is unchanged. - One stylesheet per piece, `ui-` classes in ui.components, CU1 tokens only; 44px rows and hit areas on coarse pointers; fades only with motion allowed; closing popups are inert. - Hub /kit "Overlays and inputs" section, e2e/kit-overlays.spec.ts, README section and wiki reference entries. Verification - bunx turbo run build typecheck test lint for console-ui and alert-dashboard: 23/23 tasks green; console-ui 442 tests, Hub 400. - Tests of all eleven console-ui consumers (Hub, Delivery, Tracker, Errors, Mail, Flags, Feeds, Go link, Charts, CI cache, ops-model): 31/31 turbo tasks green, conformance allowlists unchanged. - bun run jscpd: ratchet passes with no baseline change; knip reports nothing in console-ui or Hub. - Hub Playwright full suite: 116 passed, including the new e2e/kit-overlays.spec.ts (22 tests: menu keyboard and submenus, Shift+F10, popover focus return, select by keyboard and click, combobox filtering, multi-select with create, async "Searching…", Undo, F6, ⌘Z, ?, g d, palette steps and server results; axe on the open menu, popover, listbox, sheet and toast in light and dark; no overflow at 375 and 1280). After the select became Base UI only, kit-overlays and kit specs repeated 2x with 4 workers: 56/56. - Not run: Vitest browser mode (#5268 unmerged), Woodpecker CI, deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): review fixes from the first app conversions Why Converting Mail, Feeds, Charts and CI cache onto console-ui surfaced six gaps in the shared package. What - EmailPreview iframe sends referrerPolicy="no-referrer" so remote images do not leak the console URL. - formatDuration and Duration keep one decimal under 10s ("1.3s"), whole seconds from 10s. - Opt-in wrapping table cells via `data-wrap` on td/th; nowrap stays default. - Reserved app layer: order is `ui.reset, ui.tokens, ui.app, ui.components`; apps put element defaults in `@layer ui.app`. Tracker's tracker.elements layer moves to ui.app. README documents why. - Controlled Dialog remembers document.activeElement on open and passes it as Base UI finalFocus by default; optional finalFocus prop overrides. - ConsoleShell gains `sidebarActions` for the desktop sidebar header. - Hub /kit gallery shows a wrapping cell (Dialog was already listed). Verification turbo build typecheck test lint for console-ui and every dependent app (alert-dashboard, ci-cache, delivery, errors, feeds, golink, mail, flags, charts, ops-model, tracker): 65/65 tasks pass; lefthook pre-commit passes. Dialog focus return is not unit-tested (no DOM test environment; browser tests wait for Vitest browser mode). Live checks not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): link buttons keep link semantics; table scroll is a containing block Why Hub's frame work found two gaps: `<Button render={<a/>} nativeButton={false}>` makes Base UI put role="button" on the anchor (it broke 6 Hub e2e specs), and absolutely positioned content in a scrolled table pushed /kit 41px past 375px. What - New ButtonLink: a real <a href> with the ui-btn classes and variants, or a router link through `render`, never a role. Exported and documented; the README and Button docs no longer advise render={<a/>}. On /kit. - .ui-table-scroll is position: relative. Verification turbo build typecheck test lint over console-ui and its 11 dependent apps: 65/65 tasks pass; lefthook pre-commit passes. A test asserts no role on the anchor. Hub e2e and the 375px layout were not re-run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(console-ui): Tabs supports a disabled option Why Hub's email-preview toggle disables "Plain text" when a message has no text part, so it kept a local segmented control instead of the shared Tabs. What - TabOption gains `disabled`: rendered disabled, styled with --ui-faint, and skipped by arrow, Home and End keys (enabledTargetIndex). - Shown on /kit as a "Disabled tab" section; README updated. Verification turbo build typecheck test lint over console-ui and its 11 dependent apps: 65/65 pass; lefthook pre-commit passes. Playwright against the built Hub: kit.spec.ts and kit-overlays.spec.ts pass (35 with a temporary check): /kit at 375px has scrollWidth 375, the ButtonLink anchor has no role and is found by getByRole("link"), and the disabled tab is disabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): a linked row navigates from every cell Why Review of CU1 (#5279, codex P2): `.ui-lead` is `position: relative` for its unread dot, so it became the containing block of the `.ui-row-link` cover and only the lead cell navigated, although the whole row shows a pointer. What - In a linked row the lead cell is static, so the positioned row contains the cover; the unread dot then measures from the row edge, which is why the README now says the link sits in the row's first, lead cell. - Hub /kit e2e: clicking the last cell of a linked row opens the detail page. Verification - The new test fails with the old CSS (no navigation) and passes with this change. - `bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts` against the built Hub: 35 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): row keys yield to overlays; async create keeps the latest selection Why Review of #5430 (codex, two P2s): - DataTable's j/k/o row navigation listens on the document and only skipped text fields, so with a dialog or sheet open, j/k on its buttons moved the background table's current row and `o` opened it. - A multiple Combobox whose onCreate is async added the new value to the selection captured when creation started, so a chip removed or added while the request was pending was silently undone. What - Row navigation ignores keys aimed inside a dialog, sheet, menu, listbox or combobox (`isEditableTarget`) and any key while an interactive dialog is open, the same rule the shortcut registry uses. - MultipleCombobox merges the created value into the selection current when creation resolves (latest props in a ref), and never adds it twice. - Hub /kit's Labels combobox creates asynchronously (400 ms), like a server would, so the gallery and its spec exercise the pending state. Verification - data-table.dom.test.tsx: a dialog's button receiving j and o leaves the current row and onRowOpen untouched; fails on the old handler (1/10), passes now (10/10). - kit-overlays.spec.ts: create "disk-io", remove "prod" while it is pending; both stick. Fails on the old Combobox, passes now; kit specs 35/35. - turbo typecheck test lint for console-ui and alert-dashboard pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(console-ui): flag app CSS that outranks shared components Why Unlayered app CSS beats every layered rule whatever its specificity, and a top-level app layer outranks every ui.* layer. Bare element rules (a, button, time, h1, input) therefore restyle shared NavTabs and HeaderBar through the cascade, which the per-app scan did not catch. What - Two scan rules: bare-element-selector (unlayered, un-nested rules whose subject is a bare element, including *, html, body and a :root that sets more than custom properties) and app-layer (top-level @layer names other than ui.<name>, including anonymous layers). - css.ts: CssBlock.nested for native nesting, topLevelLayerNames for @layer statements and blocks. - Baselined current violations in each app's allowlist (counts only go down). - README: the ui.<app> sublayer pattern and what is allowed. Verification - bunx turbo run typecheck test lint over console-ui, alert-dashboard, delivery, errors, feeds, flags, golink, mail, tracker: 47/47 tasks pass. - bunx lefthook run pre-commit passes. - Not run: extended tier, CI (PR not submitted; stacked on #5279). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): rebaseline the layer rule on current main and CU2-4 Why The layer rule's per-app baselines were taken before main added new app CSS (Hub's Renovate ranking, Flags history/archive) and before CU2-4 moved Tracker into the reserved `ui.app` layer, so the rule failed five apps. What - Hub /kit: the one bare selector CU2-4 added (`.kit-data-detail p`) moves into `@layer ui.app` instead of being allowlisted. - Baselines at today's counts for unlayered bare element selectors: Hub engineering.css 15 (was 10), Flags styles.css 21 (was 19), Charts 5 and CI cache 3 (new entries). C1 and FL1 shrink these. - Tracker: its two app-layer entries are removed; it has no app layer left. - Consoles that joined console-ui after the first baseline get layer-rule entries too: Artifacts (71 bare selectors across 7 files), Incidents (38), Experiments (11); Flags rises to 23 after #5325/#5330. Verification - conformance.test.ts passes for alert-dashboard, charts, ci-cache, flags, tracker, artifacts, incidents and experiments (each 1/1). - Full turbo run follows before submission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(console-ui): the layer rule sees layers inside @media, @supports and @container Why Review of #5461 (codex P2): topLevelLayerNames dropped everything inside braces, so `@media (min-width: 1px) { @layer rogue { … } }` escaped the app-layer rule. Conditional group rules do not start a layer namespace, so `rogue` is still a top-level layer that outranks console-ui's components. What - css.ts scans the top-level layer namespace instead: text outside braces plus the insides of @media, @supports and @container (to any depth); layers inside another layer or a style rule stay sublayers and are ignored. Split into small per-character steps. - conformance.test.ts: rogue, other and deep layers inside conditional rules are flagged; ui.app inside @media and a layer nested in a rule are not. Verification - The new test fails on the old css.ts (1/14) and passes now (14/14). - Every console's conformance scan still passes (no app declares a layer inside a conditional rule today); console-ui typecheck/test/lint 5/5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Why
console-uiheld two looks: the chosen design and a page kit (#5151) that copied the old Hub — uppercase eyebrow, big title, stat cards, 36px controls, mono uppercase tables, pill badges. Only colour was tokenised, so spacing, type, radii and breakpoints were hard-coded per app, and the package contradicted itself (two focus rings, two backdrops, ten radii, 600 vs 650 weights, four breakpoints). Apps patched shared classes, four carried their own phone top bar, and nothing stopped the old vocabulary from coming back. This is CU1 of the console plan (FM-263): foundations, shell, page pieces and the checks. Apps are not migrated here.What
Tokens beyond colour (
src/tokens.json→ generatedtokens.css): spacing (space-1…8,gutter20px / 16px on phones), type (11/12/12.5/13/14/15/21), weights 400/500/600, radii 2/5/6/10 +round(dots only), sizes (28px controls, 44px hit areas onpointer: coarse, 30px nav rows, 36px rows, 48px header, 228px sidebar), z layers, motion, per-theme backdrop and shadows,accent-edge, and breakpoints 600/900 (alsoBREAKPOINTSandSIDEBAR_QUERYin TS, used by the drawer JS).One vocabulary in the stylesheet:
components.cssis split into one file per piece undersrc/styles/components/(so CU2–CU4 don't collide), all on tokens: one focus ring, one backdrop, one radius scale, weights ≤ 600, range-syntax media queries on the two breakpoints.ui-glyph-labelandui-workspace-labelnow have rules.New and extended pieces (all exported from
src/index.ts):ConsoleShell—app,apps,nav: (close?) => ReactNode(declared once, drawn in the sidebar and the phone drawer),navLabel,theme,palette,sidebarFooter,topBarActions,skipLinkTarget. Skip link, phone top bar + Base UI drawer (closes past the breakpoint and when the palette opens), switcher, palette button, theme row. 30px rows, no density override.HeaderBargainslead,titleId,focusOnMount, phone wrapping; meta now sits right before the actions.NavTabs(route tabs, same look asTabs),Banner,State,Section+.ui-columns,Dialog/DialogClose+ui-dialog*classes (native<dialog>too),ICONS/THEME_ICON.FigureStripgainslabel,layout: "row" | "wrap",Figure.href, glyphs on warning/error/unknown.StatusGlyphgainsiconand rich labels.Chiptakeschildrenorlabel+value,severity,href, no margin.Buttongainsdanger(links via Base UIrender).SearchFieldis 28px on the field look..ui-tableabsorbs the apps' patches:th[scope=row],tr[data-current],data-sticky, mono.ui-num,tfoot,caption,.ui-table-empty,.ui-fill+.ui-truncate,.ui-row-link, twist hover; one phone rule — scroll by default,data-stackfor label/value lines.createThemeStore()defaults toops-theme, works without a DOM, and keepstheme-colormetas equal to--ui-bg.Deprecated, still working (moved to
src/components/page-kit/, styles inpage.css):PageBody,PageHeading,SummaryGrid,Card,CardToolbar,Tag,Segmented,TopBar,ThemeToggle,SeverityBadge,size="page",.ui-data,.ui-summary*,.ui-eyebrow.page.csskeeps the old banner/state/36px search look inside aPageBody, so Go link renders unchanged. Go link's uses are recorded inpackages/golink/eslint-suppressions.json(@typescript-eslint/no-deprecated).Consistency checks (plan checks 1–4):
src/vocabulary.test.ts— no uppercase, letter-spacing, pill radii, oversized type,clamp(), colour literals, raw sizes/weights/radii/z-index or off-scale breakpoints instyles/components/*.css;page.csshas a frozen per-rule count.@shepherdjerred/console-ui/testing— the per-app scan. Every console has a 7-lineconformance.test.tsand an exact-countconformance-allowlist.json(fails if a count rises or falls). Baselines fromscripts/conformance-baseline.ts.src/consumers.test.ts— every console-ui dependent has the scan or an exemption (ops-model: tokens only).ConsoleShellis the one frame.Baseline violations per console:
Gallery: Hub
/kit(list page) and/kit/detail(detail skeleton), opened from ⌘K ("Open the console kit gallery"), not in the sidebar. Built only from console-ui.Docs: console-ui README (what belongs in the package, the checks, deprecations, consumer list) and the wiki reference (token tables incl. new scales, pieces, conformance contract).
Demo
Hub
/kit— every console-ui piece on a realistic list page (open it from ⌘K)./kit/detail— the detail-page skeleton (back link, verdict, wrapped figures, side-by-side sections, empty state).Go link (the only page-kit consumer) is unchanged — pixel diff identical except the 11px workspace-mark letter (weight 700 → 600):
Verification
bunx turbo run build typecheck test lintfor console-ui, alert-dashboard, ops-model, golink, delivery, tracker, errors, mail, flags, feeds, charts, ci-cache: 65/65 tasks pass (console-ui 368 tests; Hub 400 unit tests; every console's conformance test passes on its baseline; ops-model email parity test passes).e2e/kit.spec.ts(palette-only entry, zero axe violations light/dark at 1280 and 375 plus the open dialog, no overflow at 375/1280, focus returns to the trigger, stacked table on phones). The existing sidebar-fit test still counts 18 links.bun run jscpd: ratchet passed.bun scripts/tools/knip.ts: exit 0.bunx lefthook run pre-commit: pass.bun run verify:extended -- --filter='...[origin/main...HEAD]'(scope widened to the repo by thebun.lockchange): 65/66 tasks passed (delivery, errors and golink Postgres suites, Scout, mc-harness among them); the run was interrupted during@shepherdjerred/temporal:test:extended, and its rerun alone (bunx turbo run test:extended --filter=@shepherdjerred/temporal) passed 32/32 tasks. All affected extended suites pass.f8f9804f41(pipeline 20276): verify, alert-dashboard-sqlite, docker-e2e, paper-smoke-pr, pr-dryrun, semgrep, trivy, code review and merge-conflict all green.playwright-e2efailed by its 1800 s step timeout, not an assertion: 40/41 turbo tasks passed, and the one cut off was Scout's design-system Storybook catalog (950 passed, 3 interrupted, 0 failed). This PR selects every browser suite only because addingzodto console-ui changesbun.lock(AI-1051; ci(woodpecker-config-extension): move browser and Paper smoke lanes off pull requests #5333 moves these lanes off PRs). The same lane passed on this PR's earlier head. Evidence for the browser suites that this PR can affect, run locally with CU1 included: Hub/kit34/34, Delivery 402/402, Tracker 218/218.47a584d06c) passesbunx turbo run build typecheck test lint --filter='...@shepherdjerred/console-ui'(212/212, temporal excluded as unaffected).Notes for follow-up PRs: Flags #5163 will need
eslint-suppressions.jsonentries for its page-kit imports and a regenerated Flags allowlist when it rebases. Hub's unlayered table patches (src/styles/tables.css) still apply inside/kituntil H2 removes them.🤖 Generated with Claude Code