diagnose-tui-viewport

Diagnose: TUI viewport behavior post fix-tui-viewport — still inconsistent

Metadata

Statusdone
Assignedagent-1348
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-05-01T15:00:16.365274139+00:00
Started2026-05-01T15:08:10.987708600+00:00
Completed2026-05-01T15:22:42.233863624+00:00
Tagspriority-high,research,bug,tui,ux, eval-scheduled
Eval score0.83
└ blocking impact0.80
└ completeness0.85
└ constraint fidelity0.70
└ coordination overhead0.85
└ correctness0.85
└ downstream usability0.80
└ efficiency0.75
└ intent fidelity0.83
└ style adherence0.90

Description

Description

audit-tui-viewport (done) and implement-tui-viewport (done) both shipped, but user reports the behavior is still inconsistent — sometimes the viewport focuses the middle of the graph for no apparent reason. Either the implementation didn't fully match the audit's policy, OR the policy itself missed an edge case.

User direct quote 2026-05-01: 'Looks like our attempts to get the TUI to focus on the top of the graph view have been failing. And I just don't quite understand why this is happening. It seems like sometimes it's focusing the total middle of the view.'

User's clarified desired behavior:

'have it so that the active part of the graph is as close to the center view as possible without moving the top of the view off of the top of the graph. We'll end up being anchored at the top in effect almost all the time unless we move it and change our focus. Then our focus goes to whatever we've clicked on. And it's going to stay focused there with that in the center of the view until whenever. And we should only unfocus when we click off of that so as to unselect it somehow.'

User caveat: 'it's possible this is working perfectly now, so I don't want to blow anything up. I just want to understand what's going on.'

Investigation steps

1. Capture the misbehavior

  • When the viewport jumps unexpectedly, capture: what task was focused before, what state change just happened, where the viewport ended up (top of view = which task)
  • Try to find a reproducible trigger (state transition X → Y produces jump pattern P)

2. Compare implementation against audit's policy

  • Read audit-tui-viewport's log for the recommended policy
  • Read implement-tui-viewport's log for what was actually implemented
  • Diff: where do implementation behavior and audit policy diverge?

3. Specific edge cases the original audit might have missed

  • Viewport when graph has fewer rows than visible area (no scroll possible — should viewport behavior just stay top?)
  • Viewport when a click selects an OFF-SCREEN task (centered behavior — but how 'centered'?)
  • Viewport when scrolling past end of graph (clamping behavior)
  • Viewport when graph is dynamically growing at the bottom (new tasks appended) — does it stay anchored to current view, or auto-scroll?
  • Multiple state changes in one render frame — does each one move the viewport, or only the last?

4. Recommend either: confirm working OR propose targeted patch

If investigation shows behavior IS correct and user's perception is from rare edge cases (e.g., very fast state changes that briefly produced a jump that self-corrected), document that with evidence.

If investigation shows real misbehavior, propose a concrete targeted patch (file:line + before/after pseudo-code).

Deliverable

wg log entry:

  • Reproduction (or 'cannot reproduce' with evidence of trying)
  • Comparison: audit policy vs current implementation
  • Edge cases identified
  • Either 'working as designed, here's why user perceived issue' OR concrete fix proposal

Validation

  • Reproduction documented (with concrete steps OR 'cannot reproduce')
  • Audit-vs-implementation diff captured
  • Edge cases enumerated
  • Verdict: working OR concrete fix proposal
  • No source / doc modifications — diagnose only

Depends on

Required by

Log