Repository navigation
Conversation
Greptile SummaryThis PR fixes the default date range for the Control UI Usage tab from a single-day view to a rolling 7-day window (today − 6 days through today). The change is isolated to the
Confidence Score: 5/5Safe to merge — single-line behavioral fix with no side effects. The change is minimal (3 lines in one IIFE), logically correct, and uses standard JavaScript Date arithmetic that correctly handles month/year boundary roll-overs. No tests, types, or other files are affected. No files require special attention. Reviews (1): Last reviewed commit: "ui: default usage range to last 7 days" | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep this PR open: current main still defaults the Control UI Usage range to today-only, and the branch is a narrow plausible implementation. It is not merge-ready because it changes a user-visible default without real Control UI proof and still needs maintainer acceptance of the wider initial query window. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main initializes both Usage date fields from today and the controller sends those state values as the default usage query range. I did not run browser proof in this read-only review. Is this the best way to solve the issue? Conditionally yes: app state initialization is the narrow owner for the default range, while the controller and render path already consume the state. The remaining question is maintainer product acceptance plus real behavior proof, not a better code location. Security review: Security review cleared: The diff only changes a Control UI date initializer and does not touch dependencies, workflows, secrets, package execution, or security-sensitive surfaces. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 95b97e5b0b5e. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
Heads up: this PR needs to be updated against current |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Fix the Control UI Usage tab default date range.
The Usage view currently initializes with:
usageStartDate = todayusageEndDate = todayThat makes the default view show only a single day.
This change updates the initial state to:
usageStartDate = today - 6 daysusageEndDate = todaySo the default Usage view covers the last 7 calendar days inclusive.
Root cause
The issue is in
ui/src/ui/app.ts, where the default Usage state is initialized.ui/src/ui/controllers/usage.tscorrectly uses whatever dates are already in state.Files changed
ui/src/ui/app.tsTesting
Manual verification:
today - 6 daysthroughtoday