Skip to content

Lead Console browser notifications with the item's state - #1507

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-1493
Oct 28, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-1493

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

A Console browser notification's body now starts with the newest Needs you item's state. A toast that macOS cuts short still shows what happened (Slow, Failed, Died, …), not just which issue it was about.

 new Notification(`${count} need you · ${host}`, {
-  body: `${subject} · ${issue-title} · ${state}`,
+  body: `${state} · ${subject} · ${issue-title}`,
 })

console/README.md now describes the order.

Seams under test: the browser Notification constructor, stubbed as the OS seam in console/tests/notifications.test.cjs. Fetch, SSE, storage and Web Locks stay real.

Evidence

  • Before: the test now asserts the exact body. Against the old code it failed:
    node --test --test-name-pattern 'ask on click' tests/notifications.test.cjs
    + actual   'acme/widgets#2 · Problem 2 · Failed'
    - expected 'Failed · acme/widgets#2 · Problem 2'
    # fail 1
    
    After: cd console && node --test tests/notifications.test.cjs gives # pass 14 / # fail 0.
  • npm test --prefix site: 51 pass, 0 fail.
  • Full Rust suite (cargo test --no-fail-fast, plus the integration files after security_run in a second run): every failure was a sandboxed test that needs something this machine lacks. They failed with sandbox failed to start: socat is not on PATH (sandbox::tests, scoring grading::sandboxed_*, model_graders, trial, bug_origins) or ModuleNotFoundError: No module named 'tomllib' (bug_origins::settlement, Python < 3.11). None of them reads the Console notification body. CI covers them.

Merge Danger

Door: two-way

The change only reorders a template string in an embedded browser asset.

Blast Radius: cosmetic

Only the text of Console browser notifications changes. Title, icon, click target, dedup across tabs and locking are unchanged.

Review coverage

Both axes read all 3 changed files: console/README.md, console/tests/notifications.test.cjs and src/console/assets/notifications.js. There were no generated-output exclusions.

Unaddressed findings

Standards

None. The one judgement call, README wording that said "its issue" when the subject is not always an issue, is fixed: the README now says "then what it is about and its title".

Spec

  • The gist ("change / action") is not in the notification body. The reviewer marked this advisory and offered no failing test. It is declined:
    • The issue's named failure was "I couldn't read 'Slow' in the few characters the macOS chrome gave". Slow is the row's .state, and it now leads the body (src/console/assets/notifications.js:60).
    • Every Needs you row has a state word (src/logs/reading/inbox.rs:41-75), so the body always opens with one.
    • The gist (dispatched Ticket run · 1 hr 52 min) carries an elapsed time. Putting it before the subject would push what the item is about out of the same truncated toast. That works against the issue's "before what it is about" ordering, rather than finishing it.

Security

None. The change only reorders three textContent strings from the same-origin Inbox page into the body of a browser Notification, which renders plain text. No new source, sink, network request, storage key or navigation target is added.

Closes #1493

Built with claude 2.1.312 · claude-opus-5-5 · high

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 4b0b35d into main Oct 28, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1493 branch October 28, 2026 01:55
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 28, 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.

for browser notifications, put status / change / action before what it is about

1 participant