Skip to content

refactor: replace last holdout mantine badges with click-ui badges - #3420

Merged
hoorayimhelping merged 1 commit into
mainfrom
bucky-last-mantine-badges
Oct 22, 2026
Merged

hoorayimhelping merged 1 commit into
mainfrom
bucky-last-mantine-badges

Conversation

@hoorayimhelping

Copy link
Copy Markdown
Member

Summary

  • Removes the last normal Mantine badges for Click-ui badges (for real this time)
    • AI assistant on chart explorer
    • Materialized views
    • Exception breadcrumbs
  • Cleans up dead code

Screenshots or video

01-ai-assistant-experimental 02-mv-config-pills 03-exception-breadcrumb-chips

How to test on Vercel preview

  1. Chart Explorer: with the AI Assistant on (ANTHROPIC_API_KEY set on the API), look at the "Experimental" badge next to AI Assistant [A].
  2. Materialized views: add a tile on a source that has a materialized view, and click Accelerated. In the modal, look at the granularity, column, and aggregation badges.
  3. Exception breadcrumbs: run yarn storybook in packages/app, and open ExceptionSubpanel → Default. Look at the "error" and "200" badges in the breadcrumbs table.
  4. Dead code: run yarn knip and make ci-lint. Both must pass with StacktraceFrame.tsx deleted and the unused code removed from LogSidePanelElements.tsx.

@changeset-bot

changeset-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7fbb549

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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 22, 2026 2:17pm UTC
hyperdx-storybook Ready Ready Preview Oct 22, 2026 2:17pm UTC

Request Review

@github-actions github-actions Bot added the review/tier-3 Standard — full human review required label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Diff size: 492 production lines changed (Tier 2 max: < 250)

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Production files changed: 5
  • Production lines changed: 492 (+ 57 in test files, excluded from tier calculation)
  • Branch: bucky-last-mantine-badges
  • Author: hoorayimhelping

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

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 critical or 🟠 major in code this PR adds or changes: fix before asking for review.
  • 🔵 minor in code this PR changes: your call. Fix if small, otherwise reply.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    severity. Reply with one sentence; if it is critical, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

1 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 1 minor

None could be anchored to changed lines; they are listed below.

Findings outside the changed lines

1 minor
  • 🔵 packages/app/src/components/__tests__/ExceptionSubpanel.test.tsx:686 — Status badge test skips the 500 and 400 boundaries, so an off-by-one in StatusChip would still pass → Add the cases [500, 'danger'], [499, 'warning'], [400, 'warning'] and [399, 'success'] to the it.each. With only 503/404/200, changing status >= 500 to status > 500 (or >= 400 to > 400) in ExceptionSubpanel.tsx StatusChip would not fail any test.

Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Duplicate code analysis

1 new clone introduced by this PR.

  • packages/app/src/LogSidePanelElements.tsx:13-50 ↔ packages/app/src/components/ExceptionSubpanel.tsx:104-141 — 38 lines

If one of these duplicates a helper that already exists, import it instead
of redefining it. If the duplication is deliberate, ignore this comment —
the check is advisory and never fails the build.


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

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable defects were found.

Summary

Replaces the remaining badge labels with Click UI badges.

  • The AI Assistant’s “Experimental” label appears as an info badge.
  • Materialized view details appear as neutral badges.
  • Exception breadcrumbs show status codes and console levels as Click-ui badges.
  • Unused stacktrace, breadcrumb, and source-map helpers are removed from the app code.

No actionable issues were found. Tests and browser checks were not run; dependencies were unavailable.

Reviews (4) · Last reviewed commit: "refactor: replace last holdout mantine b..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found. This is a clean, well-scoped UI refactor (Mantine Pill/custom chips → click-ui Badge) plus dead-code removal. The LevelChip state-mapping simplification (level.includes('warn') || level.includes('warning') → level.includes('warn')) is behavior-preserving because 'warning'.includes('warn') is already true. The StacktraceBreadcrumb type hoisted to @/types is byte-identical to the removed inline definition, StacktraceFrame.tsx has no remaining importers, and all surviving imports in LogSidePanelElements.tsx are still used.

🟡 P2 -- recommended

  • packages/app/src/components/ExceptionSubpanel.tsx:104 -- CollapsibleSection and SectionWrapper are byte-identical duplicates of the versions in LogSidePanelElements.tsx (the CI jscpd-flagged clone); the duplication predates this PR but sits squarely in the area this cleanup touches.
    • Fix: Import CollapsibleSection/SectionWrapper from LogSidePanelElements.tsx or lift both into a shared module, and have both files consume the single source.
    • maintainability
🔵 P3 nitpicks (3)
  • packages/app/src/components/ExceptionSubpanel.tsx:452 -- the shouldShowSourceMapFtux memo is referenced only by commented-out JSX pointing at SourceMapsFtux, a component this PR deletes, leaving it permanently dead and keeping the file's eslint-disable @typescript-eslint/no-unused-vars alive.
    • Fix: Remove the shouldShowSourceMapFtux memo and the commented-out JSX line, then drop the top-of-file eslint-disable if nothing else needs it.
  • packages/app/src/components/ExceptionSubpanel.tsx:295 -- the null-return early paths of StatusChip (no status_code) and LevelChip (no level) have no test coverage.
    • Fix: Add breadcrumb cases with a missing status code and a missing level asserting no badge renders (screen.queryByTestId('badge') is null).
  • packages/app/src/components/__tests__/ExceptionSubpanel.test.tsx:60 -- the status-code tests exercise 503/404/200 but not the exact >= 500 / >= 400 boundaries, so an off-by-one change to the ternary cutoffs would pass.
    • Fix: Extend the it.each to include [500,'danger'], [400,'warning'], and e.g. [499,'warning']/[399,'success'].
    • testing, correctness

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

Testing gaps:

  • The new tests mock the whole @clickhouse/click-ui module, so they verify only that the computed state is forwarded to a stub Badge — the real Badge prop contract (number/ReactNode text, valid state union) is covered by ci:lint (tsc --noEmit), not these unit tests.
  • The MVConfigSummary.tsx badges and the DBChartPage.tsx "Experimental" badge have no assertions, though both are static prop swaps with low behavioral risk.

Prior comments: The 6 existing PR comments are all automated (changeset-bot, vercel, pr-triage, jscpd, greptile, e2e) with no human review feedback to verify; greptile found no actionable issues and E2E passed (441 passed, 0 failed).

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

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 456 passed • 1 skipped • 1829s

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

Tests ran across 4 shards in parallel.

View full report →

@pulpdrew pulpdrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — 7fbb5495 Deployed Oct 22, 2026 by vercel[bot]
Preview – hyperdx-storybook — 7fbb5495 Deployed Oct 22, 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-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants