Skip to content

feat(desktop): add 10-minute message grouping window#1578

Merged
wesbillman merged 2 commits into
mainfrom
feat/message-grouping-window
Jul 7, 2026
Merged

feat(desktop): add 10-minute message grouping window#1578
wesbillman merged 2 commits into
mainfrom
feat/message-grouping-window

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply a 10-minute rolling window to same-author message grouping.
  • Use the time-only continuation style only when the previous message is from the same author and within 10 minutes.
  • Apply the rule in the channel timeline, threaded reply panel, and home inbox detail.

Testing

  • desktop/src/features/messages/lib/messageGrouping.test.mjs
  • desktop/src/features/messages/lib/timelineItems.test.mjs
  • tsc --noEmit
  • Biome clean
  • Staging desktop build smoke-tested

@klopez4212 klopez4212 requested a review from wesbillman July 7, 2026 13:00
npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 added 2 commits July 7, 2026 14:01
Consecutive same-author messages currently collapse into the time-only
(avatarless) continuation style regardless of how far apart they are.
Add a 5-minute rolling window: a message only groups onto the one above
it when it is from the same author AND within 5 minutes of it. Past that
gap the message reads as a new thought and gets the traditional avatar +
header treatment.

The window is measured against the immediately preceding message, so a
steady stream keeps grouping while a lull breaks it.

Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
Promote the grouping-window logic into shared helpers in messageGrouping.ts
(MESSAGE_GROUPING_WINDOW_SECONDS = 10 min, isWithinGroupingWindow) and apply
it consistently across the three continuation surfaces:

- channel timeline (buildTimelineItems)
- threaded reply panel (MessageThreadPanel)
- home inbox detail (InboxDetailPane)

Same-author messages now only collapse into the avatarless continuation
style when they land within 10 minutes of the previous one; past that gap
they read as a new thought with the traditional avatar + header.

Threads/inbox previously grouped on author alone with no time check. Threads
carry createdAt on TimelineMessage already; the inbox reply model gained a
createdAt field, populated in all three InboxReply builders.

Bumps the window from 5 to 10 minutes per product decision.

Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
@klopez4212 klopez4212 force-pushed the feat/message-grouping-window branch from 8fd4b72 to 724c196 Compare July 7, 2026 13:01
@klopez4212 klopez4212 changed the title feat(desktop): 10-min time window for message grouping feat(desktop): add 10-minute message grouping window Jul 7, 2026

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by Pinky (Buzz agent) on Wes's behalf.

Summary: Adds a 10-minute rolling window to same-author message grouping — a message only renders as a compact continuation (time-only, no avatar/header) if it's from the same author and within 10 minutes of the previous message. Applied consistently across the channel timeline, thread panel, and home inbox detail pane.

Verified:

  • isWithinGroupingWindow logic: inclusive at exactly 600s; negative gap (out-of-order timestamps) or missing timestamps safely break the group; window measured against the previous message (not group start), with a test pinning that behavior.
  • Test coverage: boundary / negative / missing-timestamp cases in messageGrouping.test.mjs; window-break and steady-stream tests added to timelineItems.test.mjs.
  • InboxReply.createdAt plumbing supplied at all three construction sites (HomeView ×2, InboxDetailPane).
  • Purely additive && onto the existing author check — day-divider and unread-divider grouping breaks unchanged.
  • All CI checks green (Desktop Build, Core, E2E Integration, Smoke ×4, Relay E2E).
  • 2 commits behind main (#1576, #1577) with zero file overlap — safe to merge as-is.

Non-blocking note: MESSAGE_GROUPING_WINDOW_SECONDS hardcoded at 10 min is the right call for now; a setting would be over-engineering.

@wesbillman wesbillman merged commit 564ead3 into main Jul 7, 2026
25 checks passed
@wesbillman wesbillman deleted the feat/message-grouping-window branch July 7, 2026 14:42
tellaho added a commit that referenced this pull request Jul 7, 2026
…ivity

* origin/main:
  fix(desktop): hydrate reactions for Inbox context messages (#1596)
  fix: cleanup old screenshots that my agents committed (#1598)
  chore(release): release Buzz Desktop version 0.3.46 (#1585)
  fix(desktop): preserve agent model/provider when persona snapshot fields are blank (#1583)
  feat(acp,desktop): identify and reap stale agent harness processes (#1582)
  feat(desktop): active-draft badge, send-from-drafts confirm dialog, thread-deleted state (#1581)
  fix(desktop): treat baked build env vars as satisfying required agent config (#1580)
  feat(desktop): add "Copy image" to image right-click context menu (#1579)
  fix(nest): use buzz-dev symlink name for dev builds (#1587)
  fix(composer): address image-editor follow-up nits on #1491 (#1565)
  fix(desktop): render black static boot screen (#1570)
  feat(agents): group activity tool bursts (#1571)
  feat(desktop): aggregated overview rail, commit detail page, and full breadcrumbs (#1573)
  fix(desktop): fetch profiles for reaction actors and thread-reply authors (#1550)
  refactor(desktop): unify EditAgentDialog styling with PersonaDialog (#1540)
  feat(desktop): add 10-minute message grouping window (#1578)
  feat(desktop): unify sidebar section actions into a per-section ⋮ menu (#1577)
  feat(desktop): emoji avatar picker for agents + reliable picker scroll (#1576)

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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.

2 participants