Commit Graph
2 Commits
Author SHA1 Message Date
canvas-bot f97f5d2788 qa(idle-poll): assert zero background reqs in a 55s idle window
build-and-publish / test (pull_request) Has been cancelled
build-and-publish / image (pull_request) Has been cancelled
Previous audit allowed up to 5 requests in a 30s window — generous,
hid real regressions. Tighten:

- 5s settle after each scene becomes interactive (covers the burst
  of mount-time fetches every scene legitimately fires)
- 55s observation window after settle, sized to fit between two
  consecutive 60s topbar badge polls
- MAX_REQ_PER_WINDOW = 0; any /api/* or /internal/* request during
  the window fails the assertion

This is the operator-experience contract: when you stop typing,
canvas stops fetching.
2026-06-15 04:24:51 +04:00
shad 70ed7e9aa4 fix(topbar): idle-quiet badge poll (count threads, not per-thread reads)
build-and-publish / test (push) Has been cancelled
build-and-publish / image (push) Has been cancelled
Idle-poll audit caught a regression I introduced in the prior commit:
the topbar badge poll iterated chatApi.listMessages per thread on each
60s tick, firing N requests per refresh. Landing scene showed 9 reqs
in a 30s idle window (failed the <=5 budget).

Now the topbar badge just shows the THREAD COUNT (not per-thread
unread), which is a single chatApi.listThreads call. Per-thread unread
math stays in the Chat scene where it belongs (already wired:
chat-thread-row.unread + .chat-unread-summary).
2026-06-14 18:16:24 +04:00