Repository navigation
fix: show each OpenAI reasoning summary title on its own line - #31349
Merged
Merged
Conversation
ibetitsmike
approved these changes
Oct 27, 2026
OpenAI reasoning summaries stream as parts that each open with a bold title. Fantasy sent a single newline before each part, which Markdown renders as a space, so the chat UI showed every title after the first at the end of the previous paragraph. #30551 stopped the UI from dropping that newline, but one newline is still not a paragraph break. The fantasy pin moves to coder/fantasy#67, which sends a blank line before every summary part. The first part gets one too, because the UI joins adjacent reasoning items into one thinking block. Messages saved before this keep the single newline.
mafredri
force-pushed
the
mafredri/fantasy-reasoning-summary-paragraphs
branch
from
October 27, 2026 15:36
1e8ae7c to
bbe0c8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAI reasoning summaries stream as parts that each open with a bold title. Fantasy sent a single
"\n"before each part, which Markdown renders as a space, so the chat UI showed every title after the first at the end of the previous paragraph. #30551 stopped the UI from dropping that"\n", but one newline is still not a paragraph break.This moves the fantasy pin to coder/fantasy#67, which sends
"\n\n"before every summary part. The first part gets one too: the UI joins adjacent reasoning items into one thinking block, including acrossweb_searchcalls, and without it the next item's title would follow the previous sentence with no space. Messages saved before this change keep the single newline. Thego.modfork notes gain item 16, which points at the upstream PR, charmbracelet/fantasy#436.Dogfood data behind the leading blank line
7 days of dogfood
chat_messagesfor OpenAI Responses models (openai, and Bedrockopenai.*):"\n" + summary[0] + "\n" + summary[1] ..., so fantasy's separator is the only one.**Title**\n\n. No part starts or ends with whitespace.sentence.**Title**.Verification
go build ./...andmake pre-commitpass.go testpasses on every package that imports fantasy (coderd/x/chatd/...,coderd/database/db2sdk,coderd/mcp), andgo test ./coderd -run 'TestChat|TestExpChat|TestMCP|TestAIBridge'passes.StreamandGeneratetests that fail with the old separator. No coder test covers this: chattest's Responses mock streams one summary part per reasoning item.