Skip to content

feat: dock badge + attention sound, JetBrains editors with line:col, Mermaid diagrams, em-dash-free UI copy (#1506 H4) - #1511

Merged
currentbits merged 9 commits into
mainfrom
coder/1506-h4-notifications-editors-mermaid-co-4ac375
Oct 6, 2026
Merged

currentbits merged 9 commits into
mainfrom
coder/1506-h4-notifications-editors-mermaid-co-4ac375

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Item H4 of #1506.

What changed

  1. Badge: the dock badge (macOS) and launcher badge (Linux) count threads that need you: a permission, plan or question card, or a failed or unread-done thread. Muted, snoozed, archived and trashed threads don't count. Refreshed every 2 s, because opening a thread clears unread without an event.
    • Sound: a new "Play a sound when a thread needs you" option, off by default, plays the system alert only when no notification is shown (window focused). Desktop notifications keep their system default sound, unchanged.
    • Windows: no taskbar badge (it would need an overlay icon).
  2. Editors: IntelliJ IDEA, WebStorm, PyCharm, GoLand, RubyMine, Rider, CLion, PhpStorm, RustRover and Fleet, detected by app bundle (including CE/Community) or CLI launcher.
    • Line and column: path:line:col opening for the VS Code family, JetBrains and Zed. On mac this goes through the in-bundle launcher, because open -a drops the line. Line and column must be positive integers, and arguments are never a shell string.
    • Behaviour change: transcript path links now open in the last-picked editor at the linked line, falling back to the default app.
  3. Mermaid: mermaid fences render as diagrams.
    • Lazy-loaded: mermaid 12.1.0 lives in its own ~687 KB chunk.
    • Locked down three ways: securityLevel: "strict", htmlLabels: false, and DOMPurify 3.4.16 on the SVG.
    • Theme: follows the app, with a live light/dark switch.
    • Fallbacks: a parse error leaves the code block, and a fence that's still streaming stays code until it closes.
  4. Copy: every user-visible em-dash in src/ is rewritten ("Show N earlier messages", the Edit Project retention help, and so on). Empty-cell "–" markers are kept.

New dependencies: mermaid@12.1.0, dompurify@3.4.16.

Verified independently, on main merged with this branch:

  • typecheck exits 0 and vite build passes. The main chunk is 1,013 kB (+679 B; the mermaid chunk is separate).
  • test:renderer passes 2817 of 2817.
  • test:electron passes 4244 of 4244.

Lands after #1507, #1508 and #1509: it overlaps them in settings and the composer, so it needs a main merge once they're in.

🤖 Generated with Claude Code

Willem and others added 7 commits October 6, 2026 16:52
Adds IntelliJ IDEA, WebStorm, PyCharm, GoLand, RubyMine, Rider, CLion,
PhpStorm, RustRover and Fleet to the editor allowlist, detected by app
bundle on macOS and CLI launcher elsewhere. openIn takes an optional
line/column and passes it in each editor's own syntax (--goto for the
VS Code family, --line/--column for JetBrains, path:line:col for Zed).
Path links in the transcript now open in the editor picked in Thread
details, at the linked line, and fall back to the default app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrites each user-visible string in src/ (labels, notes, tooltips,
toasts) without the dash: Show earlier reads "Show N earlier messages",
the worktree cap help splits into two sentences, and the rest use a
colon, period or parentheses. Missing-value placeholders and comments
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dock (macOS) and launcher (Linux) badge counts threads waiting on the
user: a permission, plan or question card, or a failed / finished thread
that is still unread. Muted, snoozed, archived and trashed threads never
count. It polls the store every 2s because opening a thread clears its
unread without a broadcast.

Settings > General gains "Play a sound when a thread needs you", off by
default. The sound rides on the desktop notification so Focus / Do Not
Disturb silences it; with no notification (window focused or
notifications off) it plays the system alert instead. Notifications are
silent unless the sound is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
```mermaid blocks in markdown draw as SVG diagrams. The diagram
component, mermaid and DOMPurify are one lazy chunk; the main chunk only
gains the switch (+449 B). securityLevel strict, htmlLabels off, and the
SVG goes through DOMPurify's SVG profile. Themed from the app tokens and
re-rendered on a light/dark switch. A parse error, a failed render or a
fence still in the growing tail of a streaming reply shows the code
block; header and Copy stay either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The em-dash pass reworded it; the CI badge, itinerary and tests use the
hyphenated label, so keep it and only swap the dash for a colon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1506)

Wrapping only the live chunk in the context provider changed the tree
shape on settle, so React remounted every code block in it and re-ran
the async highlight (a plain-text flash, and an act() warning under
load). Always render the provider and vary its value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…focused-window alert (#1506)

Review fix: the attention-sound setting made desktop notifications silent
unless it was on, a silent regression for every existing user. Notifications
are built without `silent` again, as before. "Play a sound when a thread
needs you" now only plays the system alert when the window is focused, the
case where no notification is shown. notificationOptions and
shouldPlayAlert in notify.js pin both rules in tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T15:32:27.139220Z 1032203 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1032203c6b

ℹ️ 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".

Comment thread electron/notify.js
return false;
}
if (isEffectivelySnoozed(thread, now)) return false;
if (thread.awaitingInput || thread.pendingQuestion) return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore stale awaiting-input flags after a run stops

When the app quits or crashes while a live permission prompt is open, runner.stopAll and recoverInterruptedRuns change the thread to idle or failed without clearing awaitingInput. This unconditional check therefore keeps counting the now-unanswerable prompt forever, even after the user visits the thread, and it also prevents snoozing because isEffectivelySnoozed treats awaitingInput as a raised hand. Gate this flag on status === "working" while continuing to count persisted question and plan cards separately.

Useful? React with 👍 / 👎.

Willem added 2 commits October 6, 2026 17:32
# Conflicts:
#	src/components/EditProjectModal.tsx
#	src/components/WorktreeControl.tsx
@currentbits

Copy link
Copy Markdown
Owner Author

Merged main into this branch (now includes #1507/#1508/#1509/#1510). Resolved two conflicts:

Verified on the merged tree:

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.

1 participant