zot/internal
patriceckhart 42173ed45d tui: user bubble layout, OSC 11 theme detection, image footprint fix
User message bubble redesign:

- No more "\u258c you" / "\u258c zot" speaker labels; turns are
  delimited by a tinted bubble panel for the user side and plain
  prose for the assistant side.
- The bubble is a full-width tinted row prefixed by an accent "\u258c "
  bar (BG behind the bar matches the panel so bar and panel read as
  one continuous coloured strip). One blank tinted row above and
  below the message gives the bubble vertical breathing room \u2014 the
  closest a terminal can get to css padding-top / padding-bottom.
- Theme.UserBubble + Theme.UserBubbleBG/FG carry the panel colours.
- /btw side-chat reuses the same bubble helper so it matches the
  main chat layout.
- One blank line above the slash popup, the dialog block, and the
  sliding-in chips so they don't sit flush against the chat above.
- One trailing blank inside the /btw frame after the editor.

Tool box outer/inner geometry:

- toolBoxOuterMargin pulls the box frame in from the terminal
  edges so user bubble, assistant prose, and box frames all share
  the same left/right column.
- Image-footprint rows (escape + reservation blanks + caption gap)
  are now tagged with imageFootprintSentinel by renderImageBlock
  and the three box-side wrappers strip the tag and still wrap the
  rows in \u2502 \u2026 \u2502 so the box edges stay continuous around the
  image. The escape is indented inside the frame instead of
  kissing the \u2502.
- toolBoxSide bypasses width measurement / truncation when the row
  carries an iTerm OSC 1337 or Kitty APC G escape: visibleWidth
  doesn't recognise OSC payloads and was destroying the image
  bytes when wrapping turned them into thousand-cell-wide rows.

Markdown / code fences:

- RenderMarkdown emits a FlushLeftSentinel byte at the start of
  every fenced code-block line so a future caller can opt those
  rows out of prose indent. The current consumer doesn't strip
  the sentinel, but stale callers in skills / changelog / btw /
  compaction summaries do, so leftover sentinels never leak into
  rendered output.

Theme detection:

- New tui.DetectThemeFromBackground(timeout) probes the terminal
  via OSC 11, parses rgb:RRRR/GGGG/BBBB, and returns Light if
  Rec. 709 luma >= 0.5 else Dark. ZOT_THEME=dark|light overrides
  the probe. Falls back to Dark when the terminal doesn't
  respond within the timeout (Linux console, certain VS Code
  configs, tmux without pass-through).
- cli.go now picks the theme via DetectThemeFromBackground
  instead of hard-coding tui.Dark.
- Light theme bubble palette tuned (UserBubbleBG 254 / FG 240) so
  user rows stay legible on a light terminal.

Editor / spinner polish:

- Editor prompt remains the AccentBar in Theme.Accent.
- One "funny working line" entry softened from "go generics" to
  "the code".
2026-05-03 10:18:48 +02:00
..
agent tui: user bubble layout, OSC 11 theme detection, image footprint fix 2026-05-03 10:18:48 +02:00
assets assets: refresh zot logo to cleaner pixel-art Z 2026-04-20 12:01:43 +02:00
auth feat(auth): headless OAuth with paste-code input 2026-04-22 17:49:11 +02:00
core core: sort sessions by last-modified instead of filename 2026-04-28 19:13:59 +02:00
extproto feat(ext): interactive extension panels + persistence 2026-04-22 08:53:21 +02:00
provider anthropic: downscale oversized images on outbound requests 2026-04-28 12:48:13 +02:00
skills perf(prompt): cut system prompt to the bone (410 -> 54 tokens) 2026-04-19 17:39:38 +02:00
tui tui: user bubble layout, OSC 11 theme detection, image footprint fix 2026-05-03 10:18:48 +02:00