Skip to content

fix(frame): render continuous box borders - #51

Merged
kitlangton merged 1 commit into
anomalyco:mainfrom
kitlangton:fix/box-drawing-alpha-joints
Aug 8, 2026
Merged

fix(frame): render continuous box borders#51
kitlangton merged 1 commit into
anomalyco:mainfrom
kitlangton:fix/box-drawing-alpha-joints

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Render light Unicode box-drawing characters as continuous pixel geometry in Drive's shared frame renderer. Captured OpenCode Mermaid diagrams now have uniform borders in both PNG exports and the browser catalog.

Before / After

Before: light box characters fell through to font rendering, leaving row-boundary gaps. Drawing connected segments geometrically initially exposed a second issue: overlapping translucent rectangles accumulated alpha at cell centers and junctions, producing periodic bright dashes and hotspots.

After: each box glyph paints a non-overlapping union of integer-aligned rectangles. Adjacent cells meet edge-to-edge, while every pixel inside a glyph is painted at most once.

How

  • packages/drive/src/frame/index.ts recognizes light lines, corners, rounded corners, tees, and crossings as shared geometric primitives.
  • packages/drive/test/frame.test.ts verifies integer alignment and rejects overlapping pixel coverage.
  • @opencode-ai/client is updated from next-16543 to next-17010; the manual interleaving fixture follows the canonical callID to id protocol rename.
  • A patch changeset records the published renderer fix.

Scope

This does not change OpenCode's native Mermaid generation or the standalone Merman package. It only changes how OpenCode Drive renders captured terminal frames.

Testing

  • bun run --cwd packages/drive test:effect (205 tests)
  • bun run --cwd packages/drive typecheck
  • bun run --cwd packages/drive lint
  • bun run --cwd apps/catalog typecheck
  • bun run --cwd apps/catalog test (28 tests)
  • bun run --cwd apps/catalog build

Demo

This is a real Drive PNG render of dim, translucent box glyphs before and after the fix, enlarged with nearest-neighbor scaling so individual terminal pixels remain visible.

Before and after Drive box rendering

@kitlangton
kitlangton merged commit b524213 into anomalyco:main Aug 8, 2026
1 check passed
@kitlangton
kitlangton deleted the fix/box-drawing-alpha-joints branch August 8, 2026 02:46
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