Skip to content

refactor: switch out last normal mantine badges for click-ui - #3417

Merged
hoorayimhelping merged 1 commit into
mainfrom
bucky-click-uibadges-finish
Oct 20, 2026
Merged

hoorayimhelping merged 1 commit into
mainfrom
bucky-click-uibadges-finish

Conversation

@hoorayimhelping

Copy link
Copy Markdown
Member

Summary

  • Switches over the last of the typical Mantine badges (there is one that is circular in shape, rather than pill shaped, left to handle)
  • Also changes over some Title Case titles to Sentence case

Screenshots or video

01-chart-editor-series-and-formula 02-metric-helper-collapsed 03-metric-helper-expanded 04-metric-helper-attribute 05-metric-explorer-detail 06-tile-alert-invalid-warning 07-mv-indicator 08-mv-modal 09-span-kind

How to test on Vercel preview

  1. Chart editor: add a tile with a metric source and two series, then click Add Formula. Look at the A/B and "Formula" badges, and at the metric helper badges below each series.
  2. Metric explorer: click Browse metrics next to a metric name. Look at the metric kind and tag count badges.
  3. Tile alert: on a raw SQL tile, type SELECT count() FROM $__sourceTable and click Add Alert. Look at the "Invalid query" and "Warning" badges.
  4. Materialized views: add a tile on a source that has a materialized view. Look at the "Accelerated" badge, and then click it to see "Active" in the modal.
  5. Side panel: open a trace span on Search. Look at the span kind badge in the header.

@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Oct 20, 2026 2:01pm UTC
hyperdx-storybook Ready Ready Preview Oct 20, 2026 2:01pm UTC

Request Review

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 8
  • Production lines changed: 164
  • Branch: bucky-click-uibadges-finish
  • Author: hoorayimhelping

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 124 in total (1.67%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were established.

Summary

Replaces Mantine badges with Click UI badges across chart editing, metric details, materialized views, and trace details.

  • Chart editors show formulas, series, and alert states in shared badges.
  • Metric and trace details use shared badges for types and counts.
  • Materialized-view status labels use shared badges.

Reviews (1) · Last reviewed commit: "refactor: switch out last normal mantine..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Deep Review

Scope: a mechanical UI refactor swapping the remaining Mantine Badge components for the @clickhouse/click-ui Badge (text + state API) across 8 files in packages/app, plus some Title-Case → Sentence-case label edits and a changeset. No logic, data, or API-contract changes.

The in-repo correctness checks are clean: MVOptimizationModal.tsx removed its WARNING_COLOR/SUCCESS_COLOR constants with no dangling references, and MVOptimizationIndicator.tsx correctly retains them for the icon colors. The remaining risk is entirely in the click-ui Badge prop contract, which cannot be confirmed from the diff because the package is not installed in this checkout — so these are verification items, not confirmed breakage.

✅ No critical issues found.

🟡 P2 -- recommended

  • packages/app/src/components/DBEditTimeChartForm/ChartSeriesEditor.tsx:312 -- the text prop receives a string | number here (indexToSeriesRef(index) ?? index + 1), and MetricAttributeHelperPanel.tsx:372 / MetricExplorer/MetricDetailPanel.tsx:164 pass a raw number (attrs.length / attributeKeys.length); every pre-existing click-ui Badge call site passes a string, so if click-ui types text as string this is a tsc build break.
    • Fix: run the app's tsc build against this branch to confirm text accepts ReactNode, or wrap the numeric values in String(...).
  • packages/app/src/components/MaterializedViews/MVOptimizationIndicator.tsx:58 -- the converted badge still relies on click-ui Badge forwarding onClick, className, and data-mv-accelerated/data-testid, and the series-ref-badge tests in DBEditTimeChartForm.test.tsx assert on a forwarded data-testid without mocking click-ui, so a non-forwarding Badge would silently drop the modal-open click and break those tests.
    • Fix: run DBEditTimeChartForm.test.tsx and manually verify the MV indicator badge opens the modal on click in the preview build.
  • packages/app/src/components/DBEditTimeChartForm/TileAlertEditor.tsx:137 -- three converted badges (here, plus MVOptimizationModal.tsx:67 and ChartSeriesEditor.tsx:311) are rendered as direct children of a Mantine <Tooltip>, which requires the child to forward a ref and spread hover handlers; no pre-existing code wraps a click-ui Badge in a Mantine Tooltip, so the tooltips may silently stop appearing.
    • Fix: hover each tooltip-wrapped badge in the preview build to confirm the tooltip still renders, or wrap the Badge in a forwarding element (e.g. a <span>).
🔵 P3 nitpicks (1)
  • packages/app/src/components/DBEditTimeChartForm/TileAlertEditor.tsx:140 -- inline Mantine spacing tokens (style={{ marginLeft: 'var(--mantine-spacing-xs)' }}, and marginInlineEnd: 'var(--mantine-spacing-md)' in MVOptimizationModal.tsx) are applied to click-ui components, mixing the two design systems' spacing conventions.
    • Fix: use a wrapping layout element or a click-ui-native spacing approach for consistency with the other converted badges.

Reviewers (5): correctness, testing, maintainability, kieran-typescript, project-standards.

Testing gaps: MVOptimizationIndicator.tsx and MVOptimizationModal.tsx badges carry click behavior and data-mv-* attributes but have no unit tests, so a prop-forwarding regression in the click-ui swap would go undetected by CI.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

@github-actions

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 444 passed • 1 skipped • 1389s

Status Count
✅ Passed 444
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@hoorayimhelping
hoorayimhelping merged commit 938494d into main Oct 20, 2026
33 checks passed

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — d84f366b Deployed Oct 20, 2026 by vercel[bot]
Preview – hyperdx-storybook — d84f366b Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants