Skip to content

Integrated terminal renders gaps in lazygit borders and scrollbar blocks #36394

Open

Description

@heartwerktech

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:

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),
};

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

  1. Open the integrated terminal in official T3 Code desktop 0.1.9 on macOS, using the default terminal font at 12px.
  2. Run lazygit 0.56.0 in a Git repository with modified files. Use enough files to show a scrollbar.
  3. 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

  1. kluzzebass commented on Nov 19, 2026

    @kluzzebass

    Same defect here on T3 Code desktop 0.1.10 (macOS 27.2.1, Apple Silicon, default terminal font at 12px). Not limited to lazygit: Textual apps (here dcat tui, Textual's "tall" border uses ▎ / ▕) show the same dashed borders and scrollbar, both directly in the integrated terminal and inside tmux 3.8. Ghostty 1.4.0 on the same machine renders them solid.

    Minimal repro

    The script below prints six rows of seven columns. Each column repeats one character, so every column should be one unbroken vertical bar. Column A (background-coloured spaces) and column G (U+E0B0, which the renderer draws as a path) are controls.

    Col Character Ghostty T3 Code T3 Code + tmux
    A background-coloured spaces solid solid solid
    B U+2588 full block solid gap after every row gap after every row
    C U+258E left one quarter block solid gaps gaps
    D U+2595 right one eighth block solid gaps gaps
    E U+2502 box drawings light vertical solid gaps gaps
    F U+2503 box drawings heavy vertical solid gaps gaps
    G U+E0B0 Powerline arrow joined joined joined

    The box frame and the quadrant-block shape at the bottom break into separate rows the same way. The two controls staying solid fits the diagnosis above: the cells themselves touch, and only glyphs taken from the font fall short of the 1.35× row.

    Version 0.1.10 still has it, so the fix in #37080 has not shipped yet; this is a macOS data point for that PR, whose proof was Linux Chromium only.

    blocks-repro.sh
    #!/bin/sh
    # Minimal repro: block and box-drawing characters should join into solid
    # shapes across rows. Every glyph is literal UTF-8 in this file, so the
    # output does not depend on the shell's locale.
    #
    # Expected (Ghostty, iTerm2, Terminal.app): every column is an unbroken bar.
    # T3 Code: glyphs from the font are shorter than the 1.35x row, so bars
    # show gaps between rows. Column A uses background-coloured spaces and
    # column G uses a Powerline glyph T3 draws itself: both stay solid and
    # serve as the control.
    
    B='\033[44m'   # blue background
    R='\033[0m'
    
    printf '  A    B  C  D  E  F  G\n'
    i=0
    while [ $i -lt 6 ]; do
      printf "  ${B}  ${R}   █  ▎  ▕  │  ┃  \n"
      i=$((i + 1))
    done
    printf '\n'
    printf '  A  background-coloured spaces (control, always solid)\n'
    printf '  B  U+2588 FULL BLOCK\n'
    printf '  C  U+258E LEFT ONE QUARTER BLOCK   (Textual "tall" border)\n'
    printf '  D  U+2595 RIGHT ONE EIGHTH BLOCK   (Textual "tall" border)\n'
    printf '  E  U+2502 BOX DRAWINGS LIGHT VERTICAL\n'
    printf '  F  U+2503 BOX DRAWINGS HEAVY VERTICAL\n'
    printf '  G  U+E0B0 Powerline arrow (drawn by T3 itself, control)\n'
    printf '\n'
    printf '  ┌──────┐  ▗▄▄▄▄▄▖\n'
    printf '  │ box  │  ▐████▌\n'
    printf '  └──────┘  ▝▀▀▀▀▀▘\n'

    Posted by Claude Code (Claude Opus 5.5) on the reporter's behalf, after investigating the shipped renderer bundle.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions