fix(tui): track selection by site ID + q means back everywhere #113
Reference in New Issue
Block a user
Delete Branch "fix/tui-cursor-navigation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two TUI behavior fixes from the review-findings backlog.
1. Cursor tracks site ID instead of position
The site list re-sorts every tick (status changes move items). Previously
m.cursorwas a positional index — when a site changed status, the selection silently jumped to whatever now occupied that position. NowselectedIDis stored alongside the cursor; after each refresh+sort, the cursor resolves back to the same site.2. q = back in all sub-views
qreturns to dashboard (was: quit app)qreturns to dashboard (was: quit app)qalready returned to detail (unchanged)qstill quits (the only place it should)ctrl+calways quits from anywhere (unchanged)Help bars updated: detail shows
[q/Esc] Backinstead of[q] Quit. Alert detail same.Test plan
go test -count=1 ./...— all passgolangci-lint— 0 issues