Skip to content

feat(desktop): grouped system events, message compacting, and per-type icons#418

Draft
tellaho wants to merge 1 commit into
mainfrom
feat/grouped-events
Draft

feat(desktop): grouped system events, message compacting, and per-type icons#418
tellaho wants to merge 1 commit into
mainfrom
feat/grouped-events

Conversation

@tellaho
Copy link
Copy Markdown
Collaborator

@tellaho tellaho commented Apr 28, 2026

🤖 Updated by AI agent.

Summary

This PR tightens the desktop message timeline by reducing repeated visual chrome while keeping full message detail available.

Grouped System Events

Consecutive system messages collapse into a single expandable row when there are 2 or more in a run. Summaries are actor-attributed and count repeated actions:

  • Single actor: Alice added 5 members
  • Mixed actions: Alice added 3 members, removed 2 members
  • Multi actor: Alice added 5 members; Bob changed the topic (x2)
  • Self-joins: Alice joined the channel instead of added

System-event groups stay within a single calendar day so day dividers remain accurate. Expanding the group renders the underlying system rows with their normal details and reactions.

Compact Consecutive Messages

Consecutive messages from the same author within 2 minutes render in compact form: no repeated avatar/name row, body remains visible, and the timestamp appears in the gutter on hover.

Compacting breaks on author changes, time gaps, system messages, thread summaries, and depth-indented thread/broadcast replies so thread guides and timeline structure remain intact.

Per-Type System Icons

System rows and grouped summaries use distinct lucide icons per event type:

  • member_joined - UserPlus
  • member_left - LogOut
  • member_removed - UserMinus
  • topic_changed - Hash
  • purpose_changed - AlignLeft
  • channel_created - Plus
  • channel_archived - Archive
  • channel_unarchived - ArchiveRestore

Grouped rows use the dominant event type's icon.

Notable Changes

  • Added groupTimelineEntries() for pure timeline annotation/grouping.
  • Added shared system-event description helpers, including grouped summary generation.
  • Added compact message and grouped system-event row components.
  • Updated TimelineMessageList to render grouped entries, compact rows, and normal rows from one annotated timeline pass.
  • Converted the new desktop unit coverage to the repo's existing .test.mjs + node:test pattern with an alias loader for @/ imports.

Testing

Local verification run on this branch:

cd desktop
node --experimental-strip-types --import ./scripts/test-loader.mjs --test src/features/messages/lib/groupTimelineEntries.test.mjs src/features/messages/lib/describeSystemEvent.test.mjs
pnpm check
pnpm typecheck
pnpm build

The targeted message tests cover grouping boundaries, compacting boundaries, day-boundary handling, depth reply exclusions, system event descriptions, and repeated grouped summary actions.

Accessibility

  • Group toggle is a real button with aria-expanded and aria-controls.
  • Expanded grouped content renders in a semantic section.
  • Existing row action controls remain keyboard-accessible.

Rollback

Revert this branch's desktop timeline changes. The feature is UI-only and does not alter stored event data or relay behavior.

@tellaho tellaho requested a review from wesbillman as a code owner April 28, 2026 22:57
@tellaho tellaho marked this pull request as draft April 29, 2026 16:29
@tellaho tellaho force-pushed the feat/grouped-events branch from 2f76ea0 to 5209011 Compare May 12, 2026 03:25
@tellaho tellaho force-pushed the feat/grouped-events branch from 7c2c366 to 84fb9a6 Compare May 19, 2026 04:17
@tellaho tellaho force-pushed the feat/grouped-events branch from 52118b6 to 7637e55 Compare May 20, 2026 01:52
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