fix: fleet node health — use actual node status instead of hardcoded UNKNOWN#104
fix: fleet node health — use actual node status instead of hardcoded UNKNOWN#104TerrifiedBug wants to merge 2 commits intomainfrom
Conversation
- getStatusTimeline returns { events, nodeStatus } — fetches node's current
DB status in parallel so the timeline shows actual status when no events exist
- getUptime falls back to nodeForStatus.status before "UNKNOWN" for nodes
with no prior event history, preventing 0.00% uptime for healthy nodes
- StatusTimeline uses data.nodeStatus for the empty-range segment instead
of hardcoded "UNKNOWN", fixing the grey/unknown display for healthy nodes
Fixes VF-5: uptime shows 0.00 (red) and status timeline shows unknown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes fleet node health display by fetching the node's actual DB status instead of hardcoding
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as StatusTimeline / EventLog
participant tRPC as getStatusTimeline
participant DB as PostgreSQL
UI->>tRPC: queryOptions({ nodeId, range })
tRPC->>DB: Promise.all([findMany NodeStatusEvent, findUnique VectorNode])
DB-->>tRPC: [events[], node]
tRPC-->>UI: { events, nodeStatus: node?.status ?? "UNKNOWN" }
Note over UI: StatusTimeline uses data.events + data.nodeStatus ✅
Note over UI: EventLog still expects flat array ❌
|
getStatusTimeline now returns { events, nodeStatus } instead of a plain
array. EventLog was still treating data as an array, causing it to always
render empty. Destructure data.events to restore correct behaviour.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
getStatusTimelinerouter now returns{ events, nodeStatus }— fetches the node's current DB status in parallel with eventsgetUptimerouter falls back tonodeForStatus?.statusbefore"UNKNOWN"when no prior event existsStatusTimelinecomponent usesdata.nodeStatusas the segment status when there are no events in range, instead of hardcoding"UNKNOWN"Root Cause
Nodes that have been healthy since before the selected time range have no
NodeStatusEventrecords in that window. The original code defaulted to"UNKNOWN"in this case, causing:Test plan
Closes VF-5
🤖 Generated with Claude Code