Background-tab notifications for pending user interactions and finished replies #5411
StephenZhang-hash
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Background-tab notifications for pending user interactions and finished replies
The problem
When the reader switches to another tab, the Web GUI has no way to pull them back. An
ask_user_questionprompt or an approval request just waits silently — no system notification, no title change, no badge — and a finished reply sits just as unread — so the session stalls until the reader happens to look back. Today the shell has no Notification API usage and no visibility tracking at all, so this stall is structural, not incidental.The proposal
A small client plugin that watches the page visibility state and, while the tab is hidden, raises one system notification plus a once-per-second tab-title flash for:
Returning to the tab settles everything at once.
Key behaviors:
MutationObserver, so the layout's session-title projection always wins back the restored base title.A General-settings switch (Settings → General → Background notifications) governs the behavior and persists through the Host user-settings document (
notify.enabled, default on).Reference implementation
I built this as a standalone client plugin package following the repo's conventions — one attention channel, all side effects behind a single injectable seam, and no cross-plugin mutable state beyond its settings namespace.
StephenZhang-hash:feature/web-background-notificationsmaster: view diffContents:
packages/client/notify(node + browser halves, locales, settings row), bilingual READMEs, an implemented Agent Note, bundle/tsconfig registrations, regenerated slot catalog, and 53 tests at 100% per-file coverage.pnpm run test:guiis green.Happy to reshape this to fit the team's preferred seam if the visibility-watching responsibility belongs somewhere else in the shell.
All reactions