polish-wg-html

Polish: wg html — chat task color (blue not yellow), markdown description rendering with raw/pretty toggle

Metadata

Statusdone
Assignedagent-1278
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:sonnet
Created2026-04-30T16:26:55.858325828+00:00
Started2026-04-30T16:33:16.534996943+00:00
Completed2026-04-30T17:02:18.449216076+00:00
Tagsfix,html,viz,polish, eval-scheduled
Eval score0.73
└ blocking impact0.76
└ completeness0.68
└ constraint fidelity0.85
└ coordination overhead0.78
└ correctness0.72
└ downstream usability0.68
└ efficiency0.75
└ intent fidelity0.94
└ style adherence0.80

Description

Description

Two small polish items on the wg html output. User reports the html viewer is 'fantastic and really appears that it's doing the right thing' for general use (rsync to a public URL), but two specifics need refinement:

Item 1: Chat task color

Chat tasks (.chat-* ids) currently render in yellow in the html output. They should render in the blue we use in the TUI for chat agents.

User quote: 'the chat in particular, those are shown as yellow, they should be shown as this nice blue color which we're using.'

Action:

  • Find the TUI's chat-task color (likely in src/tui/viz_viewer/state.rs near the status palette — was cited as src/tui/viz_viewer/state.rs:271 (flash_color_for_status) by wg-html-v2's task log, but the chat-specific color may be elsewhere)
  • Apply the same RGB triple to the html output's chat-task styling
  • Verify dark theme + light theme both render correctly

Item 2: Markdown description rendering

Task descriptions are typically well-formatted markdown but render as raw text in the side panel. Pretty-print them as HTML (with code blocks syntax-highlighted, lists, headings, links).

User quote: 'the description is usually well-formatted markdown, and frankly, we should use a nice system to pretty print that in HTML. However, I would like it to be possible to switch back and forth between raw and HTML, like pretty printed views. It should default to the HTML, though, and the switch should be unobtrusive.'

Spec:

  • Default rendering: pretty-printed markdown (parsed via a sensible Rust crate — pulldown-cmark is the standard; a JS markdown renderer like marked would also work but adds runtime dep, prefer build-time rendering)
  • Toggle UI: small button or icon in the corner of the description panel — 'raw' / 'pretty' label or a discreet code-vs-document icon. Default state shows pretty; clicking toggles to raw; clicking again toggles back.
  • Unobtrusive: don't add a chrome bar or large button; small + corner-placed
  • localStorage persistence: remember the user's last choice

Validation

  • Failing test or repro: open wg html output in browser, locate a chat task. Pre-fix: yellow. Post-fix: blue (matching TUI's chat color RGB triple).
  • Live smoke: chat tasks render blue in BOTH dark and light themes
  • Live smoke: clicking a task with markdown description shows pretty-printed version (lists rendered, code blocks syntax-highlighted, links clickable)
  • Toggle button visible but unobtrusive; clicking switches to raw; clicking again switches back; choice persists across reload via localStorage
  • Toggle button visible in both light and dark themes
  • No regression of wg-html-v2's edge highlighting / theme detection / click-to-inspect side panel
  • cargo build + cargo test pass
  • Permanent smoke scenario added: assert chat task has blue color; assert markdown is parsed (not raw text) by default
  • cargo install --path . was run before claiming done

Depends on

Required by

Log