[Feature]: option to keep thinking section collapsed while streaming (desktop)
Version line
v2 — Go rewrite (1.x), main-v2 (active development)
What problem does this solve?
On the desktop app, the collapsible "thinking" section is force-expanded while the response is streaming, regardless of the expand_thinking = false setting. The setting only takes effect after generation finishes.
This is caused by the frontend logic in Message.tsx (from PR #3396): ProcessCard defaultOpen={item.streaming || defaultExpanded} // ^ always open while streaming ^ setting only applies after done
For users who prefer a clean reading experience (especially when using a fast model like deepseek-v4-flash, where reasoning streams continuously on every tool-call round), the live-scrolling thinking text is distracting and there is currently no way to hide it during generation.
Proposed solution
Requested behavior
Add an option (or change the existing one) so that the thinking section can be fully collapsed during streaming too, for example:
expand_thinking = false → thinking stays collapsed both during and after streaming, or a new config like show_thinking_during_stream = false, or make the expand state purely follow the user's default (defaultExpanded) without the item.streaming override.
Same problem here, and it's more than a reading-experience issue — it causes real UI lag.
With a chatty reasoning model (e.g. deepseek-v4-flash emitting reasoning on every tool-call round), the force-expanded thinking section re-renders on every token: thousands of DOM nodes plus the GSAP collapse animation trigger layout on each chunk, and the transcript becomes visibly janky within a few turns. The only workarounds right now are manually collapsing the section once per turn (works thanks to the userOverridden flag) or switching to a non-reasoning model.
From the current main-v2 code:
TurnCollapseforce-expands whilehasRunningWork(setOpen(true)), ignoring the user's collapse preference until the turn ends.- The old
expand_thinkingconfig still exists in the Go config/bridge layer (desktop/settings_app.go) but no longer has any frontend consumer after the TurnCollapse refactor, so there's no setting that affects this at all. truncateStreamingReasoning/reasoningDisplay="hide"already exist but are only wired to the internaldisplayMode = "compact"path — not exposed as a user option.
So a show_thinking_during_stream = false option (or making the streaming auto-open respect the fold preference) would fix both the distraction and the performance problem. Happy to help test a PR.
I’d like to work on this.
My plan is to add an explicit keep collapsed process-fold preference rather than changing the current auto behavior. The intended states would be:
auto: open while work is running, then collapse when appropriatecollapsed: remain collapsed during streaming and after completionexpanded: remain expanded
I’ll preserve the existing safety behavior where a process fold is reopened if it is the turn’s only visible content, and I’ll extend the existing transcript fold/preference tests to cover streaming, completion, live preference changes, and manual overrides.
Available via config: set expand_thinking = false (desktop setting "expand thinking") and reasoning sections default to collapsed. If your point is specifically that the section force-expands during live streaming and only collapses afterward, reopen and say so — that would be a real gap worth fixing on top of the setting.
Yes — the gap is specifically during live streaming.
With expand_thinking = false, the section may default to collapsed after completion, but the current TurnCollapse behavior still force-opens it while hasRunningWork is true. That is the behavior reported in this issue: it expands throughout generation and only respects the collapsed preference afterward.
I’ve already implemented the fix in #7518. It adds explicit auto, collapsed, and expanded process-fold preferences so collapsed stays closed during streaming and after completion, while preserving the safety rule that process-only turns remain visible. The focused transcript/settings tests, typecheck, hooks lint, CSS check, build, and bundle-budget check all passed.
Could you please take another look at #7518 with that live-streaming distinction in mind and reopen this issue if appropriate?
My point was specifically about during live streaming — the thinking section stays force-expanded while tokens stream in, even with expand_thinking = false, and only collapses after the turn finishes.
@bferanmi806-sketch's PR #7518 addresses exactly this (three-state fold preference, collapsed keeps it closed during streaming). Could you take a look at it, @esengine? Happy to test once merged. Thanks!