Skip to content

fix(site/src/pages/AgentsPage): unify Markdown spacing, align lists and table columns - #31749

Merged
mafredri merged 6 commits into
mainfrom
fix-user-message-markdown-spacing
Nov 9, 2026
Merged

mafredri merged 6 commits into
mainfrom
fix-user-message-markdown-spacing

Conversation

@mafredri

@mafredri mafredri commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

User messages render Markdown through Response since #31586 and inherited Streamdown's spacing: 16px between blocks, 4px padding on every list item, and the browser's default 1em paragraph margin. Single-newline text in a bubble rendered with large gaps, and agent replies had the same loose lists.

User and agent messages now share one spacing. Measured as visible space between text rows (a 21px line already leaves about 4px between wrapped lines), the gaps double at each level: 4px between lines, 8px between list items (main: 12px), 16px between blocks (main: 20px). In CSS that is space-y-3 between blocks and py-0.5 per list item. Every Response changes, so expect Pixel diffs in plan previews, subagent prompts, and other tool output.

Wrapped list items also started under the bullet, because Streamdown uses list-inside markers. Lists now use outside markers, so wrapped lines align with the item text. The styling uses descendant selectors on the Markdown root rather than component overrides, so Streamdown still renders the list elements and their props, such as an ordered list's start. Task items drop the bullet in favor of their checkbox. Paragraphs inside a list item stay separate blocks (main joins them onto one line), with the same 8px gap as between items.

Table cells dropped the column alignment from the separator row (| :---: | ---: |), because the th and td overrides passed only their children. They now forward the style that carries it.

The new Response stories Lists and TableColumnAlignment cover these cases.

Before is main rendering the same stories (the two new stories copied onto main); after is this branch.

Before After
User message (UserMessageWithMarkdown) user before user after
Agent reply (Response MarkdownAndLinks) agent before agent after
Lists (Response Lists) lists before lists after
Table alignment (Response TableColumnAlignment) table before table after

🤖 This PR was created with the help of Coder Agents.

@mafredri mafredri changed the title fix(site/src/pages/AgentsPage): tighten Markdown spacing in user message bubbles fix(site/src/pages/AgentsPage): share Markdown spacing and align wrapped list items Nov 5, 2026
@mafredri

mafredri commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Block gap options for user and agent messages. The PR uses 12px; list item spacing is the same in all three.

8px 12px 16px (current main)
User
Agent

🤖 This review was automatically generated with Coder Agents.

@mafredri

This comment has been minimized.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T16:41:28.908686Z abea864 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as outdated.

@mafredri

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as outdated.

@mafredri mafredri changed the title fix(site/src/pages/AgentsPage): share Markdown spacing and align wrapped list items fix(site/src/pages/AgentsPage): unify Markdown spacing, align lists and table columns Nov 6, 2026
@mafredri
mafredri marked this pull request as ready for review November 6, 2026 16:36
@mafredri
mafredri requested a review from a team as a code owner November 6, 2026 16:36
@mafredri

This comment has been minimized.

…age bubbles

User messages render through Response since #31586, which kept
Streamdown's assistant-sized spacing: 16px between blocks, 4px padding
on each list item, and the browser's 1em paragraph margin. In a bubble
this left large gaps where the user typed a single newline.

Add a compact Response mode that uses 8px block gaps, no list item
padding, and no paragraph bottom margin, and enable it for user
messages.
…ped list items

User and agent messages render the same Markdown at the same size, so
they now share one spacing: 12px between blocks and 2px padding per
list item, replacing the user-only compact mode.

Streamdown places list markers inside the text box, so wrapped lines
started under the bullet. Render lists with outside markers so wrapped
lines align with the item text.
…own's elements

The ul, ol, and li overrides dropped the props Streamdown passes, so
an ordered list starting at 3 restarted at 1. Style lists through
descendant selectors on the Markdown root instead, and render list
item paragraphs as blocks so a multi-paragraph item keeps its break.
Resetting padding on every task list removed the indent from nested
task lists, and hiding markers on the list removed bullets from plain
items mixed into it. Hide the marker on each task item instead.
The Lists story renders a list starting at three, and Pixel captures
its numbering, so the Vitest attribute check duplicated it.
The th and td overrides passed only their children, so the alignment
from a table's separator row was dropped and every column rendered
left-aligned. Forward the style that carries it.

Paragraphs inside one list item were further apart than separate items.
Use the same gap for both.
@chatgpt-codex-connector

This comment has been minimized.

@mafredri
mafredri force-pushed the fix-user-message-markdown-spacing branch from abea864 to 3d98434 Compare November 6, 2026 16:44
@mafredri
mafredri merged commit 6ba6df2 into main Nov 9, 2026
45 of 47 checks passed
@mafredri
mafredri deleted the fix-user-message-markdown-spacing branch November 9, 2026 10:46
@mafredri
mafredri temporarily deployed to main November 9, 2026 10:47 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026

This branch was previously deployed

1 inactive deployment
main — 3d984344 Deployed Nov 9, 2026 by mafredri via cla #252349
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants