Skip to content

Wrap long lines in expanded tool call bodies instead of scrolling horizontally - #430

Merged
currentbits merged 1 commit into
mainfrom
coder/tool-call-bodies-scroll-horizontally-ins-5c8382
Aug 18, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/tool-call-bodies-scroll-horizontally-ins-5c8382

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Fixes #326.

Problem

Expanded tool calls in the agent thread pane grew a horizontal scrollbar whenever the tool input or output contained long lines. The thread view is meant to never scroll horizontally — .body already sets overflow-x: hidden with a comment saying exactly that — so long lines should wrap instead.

Change

One rule in src/components/ThreadView.module.css:

 .toolPre {
   ...
-  white-space: pre;
-  overflow-x: auto;
+  white-space: pre-wrap;
+  overflow-wrap: anywhere;
+  overflow-x: hidden;
   max-width: 100%;
 }

.toolPre is shared by both the tool input and tool output <pre> elements (ThreadView.tsx:383 and :387), so this single rule fixes both panes.

overflow-wrap: anywhere rather than break-word is deliberate: tool bodies are full of unbroken tokens — long file paths, URLs, base64 — that break-word refuses to split, and anywhere also constrains the element's min-content width so it can't force its flex container wider.

Not changed

.diffLine keeps white-space: pre and its container keeps overflow: auto. Diff hunks need their columns aligned, so scrolling there is intentional, not the same bug.

Verification

  • .toolPre has no other consumers — grepped src/.
  • Audited every remaining overflow-x / white-space: pre rule in the stylesheet; nothing else reintroduces a horizontal scrollbar in the pane.
  • npm run typecheck passes.

Not visually checked in a running build — the diff is a CSS property swap with no TypeScript surface.

  • PR created by the Claude Code agent

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 5aa0704 into main Aug 18, 2026
1 check failed
@currentbits
currentbits deleted the coder/tool-call-bodies-scroll-horizontally-ins-5c8382 branch October 3, 2026 16: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.

Tool call bodies scroll horizontally instead of wrapping

1 participant