ZacharyZhang-NY
94a9e457ce
perf(database): replace listSnapshot+JS filter with scoped SQL in getInbox
...
Replace 17-table snapshot fetch + 6 JS filter passes with 5 scoped
SELECTs targeting only inbox-relevant rows:
- approvals where state = 'pending'
- runs where status in ('failed', 'timed_out') and created_at > 24h
- agents where budget breach > 80%
- tasks where status in ('blocked', 'in_review')
- agent_messages with __board__ read-receipt left join filtered to
company/incident channel or urgent priority
Agent name lookup is a single id->name map built from one scoped agents
read. Return shape unchanged.
2026-04-16 22:21:30 -04:00
..
2026-04-16 21:57:35 -04:00
2026-04-16 21:36:41 -04:00
2026-04-04 17:01:26 -04:00
2026-04-16 21:36:22 -04:00
2026-04-16 22:21:30 -04:00
2026-04-16 22:19:42 -04:00
2026-04-16 14:48:51 -04:00
2026-04-16 21:58:32 -04:00
2026-04-04 17:01:26 -04:00
2026-04-16 22:04:37 -04:00
2026-03-18 01:15:58 -04:00
2026-04-16 21:37:16 -04:00
2026-04-04 12:03:50 -04:00
2026-03-23 23:31:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-16 21:47:09 -04:00
2026-04-04 17:01:26 -04:00
2026-04-04 17:01:26 -04:00
2026-04-04 17:01:26 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-05 23:47:56 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-16 22:19:42 -04:00
2026-04-04 12:03:50 -04:00
2026-03-23 12:13:11 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-16 21:42:29 -04:00
2026-04-16 14:48:51 -04:00
2026-04-05 20:14:48 -04:00
2026-04-05 20:14:48 -04:00
2026-03-29 14:08:15 -04:00
2026-03-18 01:15:58 -04:00
2026-04-04 12:03:50 -04:00
2026-03-18 01:15:58 -04:00
2026-04-04 17:01:26 -04:00
2026-04-05 20:14:48 -04:00
2026-03-18 01:15:58 -04:00
2026-04-16 14:48:51 -04:00
2026-04-16 14:48:51 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-16 21:49:53 -04:00
2026-04-04 17:01:26 -04:00
2026-03-26 20:57:52 -04:00
2026-04-16 21:48:47 -04:00
2026-03-18 01:15:58 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-03-22 16:37:07 -04:00
2026-04-16 21:37:58 -04:00
2026-03-18 01:15:58 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 17:01:26 -04:00
2026-03-22 16:30:49 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-16 21:47:09 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 12:03:50 -04:00
2026-04-16 21:58:32 -04:00
2026-03-29 14:08:15 -04:00
2026-04-04 12:03:50 -04:00
2026-04-05 20:14:48 -04:00
2026-04-05 20:14:48 -04:00
2026-04-04 17:01:26 -04:00
2026-04-05 20:14:48 -04:00
2026-04-16 21:36:29 -04:00
2026-04-05 20:14:48 -04:00
2026-04-16 21:48:10 -04:00