Commit 700253c
authored
🤖 fix: use static mode for completed markdown to prevent render delay (#921)
## 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`_1 parent b061c16 commit 700253c
2 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments