User-message bubble background partially missing in multiplexer grids (tmux/herdr), dependent on per-row paint SGR shape
Description
Reopening a session repaints the restored user-message block with its dark background band covering only part of the block: the band fills the message's first rows and stops mid-row, leaving the message's continuation rows unstyled. Visually this is a big black bar over some of the message text (the text stays legible, white-on-black under the band) with a ragged bottom edge. The artifact is settled — two captures at different times are identical — and it scales with theme: on a light-background terminal the band reads as a black bar over the text.
Steps to Reproduce
- In a project, run a session whose first user message renders as a ≥6-row message block (message text plus a numbered list).
- Exit, then reopen the session so startup restores the message tail under the welcome screen.
- Observe the message block: its background band covers only the first ~3 rows and stops mid-row; the remaining rows render without the band.
Deterministic capture used for this report: tmux new-session -d -x 224 -y 37 running omp --resume <session>, then tmux capture-pane -e -p. A scan of cell backgrounds shows the block's band rgb(35,38,43) on rows 26–28 (to each row's text extent) and row 29 col 0 only, while rows 29–31 (message items 2–4) carry no band. Captures taken immediately after the block painted and again after later startup notices are identical, so this is the settled state, not a mid-paint snapshot. Reproduced at 224×24 as well.
Expected Behavior
The message block's background covers the entire block (all of its rows) or none of it — never a partial band with a ragged edge over message text.
Root Cause (verified — supersedes the original narrowing)
Located and verified; full evidence in the comments. Three claims in the original report were wrong and are corrected here:
- Not restore-specific. The partial band appears live, right after sending in a fresh session — if anything more partial there — and persists on
--resume. The restore path is innocent. - Not an omp paint defect. The byte stream omp writes paints every bubble row with
userMessageBg(rgb(35,38,43)) through full-width trailing padding, terminated byESC[49m— verified viatmux pipe-paneraw capture and a clean PTY run with no multiplexer (full VT replay of the same bytes shows the complete band). - Not capture trimming. Trailing blank cells are trimmed regardless of SGR (so "band stops at text extent" is expected capture behavior), but the missing band on message rows survives
capture-pane -Nand is genuinely absent from the multiplexer's grid.
The defect class is multiplexer grid state loss: rows whose paint begins with a bare ESC[48;2;…m (no ESC[0m/ESC[K earlier in the row) lose the background in tmux's grid, while rows that establish the background after ESC[0m/ESC[K keep it (with unreduced cell-level exceptions at a row's leading run). The reporter's display is herdr, where the same ragged band renders on screen — [INFERENCE] the same grid-state class; herdr was not separately instrumented. A standards VT fed the identical bytes shows the full band.
omp-side hardening candidate: begin each committed row's paint with ESC[0m/ESC[K so grid state cannot inherit a bare bg-set. Whether to harden or treat as multiplexer upstream is a maintainer call (per-cell matrix and raw paint dump in the comments).
Environment
- Platform: Linux
- omp version: omp/18.4.8
- Bun version: 1.4.2
- Area: TUI / Display
Additional context
- Originally reported from a screenshot showing the same artifact on a session in the same project (message tail "…more details extracted from the file", light theme: black bar over white page). The reproduction above used a same-project session with a same-shaped message block; exact session content is not identical, but the trigger (session reopen / restore) and the artifact (partial band with ragged edge over message rows) match.
- No "worked before" claim was made, so this is not framed as a regression.
Source: can1357/oh-my-pi