Add the Recent updates sheet behind the Home bell (Feature 21)
GET /api/v1/updates lists the last 10 distinct notification events from
the outbox, newest first and one per event key whatever its channels.
POST /api/v1/updates/seen {"through": created_at} moves
household_settings.updates_seen_at forward, so /api/v1/home's
recentUpdates.unread is true only for an event stored since. The Home
bell opens a Sheet listing the updates with relative times; a row opens
its URL, and opening the sheet marks the updates seen, clearing the
grape dot optimistically and putting it back if the mark fails.
Maestro task 96e2dc3f-1f8a-4114-bcb5-e0f93c349165.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,3 +154,11 @@ RETURNING *;
|
||||
UPDATE chat_settings
|
||||
SET last_test_at = ?, last_test_status = ?, updated_at = ?
|
||||
WHERE id = 1 AND webhook_url_ct = ?;
|
||||
|
||||
-- name: MarkUpdatesSeen :execrows
|
||||
-- Moves updates_seen_at forward to seen_at; affects no row when it is
|
||||
-- already at or after seen_at, so it never moves back. It is not a settings
|
||||
-- edit: updated_by and updated_at are left as they are.
|
||||
UPDATE household_settings
|
||||
SET updates_seen_at = CAST(sqlc.arg(seen_at) AS TEXT)
|
||||
WHERE id = 1 AND (updates_seen_at IS NULL OR updates_seen_at < CAST(sqlc.arg(seen_at) AS TEXT));
|
||||
|
||||
Reference in New Issue
Block a user