Skip to content

fix(view): flush block/box glyphs via the canvas renderer (v0.4.1)#5

Merged
mabry1985 merged 1 commit into
mainfrom
fix/flush-block-glyphs
Jun 13, 2026
Merged

fix(view): flush block/box glyphs via the canvas renderer (v0.4.1)#5
mabry1985 merged 1 commit into
mainfrom
fix/flush-block-glyphs

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Block art rendered inside the terminal (e.g. the Claude Code splash) showed seams. Cause: xterm 5.x defaults to the DOM renderer, which draws block/box glyphs (▛▜▝▘█▐▌) from the font — fonts rarely fill the full cell, so contiguous blocks gap.

Fix: load the vendored @xterm/addon-canvas + customGlyphs: true (+ lineHeight: 1.0), so those glyphs are drawn as exact cell-filling shapes → flush, no seams (this is why protoMaker shipped a GPU renderer). Also resolve the mono font concretely — the canvas font string can't read var(--pl-font-mono), so we read it and append fallbacks.

vendor/addon-canvas.js added + whitelisted. Tests: the new asset is served + the page references CanvasAddon/customGlyphs. 20 tests green.

Block art (e.g. the Claude Code splash run inside the terminal) showed seams: xterm
5.x defaults to the DOM renderer, which draws block/box glyphs from the font (gappy).
Load the vendored @xterm/addon-canvas + set customGlyphs:true (and lineHeight:1.0) so
those glyphs are drawn as exact cell-filling shapes — flush, no seams. Also resolve
the mono font CONCRETELY (the canvas font string can't read var(--pl-font-mono)).

vendor/addon-canvas.js added + whitelisted; tests cover the asset + the CanvasAddon/
customGlyphs markers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@mabry1985 mabry1985 merged commit 501ef84 into main Jun 13, 2026
1 check passed
@mabry1985 mabry1985 deleted the fix/flush-block-glyphs branch June 13, 2026 18:59

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #5 | fix(view): flush block/box glyphs via the canvas renderer (v0.4.1)

VERDICT: WARN (CI still queued — non-blocking comment; will re-evaluate once checks settle)


CI Status

  • test: queued

Diff Review

  • Switches xterm from DOM renderer to canvas renderer (+ customGlyphs:true, lineHeight:1.0) so block/box glyphs (▛▜▝▘█▐▌) render as exact cell-filling shapes — no seams.
  • Resolves --pl-font-mono CSS variable concretely before passing to fontFamily — the canvas font string can't read CSS vars (correct fix).
  • Vendored addon-canvas.js is self-served + whitelisted in api.py MIME map.
  • CanvasAddon loads best-effort via try/catch — DOM renderer fallback is safe (customGlyphs is a no-op on DOM).

Observations

  • LOW: Empty catch block on term.loadAddon(new CanvasAddon()) silently swallows errors. Consider console.warn for diagnostics (non-blocking).
  • GAP: clawpatch structural review unavailable (repo not in project registry). Diff-based review only.
  • The vendored addon-canvas.js (~29KB) is standard xterm.js addon bundling — no concerns.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

Submitted COMMENT review on protoLabsAI/terminal-plugin#5.

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.

1 participant