Skip to content

chore: remove the unused cell buffer - #137

Merged
meszmate merged 1 commit into
mainfrom
chore/remove-dead-screen-buffer
Aug 14, 2026
Merged

meszmate merged 1 commit into
mainfrom
chore/remove-dead-screen-buffer

Conversation

@meszmate

Copy link
Copy Markdown
Owner

Item 1 from the review.

src/terminal/screen.zig — Screen, Cell, Color, renderDiff, render — has no callers in src, tests, examples, or the reference. It was never wired into anything and has no tests.

Its presence actively misled. #125 was opened because a complete cell-level renderDiff sat next to a renderer that rewrote whole frames, and it was not obvious that the two work at different granularities — cells versus view strings. The render loop deals in view strings, so the line-level renderer in #131 is what it can actually use.

It also collided in the public namespace: zz.Screen is the screen-stack Screen, while zz.screen.Screen was the cell buffer.

Components that need a cell grid — canvas, braille_canvas, the layer compositor — each carry their own, so nothing is left without a home.

Breaking

zz.screen and zz.terminal.screen are removed. Nothing in the repo or the docs referenced them, and the library is pre-1.0, but it is a public symbol going away.

If you would rather keep it as a supported building block for custom drawing, say so and I will document and test it instead — but as it stands it is 300 lines that no code path reaches.

Conflict note

Touches the same two lines of terminal.zig and root.zig as #131. Whichever merges second needs a one-line rebase.

zig build test and zig build clean on 0.16.0.

`src/terminal/screen.zig` -- `Screen`, `Cell`, `Color`, `renderDiff`,
`render` -- had no callers in src, tests, examples or the reference. It
was never wired into anything.

Its presence actively misled: issue #125 was opened because a complete
cell-level `renderDiff` sat next to a renderer that rewrote whole
frames, and it was not obvious that the two work at different
granularities (cells vs. view strings). The line-level renderer is what
the render loop can actually use.

It also collided in the public namespace: `zz.Screen` is the screen-stack
Screen while `zz.screen.Screen` was the cell buffer.

Components that need a cell grid -- canvas, braille_canvas, the layer
compositor -- carry their own, so nothing is left without a home.
@meszmate
meszmate force-pushed the chore/remove-dead-screen-buffer branch from c6182a5 to ea79727 Compare August 14, 2026 03:40
@meszmate
meszmate merged commit 3ee5712 into main Aug 14, 2026
9 checks passed
@meszmate
meszmate deleted the chore/remove-dead-screen-buffer branch August 28, 2026 12:09
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