k9s icon indicating copy to clipboard operation
k9s copied to clipboard

History navigation: new view after going back should truncate forward history

Open uozalp opened this issue 6 months ago • 0 comments

When using the history navigation in K9s, if I go back in history and then switch to a new view, the new view is currently added to the end of the history list, but all the "forward" history is kept. This results in a confusing navigation experience, as the history no longer reflects a linear path.

I would expect the behavior to be similar to browser history:

  • If I go back in history and then switch to a new view, all forward history from the current index should be discarded, and the new view should be added at the end.
  • This way, the history always represents the actual navigation path, and "back" and "forward" actions remain intuitive.

Steps to reproduce:

  1. Navigate through several views.
  2. Go back in history.
  3. Switch to a new view.
  4. Observe that the new view is appended, but the forward history is still present.

Expected behavior: After switching to a new view from a previous point in history, all forward history should be truncated before adding the new view.

uozalp avatar Jun 19 '25 12:06 uozalp