Skip to content

refactor(web): migrate hand-rolled toolbars, dots, empty lines and helpers to shared primitives - #1987

Merged
Makisuo merged 3 commits into
ui-consistency-2from
ui-consistency-3
Oct 30, 2026
Merged

Makisuo merged 3 commits into
ui-consistency-2from
ui-consistency-3

Conversation

@Makisuo

@Makisuo Makisuo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

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, or framed inside a panel), toolbarCount and toolbarStat. 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 infra searchToolbar (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:

  • status dots and per-file tone maps → statusDot with a Tone
  • eyebrows → eyebrow
  • in-panel "No …" lines → emptyMessage
  • not-found states → resourceNotFound
  • dividers → separator
  • label chips → inlineCode
  • hand-styled anchors → linkButton
  • h-7/h-6 button overrides → size
  • big numbers → semibold

Integration 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; destructive stays for destructive actions and form errors. Replay event kinds read the chart hues from replay-meta, matching the timeline.

One copy of each helper:

  • severity badges (log and issue)
  • writeClipboard (the span panel gains the execCommand fallback)
  • formatCores: one rule, no trailing zeros, so "1.5 vCPU" and "10.4 / 16 cores"
  • the PlanetScale metrics module (the page copy is deleted; lag reads like every other duration)
  • local plural and relative-time helpers
  • hand-sliced SHAs
Before After

Verification

  • apps/web typecheck passes. oxlint, both the base and effect configs, has 0 errors on the 156 changed files.
  • Vitest: 2601 tests across src/page, src/ui, src/components, src/service-map, src/shell and src/lab. Three tests changed with intended copy: "1.5 vCPU", "2.00s behind", and the uptime readout.
  • A review agent read the full diff. Fixed from it: code-review settings lost their width, two formatter merges changed output, the uptime readout dropped the down monitor's name, the AWS idle ring became a filled dot, and the endpoint peek stats wrapped 2×2 at sm.
  • Screenshots: /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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…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.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too 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.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5439d498-53c4-48b5-8c70-8b929636d349
Commits

Reviewing files that changed from the base of the PR and between 8fb880c and 62558a2.

Files selected for processing: 157
  • apps/web/src/components/infra/cloudflare/accounts.ts
  • apps/web/src/components/infra/cloudflare/list-model.ts
  • apps/web/src/components/infra/cloudflare/worker-signals.ts
  • apps/web/src/components/infra/format.test.ts
  • apps/web/src/components/infra/format.ts
  • apps/web/src/components/infra/overview/summaries.test.ts
  • apps/web/src/components/infra/planetscale/metrics.ts
  • apps/web/src/components/infra/railway/format.ts
  • apps/web/src/components/integrations/planetscale-setup-steps.ts
  • apps/web/src/page/agent-sessions/list/view-toolbar.ts
  • apps/web/src/page/agent-sessions/session/command.ts
  • apps/web/src/page/agent-sessions/session/view-rail.ts
  • apps/web/src/page/agent-sessions/session/view-toolbar.ts
  • apps/web/src/page/agent-sessions/tool/error-modal-command.ts
  • apps/web/src/page/agent-sessions/tool/view-error-modal-payload.ts
  • apps/web/src/page/agent-sessions/tool/view-error-modal-rail.ts
  • apps/web/src/page/agent-sessions/tool/view-error-modal-samples.ts
  • apps/web/src/page/agent-sessions/tool/view-error-modal.ts
  • apps/web/src/page/agent-sessions/tool/view-errors.ts
  • apps/web/src/page/agent-sessions/tool/view-sessions.ts
  • apps/web/src/page/agent-sessions/tools-kit/error-parts.ts
  • apps/web/src/page/agent-sessions/tools-kit/table.ts
  • apps/web/src/page/agent-sessions/tools-kit/toolbar.ts
  • apps/web/src/page/alerts/destination/view.ts
  • apps/web/src/page/alerts/editor/view-action-bar.ts
  • apps/web/src/page/alerts/editor/view-condition.ts
  • apps/web/src/page/alerts/editor/view-details.ts
  • apps/web/src/page/alerts/editor/view-impact.ts
  • apps/web/src/page/alerts/editor/view-notifications.ts
  • apps/web/src/page/alerts/hub/hub-uptime.scene.test.ts
  • apps/web/src/page/alerts/hub/view-inbox.ts
  • apps/web/src/page/alerts/hub/view-rules.ts
  • apps/web/src/page/alerts/hub/view-uptime.ts
  • apps/web/src/page/alerts/incident/view-rail.ts
  • apps/web/src/page/alerts/incident/view-timeline.ts
  • apps/web/src/page/alerts/shared/rule-chart.ts
  • apps/web/src/page/alerts/uptime-form/view.ts
  • apps/web/src/page/alerts/uptime-monitor/view-panels.ts
  • apps/web/src/page/analytics/view-ai-parts.ts
  • apps/web/src/page/analytics/view-ai.ts
  • apps/web/src/page/anomalies/list/view.ts
  • apps/web/src/page/code-review/kit/review-sheet-more.ts
  • apps/web/src/page/code-review/kit/review-sheet-sections.ts
  • apps/web/src/page/code-review/settings/view.ts
  • apps/web/src/page/dashboards/kit/tile-shell.ts
  • apps/web/src/page/dashboards/kit/time-range-label.ts
  • apps/web/src/page/dashboards/list/view-list.ts
  • apps/web/src/page/dashboards/list/view.ts
  • apps/web/src/page/dashboards/templates/derive.ts
  • apps/web/src/page/dashboards/templates/view-panel.ts
  • apps/web/src/page/dashboards/view/view-history.ts
  • apps/web/src/page/dashboards/view/view.ts
  • apps/web/src/page/dashboards/widget/view-rail.ts
  • apps/web/src/page/dashboards/widget/view-sql.ts
  • apps/web/src/page/dashboards/widget/view.ts
  • apps/web/src/page/errors/hub/view-toolbar.ts
  • apps/web/src/page/errors/hub/view.ts
  • apps/web/src/page/errors/issue/view-panels.ts
  • apps/web/src/page/errors/issue/view-skeleton.ts
  • apps/web/src/page/infra-integrations/aws/derive.ts
  • apps/web/src/page/infra-integrations/aws/list/view-table.ts
  • apps/web/src/page/infra-integrations/aws/list/view.ts
  • apps/web/src/page/infra-integrations/cloudflare/list/view-accounts.ts
  • apps/web/src/page/infra-integrations/cloudflare/list/view-tables.ts
  • apps/web/src/page/infra-integrations/cloudflare/worker/view.ts
  • apps/web/src/page/infra-integrations/cloudflare/zone/derive.ts
  • apps/web/src/page/infra-integrations/cloudflare/zone/view.ts
  • apps/web/src/page/infra-integrations/gcp/list/view-band.ts
  • apps/web/src/page/infra-integrations/gcp/list/view-project-menu.ts
  • apps/web/src/page/infra-integrations/gcp/list/view-resources.ts
  • apps/web/src/page/infra-integrations/gcp/list/view.ts
  • apps/web/src/page/infra-integrations/gcp/workload/view-rail.ts
  • apps/web/src/page/infra-integrations/gcp/workload/view.ts
  • apps/web/src/page/infra-integrations/planetscale/db/view-breakdown.ts
  • apps/web/src/page/infra-integrations/planetscale/list/view-table.ts
  • apps/web/src/page/infra-integrations/planetscale/list/view.ts
  • apps/web/src/page/infra-integrations/planetscale/metrics.ts
  • apps/web/src/page/infra-integrations/railway/service/service.scene.test.ts
  • apps/web/src/page/infra-integrations/railway/service/view.ts
  • apps/web/src/page/infra-integrations/supabase/list/supabase.scene.test.ts
  • apps/web/src/page/infra-integrations/supabase/list/view-bottom.ts
  • apps/web/src/page/infra-integrations/supabase/list/view.ts
  • apps/web/src/page/infra-integrations/supabase/project/view-attention.ts
  • apps/web/src/page/infra-integrations/supabase/project/view-callers.ts
  • apps/web/src/page/infra-integrations/supabase/project/view-traffic.ts
  • apps/web/src/page/infra/kit/page-parts.ts
  • apps/web/src/page/infra/kubernetes/pod-table.ts
  • apps/web/src/page/infra/overview/view-findings.ts
  • apps/web/src/page/integrations/kit/count-chip.ts
  • apps/web/src/page/integrations/kit/notice.ts
  • apps/web/src/page/integrations/view-cloudflare-board.ts
  • apps/web/src/page/integrations/view-cloudflare.ts
  • apps/web/src/page/integrations/view-flow-supabase.ts
  • apps/web/src/page/integrations/view-gcp-setup-methods.ts
  • apps/web/src/page/integrations/view-gcp-workloads.ts
  • apps/web/src/page/integrations/view-gcp.ts
  • apps/web/src/page/integrations/view-github.ts
  • apps/web/src/page/integrations/view-planetscale.ts
  • apps/web/src/page/integrations/view-railway.ts
  • apps/web/src/page/integrations/view-supabase.ts
  • apps/web/src/page/investigations/conversation/command.ts
  • apps/web/src/page/investigations/conversation/kit/view-tool.ts
  • apps/web/src/page/investigations/list/view.ts
  • apps/web/src/page/kit/clipboard.ts
  • apps/web/src/page/kit/list-toolbar.ts
  • apps/web/src/page/logs/detail/view-hero.ts
  • apps/web/src/page/logs/detail/view-panels.ts
  • apps/web/src/page/onboarding/create-org-view.ts
  • apps/web/src/page/onboarding/quick-start-team-view.ts
  • apps/web/src/page/onboarding/quick-start-view.ts
  • apps/web/src/page/releases/detail/view-sections.ts
  • apps/web/src/page/replays/detail/view-rail.ts
  • apps/web/src/page/replays/detail/view-session.ts
  • apps/web/src/page/replays/detail/view.ts
  • apps/web/src/page/replays/kit/replay-meta.ts
  • apps/web/src/page/replays/kit/replays-toolbar.ts
  • apps/web/src/page/replays/kit/session-row.ts
  • apps/web/src/page/replays/list/view.ts
  • apps/web/src/page/security/finding/view.ts
  • apps/web/src/page/security/kit/add-target-view.ts
  • apps/web/src/page/security/kit/findings-view.ts
  • apps/web/src/page/security/kit/spend-settings-view.ts
  • apps/web/src/page/security/run/view-findings.ts
  • apps/web/src/page/security/run/view-header.ts
  • apps/web/src/page/security/run/view-panels.ts
  • apps/web/src/page/security/run/view.ts
  • apps/web/src/page/security/tabs/view-findings.ts
  • apps/web/src/page/security/tabs/view-overview.ts
  • apps/web/src/page/security/tabs/view-runs.ts
  • apps/web/src/page/service-map/view-db-sections.ts
  • apps/web/src/page/service-map/view-scene3d.ts
  • apps/web/src/page/services/detail/endpoint-peek/view.ts
  • apps/web/src/page/services/detail/view-api-tab.ts
  • apps/web/src/page/services/detail/view-api.ts
  • apps/web/src/page/services/detail/view-deploys.ts
  • apps/web/src/page/services/detail/view-footprint.ts
  • apps/web/src/page/services/list/view-table.ts
  • apps/web/src/page/settings/ai/view.ts
  • apps/web/src/page/settings/audit-log/view.ts
  • apps/web/src/page/settings/automation/view.ts
  • apps/web/src/page/settings/billing/view-cycle.ts
  • apps/web/src/page/settings/billing/view-plan.ts
  • apps/web/src/page/settings/data-platform/view.ts
  • apps/web/src/page/settings/ingestion/view-rules.ts
  • apps/web/src/page/settings/ingestion/view.ts
  • apps/web/src/page/settings/keys/view-reference.ts
  • apps/web/src/page/settings/kit/save-bar.ts
  • apps/web/src/page/settings/kit/section.ts
  • apps/web/src/page/settings/mcp/view-tools.ts
  • apps/web/src/page/settings/setup-health/view.ts
  • apps/web/src/page/sources/detail/view-overview.ts
  • apps/web/src/page/sources/list/view.ts
  • apps/web/src/page/traces/detail/span-panel/command.ts
  • apps/web/src/page/traces/detail/span-panel/view-tabs.ts
  • apps/web/src/page/traces/detail/view-states.ts
  • apps/web/src/service-map/map/loading.ts
  • apps/web/src/service-map/trace-flow/view.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

maple-review-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Maple review

Nothing to review

Head adds only a merge of ui-consistency-2; the three files that differ from the last reviewed commit are base-branch content identical to the base SHA, so this PR adds no new change to review.

62558a2 · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo added this pull request to stack #1989 October 30, 2026 19:58
@Makisuo
Makisuo merged commit 4303ddf into main Oct 30, 2026
28 checks passed
@Makisuo
Makisuo deleted the ui-consistency-3 branch October 30, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant