Start Thinking cards at content height - #353
Merged
Merged
Conversation
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
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 passednpm run lint:frontend:static -- src/frontend/web/von_interface/static/js/chatTab.jsgit diff --checkchatTab.jshashes matched