Skip to content

feat(ui): the bell counts what is on screen, and the tab says so too - #38

Merged
fiddur merged 3 commits into
developfrom
notification-badge
Aug 27, 2026
Merged

feat(ui): the bell counts what is on screen, and the tab says so too#38
fiddur merged 3 commits into
developfrom
notification-badge

Conversation

@fiddur

Copy link
Copy Markdown
Collaborator

Both tweaks.

The count was one list short

The bell was fed unseenAlerts — what a note leaves behind after its ten seconds run out. So an answer was invisible to the bell while its bubble was on screen, and then the number rose at the moment nothing had actually happened. Both lists reach it now, deduplicated by thread, so it means "answers waiting" rather than "notes that have timed out".

The tab now says so

A red mark on the favicon while anything is unread. That is the case that matters most: a reader in another window cannot see the bell at all, which is also the case #37 is about.

Built as SVG text rather than drawn on a canvas, because the icon already is an SVG — the mark inherits its scaling, and its ring can use the same prefers-color-scheme rule the icon already uses, so it stays legible on a light tab strip and a dark one. The icon is fetched once and kept, and if it cannot be read the tab is simply left alone.

Checked the geometry rather than eyeballing it: the badged icon parses as XML, and the ring spans x 200–400, y 10–210 in a 411×395 canvas, so nothing clips. My first coordinates put the ring 5 units past the right edge.

Verified

parser 43, git 44, github 21, ui 414, cli 190. Typecheck 0.

One honest gap: the one-line prop wiring in diff-page.tsx has no test, because DiffPage is rendered by no test in the repo — it is the hub, with router and loader dependencies. The behaviour is pinned (a note moving from shown to expired leaves the count unchanged) via unreadAlerts and the bell; only the literal pass-through is not. Same structural gap I noted on #35.

🤖 Generated with Claude Code

https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs

fiddurand others added 3 commits August 27, 2026 10:06
The count was fed only the list a note leaves behind when its time runs
out, so an answer was invisible to the bell for the ten seconds it was
being shown, and then the number rose at the moment nothing had happened.
Both lists reach the bell now, deduplicated, so it means "answers
waiting" rather than "notes that have timed out".
And the tab carries a mark while anything is unread, the way a chat app
marks one you are not looking at — which is the case that matters, since
a reader in another window cannot see the bell at all.
Built as SVG text rather than drawn on a canvas: the icon already is an
SVG, so the mark inherits its scaling and its ring can follow the same
colour-scheme rules, which is what keeps it legible on a light tab strip
and a dark one.
v0.9.16.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
Both open branches bumped from develop at 0.9.13, so this one took
0.9.14 while #37 took 0.9.15 — and whichever merged second would have
sent the version backwards. The message on the previous commit named
0.9.16 on that assumption; this makes it true.
The rule in AGENTS.md says to bump inside the pull request, which cannot
be right for two branches at once. Worth a line there about the second
one to merge needing a re-bump.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
Only the version numbers conflicted, which is the collision this branch
already carries a note about: both branches bumped from 0.9.13. Resolved
to 0.9.16, above the 0.9.15 develop now holds.
The code merged clean. `diff-page.tsx` took both hooks without help.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
@fiddur
fiddur marked this pull request as ready for review August 27, 2026 08:26
@fiddur
fiddur merged commit 3bb1943 into developAug 27, 2026
@fiddur
fiddur deleted the notification-badge branch August 27, 2026 08:26
Sign up for freeto 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

@fiddur