Skip to content

[Bug] Data list pagination gets stuck on an empty page after deletion #82

Description

@akramcodez

Description

In src/commands/data/list.tsx, deleting the last remaining item on the final page of the data list fails to decrement the current page state, leaving the user stranded on an empty, out-of-bounds page.

Environment

  • macOS version: N/A
  • Apple Silicon: N/A
  • Node version: N/A
  • Python version: N/A
  • Nanotune version: Latest

Steps to Reproduce

  1. Open the data list view via nanotune data list.
  2. Navigate to the last page (e.g., Page 2/2).
  3. Ensure there is only 1 item on this last page.
  4. Delete the item using the d hotkey.

Expected Behavior

The UI should automatically navigate back to the previous page (e.g., Page 1/1) since Page 2 no longer exists.

Actual Behavior

The table is empty, and the header reads "Page 2/1". The user is stuck until they manually press the Left arrow key.

Additional Context

  • I have searched existing issues to ensure this is not a duplicate
  • I can reproduce this issue consistently
  • This issue occurs with the latest version of nanotune

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions