Skip to content

fix(frontend): avoid spacing empty chat markdown - #2926

Merged
nessie993 merged 1 commit into
mainfrom
agent/fix-chat-markdown-spacing
Aug 4, 2026
Merged

nessie993 merged 1 commit into
mainfrom
agent/fix-chat-markdown-spacing

Conversation

@nessie993

Copy link
Copy Markdown
Contributor

What changed

  • Mark markdown roots only when they contain rendered content.
  • Apply inter-entry spacing only to visible markdown roots.
  • Keep empty response-entry components in the DOM.
  • Add coverage for hidden thinking-only entries.

Why

Thinking-only response entries are rendered as empty markdown wrappers after their content is moved to the work log. The existing adjacent-root spacing rule still added 14px for every empty wrapper, producing large gaps in assistant responses.

Validation

  • yarn test src/components/session/Markdown.test.tsx src/components/session/MarkdownLayout.test.tsx --run
  • yarn build

@nessie993
nessie993 marked this pull request as ready for review August 4, 2026 12:48
@nessie993
nessie993 merged commit 7977801 into main Aug 4, 2026
5 checks passed
@nessie993
nessie993 deleted the agent/fix-chat-markdown-spacing branch August 4, 2026 12:48
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