Repository navigation
Show live spike notifications without refresh - #170
Conversation
Outcome-spike notifications can arrive while the sidebar remains mounted, so the notification bell now polls the unread count with lifecycle-safe teardown and keeps large inboxes usable with a bounded scroll region. The browser journey proves the production-facing chain from API-key evaluation through alert cases and acknowledgement. Constraint: Alert delivery remains asynchronous and the sidebar can stay mounted across the entire response window Rejected: Add WebSocket or server-sent events | unnecessary backend protocol expansion for a lightweight unread-count signal Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep unread refresh lifecycle-bound and prevent overlapping requests Tested: uv run poe check; uv run mkdocs build --strict; npm run build; targeted Playwright 10 repeats twice on the same database plus final single pass Not-tested: Production-scale polling load beyond one browser session
Two independently merged migrations both descended from the alert-case revision, leaving fresh databases unable to use the repository's canonical upgrade target. A no-op merge revision records that both branches are required without changing schema state. Constraint: CI and documented installation flows use alembic upgrade head Rejected: Change workflows to upgrade heads | would hide divergent migration history and requires protected CI edits Confidence: high Scope-risk: narrow Reversibility: clean Directive: New migrations must descend from 20260720_0040 unless another explicit branch is intentional Tested: fresh PostgreSQL database upgraded from base to 20260720_0040 with alembic upgrade head; uv run poe check; uv run mkdocs build --strict Not-tested: downgrade traversal through both pre-merge branches
The full browser suite retains seeded active rules, so the alert journey must submit a complete low-risk transaction rather than a marker-only payload. This keeps the test on the real multi-rule evaluation path without mutating global rule state. Constraint: Full Playwright CI evaluates against seeded active demo rules. Rejected: Archive or reorder unrelated rules | would mutate shared suite state and weaken the production-path signal. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep live evaluation fixtures compatible with the seeded rule catalog. Tested: Targeted Chromium run repeated 10 times, then repeated 10 times again without database reset; uv run poe check. Not-tested: Full Playwright suite locally; GitHub Actions is the source of truth.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fdc6d7a6d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Unread polling now reloads the notification list when its count changes while the menu is open. The live traffic journey opens the inbox before generating a spike, proving the new incident appears without closing or reopening the menu. Constraint: Polling must remain bounded and avoid a second always-on notification request. Rejected: Poll the full notification list continuously | adds unnecessary payload and request load while the menu is closed. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep badge and open-menu state synchronized when notification polling changes. Tested: Seeded targeted Chromium run repeated 10 times, then repeated 10 times without database reset; npm build; uv run poe check; mkdocs strict build. Not-tested: Production-scale concurrent browser polling load.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11b9b7a385
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Notification list loads now carry a monotonic sequence so only the latest request can update menu state. The browser journey deterministically delivers a captured pre-spike response after the refreshed response and proves the incident remains visible. Constraint: Opening the menu and unread-count polling may issue concurrent list requests. Rejected: Serialize every list request | a slow obsolete request would delay fresh incident visibility. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Any future notification-list loader must preserve latest-response-wins semantics. Tested: Deterministic stale-response Chromium journey repeated 10 times, then repeated 10 times without database reset; npm build; uv run poe check. Not-tested: Artificial high-latency behavior outside the notification list endpoint.
Summary
alembic upgrade headVerification
uv run poe checkuv run mkdocs build --strictnpm run buildnpx playwright test e2e/tests/alert-live-traffic.spec.ts --project=chromium --workers=1 --repeat-each=10 --timeout=60000— 10/10 passeduv run alembic headsreports only20260720_0040;uv run alembic upgrade headcompletes to the mergepointKnown gaps
Documentation and assets
docs/whatsnew.mdupdated