feat: ANSI color rendering in preview snapshots

Server: add -e flag to tmux capture-pane to preserve escape sequences.
Frontend: ansiToHtml() parser converts SGR codes (bold, italic, dim,
16-color, 256-color) to <span> tags with inline styles. Applied to
dashboard tiles, sidebar items, and hover overlay. No external deps.
This commit is contained in:
Brian Krabach
2026-03-29 18:24:15 -07:00
parent dbade5a3d9
commit b3b2165524
4 changed files with 130 additions and 12 deletions
+1
View File
@@ -105,6 +105,7 @@ async def capture_pane(session_name: str, lines: int = 30) -> str:
try:
return await run_tmux(
"capture-pane",
"-e", # preserve ANSI escape sequences for color rendering
"-p",
"-t",
session_name,