Skip to content

simulate(tui): unify up/down navigation#922

Open
u9g wants to merge 2 commits into
mainfrom
simulate-tui-unified-nav
Open

simulate(tui): unify up/down navigation#922
u9g wants to merge 2 commits into
mainfrom
simulate-tui-unified-nav

Conversation

@u9g

@u9g u9g commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

Simplifies keyboard navigation in the lk agent simulate running view.

Previously the view had two overlapping navigation models: i/k moved a cursor over the job list while the arrow keys scrolled the whole page, and the summary/logs at the bottom weren't reachable by the cursor at all — so which key did what depended on where you were looking.

This collapses everything into a single motion:

  • Up/Down move the cursor through the job list and spill into page scrolling at each end, so the header/description above and the summary/logs below come into view continuously. The whole view is now fully scrollable with just the arrows (the mouse wheel maps to these in alt-screen).
  • Right / Enter open the selected job's detail.
  • Left / Esc go back.
  • i / j / k / l are removed.

Detail view, expanded-description, and PgUp/PgDn (fast page/log scroll) are unchanged.

Implementation

  • New navVertical(delta) — cursor movement with end-of-list scroll spill, reusing the existing followCursor/cursorViewLine machinery to keep the cursor visible while it drives and pin the viewport once you scroll past an end. It reads the last render's window height via a new pageWinRows field.
  • Removed the scrollBy/moveCursor split; cursor movement no longer wraps, so hitting the last job triggers the spill.
  • Hint bar updated accordingly.

Testing

go build ./... and the simulate/TUI tests pass. Per the repo's no-TUI-output-test convention, no assertions on rendered output were added — verified by hand against a finished run.

u9g added 2 commits July 24, 2026 15:18
The running view had two navigation models: i/k moved a cursor over the
job list while up/down scrolled the whole page, and the summary/logs at
the bottom weren't reachable by the cursor at all. Collapse both into a
single up/down motion that moves the cursor through the job list and
spills into page scrolling at each end, so the header/description above
and the summary/logs below come into view continuously. Enter still
opens the focused job's detail; i/j/k/l are removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant