Repository navigation
refactor: change KubernetesDashboardPage to use click-ui badges - #3363
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
| @@ -152,13 +153,10 @@ const renderKubeEvent = (source: TLogSource) => (event: KubeEvent) => { | |||
| </Text> | |||
| {event['object.type'] && ( | |||
| <Badge | |||
There was a problem hiding this comment.
🔵 minor — renderKubeEvent mixes the click-ui Badge with Mantine Group/Text/Timeline in one small render function
The base-branch Click UI convention says "Do not mix both libraries inside one small component". Either keep the Mantine Badge here, using semantic-token styling, or move the whole event row to click-ui (Container/Text).
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
| > | ||
| Ready | ||
| </Badge> | ||
| <Badge text="Ready" state="success" /> |
There was a problem hiding this comment.
🔵 minor — Ready/Not Ready badge pair is hand-copied at four call sites
Add a FormatReadyStatus({ ready, notReadyLabel }) next to FormatPodStatus in components/KubeComponents.tsx. Use it here, in NamespaceDetailsSidePanel.tsx:106, and at KubernetesDashboardPage.tsx:691/873. That gives the state mapping one source of truth and one test, the same way FormatPodStatus does.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor 2 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Duplicate code analysis1 new clone introduced by this PR.
If one of these duplicates a helper that already exists, import it instead jscpd compared this branch against |
|
| <Badge | ||
| variant="light" | ||
| size="xs" | ||
| fw="normal" | ||
| color={event['object.type'] === 'Normal' ? 'green' : 'yellow'} | ||
| > | ||
| {event['object.type']} | ||
| </Badge> | ||
| size="sm" | ||
| text={event['object.type']} | ||
| state={event['object.type'] === 'Normal' ? 'success' : 'warning'} | ||
| /> |
There was a problem hiding this comment.
renderKubeEvent now combines a click-ui Badge with Mantine Group and Text in the same small renderer. The repository guide says, “Do not: Mix both libraries inside one small component.” Move the event row into a small click-ui component so its text, badge, and spacing use one library. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Deep Review✅ No critical issues found. This is a mechanical swap of the Mantine 🔵 P3 nitpicks (2)
Reviewers (5): correctness, testing, maintainability, kieran-typescript, project-standards. Testing gaps: The badge changes in 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 |
E2E Test Results✅ All tests passed • 411 passed • 1 skipped • 1252s
Tests ran across 4 shards in parallel. |
🦋 Changeset detectedLatest commit: 29b47f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
| > | ||
| Not Ready | ||
| </Badge> | ||
| <Badge text="Not Ready" state="danger" /> |
There was a problem hiding this comment.
Status labels break sentence case
The replacement Badge uses Not Ready, but the repository requires sentence case for static user-facing text. Change it to Not ready here and in the node and namespace drawers. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Screenshots or video
How to test on Vercel preview
Preview routes:
a. Click Dashboards in the left navigation.
b. Under Preset Dashboards, click Kubernetes.
Steps:
Runningin green (success).Normalin green andWarningin orange. The text is in normal case, not capitals.Readyin green. Click a node row. The drawer header shows a greenReadybadge, and its pods table shows greenRunningbadges.Readyin green. Click a namespace row. The drawer header shows a greenReadybadge.References