implement-tui-viewport

Implement: TUI viewport stability per audit recommendation

Metadata

Statusdone
Assignedagent-1285
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:sonnet
Created2026-04-30T16:26:38.459859324+00:00
Started2026-04-30T16:40:39.290363187+00:00
Completed2026-04-30T17:11:10.437437771+00:00
Tagspriority-high,fix,tui,ux, eval-scheduled
Eval score0.82
└ blocking impact0.90
└ completeness0.85
└ constraint fidelity0.40
└ coordination overhead0.85
└ correctness0.88
└ downstream usability0.80
└ efficiency0.75
└ intent fidelity0.50
└ style adherence0.85

Description

Description

Implement the viewport stability policy chosen in audit-tui-viewport. Read its log via wg show audit-tui-viewport for the recommended policy, code paths to modify, and edge cases.

Likely policy (from user's stated preference)

  • Stable by default: viewport does NOT shift unless the user moves it
  • Auto-tracking when at the top: when the visible region IS already showing the top of the graph (the temporal-square-order top), new tasks introduced at the top stay visible — viewport stays anchored at top
  • Center bias: when auto-tracking, prefer keeping the active item in the middle of the visible region
  • Off-screen state changes do not jump the view: a task transitioning from open → in-progress somewhere off-screen should NOT pull the viewport to that task

User quote (the operational definition): 'It should be stable and sort of stable relative to the information around it.'

Validation

  • Failing tests written first: simulate a scroll-to-middle, then trigger a state change off-screen; assert viewport unchanged
  • Live smoke: open TUI on a project with active dispatcher. Wait for natural state changes (in-progress → done, etc.). Confirm: - When viewport is at top: stays anchored at top through state changes - When viewport is scrolled mid: does NOT jerk back to top on state change - Selecting a specific task scrolls to it ONLY if it's currently off-screen (centered) — never jumps if already visible - New task creation: only adjusts viewport if the new task is at/near the user's currently-visible region
  • No regression: explicit user navigation (arrow keys, mouse click on task) still works as before
  • cargo build + cargo test pass
  • Permanent smoke scenario added that simulates state transitions and asserts viewport invariants
  • cargo install --path . was run before claiming done — and live smoke evidence pasted in task log before claim of done

Depends on

Required by

Log