Skip to content

refactor: replace Mantine badges in LLM components with click-ui badges - #3373

Merged
hoorayimhelping merged 2 commits into
mainfrom
bucky-clickui-llm-badges
Oct 14, 2026
Merged

hoorayimhelping merged 2 commits into
mainfrom
bucky-clickui-llm-badges

Conversation

@hoorayimhelping

Copy link
Copy Markdown
Member

Summary

  • Replaces the Mantine style badges with click-ui style badges in LLM pages

Screenshots or video

Before After
1-header-beta 1-header-beta
2-session-drawer 2-session-drawer
3-chat-span-expanded 3-chat-span-expanded
4-tool-span-expanded 4-tool-span-expanded

How to reproduce

On this branch:

  1. Run yarn dev on the branch and open the app.
  2. Load the test LLM session into local ClickHouse. Use the insert command from my last reply.
  3. Open /llm. Make sure the "Beta" badge shows next to "LLM".
  4. Open /llm?llmSession=test-session. Make sure each row shows its model badge or tool badge.
  5. Expand each row. Make sure the span badges and role badges show with their colors.
  6. Do steps 3–5 again in dark mode.

How to test on Vercel preview

Steps:

  1. Open the deployed app and log in.
  2. Go to /llm. Make sure that a blue "Beta" badge is next to "LLM" in the page header.
  3. In the source selector, select a trace source that has LLM (GenAI) spans.
  4. Click the Sessions tab, and then click a session row. The session drawer opens.
  5. Make sure that each span row shows a blue model badge or an orange tool badge.
  6. Click a span row to expand it. Make sure that it shows the span badges:
    • Model in blue
    • Provider in gray
    • Operation in white
    • Tool in orange
    • Agent in green
  7. In the same expanded row, make sure that the chat role badges show in lowercase:
    • system in gray
    • user in blue
    • assistant in green
    • tool in orange
  8. Make sure that underscores show in the badge text, for example execute_tool.
  9. Do steps 2–8 again in dark mode.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4f9a881

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

Request Review

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Oct 14, 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: 4
  • Production lines changed: 74 (+ 97 in test files, excluded from tier calculation)
  • Branch: bucky-clickui-llm-badges
  • 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

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/llm/__tests__/LLMSpanSubpanel.test.tsx:119 — 'omits badges' test only counts badges, so it would still pass if the wrong badge rendered → Assert the remaining badge's content and state too, e.g. expect(badges.map(b => [b.textContent, b.getAttribute('data-state')])).toEqual([['claude-fable-5', 'info']]). As written, a regression that renders a stray provider/operation badge in place of the model badge (or reads info.model into the wrong prop) still gives a count of 1.

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

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issue was established.

Summary

Replaces Mantine badges with click-ui badges across the LLM dashboard, session drawer, span details, and chat messages.

  • LLM pages show their badges with click-ui styling.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into bucky-clickui-l..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This is a self-contained, presentational refactor swapping Mantine Badge for the click-ui Badge across the LLM components. The != null render guards and the role→color/state semantics are preserved, the two new test files are type-correct (renderWithMantine/TestProviders are declared globals in packages/app/src/setupTests.tsx, and the fixtures satisfy ConversationMessage/LLMSpanInfo), and the mock pattern matches the existing AlertStateBadge.test.tsx. No P2-or-higher issues. The lowercase role display and the stateless operation badge are intentional per the change.

🔵 P3 nitpicks (2)
  • packages/app/src/llm/components/LLMSpanSubpanel.tsx:30 — the migrated model/provider/operation/toolName/agentName badges omit size, whereas every sibling badge (ChatMessageItem, LLMSessionPanel, the dashboard Beta badge) passes size="sm" and the pre-refactor subpanel badges were size="sm", so these render at click-ui's default size and look inconsistent.
    • Fix: Add size="sm" to the five badges in LLMSpanSubpanel to match the other LLM components.
    • correctness-reviewer
  • packages/app/src/llm/__tests__/ChatMessageItem.test.tsx:7 — the @clickhouse/click-ui Badge mock (span exposing data-testid/data-state) is duplicated here, in LLMSpanSubpanel.test.tsx, and in AlertStateBadge.test.tsx.
    • Fix: Extract the shared Badge mock into a test helper and import it in the three specs.

Reviewers (4): correctness, testing, maintainability, kieran-typescript.

Testing gaps: No tests cover the LLMSessionPanel model/tool badges or the LLMDashboardPage Beta badge; the mocked Badge means the unit tests assert prop wiring, not click-ui's rendered output.

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

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 415 passed • 1 skipped • 1221s

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

Tests ran across 4 shards in parallel.

View full report →

@brandon-pereira brandon-pereira 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.

Image

LGTM - should we also update the beta label in sidebar?

@hoorayimhelping

Copy link
Copy Markdown
Member Author

LGTM - should we also update the beta label in sidebar?

@brandon-pereira I'm going to do that in a follow-up PR

This branch was successfully deployed

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