gemini-cli PR fixes right-border bleed in scrollable tool containers
villahernandez-coder · ghdev · 2026-10-14
PR #29742 in google-gemini/gemini-cli fixes a rendering glitch where bordered tool output containers (expanded WriteFile/Edit views in compact mode, scrollable tool results in alternate buffer mode) intermittently break past the right border when a nested vertical scrollbar coexists with wrapped text.
Root cause
- In DenseToolMessage, the outer bordered Box (4 columns of border/padding chrome) was capped at PAYLOADMAXWIDTH (124), but ScrollableList received the width without subtracting PAYLOADBORDERCHROMEWIDTH, so on wide terminals (≥135 cols) the inner list spanned 124 columns, overwriting the border. Narrow terminals left a 4-column gap; colorizeCode/renderDiffLines also got unsafe widths.
- In ToolResultDisplay, nested components (MarkdownDisplay, DiffRenderer, etc.) were passed childWidth instead of childWidth - 1 despite the Scrollable reserving one column for the scrollbar.
Fix: compute safeContentWidth = Math.max(0, totalContainerWidth - borderSpace - scrollbarBuffer) in both places and apply it to nested boxes and text-wrapping containers.
More from coding & agent
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23
- How do you audit AI agent decisions in regulated workflows? A field survey — Ok_Way_1993 · 2026-10-23