Bug
The last row of markdown tables is always missing after message streaming completes.
Reproduction
- Enable
OPENCODE_EXPERIMENTAL_MARKDOWN=true
- Ask the AI to output a markdown table with 3+ data rows
- After streaming completes, the last row is not visible
Root cause
Two issues work together:
- opencode:
TextPart passes streaming={true} unconditionally to <markdown> and <code> elements — even for completed messages
- opentui: During streaming, the last table row is skipped (
rows.slice(0, -1)) as potentially incomplete. When streaming changes to false, updateBlocks() skips the table because tokenRaw hasn't changed — the missing row is never added back
Fix
Bug
The last row of markdown tables is always missing after message streaming completes.
Reproduction
OPENCODE_EXPERIMENTAL_MARKDOWN=trueRoot cause
Two issues work together:
TextPartpassesstreaming={true}unconditionally to<markdown>and<code>elements — even for completed messagesrows.slice(0, -1)) as potentially incomplete. Whenstreamingchanges tofalse,updateBlocks()skips the table becausetokenRawhasn't changed — the missing row is never added backFix
message.time.completed— fix(tui): stop streaming markdown/code after message completes #13854clearCache()onstreaming: true→falsetransition — fix(markdown): rebuild table when streaming ends opentui#696