Repository navigation
fix(ui): use the selected timezone for Usage date shortcuts - #148277
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 2:33 AM ET / 06:33 UTC (Revision 5). ClawSweeper reviewWhat this changesMakes Usage date shortcuts and Today labels follow the selected timezone, consolidates date formatting, and adds browser coverage plus small test-fixture and routing repairs. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main and v2026.9.4. The patch and inspected browser proof support the intended correction, with no actionable correctness or security findings. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI Usage page turns calendar selections into Gateway requests for session usage and costs. Its date shortcuts determine which days appear in the totals, charts, and session details. flowchart TD
A[Current time] --> C[Usage date shortcuts]
B[Selected UTC or local timezone] --> C
C --> D[Start and end dates]
D --> E[Gateway usage requests]
E --> F[Usage totals and charts]
B --> G[Today label and day filters]
G --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +6, Tests +218. Total +224 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep calendar selection consistent across shortcut arithmetic, request dates, day filters, and labels through the existing shared formatter. Do we have a high-confidence way to reproduce the issue? Yes: selecting UTC Today when the browser's local date differs from UTC reaches the source-proven mismatch still present on main. Supplied before/after browser evidence demonstrates the scenario; this review did not rerun it. Is this the best way to solve the issue? Yes: the patch repairs the existing date-selection owner, reuses one formatter, and preserves local-calendar behavior without adding settings or changing stored data. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e9ca5bc044a8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Use the canonical Date clone and avoid a shadowed test label. Route the existing wizard recovery integration test through the host-capable infra owner so pending plugin-install recovery exercises the real shared-state broker. Co-authored-by: Qu Ziang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
Maintainer validationReviewed head:
Proof limits: no full local matrix is claimed. An earlier full routing-file run was terminated; selected assertions and hosted CI supply the relevant proof. Inspected original screenshots were delivered in chat and their GitHub embeds verified; a new full-browser pixel recheck was unavailable. The browser uses a mocked Gateway, not a live provider. Named follow-up: watch load sensitivity of the unrelated Claw package process-exit probe if it recurs. Its first CI attempt timed out; the unchanged full file passed 8/8 locally and the single diagnostic failed-job rerun passed. No timeouts or assertions were relaxed. Credit is preserved for Qu Ziang and Tak Hoffman. Native preparation has passed on this exact head. Companion #148883 repairs the canonical squash helper so it does not reintroduce automation credit; the Usage source and its green CI remain unchanged. |
Preserve the upstream wizard routing and persisted cloud follow-up repair before refreshing the PR base. Co-authored-by: Qu Ziang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
Remove the duplicate wizard recovery entry introduced by parallel main-branch fixes; retain the canonical host-capable test owner. Co-authored-by: Qu Ziang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
Exclude the verified automation service-email alias from native squash coauthor credit. Reuse the exact identity filter and preserve requested human credit without broad name or domain matching. Related: #148277 Real captured-input composition and the 390 native merge/outcome tests pass. Independent P0-P2 review found no actionable issues. Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
|
Merged via squash.
|
* commit '0cd944c01416c4f9c1f6dc9d1dea9670c5b99cab': improve: speed up session search for restricted operators (#148826) fix(update): avoid retry guidance for historical abandoned runs (#146982) fix(android): reduce queued-message send overhead (#148899) refactor(slack): count table cells only for native output (#148872) fix: correct update status and apply saved model keys (#148830) refactor(nostr): share doctor state migration flow (#148647) refactor(gateway): centralize device token denial responses (#148644) test: make kitchen sink assertions runtime portable (#148891) refactor(agents): share preferred block chunk boundaries (#148391) fix(ui): use the selected timezone for Usage date shortcuts (#148277) test: probe active Node in release preflight (#148892) fix(test): restore services typecheck shard headroom (#148889)
…148883) Exclude the verified automation service-email alias from native squash coauthor credit. Reuse the exact identity filter and preserve requested human credit without broad name or domain matching. Related: openclaw#148277 Real captured-input composition and the 390 native merge/outcome tests pass. Independent P0-P2 review found no actionable issues. Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
…#148277) Fix Usage date shortcuts and Today comparison labels selecting the wrong calendar day when UTC is selected near local midnight. Use the selected UTC or Local calendar through the shared formatter while preserving Local daylight-saving behavior. Keep browser regression coverage for all six shortcuts across calendar boundaries. Stabilize the temporary Git fixture and remove duplicate host-test routing uncovered during integration. Exact-head CI passed in run34883371099, attempt2. Co-authored-by: Qu Ziang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]>
What Problem This Solves
Fixes Usage date shortcuts selecting the wrong day when UTC is selected and the browser's local date differs from the UTC date.
User Impact
Today, 7d, 30d, 90d, 1y, and All use the selected calendar, so UTC usage is not omitted or assigned to tomorrow near local midnight. The cost comparison's Today label follows the same timezone.
Why This Change Was Made
Preset arithmetic and formatting used local dates even when requests were sent in UTC mode. They now use the selected timezone through the existing shared date formatter; local calendar and daylight-saving behavior remain intact.
Evidence
sessions.usageandusage.costrequests, displayed usage, and the Today label.pnpm tsgo:ui), formatting, i18n verification, and scoped stylelint pass. Independent review and the required autoreview (P0–P2) found no actionable issues.2330df403ea700bb7986cf65b3e4467e48636185; reverified September 15. The full matrix was not run locally.2026-09-13T16:30:00Zin an Asia/Shanghai browser. Clicking UTC Today incorrectly selected September 14 before the fix; afterward it selects September 13 and displays 1.2K tokens / $0.12.Before:
After: