Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Dec 5, 2025

Summary

Fixes plan body taking 10+ seconds to render after the ORPC migration.

Root Cause

After ORPC, IPC events go through async iterators with microtask boundaries, giving React more opportunities to deprioritize Streamdown's useTransition() indefinitely.

Fix

Set mode="static" for completed content (parseIncompleteMarkdown=false) to bypass useTransition() and render immediately. This aligns with Streamdown's intended API:

  • mode="streaming" - for incremental content, uses useTransition()
  • mode="static" - for complete content, renders immediately

Even if this doesn't fully resolve the delay, the change is correct regardless - we were incorrectly using streaming mode for all content, including completed messages.


Generated with mux

After the ORPC migration, async event boundaries let React deprioritize
Streamdown's useTransition() indefinitely, causing 10+ second delays
for plan body rendering.

Fix: Set mode='static' for completed content (parseIncompleteMarkdown=false)
to bypass useTransition() and render immediately. This aligns with
Streamdown's intended API usage.
@ethanndickson ethanndickson added this pull request to the merge queue Dec 5, 2025
Merged via the queue into main with commit 700253c Dec 5, 2025
17 checks passed
@ethanndickson ethanndickson deleted the plan-body-render-delay branch December 5, 2025 03:01
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