feature: chat message reactions - #624
Merged
Merged
Conversation
This was referenced Sep 29, 2026
lukepolo
force-pushed
the
feature/chat-self-edit
branch
from
September 29, 2026 01:17
85b4715 to
ea4fce8
Compare
Anyone who can post in a room can react to any line in it, website or game, with one of six reactions: 👍 ❤️ 😂 🔥 😮 😢. Reactions show as pills under the message with a count, in the api's fixed order, and the ones you hold are picked out in amber. Clicking a pill toggles it, and hovering it names who reacted from what this browser already knows (the room's participants and whoever has spoken), counting the rest. The message menu gains Add Reaction above Edit, which opens a picker of all six hung off the trigger. The menu, the picker and the confirm all hold the right hub open. A gagged player in a group room can only take back what they hold: the picker disables the rest and says why. The socket sends lobby:react through the chat request plumbing and listens for the room's `reaction` event, whose whole-state payload replaces the message's reactions and never creates or revives one. A history snapshot keeps reactions that changed live after the room was joined, since the api sends no version to compare. Refusals toast through chatErrors, with copy for rate_limited and gagged.
Picking Add Reaction now holds the right hub from the pick itself: the menu's exit animation outlasts the hub's hover-close delay, so a hover-peeking hub used to collapse before the picker opened. Closing the picker by clicking elsewhere no longer pulls focus back to the trigger, since reka emits its close focus event twice. The picker is labelled for screen readers. A double click no longer adds a reaction and takes it straight back: the picker ignores a pick once it is closing, and a toggle already on its way for the same message and reaction isn't sent again. A reaction the server never answered says it may still go through. A gagged player's row keeps the trigger's room when their last reaction goes, so it doesn't rewrap, and a held pill that can't be toggled no longer looks clickable.
The picker's dialog is named "React" for screen readers; the test fails with the aria-label reverted to the inner grid.
lukepolo
force-pushed
the
feature/chat-reactions
branch
from
September 29, 2026 01:22
d8b5002 to
6978a59
Compare
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.
Players can react to any chat message with one of six reactions, and click a reaction again to take it back.
Socket.reactshares the request plumbing, won't resend a toggle that's still in flight, and applies the room's:reactionbroadcast; live reactions survive a stale snapshot.Merge/deploy: pairs with 5stackgg/api#445; stacked on #622, merge that first.
Tests: the hub collapsing between pick and picker, a double click toggling twice (picker and socket), focus stolen after a click outside, the timeout copy, a gagged row rewrapping, a held pill's hover and the picker's missing label each fail with their fix reverted. Based on DEAFCS 662b049bd, 76e53ec92, 32d7ae9e9, 4d923158d