Repository navigation
fix(data-studio): normalize thinking spacing and keep tool calls collapsed - #223
Merged
Merged
Conversation
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.
Summary
Fixes two UX issues in Data Studio's agent message timeline (
src/components/agent-message-bubble.vue):Excessive spacing between thinking lines/paragraphs:
.activity-bodysetwhite-space: pre-wrapandword-break: break-all, which were inherited by.activity-body.thinking-bodyand its child<MarkdownRender>output. Becausemarkdown-it(breaks: true) emits literal\ncharacters between block tags (</p>\n<p>), after<br>\n, and after the final block,white-space: pre-wrapturned every HTML newline into an extra full blank line (~17.4px) on top of paragraph margins and at the bottom of the thinking container.white-space: pre-wrapandword-break: break-allfrom.activity-body(.tool-args-preand.tool-result-prealready declare them directly).white-space: normal; word-break: normal;on.activity-body.thinking-bodyand normalized compact block margins (margin: 0 0 4pxon<p>, compact margins for headings/lists/pre/blockquotes, zero outer top/bottom margins).Tool calls auto-expanding then collapsing (screen shaking): The tool call
<details>bound:open="tc.status === 'error' || tc.status === 'executing'", expanding every tool call while executing and collapsing it on completion.:openbinding so tool call<details>stay closed by default across all statuses and only open on user click (preserving user-toggled state across status transitions; error/denied/interrupted notices remain visible outside<details>).Verification
src/__tests__/agentOutcomes.test.tscovering default-closed state for all tool statuses, stability acrossexecuting→donetransitions, and.thinking-bodywhitespace handling.npm run lint:check— passednpm run build(vue-tsc --noEmit && vite build) — passednpm test— 68 suites, 944 tests passednpm run test:ui— 3 Playwright UI tests passed/data-studiorendering in Chromium (light & dark themes): 4px symmetrical top/paragraph/bottom gaps in.thinking-body, tool calls collapsed by default and expanding cleanly on click.