Skip to content

fix(data-studio): normalize thinking spacing and keep tool calls collapsed - #223

Merged
Blankll merged 1 commit into
masterfrom
fix/data-studio-thinking-and-tool-collapse
Nov 25, 2026
Merged

Blankll merged 1 commit into
masterfrom
fix/data-studio-thinking-and-tool-collapse

Conversation

@Blankll

@Blankll Blankll commented Nov 25, 2026

Copy link
Copy Markdown
Member

Summary

Fixes two UX issues in Data Studio's agent message timeline (src/components/agent-message-bubble.vue):

  1. Excessive spacing between thinking lines/paragraphs: .activity-body set white-space: pre-wrap and word-break: break-all, which were inherited by .activity-body.thinking-body and its child <MarkdownRender> output. Because markdown-it (breaks: true) emits literal \n characters between block tags (</p>\n<p>), after <br>\n, and after the final block, white-space: pre-wrap turned every HTML newline into an extra full blank line (~17.4px) on top of paragraph margins and at the bottom of the thinking container.

    • Removed white-space: pre-wrap and word-break: break-all from .activity-body (.tool-args-pre and .tool-result-pre already declare them directly).
    • Set white-space: normal; word-break: normal; on .activity-body.thinking-body and normalized compact block margins (margin: 0 0 4px on <p>, compact margins for headings/lists/pre/blockquotes, zero outer top/bottom margins).
  2. 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.

    • Removed the :open binding 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

  • Added unit tests in src/__tests__/agentOutcomes.test.ts covering default-closed state for all tool statuses, stability across executing → done transitions, and .thinking-body whitespace handling.
  • npm run lint:check — passed
  • npm run build (vue-tsc --noEmit && vite build) — passed
  • npm test — 68 suites, 944 tests passed
  • npm run test:ui — 3 Playwright UI tests passed
  • Verified /data-studio rendering in Chromium (light & dark themes): 4px symmetrical top/paragraph/bottom gaps in .thinking-body, tool calls collapsed by default and expanding cleanly on click.

@Blankll
Blankll merged commit e4fdb2e into master Nov 25, 2026
3 checks passed
@Blankll
Blankll deleted the fix/data-studio-thinking-and-tool-collapse branch November 25, 2026 08:07
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.

1 participant