audit-tui-viewport

Audit: TUI viewport jumps — what triggers them, where to fix, propose stability policy

Metadata

Statusdone
Assignedagent-1277
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-04-30T16:26:29.430959782+00:00
Started2026-04-30T16:33:14.289535266+00:00
Completed2026-04-30T16:38:22.038558124+00:00
Tagspriority-high,research,tui,ux, eval-scheduled
Eval score0.93
└ blocking impact1.00
└ completeness1.00
└ coordination overhead0.96
└ correctness0.92
└ downstream usability0.96
└ efficiency0.85
└ intent fidelity0.83
└ style adherence0.90

Description

Description

User report 2026-04-30: in the TUI, the viewport jumps unexpectedly when state changes. Tasks getting introduced or transitioning state pull focus, often pushing the visible region to a place where the action ISN'T happening. Net: jarring + counterintuitive.

User direct quote: 'we often have a situation where the actions happening near the top of the view, but something will shift the window down. I think it's like the introduction of a new task, a change of state of a task maybe. It focuses that task at the top of the window. ... I think what we should be trying to do is to move or focus as much as possible to get the interesting stuff in the middle of the screen. ... given the fact that things are usually happening at the very top of the graph this should tend to drive us to the very top and make it so that the top of the window is at the top of the graph in the temporal square order we're using. ... I just kind of want it to be a bit stable unless we move it around. It should be stable and sort of stable relative to the information around it.'

Investigation goals (audit-only — no source modifications)

  1. Where are viewport shifts triggered? Find every code path that calls something like scroll_to(task_id) / set_viewport_top(...) / focus_task(...). Likely candidates:

    • State-transition handlers (open → in-progress → done)
    • New-task-creation handlers (auto-scroll to show the new task)
    • Selection-on-click / selection-on-key handlers
    • Cycle iteration resets
  2. What's the current policy? For each trigger, what's the heuristic? Is it consistent or piecemeal?

  3. What does 'stable' mean operationally? Possible policies to compare:

    • Sticky-by-default: viewport doesn't move unless user explicitly moves it
    • Center-on-action: viewport keeps the active task in the middle of the visible region
    • Top-of-graph-anchor: when the user is at/near the top of the temporal-sort, viewport sticks to top (the user's specific suggestion for the common case)
    • Hybrid: sticky if user has scrolled away from auto-tracking; auto-track when user is at the edge
  4. How does the user signal 'I want auto-tracking' vs 'I want stable view'? Implicit (proximity to top/bottom) or explicit (a follow-mode toggle key)?

Deliverable

Posted via wg log:

  • Full list of code paths that trigger viewport shifts (file:line)
  • Concrete recommended policy for the implementation task to follow
  • Specific cases to handle: new task introduced + user near top, new task introduced + user scrolled mid-view, state transition of currently-visible task, state transition of off-screen task, selection-by-click vs selection-by-key
  • Smoke scenario list

Validation

  • Code paths enumerated with file:line
  • Current policy summarized
  • Recommended policy specified concretely
  • Edge cases enumerated
  • Smoke scenario list provided
  • No source / doc modifications

Depends on

Required by

Log