Repository navigation
feat(console-ui): detail, form, data and overlay pieces (CU2–4) - #5430
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
|
60c065c to
bdf3a5d
Compare
|
@codex review Automated re-review request for |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdf3a5dd95
ℹ️ 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".
c8acbfe to
5f9e9ce
Compare
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>
…k 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>
…nd 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>
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>
…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>
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>
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>
…atest 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>
5f9e9ce to
ac14936
Compare
…them Why CU2–4 (#5430) added @tanstack/react-table and @tanstack/react-form to console-ui (and react-form to Hub). The stack standard kept both in CATALOG_PENDING until a package declared them, and allowlisted console-ui as "missing" them; both entries are now stale and the stack check fails. What - Root catalog gains @tanstack/react-table ^9.3.1 and @tanstack/react-form ^1.33.6, the versions CU2–4 declared; console-ui and Hub use catalog:. - CATALOG_PENDING is empty and console-ui's two "missing" allowlist entries are gone; the wiki's "outside the catalog" table drops their row. Verification - `bun install --frozen-lockfile` passes; `bun run check-console-stack`: OK. - `bunx turbo run typecheck test lint --filter=@shepherdjerred/root-scripts --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/alert-dashboard`: 34/34. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them Why CU2–4 (#5430) added @tanstack/react-table and @tanstack/react-form to console-ui (and react-form to Hub). The stack standard kept both in CATALOG_PENDING until a package declared them, and allowlisted console-ui as "missing" them; both entries are now stale and the stack check fails. What - Root catalog gains @tanstack/react-table ^9.3.1 and @tanstack/react-form ^1.33.6, the versions CU2–4 declared; console-ui and Hub use catalog:. - CATALOG_PENDING is empty and console-ui's two "missing" allowlist entries are gone; the wiki's "outside the catalog" table drops their row. Verification - `bun install --frozen-lockfile` passes; `bun run check-console-stack`: OK. - `bunx turbo run typecheck test lint --filter=@shepherdjerred/root-scripts --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/alert-dashboard`: 34/34. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stack check (#5275) * feat(root): one stack standard for the ops consoles, Bun catalog and stack check Why The ten first-party ops consoles shared React, Vite, TypeScript, Vitest, Zod and console-ui, then diverged below that: React Router beside TanStack Router and hand-rolled routing, REST beside tRPC, raw SQLite beside Prisma. Nothing wrote the standard down, kept versions aligned, or stopped a new console from starting from a bare server. What - Root Bun `catalog` of the shared library versions (nothing upgraded); the ten consoles, console-ui and ops-model declare them as `catalog:`. - Renovate reads the catalog through a JSONata custom manager (its npm manager does not read `catalog`); `check-floating-deps` accepts `catalog:`. - `bun run check-console-stack` (wired into package.json, turbo and verify): required libraries, banned alternatives, `catalog:` use, Rust-console exceptions, and a per-app allowlist of today's deviations that can only shrink. - Mail, Flags and Feeds lint with the React rules; their `useEffect` calls are replaced with ref callbacks, `<title>` and derived state. - `new-service.ts --console` scaffolds the standard stack. - Wiki reference `console-stack`, the why in the hosted-service model page, the how-to flag, and one line in AGENTS.md. Verification - `bun install --frozen-lockfile`; `bunx turbo run typecheck lint test` over the ten consoles, console-ui and ops-model: 56 of 56 tasks pass. - check-console-stack, check-floating-deps, renovate-hints and the Renovate, scaffolder and root-scripts suites pass; knip shows only the existing `#generated` unresolved imports; jscpd ratchet passes; wiki builds. - A scaffolded `--console` package typechecks, lints, tests, builds and serves `/healthz`, `/trpc` and the client. - Renovate extraction of the catalog verified with a local `renovate --dry-run=extract`. - Not run: live Renovate PR creation; deployment (no runtime change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(root): catalog TanStack Table and Form now console-ui declares them Why CU2–4 (#5430) added @tanstack/react-table and @tanstack/react-form to console-ui (and react-form to Hub). The stack standard kept both in CATALOG_PENDING until a package declared them, and allowlisted console-ui as "missing" them; both entries are now stale and the stack check fails. What - Root catalog gains @tanstack/react-table ^9.3.1 and @tanstack/react-form ^1.33.6, the versions CU2–4 declared; console-ui and Hub use catalog:. - CATALOG_PENDING is empty and console-ui's two "missing" allowlist entries are gone; the wiki's "outside the catalog" table drops their row. Verification - `bun install --frozen-lockfile` passes; `bun run check-console-stack`: OK. - `bunx turbo run typecheck test lint --filter=@shepherdjerred/root-scripts --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/alert-dashboard`: 34/34. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(docs): link the console stack reference to its sources Why Review of #5275 (codex P1): packages/docs/wiki/AGENTS.md requires every claim about the system to link the source file that proves it, and the console-stack reference named its sources only as inline code. What - Links the root package.json (catalog), renovate.json (catalog manager), scripts/checks/check-console-stack.ts, scripts/checks/console-stack-rules.ts and the scaffolder scripts/misc/new-service-console.ts. Verification - package.json and renovate.json return 200 on main; the three scripts this PR adds return 200 on the pushed console-stack-standard branch and resolve on main once it merges (rechecked after merge). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Why
The chosen console mockup drew only Home and Alerts. Detail pages, forms, timestamps, tables, menus, pickers, toasts and dialogs were never designed, so each console built its own:
/shortcuts.Only Hub can sort or export a table, and only Tracker has real menus and pickers.
This is CU2–CU4 of the console plan (FM-263). It settles those pieces once in
@shepherdjerred/console-ui, so the app PRs (M1, F1, C1, H1–H4, D1–D4, T1–T7, E1, G1) delete their local copies instead of restyling them.It adds to the package and migrates no app. The exception is Tracker's top-level
tracker.elementslayer, which moves into the new reservedui.appslot.What
Detail, forms, time, feedback (CU2)
DescriptionList,Disclosure,CodeBlock,CopyButton,Pager,ListToggleanduseCapped(promoted from Hub),BackLink.Checkbox,RadioGroup,Switch,Fieldset,Textarea,InputAddon,FormActions,ErrorSummary.RelativeTime,ExactTime(Pacific),Duration.Kbd,useSearchShortcut,StatusDot,SavedStatus,Skeleton, and a sandboxedEmailPreview(referrerPolicy="no-referrer").Data (CU3)
DataTablepromoted from Hub and rebuilt on TanStack Table. It supports sort, search, selection with a bulk bar, expansion, grouping by severity, and copy as CSV or JSON. It virtualises past 200 rows with TanStack Virtual, and has a phone layout.FilterBar,BulkBar,Timeline,useRowNavigation,Sparkline,StatusMatrix,Meter/StackedMeter.data-wrap.Overlays and inputs (CU4, promoted from Tracker)
Menu,ContextMenu,Popover,Sheet,Avatar/ActorChip.Selectat 28px on Base UI. The customizable native<select>is Limited Availability and is not used.Comboboxwith single or multiple selection and async options.toastwith undo.createShortcutRegistrywithShortcutSheet.CommandPalettegains async sections and multi-step commands.Fixes found by the first app conversions and CU1's review
ui.reset, ui.tokens, ui.app, ui.components. Apps put element defaults in@layer ui.app, with no import-order trick.Dialogreturns focus to its opener by default.ButtonLinkkeeps link semantics;render={<a/>}onButtongave anchorsrole="button"..ui-table-scrollis a containing block.Tabssupports a disabled option.ConsoleShellgainssidebarActions.ui-row-link) navigates from every cell: in a linked row the lead cell is no longer the cover's containing block.Gallery and docs
/kitgains Detail and forms, Data, and Overlays sections.Demo
All new pieces are on Hub's
/kitgallery. This PR adds to the package and migrates no app, so there is no app "before".Full gallery, every section in light, dark and phone (68 screenshots)
In these shots the Signal column wraps because Hub's own unlayered
tables.cssstill setswhite-space: normalon.ui-tablebody cells; H2 removes that rule.Verification
bunx turbo run build typecheck test lint --filter='...@shepherdjerred/console-ui' --filter='!@shepherdjerred/temporal' --continueon current main (with CU1 merged): 212 of 212 tasks pass. Temporal reaches console-ui only through shared packages; on an earlier base its full run had one load-timeout flake that passed alone.bun --bun playwright test e2e/kit.spec.ts e2e/kit-overlays.spec.ts) against the built Hub: 35 passed, including a new check that a linked row navigates from its last cell (CU1 review P2; it fails on the old CSS)./kitoverflow at 375 and 1280, the validation summary, copy and the/shortcut, the email preview, menus, select, combobox, toasts, sheet, aButtonLinkwith no role, and the disabled tab./kitcapture at 1280 and 375:scrollWidthis 1280 and 375, so no horizontal overflow.bunx turbo run test:extended --filter=@shepherdjerred/delivery --filter=@shepherdjerred/errors --filter=@shepherdjerred/golink: 19 of 19 tasks....@shepherdjerred/console-ui(Scout backend and temporal, mc-harness, temporal) reach console-ui only through shared packages and execute none of the new components./kiton Hub, which I check after Hub deploys.tables.cssstill forceswhite-space: normalon.ui-tablebody cells, so the Signal column wraps. H2 removes that rule.🤖 Generated with Claude Code