Skip to content

chore: convert AlertStateBadge to use click-ui badge - #3314

Merged
hoorayimhelping merged 2 commits into
mainfrom
bucky-alerts-badge-clickui
Oct 9, 2026
Merged

hoorayimhelping merged 2 commits into
mainfrom
bucky-alerts-badge-clickui

Conversation

@hoorayimhelping

Copy link
Copy Markdown
Member

Summary

  • Replaces Mantine's Badge with click-ui's Badge in the AlertStateBadge component, which shows up in the Alerts page.

Screenshots or video

Type Before After
Alert before alert after alert
Pending before pending after pending
OK before ok after ok
Disabled before disabled after disabled
Error (in table) before alert after error

How to test on Vercel preview

  1. Open the Vercel preview URL and log in.
  2. Go to Search. Select a log source. Click Save, type a name, and submit.
  3. On the saved search page, click Alerts.
  4. Click Add New Incoming Webhook. Select Generic. Type any name and any URL (for example https://example.com/hook). Click Add Webhook.
  5. Click Create Alert.
  6. Go to Alerts. Make sure that the alert card shows a green Ok badge, with correct styles in light mode and in dark mode.

References

@vercel

vercel Bot commented Oct 7, 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 9, 2026 1:50pm UTC
hyperdx-storybook Ready Ready Preview Oct 9, 2026 1:50pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f27dfec

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

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

github-actions Bot commented Oct 7, 2026 •

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: 1
  • Production lines changed: 28 (+ 45 in test files, excluded from tier calculation)
  • Branch: bucky-alerts-badge-clickui
  • 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

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

✅ No issues found.

@github-actions

github-actions Bot commented Oct 7, 2026 •

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 125 in total (1.75%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Replaces Mantine’s Badge with click-ui’s Badge in AlertStateBadge.

  • Alert state badges now use click-ui styles.
  • The style guide explains when click-ui Container can replace Box.

Reviews (3) · Last reviewed commit: "Merge branch 'main' into bucky-alerts-ba..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

Scope: converts AlertStateBadge from Mantine's Badge to click-ui's Badge, adds a unit test, a changeset, and a code_style.md note. Diff is small and UI-local. One confirmed issue: the new test references the React namespace without importing it, which breaks the repo's typecheck gate.

🔴 P0/P1 — must fix

  • packages/app/src/components/alerts/__tests__/AlertStateBadge.test.tsx:15 — the inline mock's type annotation uses React.ReactNode but the file never imports React, so yarn tsc --noEmit (run by ci:lint) fails with TS2686 because @types/react exposes React only as a UMD global inside a module.
    • Fix: Add import * as React from 'react'; to the test file, or import ReactNode directly and drop the React. namespace reference.
    • correctness, kieran-typescript, project-standards

Reviewers (6): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments.

Testing gaps:

  • The test fully mocks click-ui's Badge, so the real component's prop contract (valid state/type values) is never exercised at runtime; it is only guarded by the type checker, which this diff also breaks until the import above is added.
  • Previous-comments review: all existing PR comments are automation (Vercel, changeset-bot, triage, jscpd, Greptile, E2E); no human feedback threads required follow-up.

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 7, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 407 passed • 1 skipped • 1410s

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

Tests ran across 4 shards in parallel.

View full report →

@hoorayimhelping

Copy link
Copy Markdown
Member Author
packages/app/src/components/alerts/__tests__/AlertStateBadge.test.tsx:15 — the inline mock's type annotation uses React.ReactNode but the file never imports React, so yarn tsc --noEmit (run by ci:lint) fails with TS2686 because @types/react exposes React only as a UMD global inside a module.

    Fix: Add import * as React from 'react'; to the test file, or import ReactNode directly and drop the React. namespace reference.

This seems incorrect to me. yarn tsc --noEmit passes. TS2686 applies only to value references to a UMD global, and React.ReactNode here is in a type position, which is allowed. RevealSnippet.test.tsx uses the same pattern.

~/Development/hyperdx/packages/app>yarn tsc --noEmit
~/Development/hyperdx/packages/app>

@elizabetdev elizabetdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 🎉
From a design perspective.

@knudtty

knudtty commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

It looks a bit... sanitized. Are we able to keep the caps and potentially bold?

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — f27dfec8 Deployed Oct 9, 2026 by vercel[bot]
Preview – hyperdx-storybook — f27dfec8 Deployed Oct 9, 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.

3 participants