Skip to content

fix(markdown): rebuild table when streaming ends#696

Merged
kommander merged 4 commits intoanomalyco:mainfrom
mocksoul:fix/streaming-table-rebuild
Feb 17, 2026
Merged

fix(markdown): rebuild table when streaming ends#696
kommander merged 4 commits intoanomalyco:mainfrom
mocksoul:fix/streaming-table-rebuild

Conversation

@mocksoul
Copy link
Copy Markdown
Contributor

Summary

  • Last table row is permanently missing after streaming completes
  • updateBlocks() skips table rebuild when token raw hasn't changed, but the table renderable was created with N-1 rows during streaming (rows.slice(0, -1))
  • Use clearCache() instead of updateBlocks() on streaming: true→false transition to force full rebuild

When streaming transitions from true to false, updateBlocks() skips
table updates because the token raw hasn't changed. However, the table
renderable was created with N-1 rows during streaming (last row is
skipped as potentially incomplete). This causes the last table row to
be permanently missing after streaming completes.

Use clearCache() instead of updateBlocks() when streaming ends to force
a full rebuild, ensuring all table rows are rendered.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 16, 2026

@opentui/core

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core@f7ca70c

@opentui/react

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/react@f7ca70c

@opentui/solid

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/solid@f7ca70c

@opentui/core-darwin-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-arm64@f7ca70c

@opentui/core-darwin-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-x64@f7ca70c

@opentui/core-linux-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-arm64@f7ca70c

@opentui/core-linux-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-x64@f7ca70c

@opentui/core-win32-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-arm64@f7ca70c

@opentui/core-win32-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-x64@f7ca70c

commit: f7ca70c

Streaming mode affects table row visibility even when token raw is unchanged. Force cache invalidation on mode changes and add bidirectional regression coverage for streaming toggles.
Streaming mode changes table row visibility even when token raw is unchanged.
Rebuild cached markdown blocks on streaming mode transitions.
Copy link
Copy Markdown
Member

@simonklee simonklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the report.

Added a couple regression and made it so mode-changes simply clear the cache so it's symmetrical (streaming -> non-streaming and visa versa)

@remorses
Copy link
Copy Markdown
Contributor

It would be better to fix the bug without clearing the full cache to prevent stutters for big markdown content. Can you try telling your agent to try that @mocksoul?

@remorses
Copy link
Copy Markdown
Contributor

remorses commented Feb 16, 2026

@simonklee
Copy link
Copy Markdown
Member

simonklee commented Feb 16, 2026 via email

@remorses
Copy link
Copy Markdown
Contributor

Ok I am fine with this. Later we can add a method to only rebuild tables to improve performance (I cannot push to PRs)

@kommander kommander merged commit f4712b9 into anomalyco:main Feb 17, 2026
9 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.

4 participants