zot/internal/tui
patriceckhart 998a062a20 tui: render inline images inside tool boxes
Two fixes for image-block rendering after the box refactor.

clipBottomClippedImages decides whether to suppress an image escape
this frame by scanning forward for the matching "image - ..." info
line, treating any non-blank intervening row as a blocker. The image
block layout is: escape row + N blank reservation rows + info row.
With tool boxes, the reservation rows are wrapped as "\u2502    \u2026    \u2502"
and the naive whitespace check now sees them as non-blank \u2014 the scan
broke before reaching the info line, decided the image was clipped,
and zeroed out the escape sequence. Result: a tall blank gap inside
the box where the image should be, with only the metadata caption
visible at the bottom (visible on iTerm2 / Kitty / WezTerm).

Add isBoxBlankLine() that strips ANSI escapes, surrounding whitespace,
and \u2502 box edges before checking for emptiness. Use it in both
clipBottomClippedImages and snapViewportStartToImageBlock so the
viewport snap-back also recognises wrapped reservation rows.

Also add one extra blank reservation row between the image footprint
and the muted "image - mime - WxH - sizeKB" caption, so the caption
doesn't sit flush against the last pixel row of the image.
2026-04-28 08:11:58 +02:00
..
editor.go tui: require pasted path candidates to exist on disk 2026-04-27 10:59:23 +02:00
highlight.go chore: scrub stray "pi" references from source comments 2026-04-19 17:06:45 +02:00
image.go fix(tui): stabilize inline image scrolling 2026-04-26 11:20:25 +02:00
image_test.go fix(tui): stabilize inline image scrolling 2026-04-26 11:20:25 +02:00
input.go add collapsible code blocks 2026-04-18 10:30:29 +02:00
markdown.go feat(tui): context diffs + framed tool blocks + paced streaming 2026-04-20 15:50:39 +02:00
partialjson.go feat(tui): live-stream file body during write/edit tool calls 2026-04-20 08:37:14 +02:00
partialjson_test.go feat(tui): live-stream file body during write/edit tool calls 2026-04-20 08:37:14 +02:00
paste_collapse_test.go tweak(tui): two-threshold paste collapse with line-vs-char shape 2026-04-21 17:13:23 +02:00
quote_paste_test.go tui: skip path-quoting tests on windows 2026-04-27 11:14:39 +02:00
render.go fix(tui): VS Code ghost highlight on selection navigation 2026-04-25 20:49:41 +02:00
resize_unix.go fix ci: portable syscall.Select via x/sys/unix; gofmt pass 2026-04-18 10:55:42 +02:00
resize_windows.go initial commit 2026-04-17 20:36:38 +02:00
statusbar_test.go feat(ext): phase 4 - full-event interception, arg rewrites, /reload-ext 2026-04-19 17:02:04 +02:00
terminal.go initial commit 2026-04-17 20:36:38 +02:00
theme.go tui: unify accent bar, narrow status split, restore session usage 2026-04-27 19:51:36 +02:00
view.go tui: render inline images inside tool boxes 2026-04-28 08:11:58 +02:00
wrap_test.go feat(tui): collapse multi-line pastes to a placeholder token 2026-04-21 08:47:36 +02:00