IDE extension: expanding a long user message pushes 'Show less' off-screen with no in-message scroll — can't collapse without scrolling the whole session
What happened
In the Claude Code VS Code extension chat, expanding a very long user message ("Show more") makes it impossible to collapse the message again without a workaround:
- The "Show less" control renders below the visible viewport.
- The message's internal scroll does not work — the expanded message just grows past the viewport.
- The only way to reach "Show less" is to scroll the entire session to the very bottom until the button re-appears, collapse it there, then scroll back up.
Effectively an expanded long message hijacks navigation until you manually work around it.
Steps to reproduce
- Have a chat where a single user message contains a large amount of text (long enough to be truncated behind a "Show more" toggle).
- Click Show more to expand that message.
- Try to collapse it again.
Expected
The expanded message is scrollable within its own bounds, or the "Show less" control stays reachable (sticky / inside the message container), so the message can be collapsed in place — without scrolling the whole conversation.
Actual
"Show less" is off-screen and there is no in-message scroll; you must scroll to the end of the entire session to find the button, collapse, and scroll back.
Environment
- Claude Code VS Code extension:
anthropic.claude-codev2.1.207 (darwin-arm64) - VS Code: 1.128.0 (commit fc3def6774c76082adf699d366f31a557ce5573f, 2026-07-07)
- Electron: 42.5.0 · Chromium: 148.0.7778.271 · Node.js: 24.17.0
- OS: macOS (Darwin arm64 25.5.0)
Severity
Usability / Minor–Medium — no data loss, but interaction is blocked until a non-obvious workaround, and it gets worse the longer the message and the session.
3 Comments
Still reproduces on v2.1.241 (win32-x64, VS Code extension host on Windows 11). Adding the root cause from the shipped
webview/index.js, since this one is a two-line fix.Root cause
Every user message is rendered by the expandable-content component, called with
maxHeight: 60from the user-message renderer:and the component itself:
Two things combine into the reported behavior:
styletovoid 0, so the block grows to the full height of the content. "Show less" is the last child of the container in normal flow, so on a long initial prompt it lands thousands of pixels below the fold — matching the "scroll to the very bottom of the session to find it" workaround in the report.onClick: !s&&o ? d : void 0). So that off-screen button is the only way back, which is why the message effectively hijacks navigation.There is a related defect in the same component:
o(is-truncated) is measured once per[maxHeight, content], so resizing the sidebar never re-measures. A message that crosses the 60px threshold after a resize renders fully expanded with no button at all — that looks like the mechanism behind #85792 and #88512.Suggested fix
Capping the expanded height and letting it scroll internally fixes the reported symptom on its own, since "Show less" then always sits just under the block:
Making the button sticky within the container would work too. Re-enabling click-to-collapse while expanded (or wrapping the measurement in a
ResizeObserver) would address the second and third points respectively.I have been running the
70vh+overflowY:autovariant as a local patch on the shipped bundle for several releases and have not hit a layout regression from it.Note on identifiers
The names above are minifier output and change every release —
aathere was_ntin 2.1.239, and the effect-hook alias wentce→re→seacross 2.1.79 / 2.1.239 / 2.1.241. The structure has been stable; only the short names move.Still reproduces on
anthropic.claude-codev2.1.274 with VS Code 1.138.0 (Windows 11).Same symptom as described: on a large prompt, clicking Show more expands the message to full height with no internal scroll, and the Show less control lands off-screen. Since click-to-collapse is disabled while expanded, the only way back is scrolling the whole session down to find the button — which in my case made it feel like the modal for the previous prompt was stuck/unclosable while trying to work with a new one.
Environment
anthropic.claude-codev2.1.274+1 on the root-cause analysis above — the height cap only applying while collapsed, plus disabling click-to-collapse when expanded, matches what I'm seeing.
+1, would be great to have this fixed. Still happens on 2.1.284, macOS/VSCodium.