Skip to content

Tighten sandbox live indicator freshness

3c7d849
Select commit
Loading
Failed to load commit list.
Open

refactor: sandbox details header + live indicator determination #288

Tighten sandbox live indicator freshness
3c7d849
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 6, 2026 in 11m 40s

Code review found 1 important issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/features/dashboard/sandbox/monitoring/state/use-sandbox-monitoring-controller.ts:260-268 Inconsistent liveMetricThresholdMs between controller and chart

Annotations

Check failure on line 268 in src/features/dashboard/sandbox/monitoring/state/use-sandbox-monitoring-controller.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Inconsistent liveMetricThresholdMs between controller and chart

The controller computes `liveMetricThresholdMs` from the overfetched fetch window (`fetchTimeframe.end - fetchTimeframe.start`), while the chart computes it from the visible display window (`xAxisMax - xAxisMin`); near `calculateStepForDuration` bucket boundaries these resolve to different steps. For a ~59-minute view the display window (3,540,000ms) falls in the <1hr bucket → 5s step, while the fetch window (3,681,600ms with buffers) falls in the <6hr bucket → 30s step — so the header shows liv