Skip to content

feat(app): repair incomplete streaming Markdown - #3193

Merged
SawyerHood merged 2 commits into
get-bb:mainfrom
smsunarto:scott/streaming-markdown-repair
Sep 8, 2026
Merged

SawyerHood merged 2 commits into
get-bb:mainfrom
smsunarto:scott/streaming-markdown-repair

Conversation

@smsunarto

@smsunarto smsunarto commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

Assistant messages passed incomplete Markdown straight to the renderer. During streaming, unfinished bold and inline code showed their delimiters, while partial links and images exposed unfinished syntax.

What changed

Use pinned [email protected] on the displayed live tail in AssistantConversationMessage. This also covers the first paragraph, before a settled/tail split exists. Incomplete links render as plain text and incomplete images stay hidden. Settled content, completed messages, and the original text used by message actions remain unchanged.

Tails containing directives or triple code fences bypass repair. Probes found that remend can alter partial directive syntax and tilde-fenced code. Repair resumes after those move into the settled prefix. Unrelated HTML, math, setext, comparison, and single-tilde transformations are disabled.

bb-remend-demo.mp4

How you verified

  • Captured six failing repair regressions before the implementation.
  • Passed 72 tests across the conversation, streaming split, directive, and local-link suites. These include real-renderer checks for formatting, link/image completion, directive attributes, thread mentions, file navigation, and copying original source.
  • Passed pnpm exec turbo run typecheck lint --filter=@bb/app. Lint reports 184 warnings and no errors; none names the changed conversation component.
  • Passed pnpm exec turbo run build --filter=@bb/app and formatting checks on the changed source files.
  • Passed eight browser replay assertions using the actual conversation component from the source-built dev app. Checked partial bold/code, split tails, incomplete links/images, literal directives, tilde fences, and stopped generation. Captured a short streaming comparison. This is a component replay, not an end-to-end provider turn.

Focused test command:

pnpm exec turbo run test --filter=@bb/app -- \
  src/components/thread/timeline/ConversationMessageContent.streaming.test.tsx \
  src/components/thread/timeline/ConversationMessageContent.streaming-render.test.tsx \
  src/components/thread/timeline/ConversationMessageContent.test.tsx \
  src/components/thread/timeline/streaming-markdown-split.test.ts \
  src/components/ui/markdown-message-directives.test.tsx \
  src/components/ui/markdown-local-file-link-normalize.test.ts

AGENT GENERATED

@SawyerHood
SawyerHood force-pushed the scott/streaming-markdown-repair branch from 4072a62 to 9756a7f Compare September 8, 2026 18:25
@SawyerHood
SawyerHood merged commit d9f2ac5 into get-bb:main Sep 8, 2026
14 checks passed
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