Skip to content

feat: extend sandboxes monitoring charts to support up to 90 days#350

Open
devin-ai-integration[bot] wants to merge 5 commits into
mainfrom
devin/1780334031-90d-timepicker
Open

feat: extend sandboxes monitoring charts to support up to 90 days#350
devin-ai-integration[bot] wants to merge 5 commits into
mainfrom
devin/1780334031-90d-timepicker

feat: extend sandboxes monitoring to support up to 90 days

7c34e66
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 1, 2026 in 7m 7s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/features/dashboard/sandboxes/monitoring/header.tsx:159-163 Mock data generator clamps to 30 days, breaks 90-day preview
🟡 Nit src/features/dashboard/sandboxes/monitoring/time-picker/validation.ts:39-49 Validation messages say 91 days while UI promises 90 days

Annotations

Check failure on line 163 in src/features/dashboard/sandboxes/monitoring/header.tsx

See this annotation in the file changed.

@claude claude / Claude Code Review

Mock data generator clamps to 30 days, breaks 90-day preview

Mock data generator at `src/configs/mock-data.ts:1087-1102` still hardcodes a 30-day clamp (`const thirtyDaysAgo = now - 30 * 24 * 60 * 60 * 1000; if (startMs < thirtyDaysAgo) startMs = thirtyDaysAgo`). This PR's new 90-day query in `MaxConcurrentSandboxes` (header.tsx:162) and the "Last 90 days" preset now silently truncate to 30 days when `USE_MOCK_DATA` is on, so the "(90-day max)" card and the 90d chart on the Vercel preview deployments listed in this PR are computed over only the last 30 da

Check warning on line 49 in src/features/dashboard/sandboxes/monitoring/time-picker/validation.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Validation messages say 91 days while UI promises 90 days

The validation error messages now reference "91 days" (`Start date cannot be more than 91 days ago` / `Date range cannot exceed 91 days`) but the UI advertises 90 days everywhere — the new "Last 90 days" preset in TIME_OPTIONS/TIME_RANGES and the header card's "(90-day max)" label. A user who selects "Last 90 days" and nudges the start a touch earlier in the custom picker will see an error referencing a 91-day limit the UI never promised. The same drift propagates server-side because `get-team-m