Skip to content

fix(chat-ui): tighten execute command spacing - #2969

Open
janburzinski wants to merge 4 commits into
generalaction:mainfrom
janburzinski:jan/eng-1931-reduce-unnecessary-bottom-spacing-in-the-execution-area
Open

fix(chat-ui): tighten execute command spacing#2969
janburzinski wants to merge 4 commits into
generalaction:mainfrom
janburzinski:jan/eng-1931-reduce-unnecessary-bottom-spacing-in-the-execution-area

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

Reduces unnecessary bottom spacing in collapsed Execute cards while keeping long commands fully accessible.

  • Measures only visible command lines while collapsed instead of hidden output and spacer lines
  • Keeps short, medium, and long commands at a consistent compact height
  • Preserves horizontal scrolling for long commands
  • Reserves scrollbar clearance only when the browser’s native scrollbar actually consumes layout space
  • Keeps captured output available in the expanded state

Screenshot/Recording (if applicable)

before:
image

after:
image

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Tightens collapsed Execute-card geometry while preserving expanded output and horizontal scrolling.

  • Measures collapsed cards from command lines only, excluding hidden output.
  • Detects whether native horizontal scrollbars consume layout height.
  • Uses the configured code-font line height for initial estimates.
  • Adds Storybook coverage for completed commands of varying lengths.

Confidence Score: 5/5

The PR appears safe to merge with no concrete behavioral, security, or build failures identified.

Collapsed cards now exclude hidden output from measurement while expansion reactively restores the preserved output, and rendered scrollbar clearance remains aligned with the measured row geometry.

Important Files Changed

Filename Overview
packages/chat-ui/src/components/rows/tools/execute/Execute.tsx Separates visual scrollbar sizing from consumed layout clearance and incorporates that clearance into body height.
packages/chat-ui/src/components/rows/tools/execute/execute.def.tsx Restricts collapsed geometry to visible command lines, measures native scrollbar clearance, and aligns estimates with the theme’s code line height.
packages/chat-ui/src/stories/rows/tools/execute.stories.tsx Adds representative short, medium, and horizontally overflowing completed-command examples.

Reviews (1): Last reviewed commit: "refactor(chat-ui): simplify execute over..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant