Metadata
| Status | done |
|---|---|
| Assigned | agent-904 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-28T01:44:01.439620585+00:00 |
| Started | 2026-04-28T01:44:21.260307226+00:00 |
| Completed | 2026-04-28T02:16:04.815750851+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.74 |
| └ blocking impact | 0.75 |
| └ completeness | 0.72 |
| └ constraint fidelity | 0.85 |
| └ coordination overhead | 0.70 |
| └ correctness | 0.75 |
| └ downstream usability | 0.74 |
| └ efficiency | 0.78 |
| └ intent fidelity | 0.65 |
| └ style adherence | 0.76 |
Description
Description
The wg TUI's PTY-rendering pane is duplicating output. The user pasted a screenshot of one pane that shows the same multi-line block printed twice — a list of three review-session tasks (stocktake-assets / content-review-poietic-life / wg-visual-language-study) followed by the identical block again, all inside a single bordered box.
User quote: 'this shows a bug where the pty output gets doubled. seems pretty annoying lol'
This is a display / rendering bug, not a state corruption bug — the underlying chat/log data is fine, only the on-screen rendering is wrong. Likely something in:
- the PTY scrollback buffer / line wrapping logic
- redraw-on-resize re-printing already-printed lines
- terminal capability mismatch (CRLF / cursor-up handling)
- ratatui Paragraph wrapping interacting badly with embedded ANSI
The worker should reproduce first (find a chat / log view that consistently doubles), then narrow to the specific pane / view widget, then fix.
Repro hints
- The doubled content appears in a bordered Tui box, multi-line, looks like an active chat-agent transcript or a streamed paste from a session
- Probably reproducible by pasting a long block into a chat input or by streaming chat-agent output at a width where wrapping kicks in
- Check both the chat detail view and the log raw view since they share the same underlying renderer paths
Out of scope
- No restyling of the panes (per the user's earlier feedback the log raw view is 'amazing as it currently is')
- Don't change colors, borders, layout — just stop the duplication
Validation
- Reproduce: identify the exact view + content shape that triggers doubling, document the steps
- Failing test first: a unit/integration test that renders the offending content into a fixed-width buffer and asserts the rendered cells contain each input line exactly once
- Implementation makes the test pass
- Manual smoke: paste/stream the kind of content the user showed (a multi-line list, ~10 lines) into the same view and verify single-render
- Verify on at least two terminal widths (narrow enough to wrap, wide enough not to) — bug shouldn't be width-dependent
- No regressions in chat detail view, log raw view, or any other PTY-driven pane
- cargo build + cargo test pass
Depends on
Required by
- (none)
Log
- 2026-04-28T01:44:01.427534578+00:00 Task paused
- 2026-04-28T01:44:04.274499065+00:00 Task published
- 2026-04-28T01:44:20.312048556+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer is ideal: implements rendering bugs correctly, prioritizes thorough testing and regression avoidance (critical here), and has proven performance (0.73, 159 tasks).
- 2026-04-28T01:44:21.260310142+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T01:44:30.064362943+00:00 Starting investigation: reproducing the PTY output doubling bug
- 2026-04-28T02:12:11.470773809+00:00 Reproduced bug: chat tab renders streaming_text + finalized coordinator message simultaneously when multiple requests are in flight (race window between agent's outbox-append and file-clear). Fix: (1) suppress streaming_text rendering when last message is a Coordinator response (the live transcript is stale at that point); (2) clear streaming_text in poll_chat_messages whenever a new outbox message arrives. Tests: streaming_text_does_not_double_finalized_message (failing-then-passing) + width-variant + 3 PTY pane no-double tests at widths 40/80/120.
- 2026-04-28T02:15:46.660633551+00:00 Committed: 572a28d37
- 2026-04-28T02:16:04.815754488+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-28T02:18:14.796592043+00:00 PendingEval → Done (evaluator passed; downstream unblocks)