Files
AgentCompany/src/main
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-04 17:01:26 -04:00
2026-04-16 14:48:51 -04:00
2026-04-04 17:01:26 -04:00
2026-03-18 01:15:58 -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-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-04 12:03:50 -04:00
2026-04-04 12:03:50 -04:00
2026-04-04 12:03:50 -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-04 17:01:26 -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-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-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-05 20:14:48 -04:00
2026-04-04 12:03:50 -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-05 20:14:48 -04:00