Skip to content

fix(renderer): eliminate box-drawing gaps - #60

Merged
jarmak-personal merged 1 commit into
hvir-mainfrom
fix/issue-52-box-drawing
Aug 10, 2026
Merged

jarmak-personal merged 1 commit into
hvir-mainfrom
fix/issue-52-box-drawing

Conversation

@jarmak-personal

Copy link
Copy Markdown
Owner

Closes #52

Summary

  • draw a focused set of 26 uniform light/heavy and rounded box-drawing glyphs as device-pixel-aligned Canvas geometry
  • align cell metrics to the physical-pixel grid without shrinking the existing CSS-ceiled dimensions
  • keep canvas backing dimensions stable at fractional DPRs and preserve selection, inverse, faint, and cursor styling
  • retain font rendering for mixed-weight, dashed, double-line, block-element, and grapheme cases

Design notes

I reviewed upstream PRs coder#128 and coder#146, but did not copy either implementation: coder#128 expands into unrelated block/Powerline/visual-infrastructure work, while coder#146 later includes unrelated performance changes. This PR keeps the fix scoped to the reproducible box-drawing seams and uses a single fill path for intersecting straight strokes so translucent/faint cells composite once.

Verification

  • bun run fmt
  • bun run lint (pre-existing diagnostics only)
  • bun run typecheck
  • bun test (541 passing, 0 failing)
  • bun run build
  • geometry coverage across 11/15/19/21px fonts and DPR 1/1.25/1.5/2
  • ESM and UMD external-WASM smoke checks

@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
@jarmak-personal

Copy link
Copy Markdown
Owner Author

External review disposition:

  • Gemini 3.6 Flash: CLEAN.
  • GPT-5.4 Mini raised two faint-style behaviors (block-cursor accent alpha and decoration alpha). I traced both through origin/hvir-main; both code paths are unchanged on the base branch and are not regressions from this PR, so they are intentionally left out of Eliminate box-drawing gaps at fractional device scales #52.

No review-driven code changes were required.

@jarmak-personal

Copy link
Copy Markdown
Owner Author

Full Opus review disposition (claude-opus-4-8, max effort): approve / merge.

Opus found no blocking correctness, security, performance, or regression issue. It independently verified the device-grid invariant, stroke centering, single-composite faint behavior, run isolation, fallback/grapheme path, all 26 glyph mappings and rounded orientations, stable backing-store sizing, and test-harness fidelity.

Non-blocking notes consciously accepted for this scoped fix:

  • 1/3-device-pixel light/heavy strokes prioritize crisp odd-width geometry over font-scaled/native weight parity.
  • Rounding cells upward at fractional DPR can slightly reduce fitted rows/columns; this avoids shrinking legacy cell bounds or clipping fallback glyphs.
  • Runtime DPR changes remain a pre-existing renderer lifecycle gap and belong in a separate follow-up.
  • Broader mixed/dashed/double/block glyph coverage remains intentionally font-rendered.

No Opus-driven code changes are required.

@jarmak-personal
jarmak-personal merged commit db36c3b into hvir-main Aug 10, 2026
10 checks passed
@jarmak-personal
jarmak-personal deleted the fix/issue-52-box-drawing branch August 10, 2026 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate box-drawing gaps at fractional device scales

1 participant