Skip to content

perf(desktop): use useDeferredValue for Transcript items#2956

Open
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:pr/deferred-transcript
Open

perf(desktop): use useDeferredValue for Transcript items#2956
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:pr/deferred-transcript

Conversation

@HUQIANTAO
Copy link
Copy Markdown
Contributor

Wrap state.items in useDeferredValue so Composer input (high-priority) renders before Transcript (low-priority) during streaming.

…t responsive

During streaming, every text/reasoning delta triggers a state update that
re-renders the entire Transcript. If the user is typing in the Composer at
the same time, the transcript re-render can block the keystroke from being
processed — causing visible input lag.

Wrap state.items in useDeferredValue before passing to Transcript. This
tells React to treat transcript updates as low-priority: when a keystroke
and a transcript update collide, the keystroke is processed immediately
and the transcript re-render is deferred to idle time.
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant