fix(resources): show derived pod readiness on the Phase row, not just Running#571
Merged
nadaverell merged 2 commits intomainfrom May 2, 2026
Merged
Conversation
… Running
The pod detail/side panel rendered `pod.status.phase` verbatim in the
"Phase" property row. On a Running-but-not-ready pod (e.g. 0/1
containers ready), or one that's clearly cycling (thousands of restarts,
last-exit Completed minutes ago), the row therefore read as a healthy
"Running" — directly contradicting the panel header ("Running (0/1)"),
the green/red status badge, and the Issues Detected banner above it.
SKY-819 captured two real reports of users reading the Phase row top-down
and concluding the pod was healthy when it wasn't.
This change adds `getPodPhaseDisplay(pod)` next to `getPodStatus` in
`resource-utils.ts`. It returns:
- `phase` — the verbatim API field, never lost (kubectl correlation)
- `text` — phase + a derived qualifier:
"Running — Not Ready (0/1)"
"Running — Restarting (6301 restarts)"
"Running — Not Ready (0/1), 6301 restarts" (both)
"Running — CrashLoopBackOff" / "OOMKilled" / etc.
"Running — Terminating" when deletionTimestamp set
- `level` — HealthLevel for tinting; mirrors the panel header so the
row colour matches the badge / icon shown above.
- `hint` — optional one-liner surfaced via tooltip explaining why the
state was downgraded.
PodRenderer now renders the Phase Property using that display, tinted
via `healthColors[level]`, with the hint as a tooltip when present.
Pure helper, full unit coverage in `get-pod-phase-display.test.ts`
(13 cases including the boundary at the cycling threshold and all the
fixture shapes from SKY-819).
Linear: SKY-819
Made-with: Cursor
… coverage Container-state failure detection now skips when phase is Succeeded so a Job pod whose sidecar was OOMKilled before the main container completed reads "Completed" rather than "Succeeded — OOMKilled / unhealthy". Adds test fixtures for ErrImagePull, CreateContainerConfigError, multi-container partial readiness, restart sums across containers, and the Succeeded+sidecar gate. Strips ticket/diff-history references from comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two reported pod-detail bugs on app.radarhq.io that share the same root cause: the pod side panel rendered
pod.status.phaseverbatim in the Phase property row, so a pod that the rest of the panel clearly flagged as broken still read as a healthy "Running" in the Phase row. Linear: SKY-819.The bugs:
Phase: Runningwhile the same panel header showedRunning (0/1)with an "Issues Detected / Not Ready" alert.Phase: Running+ green status icon alongside6,301 restartsandLast exit: Completed 6m ago— visual hierarchy implied the pod was healthy when it was clearly cycling.Fix
getPodPhaseDisplay(pod)inresource-utils.ts. Pure, unit-tested. Derives a richer "Phase" from the raw phase plus ready-ratio, restart count, container-state reasons, anddeletionTimestamp. Returns:phase— the verbatim API field (kubectl correlation never lost)text— phase + a derived qualifier:Running — Not Ready (0/1)Running — Restarting (6301 restarts)Running — Not Ready (0/1), 6301 restartsRunning — CrashLoopBackOff/OOMKilled/ImagePullBackOffRunning — TerminatingwhendeletionTimestampis setlevel—HealthLevelfor tinting; mirrors the panel header so the row colour matches the badge / icon shown abovehint— optional one-liner surfaced via tooltipPodRenderernow renders the Phase row using that display, tinted viahealthColors[level], with the hint as a tooltip when present. The verbatim phase is always preserved in the helper output for debugging.Test plan
cd packages/k8s-ui && npm test— 80 passed (13 new inget-pod-phase-display.test.ts, covering all SKY-819 fixture shapes plus the cycling-threshold boundary).cd web && npm run tsc— clean.cd web && npm run build— clean.0/1 ready→ Phase row reads "Running — Not Ready (0/1)" in the degraded colour and matches the panel header.Made with Cursor
Note
Low Risk
Low risk: UI-only change that derives and displays a richer pod phase string from existing pod status fields, backed by unit tests; no API/auth/data persistence changes.
Overview
Updates the pod details side panel so the Phase row no longer shows raw
pod.status.phaseonly, but a derived, color-tinted status (with optional tooltip hint) that reflects readiness ratio, restart cycling, termination, and common container failure reasons.Adds a new
getPodPhaseDisplay()helper inresource-utils.tsplus a dedicated Vitest suite covering readiness/restart thresholds, multi-container pods, terminating pods, and failure states likeCrashLoopBackOff, image pull errors, andOOMKilled(while preserving the raw phase field for correlation).Reviewed by Cursor Bugbot for commit 000957b. Bugbot is set up for automated code reviews on this repo. Configure here.