Skip to content

Fix DAG arrow-key nav stolen by Details roster scroll - #918

Merged
anutron merged 1 commit into
masterfrom
argus/dag-arrow-key-focus-fix
Jul 31, 2026
Merged

Fix DAG arrow-key nav stolen by Details roster scroll#918
anutron merged 1 commit into
masterfrom
argus/dag-arrow-key-focus-fix

Conversation

@anutron

@anutron anutron commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reported bug: in the native Hera coordinator view, pressing Up/Down/j/k to navigate the embedded plan-DAG graph instead scrolled the "Agents" roster shown above it in the Details region — the roster claimed those keys FIRST whenever it had unseen rows (a prior "layered, not duplicated" design), only falling through to the plan widget once the roster hit its scroll bound.
  • Fix: split the keysets. internal/tui/hera/page.go's rosterScrollDelta/handleDetailsKey now route PgUp/PgDn exclusively to DetailsView.ScrollRoster, and j/k/Up/Down/h/l/Enter/Space/Esc reach planview.Widget.InputHandler unconditionally — the two surfaces can no longer contend for the same keystroke.
  • No change to rail-focused navigation (Up/Down/j/k/s/S/m/M etc. on the left rail) or to any other focus-ladder behavior (Tab/Ctrl+Alt+arrows/Ctrl+Q/Ctrl+Z) — this only touches the Details/plan region's own key routing.
  • Docs: added a context/knowledge/gotchas/hera-view.md bullet + updated the README's plan-DAG key table (PgUp/PgDn row added, arrow-key row corrected).

Test plan

  • New regression tests in internal/tui/hera/dag_test.go: TestFocusRouting_ArrowKeysStayWithinFocusedRegion (end-to-end SimulationScreen test proving rail-focused keys are unaffected and DAG-focused arrows never leak to the rail cursor or roster scroll), TestHandleDetailsKey_ArrowsAlwaysReachPlanNeverRoster, TestHandleDetailsKey_PgDnPgUpScrollRoster.
  • Updated TestRosterScrollDelta (details_test.go) for the new PgUp/PgDn keyset.
  • make pre-pr clean (build, vet, fmt-check, lint-pr, test-cover-gate all pass; vuln fails only on pre-existing advisory stdlib CVEs, confirmed toolchain-only and CI-continue-on-error, unrelated to this change).
  • Full internal/tui/... suite green.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

The Agents roster (Details region, coordinator view) claimed j/k/Up/Down
FIRST whenever it had unseen rows, falling through to the embedded plan
widget only once the roster hit its scroll bound -- so arrow keys aimed
at the plan DAG instead silently scrolled the roster above it. Split the
keysets: the roster now scrolls exclusively via PgUp/PgDn, and every
plan-nav key reaches planview.Widget unconditionally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/drn/argus/internal/tui/hera 92.29% (-0.01%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/drn/argus/internal/tui/hera/details.go 99.63% (ø) 269 268 1
github.com/drn/argus/internal/tui/hera/page.go 88.00% (-0.07%) 350 (-2) 308 (-2) 42 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/drn/argus/internal/tui/hera/dag_test.go
  • github.com/drn/argus/internal/tui/hera/details_test.go

@anutron
anutron merged commit bcc21ed into master Jul 31, 2026
1 check passed
@anutron
anutron deleted the argus/dag-arrow-key-focus-fix branch July 31, 2026 07:42
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