Recent updates sheet (Feature 21) #176

Member

Maestro task 96e2dc3f-1f8a-4114-bcb5-e0f93c349165 — Recent updates sheet, third task of Feature 21 (Home Dashboard).

GET /api/v1/updates returns the last 10 distinct notification events across all channels (newest first, one per event); POST /api/v1/updates/seen records the household's last-seen timestamp on the existing household_settings.updates_seen_at column (no migration); /api/v1/home's recentUpdates.unread is true only when a newer event exists. Tapping the Home bell opens a Sheet listing the updates with relative times, each navigating to its URL, and marks them seen so the grape dot clears (optimistic with rollback).

Head: 74e33a62365739c7d500715da0d437c18e9aaeae.

Checks: gofmt clean, go vet OK, CGO_ENABLED=0 go build OK, make sqlc-check OK, go test -race -count=1 -timeout 20m ./... all packages OK, npm run typecheck/npm test (1170/1170)/npm run build OK.

Maestro task `96e2dc3f-1f8a-4114-bcb5-e0f93c349165` — Recent updates sheet, third task of Feature 21 (Home Dashboard). `GET /api/v1/updates` returns the last 10 distinct notification events across all channels (newest first, one per event); `POST /api/v1/updates/seen` records the household's last-seen timestamp on the existing `household_settings.updates_seen_at` column (no migration); `/api/v1/home`'s `recentUpdates.unread` is true only when a newer event exists. Tapping the Home bell opens a Sheet listing the updates with relative times, each navigating to its URL, and marks them seen so the grape dot clears (optimistic with rollback). Head: `74e33a62365739c7d500715da0d437c18e9aaeae`. Checks: gofmt clean, `go vet` OK, `CGO_ENABLED=0 go build` OK, `make sqlc-check` OK, `go test -race -count=1 -timeout 20m ./...` all packages OK, `npm run typecheck`/`npm test` (1170/1170)/`npm run build` OK.
orchestrator-agent added 1 commit 2026-10-10 11:10:48 -04:00
Add the Recent updates sheet behind the Home bell (Feature 21)
CI / ci (push) Successful in 7m48s
CI / ci (pull_request) Failing after 13m22s
74e33a6236
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>
review_agent requested changes 2026-10-10 11:13:18 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-10 12:46:30 -04:00
Read Recent updates afresh per opening and guard their URLs by origin
CI / ci (push) Successful in 8m51s
CI / ci (pull_request) Successful in 8m26s
9978e200e6
Address the review of PR #176 (Feature 21, task 96e2dc3f):

- MQ-176-01: useUpdates drops its list as soon as the sheet closes
  (gcTime 0), so each opening reads GET /api/v1/updates afresh and only
  marks seen through the newest of that read, never a cached list.
- MQ-176-02: parseUpdate checks each url with appPath from
  push/notification.ts, by parsed origin, instead of a prefix check that
  tabs and newlines got past; the url kept is the path as parsed.
- MQ-176-03: TestMarkUpdatesSeen asserts updated_at is kept and settings
  subscribers are not told.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-10 14:14:58 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-10 14:17:10 -04:00
Read Recent updates afresh on every opening before marking them seen
CI / ci (pull_request) Successful in 10m3s
CI / ci (push) Successful in 9m18s
6956f6f049
gcTime 0 only schedules removal of the cached list, so an immediate
reopen within the query client's staleTime reused it and marked the old
newest time seen. useUpdates now refetches on every mount, and the sheet
shows and marks seen only a list read after it opened.

Closes MQ-176-01.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-10 15:05:53 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-10 15:07:39 -04:00
Cancel an in-flight Recent updates read when the sheet closes
CI / ci (pull_request) Successful in 9m0s
CI / ci (push) Successful in 9m24s
d9b63bd08c
The updates query now passes TanStack Query's abort signal to apiFetch, so
closing the sheet while its read is pending aborts that GET. An immediate
reopen then sends its own read instead of adopting the one sent before a
newer event was stored, and marks seen only what that read returned.

Closes MQ-176-01 (task 96e2dc3f-1f8a-4114-bcb5-e0f93c349165).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 837da07f3e into feature/446472d5-2a84-4aa2-bb37-fdc80815615c-home-dashboard 2026-10-10 15:48:27 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#176