Repository navigation
refactor(web): migrate hand-rolled toolbars, dots, empty lines and helpers to shared primitives - #1987
Conversation
…lpers to shared primitives New page/kit/list-toolbar (listToolbar, toolbarCount, toolbarStat) replaces the copied list toolbars and count readouts; list pages that showed a StatRail (uptime, Supabase, PlanetScale) now show inline toolbar stats. Status dots, eyebrows, in-panel empty lines, not-found states, dividers, inline code, link buttons and pending buttons use their primitives, with data status on the tone palette instead of success/destructive. Duplicate helpers are gone: severity badges, clipboard writers, formatCores, the PlanetScale metrics copy, local plural and relative-time helpers. Integration reconnect cards share integrationNotice.
One formatCores rule without trailing zeros, PlanetScale lag back on formatDuration, the uptime down figure names the down monitors, AWS idle is a hollow ring again, code-review settings keep the settings width, endpoint peek stats go four-wide from sm.
|
Important Review skippedToo many files! This PR contains 157 files, which is 7 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
This comment has been minimized.
This comment has been minimized.
Maple reviewNothing to review Head adds only a merge of
|
Stack: #1985 tokens and primitives → #1986 kit pieces → #1987 migrations → #1988 scale cleanup
Third PR in the UI consistency stack (on #1986). Hand-rolled UI across apps/web moves onto the shared primitives, and copies of the same helper are removed.
Changes
List toolbar. New
page/kit/list-toolbar.ts:listToolbar(inline, orframedinside a panel),toolbarCountandtoolbarStat. It replaces the copied toolbars and count readouts on errors, anomalies, investigations, security runs and findings, replays, alert rules, dashboards, sources, GCP resources and the infrasearchToolbar(10 pages). Per the "inline stats on list pages, StatRail on overview and detail" decision, the uptime hub, Supabase and PlanetScale lists swap their StatRail for toolbar stats. The uptime "down" figure names the down monitors in its tooltip.Primitives instead of copies:
statusDotwith aToneeyebrowemptyMessageresourceNotFoundseparatorinlineCodelinkButtonh-7/h-6button overrides →sizeIntegration reconnect cards share
integrationNotice, and the count-chip toggles share one class set.Pending buttons keep a static label and show the loading state ("Starting…" / "Cancelling…" are gone). Security dialogs use the dialog's
isPending, which also disables Cancel while the request runs.Status colours on the tone palette. Data status (5xx, error rate, live, healthy, uptime results) uses severity and tone tokens;
destructivestays for destructive actions and form errors. Replay event kinds read the chart hues fromreplay-meta, matching the timeline.One copy of each helper:
writeClipboard(the span panel gains theexecCommandfallback)formatCores: one rule, no trailing zeros, so "1.5 vCPU" and "10.4 / 16 cores"Verification
apps/webtypecheck passes. oxlint, both the base and effect configs, has 0 errors on the 156 changed files.src/page,src/ui,src/components,src/service-map,src/shellandsrc/lab. Three tests changed with intended copy: "1.5 vCPU", "2.00s behind", and the uptime readout.sm./lab/*before (refactor(web): one route-tab strip, row link, sheet header and page title #1986 state) and after. Most of this PR is not visible in the labs (uptime hub, investigations list, security tabs, Supabase/PlanetScale lists have no lab route), so those are checked on the PR preview of the top of the stack.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.