wg-html-surface

wg html: surface message indicator on tasks with unread messages (parity with TUI)

Metadata

Statusdone
Assignedagent-1306
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-05-01T00:17:00.464357431+00:00
Started2026-05-01T00:17:43.244061185+00:00
Completed2026-05-01T00:47:28.071473228+00:00
Tagsfix,html,viz, eval-scheduled
Eval score0.83
└ blocking impact0.85
└ completeness0.84
└ coordination overhead0.88
└ correctness0.82
└ downstream usability0.86
└ efficiency0.80
└ intent fidelity0.83
└ style adherence0.90

Description

Description

The TUI shows a small letter / envelope indicator on tasks that have unread messages from wg msg send. The wg html export currently doesn't show this. User wants parity.

User quote 2026-04-30: 'it would be great if that were also present in the HTML publish, in the HTML export.'

Spec

  • Render a small icon (envelope / letter / 📩-style) next to the task id in the html viz when the task has unread messages
  • Same icon shape across the task-list rows AND inside the inspector side panel detail
  • Default click on the indicator: opens the inspector and shows the message log section (or scrolls to it if already open)
  • Color follows theme (dark/light) — same treatment as other status indicators
  • If we're rendering for a static deployment with mostly read messages: indicator should be present whenever the message count > 0 from the task's data, OR specifically when there are unread ones (which depends on whether wg's read-state is tracked per-machine or globally — verify)

Implementation

  • Source: the task data already includes message metadata (per the wg msg list / --json command)
  • Hook into the existing per-task render where status glyphs are emitted
  • Add CSS class has-unread-msg (or similar) and a corresponding visual element
  • For the inspector panel: a 'Messages (N unread)' section that lists them

Validation

  • Failing test or repro: render html on a project where some tasks have unread messages. Pre-fix: no indicator. Post-fix: indicator visible on those tasks.
  • Live smoke: wg msg send <task> 'test', wg html, open in browser, confirm indicator on that task
  • Inspector shows the message content when the task is clicked
  • No regression of other html features
  • cargo build + cargo test pass
  • cargo install --path . was run before claiming done

Coordinate with fix-msg-indicator

Sister task fix-msg-indicator is fixing the TUI's indicator-disappears bug. The two tasks share concerns: same data source, same logical state. If fix-msg-indicator changes the unread-state computation, this task's html implementation should consume the same source. Run after or alongside; coordinate via wg log if needed.

Depends on

Required by

Log