Skip to content

Chat reactions and @mentions (#96) - #105

Merged
Oceandek merged 1 commit into
mainfrom
feat/chat-reactions-mentions
Oct 29, 2026
Merged

Oceandek merged 1 commit into
mainfrom
feat/chat-reactions-mentions

Conversation

@Oceandek

Copy link
Copy Markdown
Collaborator

Closes #96 (spec #91).

What's new

  • Reactions: 👍 ❤️ 😂 😮 😢 🎉 on any message, through the smiley button under it. Each reaction shows its count; hovering it shows the names. Clicking a reaction you gave takes it back. You can give several different reactions. Other emoji get 422. Deleted messages and Archived chats can't get reactions (409). Deleting a message also removes its reactions.
  • @mentions: type @ in the send box to get suggestions: the chat people (Product Owner, Members, Guests) plus @team. Click one to insert @First Last . The backend reads mentions from the text when a message is sent or edited (case-insensitive, whole name). @team means every Member at that moment. Your own name is ignored.
    • A mentioned person sees the message with a red line on the left; @names and @team are bold in every message.
    • A red @ marker appears next to the Unread badge on the Chat / Chats item and in the Chats table, until the person has read past that message.
    • Staff who only read along (not Product Owner or Guest) can't be mentioned. No emails.
    • Editing a message changes who is mentioned; a deleted message mentions nobody.
  • Live: a reaction gives the message a new revision, so open chats show it with the next poll (replies are not renumbered, since their quote doesn't change).
  • Migration 0018 (chat_reactions with a check on the six emoji, chat_mentions); CONTEXT.md: Mention, Reaction; changelog row.

Also

  • Links in messages are underlined (they looked like plain text; .chat-text a in theme.py).
  • Checked visually with a preview of the chat page in headless Chrome (messages, quote, photo + file, reactions, mention highlight, deleted message, @ marker); the reaction buttons were made a bit larger after that.

API

PUT/DELETE /api/chat/messages/{id}/reactions/{emoji} return the message. Messages get reactions [{emoji, count, names, mine}] and mentions_me; GET /api/chats rows and GET /api/chats/unread get mentioned.

Tests

  • Backend 359 passed; new test_chat_reactions_mentions.py (counts with names, adding twice, taking back, only the six, outsiders, deleted messages, a mention and its marker until read, @team, staff who only read along, edits change mentions, deleted message).
  • Frontend 113 passed (one unrelated NiceGUI startup error in test_my_project that passed on rerun); new test_chat_reactions_mentions.py (bold mentions without breaking links, react and see others' reactions live, @ suggestions insert the name and mark the chat, a mentioned Teacher sees the @ marker and the highlight).

🤖 Generated with Claude Code

Six emoji reactions with counts and names; @ suggests the chat people and
@team, mentioned people see the message highlighted and a red @ marker until
read. Links in messages are underlined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Oceandek
Oceandek merged commit ce6963a into main Oct 29, 2026
2 checks passed
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.

Chat reactions and @mentions

1 participant