tui-log-view-2

TUI Log view: response first-line is shifted by checkmark indicator; layout misaligned

Metadata

Statusdone
Assignedagent-695
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-27T15:04:39.528300739+00:00
Started2026-04-27T15:05:59.958100135+00:00
Completed2026-04-27T15:38:52.697043335+00:00
Tagseval-scheduled

Description

Description

User reports: in the TUI Log view (4:Log), responses from agents are prefixed with a checkmark indicator (✓ / ✓✓) and the response's first line is visually shifted — its position differs from subsequent lines, making the layout look misaligned. User wants the response to either (a) start cleanly aligned with no shift, or (b) have the checkmark elsewhere (line above, gutter, etc) so the response text itself flows uniformly.

Likely culprit: src/tui/viz_viewer/render.rs:3501-3513 renders status indicators with leading 2-space padding (' ✓✓' / ' ✓') appended to the user-message line. The response then renders below, but if its first line is inline-prefixed with anything, the columns don't match.

Investigation

Read render.rs around line 3500 (where status_span is built) AND wherever the response/coordinator-message rendering happens. Identify the alignment mismatch:

  • User message line ends with status indicator
  • Response (coordinator message) starts on next line — does it get its own indicator that's a different width?
  • Or does the response wrap with leading spaces on first line only, no leading on continuation lines?

Fix options (pick whichever cleans up best)

A. Status indicator goes in a gutter / margin — separate column, doesn't affect text alignment B. Indicator above the response on its own line — clean separation, response text starts at column 0 C. Indicator after the response, not before — like git commit signing; doesn't shift main content D. Uniform indent on all lines — if response gets a leading indicator, all wrap-continuation lines also get an indent so it hangs nicely

Recommend (D) for minimal disruption — match standard CLI rendering of multi-line content with a prefix.

Hard gate

Before claiming done:

  1. Open wg tui in a chat with at least one user message + one multi-line agent response
  2. Visually verify: response first line is aligned with response continuation lines (no shift)
  3. Indicator is visible but doesn't disrupt text flow
  4. Capture screenshot before/after as evidence

Files likely to touch

  • src/tui/viz_viewer/render.rs (lines 3490-3520 area, plus wherever response messages render)

Validation

  • Failing test first: test_response_first_line_aligns_with_continuation — synthetic chat with a 3-line response, render to a buffer, assert column-0 of all 3 lines is the same character class (not 2-space indent on line 1 and column 0 on lines 2/3)
  • Implementation makes test pass
  • cargo build + cargo test pass with no regressions
  • HARD GATE manual smoke as above

Depends on

Required by

Log