# Rendering

URL: https://tuios.dev/blog/topic/rendering

> What tuios draws, and the bugs that put the wrong thing on screen.

## Posts

- [One fuzz failure was the test, one was the emulator](https://tuios.dev/blog/one-fuzz-failure-was-the-test.md): Two fuzz targets failed in tuios on the same evening. The kitty graphics target had an oracle that an allocator change left behind, and my first fix made it too lenient. FuzzModel found a real bug, a cut-off UTF-8 rune that ate the escape after it.
- [The background vanished under a tab](https://tuios.dev/blog/the-background-vanished-under-a-tab.md): Under tmux, a few cells beside the Inbox title showed the terminal's own background instead of the panel's. The bytes tuios sent were right. bubbletea moved the cursor with a hard tab, and tmux 3.6 and later keep that tab as one cell that a later write breaks.
- [The underline depended on which code drew it](https://tuios.dev/blog/the-underline-depended-on-which-code-drew-it.md): A focused tuios pane dropped SGR underline, and some unfocused panes dropped almost every attribute. tuios had five ways to draw a pane and only one kept everything, so the text changed when focus moved.
- [The screenshot cell was half measured and half guessed](https://tuios.dev/blog/the-cell-was-half-measured.md): Pane screenshots came out stretched. Two rounds of font maths got the cell shape wrong. The fix asks the host terminal for its real cell size in pixels.
- [The renderer was drawing a backlog it had caused](https://tuios.dev/blog/drawing-the-backlog.md): A flooded tuios pane kept painting 1.2 s after its source exited. The client's own renderer caused the backlog, and pacing by queued bytes halved the tail.
- [A fifth of every frame went to changing nothing](https://tuios.dev/blog/a-fifth-of-every-frame-went-to-changing-nothing.md): A profile put 19.8% of the tuios client in lipgloss.Wrap, rewrapping pane text already the right width. Skipping it was easy. Proving the skip safe was the work.
- [My differential tests passed and the screen was pink](https://tuios.dev/blog/my-differential-tests-passed-and-the-screen-was-pink.md): A style cache keyed by recycled libghostty-vt style IDs painted ls output hot pink, and a differential test suite that compared once, at the end, missed it.
- [My multiplexer lied about what it could do](https://tuios.dev/blog/a-terminal-that-lied-about-what-it-could-do.md): kitty icat drew nothing when tuios ran in a browser client, because the graphics passthrough said yes to file transmission without asking the host.
- [The bug I closed three times: a speckled sprite in a WebGL terminal](https://tuios.dev/blog/the-bug-i-closed-three-times.md): A speckled sprite in the tuios browser terminal. Three wrong closures, a test suite blind by construction, and a browser that salted its own pixel readback.
- [I ported a correct emoji width table and it fixed nothing](https://tuios.dev/blog/the-width-table-that-changed-nothing.md): Emoji widths were wrong in the tuios browser client. I ported ghostty's per-codepoint width table and nothing changed, because a terminal gives width to grapheme clusters, not to codepoints.
- [I shipped three fixes for a bug I had not found](https://tuios.dev/blog/three-fixes-for-a-bug-i-had-not-found.md): A tuios pane went blank on focus changes. I shipped three real fixes for other bugs before I reproduced it, and the cause was a window width read from its first line.
