fix(scheduler): treat /api/email/unread-state as passive UI poll (#6009)

Background scheduled agent runs were aborted as "Stopped by user" when
the web UI was merely open, because the idle /api/email/unread-state
poll was counted as foreground activity while its sibling
/api/email/urgency-state was already excluded.

Fixes #5981

Co-authored-by: michaelxer <michaelxer@users.noreply.github.com>
This commit is contained in:
Michael
2026-08-14 10:22:27 +01:00
committed by GitHub
co-authored by michaelxer
parent c4369305f0
commit a6bc86e331
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -65,6 +65,8 @@ _PASSIVE_EXACT_PATHS = {
"/api/tasks/notifications",
"/api/research/active",
"/api/email/urgency-state",
# UI idle poll sibling of urgency-state; must not pre-empt background tasks.
"/api/email/unread-state",
}
_PASSIVE_PREFIXES = (