Skip to content

Add message grouping for consecutive same-author messages#11

Merged
emilhauk merged 2 commits intomasterfrom
message-grouping
Mar 22, 2026
Merged

Add message grouping for consecutive same-author messages#11
emilhauk merged 2 commits intomasterfrom
message-grouping

Conversation

@emilhauk
Copy link
Copy Markdown
Owner

Summary

  • Consecutive messages from the same author within 5 minutes are visually grouped — avatar/name/time shown only on the first message
  • Pure client-side approach: JS scans DOM and toggles message--continuation CSS class
  • Handles all mutation paths: SSE insert, delete (regroups next sibling), edit, history prepend, and catch-up reconnect

Test plan

  • 5 new E2E browser tests: consecutive grouping, time gap break, author change break, SSE insert, delete regroup
  • All existing tests pass (make test)
  • Manual: send 3 messages quickly → only first shows avatar/name
  • Manual: delete middle message in a group → next message regrouped correctly
  • Manual: scroll up to load history → grouping applied across boundary

🤖 Generated with Claude Code

emilhauk and others added 2 commits March 19, 2026 23:42
Collapse avatar/name/time for consecutive messages from the same author
within a 5-minute window, matching Slack/Discord convention. Pure
client-side: JS scans DOM and toggles a CSS class. Handles SSE insert,
delete, edit, history prepend, and catch-up reconnect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace always-visible touch controls with a bottom sheet triggered by
tapping a message on mobile. The sheet shows a cloned message preview
(avatar, author, text) and contextual actions (react, copy, edit, delete).
Edit/delete are owner-only, verified via computed display in E2E tests.

The emoji picker opens inline within the sheet rather than as a separate
overlay. A MutationObserver on the picker's hidden attribute closes the
sheet after emoji selection (reactions.js uses stopImmediatePropagation).

On desktop, edit/delete/react buttons move from inline meta to a floating
toolbar (position: absolute, top-right) that appears on message hover.

Reaction bars with no pills are now display:none globally (the toolbar
handles the add-reaction role). When pills exist, the add-reaction button
is always visible at the end — no hover required.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@emilhauk emilhauk merged commit 3405ded into master Mar 22, 2026
4 checks passed
@emilhauk emilhauk deleted the message-grouping branch March 22, 2026 12:47
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.

1 participant