[2.x] feat(realtime): ambient typing dots on the index sidebar tag list - #4756
Merged
Conversation
Extend the discussion-list ambient typing indicator to the tag list: a tag lights up while someone is typing in a discussion carrying it, or composing a new discussion in it. Backend (IndexTypingPresence): - The index-typing broadcast now carries the tag IDs a typing discussion belongs to, scoped per channel so a restricted tag is never disclosed to an audience that can't see it (public channel → guest-visible tags; each restricted-tag channel → only its own tag). - touchTags(): new-discussion compose typing. There's no discussion id yet, so the client sends the selected tag IDs on its own private-user channel; the user id comes from the (authorised) channel name and every claimed tag is re-authorised against that actor before broadcasting — a client can't light up a restricted tag it can't see. - While typing continues, the rising edge is re-broadcast every REFRESH_MS so the dot doesn't self-clear mid-typing (the frontend TTL would otherwise expire between coalesced bursts). Falling edge on TTL expiry as before. Frontend: - IndexTagTypingState: tag-keyed presence, keyed per source (discussion id or per-user compose key) so concurrent typers in one tag don't clear each other's dot. - TagLinkButton renders the dot via its linkItems ItemList (the seam added in the prior tags refactor). - The restricted-tag channel subscriptions now come from a server-computed forum attribute (index-typing-tags) listing the restricted tags the actor can see, replacing the per-visible-tag subscribe loop — one auth round-trip per visible restricted tag instead of one per tag. Reuses the existing index-typing channels, subscriptions and dot styling; no new admin settings (the existing public/restricted toggles gate it).
imorland
marked this pull request as ready for review
June 17, 2026 23:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the discussion-list ambient typing indicator (#4731) to the index sidebar tag list: a tag lights up with a presence-only dot while someone is typing in a discussion carrying it — including someone composing a new discussion in it.
Builds on #4755 (merged), which added the
linkItemsextension seam toTagLinkButton.Backend (
IndexTypingPresence)index-typingbroadcast now carries the tag IDs a typing discussion belongs to, scoped per channel so a restricted tag is never disclosed to an audience that can't see it: the public channel carries a guest-visible discussion's tags; each restricted-tag channel carries only its own tag.touchTags()— new-discussion compose typing. There's no discussion id yet, so the client sends its selected tag IDs on its ownprivate-user={id}channel. The user id is taken from the (already-authorised) channel name — never the payload — and every claimed tag is re-authorised against that actor before broadcasting, so a client can't light up (and thus disclose activity in) a restricted tag it can't see.REFRESH_MSso the dot doesn't self-clear mid-typing (the frontend TTL would otherwise lapse between coalesced bursts). Falling edge on TTL expiry, as before.Frontend
IndexTagTypingState— tag-keyed presence, keyed per source (discussion id, or a per-user compose key) so concurrent typers in one tag don't clear each other's dot.TagLinkButtonrenders the dot via itslinkItemsItemList (the [2.x] refactor(tags): convert TagLinkButton to TSX with an extensible linkItems list #4755 seam).index-typing-tags) listing the restricted tags the actor can see, replacing the per-visible-tag subscribe loop — this drops the websocket-auth requests on page load from one-per-tag to one-per-visible-restricted-tag.Reuses the existing index-typing channels, subscriptions and dot styling. No new admin settings — the existing public / restricted index-typing toggles gate it.
Testing
yarn check-typings,yarn build(realtime): clean.index-typing-tagsforum attribute per actor, and the rising-edge refresh/coalesce timing.