Skip to content

Add browser notifications for new Needs you items - #1091

Merged
JacobStephens2 merged 5 commits into
mainfrom
issue-958
Oct 22, 2026
Merged

JacobStephens2 merged 5 commits into
mainfrom
issue-958

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

An open Console tab can now notify this browser when Needs you rises.

Header control → browser permission + remembered choice
/events (one stream per tab) → fetch Inbox under a shared Web Lock
  first sample / same count / fall / off → no notification
  new rise → one notification across tabs
Notification click → focus tab → Inbox

Includes the count, machine and newest arriving item. Account and Console log
tabs participate too. Same-origin scripts and the Content-Security-Policy stay
unchanged; no service worker or push subscription is introduced.
The page and notifications share the stream so three open tabs keep refreshing
on HTTP/1.1 connections too.
Each subscriber refreshes independently, so a slow notification fetch cannot
freeze the Inbox.

Closes #958

Evidence

  • Before: the notification control was absent. Both Spec findings were reproduced using their exact commands: a delayed tab repeated a notification (3 !== 2), and a stalled notification fetch froze Inbox refreshes after notifications were turned off. A three-tab test also exposed duplicate streams blocking HTTP/1.1 refreshes.
    After: 14 notification browser tests pass, including three-tab updates, independent subscriber refreshes, tab races, permission/support failures, reload/off persistence, click-to-Inbox, newest-item ordering, reconnects and restored pages.
  • npm test --prefix console: 66 passed, 1 skipped. Includes unchanged CSP and no-inline-script checks.
  • cargo build --locked and cargo fmt --check: passed.
  • /usr/bin/time -p scripts/affected-tests main: 2,352 Rust tests passed, 56 skipped; 24m29s wall time including 2m42s compilation (cargo nextest run). The final browser-only stream change subsequently passed the complete Console browser suite above.

Test seams

  • Console pages and live Command-record updates, exercised through Playwright with the browser Notification/OS interface stubbed.
  • Console HTTP responses and embedded assets, including the existing Content-Security-Policy contract.

Review

  • Fixed point: main (641f0f54fb24759ebefea5f38ac54ca7fc4dd605).
  • Standards: one naming heuristic addressed by renaming the shared suppression state to handled.
  • Spec: two P2 findings reproduced with their exact commands, fixed, and covered by retained regressions.
  • A fresh Standards/Spec review covered the final shared-stream implementation. Both reviewers read all 11 changed files. Unread changed files: none. Generated-output exclusions: none.

Unaddressed findings

Standards

None.

Spec

None.

Security review outcome

  • Security review incomplete: session failed, ended early or omitted a valid final line; see Session log

Merge Danger

Door: two-way

Revert the browser feature and its templates to remove it; no server-side data migration.

Blast Radius: Console

Browser-local opt-in notifications and the shared Console headers/row metadata.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 829a86f into main Oct 22, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-958 branch October 22, 2026 19:55
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make browser notification option on thirdshift console web ui

1 participant