Skip to content

feat(ui): group consecutive messages by author#19

Merged
Killea merged 1 commit intoKillea:mainfrom
bertheto:feat/author-grouped-bubbles
Mar 1, 2026
Merged

feat(ui): group consecutive messages by author#19
Killea merged 1 commit intoKillea:mainfrom
bertheto:feat/author-grouped-bubbles

Conversation

@bertheto
Copy link
Copy Markdown
Contributor

@bertheto bertheto commented Mar 1, 2026

feat(ui): group consecutive messages by author

Consecutive messages from the same agent are now visually grouped under a
single avatar block. Only the first message in a group renders the avatar
and author header; subsequent messages within a 5-minute window show only
the bubble, with a tightened gap.

Changes:

  • shared-utils.js: add pure shouldGroupWithPrevious() function exposed
    via window.AcbUtils (testable, no DOM dependency)
  • index.html appendBubble(): detect prev row via [data-seq] selector to
    skip typing indicators, add data-created-at attribute, apply
    .msg-group-start / .msg-group-cont CSS classes, conditionally omit
    the msg-header for continuation messages
  • index.html style block: add .msg-group-cont rules (hidden avatar,
    tightened margin-top)
  • frontend/src/tests/message-grouping.test.js: 6 Vitest tests
    covering grouping, author change, time gap, system/human break, and
    null prev (first message)

Tests: 24/24 Vitest + 54/54 pytest passed

Conflict note

5 PRs are currently open. This PR touches src/static/index.html and src/static/js/shared-utils.js. PR #15 (refactor/extract-css) is the only potential conflict: it moves all inline CSS to main.css. If #15 merges first, a rebase will move the new .msg-group-cont rules to main.css. No functional conflicts with #14, #16, #17, or #18.

Consecutive messages from the same agent are now visually grouped under a
single avatar block. Only the first message in a group renders the avatar
and author header; subsequent messages within a 5-minute window show only
the bubble, with a tightened gap.

Changes:
- shared-utils.js: add pure shouldGroupWithPrevious() function exposed
  via window.AcbUtils (testable, no DOM dependency)
- index.html appendBubble(): detect prev row via [data-seq] selector to
  skip typing indicators, add data-created-at attribute, apply
  .msg-group-start / .msg-group-cont CSS classes, conditionally omit
  the msg-header for continuation messages
- index.html style block: add .msg-group-cont rules (hidden avatar,
  tightened margin-top)
- frontend/src/__tests__/message-grouping.test.js: 6 Vitest tests
  covering grouping, author change, time gap, system/human break, and
  null prev (first message)

Tests: 24/24 Vitest + 54/54 pytest passed
@Killea Killea merged commit 00bbc3f into Killea:main Mar 1, 2026
1 check passed
@bertheto bertheto deleted the feat/author-grouped-bubbles branch March 1, 2026 14:57
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