Skip to content
This repository was archived by the owner on Oct 15, 2026. It is now read-only.

Unread messages and badges - #16

Merged
KevinJump merged 1 commit into
v17/mainfrom
feature/unread-messages
Oct 14, 2026
Merged

KevinJump merged 1 commit into
v17/mainfrom
feature/unread-messages

Conversation

@KevinJump

Copy link
Copy Markdown
Member

Unread counts for chat.

  • A BackChatReadState table records when each user last read each channel.
  • The hub sends your counts on connect and whenever a channel that counts for you gets a message. A MarkRead hub method clears a channel; every tab you have open stays in step.
  • The header chat button shows a badge. A document's Chat tab shows its own count, using the view hints Umbraco uses for validation counts (that answers the open question: v17 tabs can carry a badge).
  • Global always counts; a document chat counts once you've posted in it. Your own messages never count.
  • Badges show a number up to 9, then "9+".
  • Channel access moved out of the hub into ChannelAccessService, so everything that notifies about a channel checks it the same way.

Tested on a local v17 site with a second user driven by a script: live badge updates, clearing on open, staying cleared after reload, two tabs in step, uncounted document channels staying silent.

Closes #2

Part of the roadmap in #12. This is one of a stack of PRs, one per issue, each based on the one before it. Merge them in order; GitHub retargets the next one when its base branch is deleted.

🤖 Generated with Claude Code

Track when each user last read a channel and send them unread counts on
connect and as messages arrive. The header chat button shows a badge, and
a document's comms tab shows its count through Umbraco's view hints.
A document channel counts once you've posted in it.

Closes #2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KevinJump
KevinJump merged commit 5520d3d into v17/main Oct 14, 2026
5 checks passed
@KevinJump
KevinJump deleted the feature/unread-messages branch October 14, 2026 18:18
@KevinJump
KevinJump restored the feature/unread-messages branch October 14, 2026 18:18
@KevinJump
KevinJump deleted the feature/unread-messages branch October 14, 2026 18:19
@KevinJump KevinJump mentioned this pull request Oct 14, 2026
9 of 13 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unread messages and badges

1 participant