Skip to content

Start Thinking cards at content height - #353

Merged
witbrock merged 1 commit into
mainfrom
agent/thinking-card-initial-height
Aug 6, 2026
Merged

Start Thinking cards at content height#353
witbrock merged 1 commit into
mainfrom
agent/thinking-card-initial-height

Conversation

@witbrock

@witbrock witbrock commented Aug 6, 2026

Copy link
Copy Markdown
Member

What changed

  • Size a new Thinking card to its rendered initial content, bounded by the existing 220–520 px limits.
  • Preserve existing vertical drag-resizing, size controls, and remembered manual heights.
  • Add regression coverage for content-fitting initial height and update the retained-card starting-height expectations.

Why

The initial-height calculation capped every new card at 220 px even when its first rendered content was taller, forcing immediate scrolling or manual resizing.

User impact

Thinking cards now open tall enough for their initial content when it fits within the existing maximum, while remaining resizable.

Validation

  • npm test -- --runInBand --silent --runTestsByPath src/frontend/web/von_interface/static/js/test/chatTab.test.js — 258 passed
  • npm run lint:frontend:static -- src/frontend/web/von_interface/static/js/chatTab.js
  • git diff --check
  • Local and server-served chatTab.js hashes matched

Copilot AI lite review requested due to automatic review settings August 6, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the frontend “Thinking” card initial-height calculation so new cards open at a height that fits their initially rendered content (within the existing 220–520px bounds), while preserving manual resize behaviour and stored heights.

Changes:

  • Refactors the initial thinking-card body height logic into a dedicated helper and removes the previous “always cap at default height” behaviour.
  • Updates retained-card height expectations to match the new initial-height behaviour.
  • Adds a regression test ensuring the active thinking card starts tall enough for its initial content.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/frontend/web/von_interface/static/js/chatTab.js Introduces getThinkingCardInitialBodyHeightPx() and updates height initialisation to size to initial content (clamped).
src/frontend/web/von_interface/static/js/test/chatTab.test.js Updates retained-card height assertions and adds a regression test for content-fitting initial height.

@witbrock
witbrock merged commit d989f92 into main Aug 6, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants