Slash command/skill inputs not collapsible, blocks view of response
Bug
When invoking any skill or slash command with a large input (e.g., pasting 50+ lines of text as arguments), the user message renders at full height with no collapse toggle. The assistant's response is pushed far below the viewport, making it impossible to see what Claude is doing without scrolling past the entire input.
Regular user messages correctly collapse at 60px with a gradient overlay and expand/collapse button. Slash command messages bypass this.
Reproduces on both VS Code (macOS) and Claude Desktop (Windows).
Root cause (from reading the minified webview source)
In webview/index.js, regular user messages are wrapped in an expandable container component (Ho1) with maxHeight: 60:
// Regular messages — correctly collapsible
createElement(Ho1, {content: w, context: X, maxHeight: 60})
But when isSlashCommand is true, the text renders directly without the expandable wrapper:
// Slash commands — no collapse, renders full height
if (N.isSlashCommand)
return createElement("div",
{className: \`\${z2.userMessage} \${z2.slashCommandMessage}\`},
N.text // <-- raw text, no Ho1 wrapper
)
The Ho1 component provides the collapse behavior: it measures scrollHeight against maxHeight, and when content overflows, it adds a gradient overlay (truncationGradient_xGDvVg), sets overflow-y: hidden with a CSS transition, and renders expand/collapse buttons.
Attempted fix
Wrapping N.text in Ho1 crashes the webview:
Error rendering content: Cannot read properties of undefined (reading 'type')
Ho1 internally calls a child renderer that expects a structured content object, not a raw string. The fix needs to either:
- Wrap
N.textin the expected content shape before passing toHo1, or - Add a simpler CSS-only truncation (max-height + overflow hidden + gradient) to
.slashCommandMessage
Steps to reproduce
- Open Claude Code in VS Code or Desktop
- Invoke any skill with large input (50+ lines of text as arguments)
- The entire input renders expanded, no collapse button
- Assistant response is hidden below the fold — user cannot see progress
Expected
Slash command inputs should collapse like regular user messages, with a gradient and expand/collapse toggle.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗