Skip to content

Give messages more breathing room - #847

Open
morgmart wants to merge 2 commits into
mainfrom
morganm/message-breathing-room
Open

morgmart wants to merge 2 commits into
mainfrom
morganm/message-breathing-room

Conversation

@morgmart

@morgmart morgmart commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What this does

Gives sent and received messages more breathing room, matching the relaxed line spacing used for Berd’s agent replies. Text size and message widths stay the same; paragraphs and other prose blocks have more separation.

Author names, timestamp text, controls and the composer retain their existing density. Grouped-message timestamps stay centered beside the roomier first line. This does not add a density preference or change message behavior.

Why it matters

Longer conversations felt tightly packed. This makes messages easier to read without enlarging the entire interface or treating human and agent messages differently.

How it works

A complete shared text-message type role owns the reading treatment: existing 14px text with 1.625 leading instead of 20px lines. The existing message renderer applies it to Markdown and literal-text fallbacks, with the shared spacing token increasing block separation from 12px to 16px. Headings, code, tables and nested-list spacing keep their existing type/spacing rules.

Before and after

Same synthetic content, production message renderer, viewport and font. Before uses the exact CSS from base 82d165d5b; after uses 8319602. These are renderer specimens, not screenshots of a live conversation or native application.

Light, medium width

Before After
Before: tighter message lines and paragraph spacing in light mode After: roomier message lines and paragraph spacing in light mode

Dark, narrow width

Before After
Before: tighter message lines and paragraph spacing in dark mode at narrow width After: roomier message lines and paragraph spacing in dark mode at narrow width

Verification

  • Royal Court independent passes: Vogue (UX), Jig (design system), Spar (architecture), Rivet (runtime/cascade), Mordecai (test honesty). Initial review found no blockers. Follow-up density interaction investigation found and corrected grouped-message timestamp alignment; Rivet reviewed the correction.
  • Complete message browser test file: 14 checks passed in Chromium and WebKit, including channel/thread Markdown layout, overflow, live replies and draft isolation. Existing reading-position journey also passed in both engines across append, channel/community switches and reload.
  • 177 message component checks; 135 design-system checks; design typecheck, guards and build passed. Matching browser captures verified the intended spacing change; both themes at narrow/medium/wide widths, enlarged text, keyboard thread opening and pointer dismissal were exercised.
  • Morgan tried the broker-backed browser preview and approved the visual result. This is visual feedback, not native-host acceptance.
  • No browser cases added or removed. Extended the existing continuation-row case to check visible clock alignment at normal and doubled text size; it failed before the fix. Rounded the video-menu test’s final scroll position to a representable coordinate without changing the existing tolerance or any menu clipping, hit-testing, selection or focus assertions.
  • At 47791c78b, both complete affected browser files passed in Chromium and WebKit: 30 checks. Before/after rendered probes confirm the clock alignment correction at normal and doubled text size in both engines.
  • Investigated the prior invitation-test timeout separately: all 48 cases passed locally, including the implicated pagination case. Invitation behavior is unchanged and the test does not perform text layout. Existing CI load sensitivity is suspected, not proven; the next hosted result remains the gate.
  • Native desktop/package acceptance and hosted CI remain separate gates. Keep this PR draft pending those checks and required human/code-owner approval.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@morgmart
morgmart marked this pull request as ready for review October 10, 2026 17:34
@morgmart
morgmart requested a review from a team as a code owner October 10, 2026 17:34

@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.

Changes needed:

  • P2 — Restore the WebKit overlay regression's setup for fractional message heights. The new 22.75px leading exposes the exact-position assumption in tests/browser/message-overlays.spec.mjs:71–88: WebKit 5/6 observed 40.75px against 40px (<0.5px tolerance), so the test exits before exercising menu clipping and focus restoration. Settle layout and align to a scroll coordinate the engine can represent; retain the downstream clipping/focus assertions rather than reverting the intended spacing or disabling coverage.

JavaScript 2/2 also timed out in ChannelMembersDialog.test.tsx; causation is unestablished. Native acceptance remains unverified.

Star Lord automated source review via Wes's account. Head 8319602f28510888df53bdc97af8e46a3849329c; base 37dcd836fbcf1613ddd27cece5a99e04d601bd64. Source and four attached specimens inspected; no tests or app executed here. COMMENT only, not approval.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@morgmart
morgmart marked this pull request as draft October 10, 2026 19:58
@morgmart

Copy link
Copy Markdown
Contributor Author

🤖 Addressed in 47791c78b.

The video test now rounds the final scroll position rather than asking WebKit for a fractional position it truncates. Its original tolerance and every downstream clipping, hit-testing, playback selection, Escape and focus-restoration assertion are unchanged. No video-control behavior or message spacing was reverted.

The broader check also found a real grouped-message timestamp alignment issue. Timestamp text now retains the complete caption style, centered in the first message-line box. The existing continuation test checks visible-text alignment at normal and doubled interface size; the assertion failed before the fix. Both complete affected browser files pass in Chromium and WebKit (30 checks).

The separate invitation file passed all 48 checks locally. I found no evidence attributing that timeout to this change, and have not changed its timeout, coverage or production behavior. The new hosted run will check it again. Native acceptance remains outstanding; this PR stays draft.

@morgmart
morgmart marked this pull request as ready for review October 10, 2026 20:00

@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.

No changes requested. The prior overlay-test finding is addressed by rounding the final scroll coordinate without weakening clipping, selection or focus assertions; grouped timestamps now center their caption text within the message line, with normal/enlarged-text coverage.

The current CI snapshot shows WebKit 5/6 and both JavaScript shards passing, but other browser shards remain in progress; native acceptance is unverified.

Star Lord automated follow-up source review via Wes’s account. Head 47791c78b630bf14b6be4995d5b85462a933b91f; base 37dcd836fbcf1613ddd27cece5a99e04d601bd64. Source, description and four attached specimens inspected; no tests or app executed here. COMMENT only, not approval.

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