Skip to content

Esc key does nothing in device selection screen — user gets permanently trapped #300

@cobalteclipse-dev

Description

@cobalteclipse-dev

Describe the bug:
Pressing Esc while in the device selection screen (d menu) does nothing. The only
way to exit is to press q, which quits the entire application.

To Reproduce:

  1. Launch spotatui
  2. Press d to open the device selection menu
  3. Press Esc to try to return to the main view
  4. Nothing happens — you are stuck in the device selection screen

Expected behavior:
Pressing Esc should return to the main view (Library), the same way it does in
other menus.

Desktop:

  • OS: Linux Mint 22.1 (Xia)
  • Terminal: gnome-terminal
  • Version: 0.38.6

Additional context:
The escape handler in src/handlers/mod.rs explicitly skips ActiveBlock::SelectDevice:

// These are global views that have no active/inactive distinction so do nothing  
ActiveBlock::SelectDevice | ActiveBlock::Analysis => {}  

This means Esc is intentionally swallowed but no navigation action is taken. This
is particularly painful because the device selection screen is shown on startup when
no device is configured, trapping new users.

Proposed fix
Remove ActiveBlock::SelectDevice from that arm and add a proper Esc handler, e.g.:

Key::Esc => app.set_current_route_state(Some(ActiveBlock::Library), None)  

This matches the pattern already used in src/handlers/select_device.rs line 10.
Workaround until fixed: press q to quit spotatui entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions