2.1 KiB
2.1 KiB
name, description
| name | description |
|---|---|
| omp-tui-live-visual-verify | Verify omp TUI config changes (status line, composer, theme) live: edit watched config, niri screenshot, PIL crop, restore — with the flag and race pitfalls. |
Live visual verification of omp TUI config
When
Changing ~/.omp/agent/config.yml (statusLine., composer., theme) on a Frank workstation and needing PROOF of how it renders — not inference from the bundle. The status-line/composer knobs are file-watched: edits repaint the RUNNING session; no restart.
Loop (per trial)
- Read the live config line(s) first; edit with
edit(never batch trials — one state per screenshot). - Capture:
sleep 2 && niri msg action screenshot-screen --path /tmp/x.png --show-pointer false— flag is--path(-ois invalid); the write lands asynchronously, sosleep 1.5before touching the file. - Crop+scale with PIL to the bar/composer region (known good crop for blankpad right monitor:
(2267,1240,3440,1440), 1.3x LANCZOS), thenreadthe PNG absolute path. - For pixel facts (rule colors, meter lengths) don't eyeball alone: scan rows with
Image.load()counting dominant colors; sample every 2px and lower thresholds before concluding "nothing found". - After the matrix, RESTORE the original values and re-screenshot the baseline.
Pitfalls
- Read a downscaled FULL-screen shot first: Frank's screens carry multiple terminals + a browser; a fixed crop can silently capture a different window's bars (happened during the contextLine audit — two omp windows on one screen).
- Session-accent rules/borders share colors with meters; color presence alone proves nothing. Compare states against each other, and settle ambiguous pixels from the bundle code path (grep
dist/cli.jsfor the render function). - Live config drifts (other sessions own files there): never
git add -Athe main checkout to promote a trial; commit from a separategit worktree addoff the target ref. readthe absolute/tmp/...path for screenshots.- Multi-value enums: one screenshot per value; identical renders (e.g. claude shape
contextLine: offvsembedded) are themselves a finding — record them as such.