@tdd_issue @tdd_issue_10442
Feature: TDD Issue #10442 — SlashCommandOverlay keyboard navigation
  As a developer
  I want to verify that SlashCommandOverlay supports keyboard navigation
  So that users can navigate the slash command list with up/down/Enter/Escape

  Background:
    Given the slash command overlay module is imported

  Scenario: SlashCommandOverlay has navigate_up method
    Given I have a SlashCommandOverlay instance
    Then the overlay should have a navigate_up method

  Scenario: SlashCommandOverlay has navigate_down method
    Given I have a SlashCommandOverlay instance
    Then the overlay should have a navigate_down method

  Scenario: SlashCommandOverlay has select_current method
    Given I have a SlashCommandOverlay instance
    Then the overlay should have a select_current method

  Scenario: SlashCommandOverlay has dismiss method
    Given I have a SlashCommandOverlay instance
    Then the overlay should have a dismiss method

  Scenario: SlashCommandOverlay has selected_index attribute
    Given I have a SlashCommandOverlay instance
    Then the overlay should have a selected_index attribute

  Scenario: navigate_down increments selected_index
    Given I have a SlashCommandOverlay instance
    And the overlay has commands loaded
    When I call navigate_down on the overlay
    Then the overlay selected_index should be 1

  Scenario: navigate_up decrements selected_index
    Given I have a SlashCommandOverlay instance
    And the overlay has commands loaded
    And the overlay selected_index is set to 2
    When I call navigate_up on the overlay
    Then the overlay selected_index should be 1

  Scenario: navigate_up does not go below zero
    Given I have a SlashCommandOverlay instance
    And the overlay has commands loaded
    When I call navigate_up on the overlay
    Then the overlay selected_index should be 0

  Scenario: navigate_down does not exceed command count
    Given I have a SlashCommandOverlay instance
    And the overlay has commands loaded
    When I call navigate_down on the overlay many times
    Then the overlay selected_index should not exceed the command count

  Scenario: select_current returns the currently selected command
    Given I have a SlashCommandOverlay instance
    And the overlay has commands loaded
    And the overlay selected_index is set to 1
    When I call select_current on the overlay
    Then the selected command should be the second command in the list
