Metadata
| Status | done |
|---|---|
| Assigned | agent-1131 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-29T16:41:34.425071987+00:00 |
| Started | 2026-04-29T16:58:04.640827289+00:00 |
| Completed | 2026-04-29T17:08:46.039027508+00:00 |
| Tags | fix,html,viz,chat, eval-scheduled |
| Tokens | 10844941 in / 18785 out |
| Eval score | 0.90 |
| └ blocking impact | 0.90 |
| └ completeness | 0.90 |
| └ coordination overhead | 0.83 |
| └ correctness | 0.95 |
| └ downstream usability | 0.90 |
| └ efficiency | 0.82 |
| └ intent fidelity | 0.85 |
| └ style adherence | 0.90 |
Description
Description
The wg-html-v2 viewer surfaces per-task data but doesn't render chat transcripts (the JSONL conversation history at ~/.wg/chat/<ref>/*.jsonl). Add a --chat flag to opt into rendering chat content, with visibility-aware defaults so a casual wg html --chat doesn't accidentally publish the user's conversations.
Spec
Flag matrix
| Command | Tasks rendered | Chat transcripts |
|---|---|---|
wg html (default) | all tasks | none — chat task nodes rendered but transcript omitted |
wg html --chat | all tasks | only chats with visibility = public |
wg html --chat --all | all tasks | all chats regardless of visibility |
wg html --chat --public-only | only public tasks | only public chats |
The single visibility field on the chat task drives transcript inclusion. No separate chat.share field — overkill for a single-user codebase.
Rendering
- Chat task's per-page or side-panel section adds a 'Conversation' block when transcript is included
- Render messages role-by-role with timestamps; code blocks get the same syntax/theme treatment as task descriptions
- Preserve order from the JSONL
- Light sanitization layer: redact obvious secret patterns in transcript text (api-key-shaped strings, absolute paths under
~/.wg/secretsetc.) with[redacted]markers. NOT a security guarantee — just a safety net against accidental shell-history leaks. - If transcript is OMITTED due to visibility filter, render a single line: 'Chat transcript hidden (visibility: internal). Use --all to include.'
Footer / header note
Page header should say 'Showing N chat transcripts' when --chat is active. If 0 chats are shown but --chat was passed (because all chats are internal), say so explicitly so the user isn't confused.
Validation
- Failing tests written first
-
wg html(no --chat) — no transcript content in output, but chat task nodes still appear in the viz -
wg html --chaton a project with mixed-visibility chats — only public chats' transcripts in output; internal chats show 'transcript hidden' message -
wg html --chat --all— all chat transcripts in output -
wg html --chat --public-only— only public tasks AND only public chats -
Sanitization layer redacts at least:
sk-[a-zA-Z0-9]{20,}(api-key shape),OPENAI_API_KEY=..., paths under~/.wg/secrets. Document the regexes; this is best-effort, not a security guarantee. -
Live smoke:
wg html --chaton this project, open a few chat task pages in browser, confirm conversation renders with role/timestamp/code-block formatting - Counter footer accurate (N chat transcripts shown / M omitted by visibility)
- cargo build + cargo test pass
- Permanent smoke scenario added with this task id in owners
- cargo install --path . was run before claiming done
Depends on
Required by
- (none)
Log
- 2026-04-29T16:41:34.412127321+00:00 Task paused
- 2026-04-29T16:41:34.458041754+00:00 Task published
- 2026-04-29T16:41:56.803041576+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer has strong Rust track record (0.77 score, 312 tasks), and Careful tradeoff matches task's verification requirements (visibility logic, secret sanitization, live smoke testing, thorough validation).
- 2026-04-29T16:41:58.483994252+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T16:42:12.170020143+00:00 Starting investigation: locate wg html v2 viewer code, chat storage format, visibility model
- 2026-04-29T16:45:03.275091368+00:00 Design: --chat flag opts in to transcripts; --all (when paired with --chat) extends to internal transcripts; --public-only also filters chat tasks. Reuses src/chat.rs read_inbox_ref / read_outbox_ref with chat alias derived from task id. Sanitizer = small static regex set (sk-[a-zA-Z0-9]{20,}, OPENAI_API_KEY=..., paths under ~/.wg/secrets, generic api[_-]?key|secret|token = ...). Writing failing-first integration tests now.
- 2026-04-29T16:57:56.077503606+00:00 Task unclaimed: agent 'agent-1126' (PID 3634466) process exited
- 2026-04-29T16:58:04.640830615+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T17:07:37.649895401+00:00 Validated: cargo build clean (bin warns pre-existing); 26/26 integration_html tests pass (incl. 8 new chat tests); 16/16 html lib tests pass; smoke wg_html_chat passes 5/5 (default omits transcripts; --chat shows public; --chat --all shows all; --chat --public-only filters internal; sanitizer redacts sk-/OPENAI_API_KEY=/.wg/secrets paths)
- 2026-04-29T17:07:41.599473523+00:00 Live smoke against this project's graph: wg html --chat reports 'Showing 0 chat transcripts (28 hidden by visibility — pass --all to include them)' (correct — all chat tasks here are visibility=internal); --chat --all renders all chat task pages with Conversation sections (most empty because their UUIDs don't have inbox.jsonl). cargo install --path . succeeded.
- 2026-04-29T17:08:34.056661100+00:00 Committed: d699e3c80 — pushed to remote (wg/agent-1126/wg-html-chat)
- 2026-04-29T17:08:46.039033078+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-29T17:11:02.469376065+00:00 PendingEval → Done (evaluator passed; downstream unblocks)