firestore: declare the alert_events composite index (#51) #121

Merged
logan merged 1 commits from fix/51-alert-events-index into main 2026-09-07 19:06:28 -04:00
Owner

Adds the alert_events (acknowledged ASC, org_id ASC, triggered_at DESC) COLLECTION-scope index to infra/firestore/firestore.indexes.json — the index the /watch Triggered Alerts tab and the site-wide useUnacknowledgedAlerts hook require (currently throwing on every page load).

Scope is COLLECTION not COLLECTION_GROUP (useAlerts.ts uses collection(); verified against the decoded console create_composite payload). Still needs a manual headless apply on the VM — no deploy automation exists (that is #51's core). Does not touch the pre-existing near-miss index or #33's dupes. Refs #51.

🤖 Generated with Claude Code

Adds the `alert_events (acknowledged ASC, org_id ASC, triggered_at DESC)` COLLECTION-scope index to `infra/firestore/firestore.indexes.json` — the index the `/watch` Triggered Alerts tab and the site-wide `useUnacknowledgedAlerts` hook require (currently throwing on every page load). Scope is `COLLECTION` not `COLLECTION_GROUP` (`useAlerts.ts` uses `collection()`; verified against the decoded console `create_composite` payload). Still needs a manual headless apply on the VM — no deploy automation exists (that is #51's core). Does not touch the pre-existing near-miss index or #33's dupes. Refs #51. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
logan added 1 commit 2026-09-07 19:03:14 -04:00
collectionGroup alert_events (acknowledged, org_id, triggered_at desc) — the index the /watch Triggered Alerts tab and the site-wide useUnacknowledgedAlerts hook require. Still needs a manual deploy; no automation exists (#51).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
logan merged commit 629bd1c340 into main 2026-09-07 19:06:28 -04:00
logan deleted branch fix/51-alert-events-index 2026-09-07 19:06:28 -04:00
Sign in to join this conversation.