Repository navigation
Description
What happened
Lazygit's vertical borders and scrollbar thumbs look dashed: visible gaps appear between terminal rows instead of continuous lines and blocks. This happens immediately in the official macOS desktop beta, including with the default terminal font at 12px.
Diagnosis
In apps/web/src/terminal/ghostty/renderer.ts, measureGhosttyCell uses max(round(fontSize * 1.35), measured glyph height). renderGhosttySnapshot draws box-drawing and block characters with fillText and clips them to each row. Font glyphs can be shorter than the cell, leaving gaps. Powerline separators already have cell-sized geometric rendering; box-drawing/block characters do not.
Version-pinned source:
t3code/apps/web/src/terminal/ghostty/renderer.ts
Lines 87 to 103 in 24e7747
| export function measureGhosttyCell( | |
| context: CanvasRenderingContext2D, | |
| fontSize: number, | |
| fontFamily: string, | |
| ): GhosttyCellMetrics { | |
| context.font = `normal 400 ${fontSize}px ${fontFamily}`; | |
| const widthMeasurement = context.measureText("M"); | |
| const verticalMeasurement = context.measureText("Mg"); | |
| const ascent = verticalMeasurement.actualBoundingBoxAscent || fontSize; | |
| const descent = verticalMeasurement.actualBoundingBoxDescent; | |
| const glyphHeight = ascent + descent; | |
| const height = Math.max(1, Math.round(fontSize * 1.35), Math.ceil(glyphHeight)); | |
| return { | |
| width: Math.max(1, widthMeasurement.width), | |
| height, | |
| baseline: Math.round((height - glyphHeight) / 2 + ascent), | |
| }; |
t3code/apps/web/src/terminal/ghostty/renderer.ts
Lines 238 to 255 in 24e7747
| if (!first.invisible && text.trim().length > 0) { | |
| context.save(); | |
| context.beginPath(); | |
| context.rect( | |
| padding + runStart * metrics.width, | |
| top, | |
| (runEnd - runStart) * metrics.width, | |
| metrics.height, | |
| ); | |
| context.clip(); | |
| context.font = fontForCell(first, fontSize, fontFamily); | |
| context.fillStyle = cssColor(first.foreground); | |
| context.fillText( | |
| text, | |
| padding + runStart * metrics.width, | |
| top + metrics.baseline, | |
| (runEnd - runStart) * metrics.width, | |
| ); |
Suggested scope: draw terminal graphics from cell edges, preserving the current font size, row spacing, themes, and transport.
Steps to reproduce
- Open the integrated terminal in official T3 Code desktop 0.1.9 on macOS, using the default terminal font at 12px.
- Run lazygit 0.56.0 in a Git repository with modified files. Use enough files to show a scrollbar.
- Inspect vertical panel borders and the block-shaped scrollbar thumb.
Expected: continuous lines and blocks.
Actual: repeated gaps at row boundaries.
Version
T3 Code desktop/server 0.1.9; commit 24e7747.
Environment
macOS 26.3 (25D5101c), Apple Silicon arm64; desktop app with its local server; lazygit 0.56.0 (MacPorts); default terminal font, 12px; 2x display-scale reproduction.
Evidence
Screenshots show the gaps. A browser harness replayed captured lazygit ANSI output through the release's Ghostty WASM and real renderer. At 12px with the default font stack, cells measured 7.224609375 x 16px. Across 88 border/scrollbar cells, the original renderer had 284 empty scanlines; a cell-geometry proof-of-fix had zero. This is renderer-harness evidence, not a live patched-app test. Before/after PNGs and the release-targeted patch are available to attach.Related issues
#24888 explicitly excludes box-drawing/block characters. #34552 fixes rounded Powerline caps only. #27516 proposed a cell-height setting; this report requests continuous graphics without changing default spacing.
Fix applied or workaround
No reliable settings-only workaround was found. Font/size experiments were reverted to the default font and 12px. A separate local proof-of-fix passed 66 existing terminal tests and web/desktop builds, but was not installed or launched. The user is keeping the official beta and its updates. No PR has been submitted.
Filed by
Codex / gpt-6.1-sol via T3 Code triage.
Activity