Add GET /api/v1/home for the Home dashboard
CI / ci (push) Successful in 8m28s
CI / ci (pull_request) Successful in 8m20s

home.Service aggregates the Home screen from the services that own each
value, at "now" in the household's zone: the date label, tonight's dinner
from the current week's plan (null with no plan), the pending Side quest
count from the deck, the Supply run status of the upcoming week or else
the current one, and recentUpdates.unread.

unread is whether a notification was stored in notification_outbox after
household_settings.updates_seen_at (or at all while it is null), read
through the new notify.StoredSince over the HasNotificationSince query.
Nothing writes updates_seen_at yet; the updates task adds that.

Tests under America/Chicago show tonight's dinner flips at local
midnight, not UTC midnight, and cover no plan, no suggestions, the
Supply run choice and unread.

Maestro task 9ccfc3a6-cc7b-493a-aa4b-2b455d26f4df.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 20:19:33 -04:00
co-authored by Claude Opus 5.5
parent 4dcfc3c27d
commit cdbec3f3a2
27 changed files with 849 additions and 31 deletions
+8
View File
@@ -66,3 +66,11 @@ SELECT * FROM notification_prefs;
UPDATE notification_prefs
SET push = ?, chat = ?, updated_at = ?
WHERE event = ?;
-- name: HasNotificationSince :one
-- Reports whether a notification was stored after since, or at all when
-- since is NULL.
SELECT EXISTS (
SELECT 1 FROM notification_outbox
WHERE CAST(sqlc.narg(since) AS TEXT) IS NULL OR created_at > CAST(sqlc.narg(since) AS TEXT)
) AS found;