Problem
selected_row and scroll_offset are a single shared pair, and on_view_enter resets both to the top on every view switch. Navigating away from a list and back always drops the operator at row one, losing their place. On a long EC2 or Secrets list that is a real cost when pivoting between views during triage.
Context
#31 closed the correctness half of this (no view can hold an out-of-bounds selection) by centralizing the clamp in the shared list helper from #30. It deliberately did not add persistence, because the acceptance there was about out-of-bounds selection and on_view_enter resetting to the top meant there was no cross-view bleed to fix.
Proposed fix
Keep per-view selection state, for example a map from ActiveView to its (selected_row, scroll_offset), restored on view enter and cleared alongside the inventory on a profile or region change (the same point where clear_service_data runs, so a restored cursor can never point into another account's data).
ui::views::list_table::render_list_table already takes the selection as &mut borrows, so views would pass the per-view entry instead of the shared fields with no change to the helper.
Acceptance
Problem
selected_rowandscroll_offsetare a single shared pair, andon_view_enterresets both to the top on every view switch. Navigating away from a list and back always drops the operator at row one, losing their place. On a long EC2 or Secrets list that is a real cost when pivoting between views during triage.Context
#31 closed the correctness half of this (no view can hold an out-of-bounds selection) by centralizing the clamp in the shared list helper from #30. It deliberately did not add persistence, because the acceptance there was about out-of-bounds selection and
on_view_enterresetting to the top meant there was no cross-view bleed to fix.Proposed fix
Keep per-view selection state, for example a map from
ActiveViewto its(selected_row, scroll_offset), restored on view enter and cleared alongside the inventory on a profile or region change (the same point whereclear_service_dataruns, so a restored cursor can never point into another account's data).ui::views::list_table::render_list_tablealready takes the selection as&mutborrows, so views would pass the per-view entry instead of the shared fields with no change to the helper.Acceptance