Skip to content

fix(chat): one 24px gap between message groups, 6px in a run; seen faces in the text gutter - #671

Merged
rafavalls merged 6 commits into
mainfrom
fix/message-spacing
Nov 30, 2026
Merged

rafavalls merged 6 commits into
mainfrom
fix/message-spacing

Conversation

@rafavalls

@rafavalls rafavalls commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Message spacing now comes from layout, not from footer rows, and is the same everywhere.

  • Between message groups: always 24px (mt-5 + pt-1), whatever sits under the message above (nothing, choice buttons, seen faces, reactions). Before: 8px with nothing under, 36px with the faces row.
  • Inside a run of the same person: 6px (was 2px).
  • Seen faces with no reaction chips no longer take a row: every message keeps a right gutter (88px desktop / 60px phone) and the faces sit there, right-aligned, centered on the last line. With chips or a status line the faces stay in that row as before. Phone stack shows 1 face + "+N".
  • Root cause of the earlier tight agent replies (fix(chat): agent replies in a row keep their gap again (one seen per visual run) #537): replies are always their own group; this PR finishes the job by making the gap independent of footers.
Under the message main this PR
nothing / choices 8px 24px
seen faces 36px 24px
reactions 32px 24px after the chips row
in a run 2px 6px

Checks: bun run check (chat DOM tests incl. new gutter/class tests), design-system suite. No hover layout shift.

🤖 Generated with Claude Code


Summary by cubic

Message spacing now comes from the layout, not from footer rows, so it's the same everywhere.

  • A message group (avatar and name) always starts 24px below whatever sits under the previous message, and runs of the same person sit 6px apart (was 2px).
  • Seen faces with no reaction chips or status line no longer take a row of their own: every message keeps a right gutter (88px desktop / 60px phone) and the faces sit there, right-aligned on the text's last line. Phone stack shows one face and "+N".

Spacing changes

Under the message main this PR
nothing / choices 8px 24px
seen faces 36px 24px
reactions 32px 24px after the chips row
in a run 2px 6px

Written for commit 8d2c576. Summary will update on new commits.

View guided diff Turn on auto-fix

rafavalls and others added 5 commits November 30, 2026 11:05
…, 6px in a run

The space between message groups came from the reaction/seen row under each
message; with one seen per run and no empty row, groups sat 8px apart and the
follow-ups of a run 2px. Now a new group (avatar and name) starts 16px (mt-3 +
pt-1) below the previous message's last line, its text or the row under it,
so the gap is the same with or without faces, reactions or acks. A follow-up
in a run starts 6px (pt-1.5) below, less than the 8px between paragraphs of
one message. The loading skeleton uses the same group gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… of their own

A message with only faces under it (who saw it, agents that passed; no reaction
chips, no doing/done line) took a 28px row, and the next group sat 44px below
its text instead of 16px. Now that row is laid over the end of the text's last
line, bottom right, with no height: the gap is 16px, like a message with nothing
under it. A zero-height spacer as wide as the faces ends the text (::after, by
class, sized per number of faces), so the last line keeps room for them; a line
too long for both wraps the spacer and the faces get a line of their own. With
chips, a status, or a code block, table, quote, file or card last, the row stays
a row. RichContent marks its text as one flow or blocks (data-rich-flow).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…essage's text

The faces of a message with only "seen" under it sat right after the end of its
text, squeezed against the paragraph like part of it. Now every message's text
keeps the same right gutter (88px; 60px on a phone, where the footer shows one
face and "+N"), and those faces sit in it, right-aligned, on the text's last
line box (1px up so they center on the x-height; a code block's last line sits
above its padding), with no height of their own: the next message stays 16px
away. With chips or a status the faces stay in the row, as before. The spacer
after the text and RichContent's data-rich-flow are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the first)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On main a new group sat 8px after a message with nothing under it and 36px
after one with the row of faces (32px after reaction chips). Valls asked for
the middle, always the same. The midpoint (22px) is off the 4px scale; 24px
(mt-5 + pt-1) is one line of text and the roomier side, which they preferred.
The faces sit in the text's gutter and never change it; reaction chips are
part of the message, and the 24px follows them. Runs stay 6px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rafavalls
rafavalls enabled auto-merge (squash) November 30, 2026 14:28
@rafavalls
rafavalls merged commit a2200e9 into main Nov 30, 2026
6 checks passed
rafavalls added a commit that referenced this pull request Nov 30, 2026
…text, as wide as its stack (#673)

#671 kept an 88px right gutter on every message's text (60px on a phone), so
text wrapped early everywhere and left an empty column on the right, worst in
narrow panes. Now only the message whose faces sit beside its text (faces only,
the last of a run) keeps one, sized to its stack and 12px (40px for one face,
up to 96px for three, "+N" and the ✓; one face and "+N" on a phone), from a
class table (no inline styles). Every other message's text has the full width.
The faces stay on the last line, 24px between groups and 6px in a run.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
rafavalls added a commit that referenced this pull request Nov 30, 2026
…#675)

Proposal (Valls): the faces of who saw a message go back under it, and the gap
between messages stays the same with or without them. A faces-only row hangs
under the message body (absolute, top-full, right-aligned), 24px high in the
24px group gap, with 16px faces (AvatarStack xs; the ✓ level with the last
face) centered in it: 4px clear above and below, so it never touches the next
message's quote, name or avatar. It takes no height. With reaction chips the
faces stay at the end of that row. A run's faces are on its last message, which
a group gap follows; a notice, a day divider, a call line or the "working" bar
after a faces message gets the same 24px, and the timeline ends with 24px.

Removes the text gutter of #671/#673 (facesGutter and its class table): every
message's text has the full width. Phone: one face and "+N".

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

1 participant