Repository navigation
refactor(ui): primitives pass 6, page shells, CursorPlot, controls, type scale - #1278
Conversation
…sizes Adds three dense sizes below text-xs to the shared theme and sweeps the ~840 text-[9-11.5px] values in web and @maple/ui onto them. rounded-[2px] becomes rounded-xs. No line-height on the tokens, so rendering is unchanged.
…ts, shared thresholds Controls: FilterChip, IconButton, RowActionsMenu, RefreshButton, ListRow + rowSelectedClass, Badge tag variant, FacetSelect, keyed mutation hooks; SectionHeader folded into SectionHeading; header rows drop hover in Table. Layout: DashboardPage (time-scoped shell, KubernetesShell rebuilt on it), ResultPage (one shell for loading/error/not-found), DetailHeader shared with SheetDetailHeader, DashboardLayout.Tabs + Scroll width/gap, SettingsSection, AuthLayout.Title/Description, Panel padded/tone variants. Charts: CursorPlot owns focus store, tooltip and colour resolution for 12 charts; makeBucketAxis moves into plot and replaces the label axes; one OTHER_COLOR; ChartCard moves to common; SeriesLegend swatches + overflow. Stats: StatRail sizes/hint/StatFigure replace alert-stat-card and FleetBand cells; MiniBars, inline KeyValueList, BackdropBar, VirtualTableBody. Lib: EMPTY_VALUE, formatPercent floor, utilizationLevel, errorRateLevel on the service map, TOKEN_FALLBACK instead of per-chart hex pairs, AGENT_ACCENT, CONCEPT_ICON. Fixes the issue chart colouring severities differently from the severity badge.
Page shells: ~45 routes move onto DashboardPage (time-scoped shell) and ResultPage (one shell for loading/error/not-found), deleting the local Investigation/Issue/Session/Anomalies/Page shells; page tabs move to the shared tabs slot; detail headers on DetailHeader. Settings and account sit on SettingsSection at one width. ~150 hand-built error toasts and Exit branches move to toastExit and the mutation hooks, per-row pending ids to the keyed hooks, form dialogs to FormDialog, inline errors to FieldError, kebabs to RowActionsMenu, icon buttons to IconButton. Fixes: alert destination and chat deletes, revoking an invitation and removing a tax ID now confirm; dates in billing, api keys, audit log, alerts and investigations follow the user's timezone setting; PlanetScale storage uses the shared 90%/60% utilisation levels. Also: Panel replaces the hand-built card wrappers (one radius), formatting goes through the shared helpers (EMPTY_VALUE, formatPercent, countLabel, RelativeTime), status colour uses Tone instead of destructive.
…s-pass-6 # Conflicts: # apps/web/src/routes/analytics/index.tsx
|
Note A newer push replaced |
|
Important Review skippedToo many files! This PR contains 577 files, which is 427 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. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
📒 Files selected for processing (577)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
service-map-node no longer exports its local copy. Also: the startup bundle check lists every chunk with its source key when it is over budget.
|
Note A newer push replaced |
…s-pass-6 # Conflicts: # apps/web/src/components/integrations/github-integration-card.tsx
|
Note A newer push replaced |
…s-pass-6 # Conflicts: # apps/web/src/components/code-review/code-review-analytics.tsx # apps/web/src/components/code-review/review-detail-sheet.tsx
|
Note A newer push replaced |
The org switcher sits in the persistent sidebar, so the dialog it opens was startup code. Moving it to FieldError pulled Base UI's field validation in and pushed initial JS to 695.4 KB against the 695 KB budget. It now loads on first open, which also takes its form, radio group and dialog chunks out of startup.
Maple review🟡 Confidence 6/10 · needs attention Warning This review ended early; what follows is what it established. A large UI refactor: new shared primitives (
What was checked
Files not reviewed (214)The review ended before it read these diffs, so nothing above vouches for them.
|
Sixth UI unification pass. An audit of
apps/weband@maple/uifound that most remaining drift was not missing primitives but pages bypassing ones that already exist (Panel in 21 files vs ~120 hand-built cards,toastExitat 8 sites vs ~150 hand-built error toasts,FormDialogwith 1 user). This PR adds the handful of primitives that were genuinely missing and moves the app onto them.Fixes
timezone-format.ts.utilizationLevel, 90% / 60%), error rate on the service map (errorRateLevel, 5% / 1%,>=), latency colouring vialatency-tone.New primitives
text-2xs(11px),text-3xs(10px),text-4xs(9px) theme tokens replace ~840text-[9-11.5px]values;rounded-[2px]becomesrounded-xs. No line-height on the tokens, so rendering is unchanged.@maple/ui):FilterChip,IconButton(required label, tooltip built in),RowActionsMenu,RefreshButton,ListRow+rowSelectedClass, Badgetag.FacetSelect, keyed mutation hooks (useKeyedMutationAction) in web.SectionHeaderfolded intoSectionHeading. Table header rows no longer hover.DashboardPage(time-scoped shell;KubernetesShellrebuilt on it),ResultPage(one shell for loading / error / not-found),DetailHeadersharing its API withSheetDetailHeader, aDashboardLayout.Tabsslot, Scrollwidth/gap,SettingsSection(fixed width),AuthLayout.Title/Description,Panelpadded/tone.CursorPlotowns the focus store, cursor tooltip and colour resolution that 12 charts each wired by hand.makeBucketAxismoves into plot and replaces the 5 label axes, so the same range ticks the same everywhere. OneOTHER_COLOR;ChartCardmoves tocommon/;SeriesLegendgets swatch shapes and "+N" overflow.StatRailsizes,hintandStatFigurereplacealert-stat-cardand the FleetBand cells;MiniBars, inlineKeyValueList,BackdropBar,VirtualTableBody.EMPTY_VALUE,formatPercentfloor,TOKEN_FALLBACK(no more per-chart["--token", "#hex"]pairs),AGENT_ACCENT,CONCEPT_ICON.Migrations
DashboardPage/ResultPage; the local Investigation / Issue / Session / Anomalies / Page shells are deleted,logs/$logIdgoes from 5 shells to 1,traces/$traceIdfrom 4.SettingsSection, form dialogs onFormDialog, inline errors onFieldError, kebabs onRowActionsMenu, icon buttons onIconButton.formatPercent,countLabel,RelativeTime,EMPTY_VALUE), Tone instead ofdestructivefor status colour.Visible changes worth a look
max-w-3xl; billing's two-column grid stacks.toLocaleString()are now compact (1.2K), e.g. the home Total and span counts. Places that deliberately showed exact counts are left exact.ResultPageshows "Loading…" / "Error" / "Not found" as the last breadcrumb.Left on purpose
@maple/uiTable and the duplicate row styles are gone.create-api-key/roll-api-keydialogs stay on Dialog (form then secret reveal).formatCountin billing and code review keeps exact numbers below 10K on purpose.Verification
tsc --noEmitclean forapps/webandpackages/ui; oxlint clean and oxfmt applied on all changed files./lab/*fixture pages (agent tools, agent session, errors, infra, widgets, replays, verdict) render without errors in the browser.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.