diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 06:46:53 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 06:46:53 +0000 |
| commit | 2413413b01925c7fab07768d7e405ac13c735000 (patch) | |
| tree | cc168393e8a2b9bb795e3003366be14e8d8303d6 /internal/handlers/heuristic_test.go | |
| parent | cef79fc49fd8d6e607c71432755812adca847ce2 (diff) | |
Surface budget_status on GET /api/widget when tracked tasks exist
Wires ComputeBudgetPeriod together with availability blocks, tracked
project/label sets, calendar events, and native tasks into a new
computeBudgetStatus helper on *Handler. HandleWidgetGet now populates
WidgetResponse.BudgetStatus with today/week periods, but only when at
least one incomplete budget-tracked task exists in the rolling week
window -- otherwise the field is omitted entirely so unconfigured users
see no new UI. Errors are logged and swallowed, matching the existing
resilience pattern for this widget endpoint.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQaPGQVSfmKUiHXB87qRTC
Diffstat (limited to 'internal/handlers/heuristic_test.go')
0 files changed, 0 insertions, 0 deletions
