Feature: TUI Slash Command Overlay Shows Descriptions
  Per ADR-046, the SlashCommandOverlay must display each command with its
  description alongside the command name in aligned columns.

  Background:
    Given the slash command overlay module is imported

  @tdd_issue @tdd_issue_4295 @tdd_expected_fail
  Scenario: Overlay renders command name and description in aligned columns
    Given I have a SlashCommandOverlay instance
    When I call set_commands with query "" and commands "session:create,settings"
    Then the overlay text should contain "  /session:create"
    And the overlay text should contain "Desc for session:create"
    And the overlay text should contain "  /settings"
    And the overlay text should contain "Desc for settings"

  Scenario: Overlay renders descriptions for filtered commands
    Given I have a SlashCommandOverlay instance
    When I call set_commands with query "session" and commands "session:create,session:list,plan:use"
    Then the overlay text should contain "  /session:create"
    And the overlay text should contain "Desc for session:create"
    And the overlay text should contain "  /session:list"
    And the overlay text should contain "Desc for session:list"
    And the overlay text should not contain "  /plan:use"

  @tdd_issue @tdd_issue_4295
  Scenario: Overlay uses real slash_command_specs from catalog
    Given I have a SlashCommandOverlay instance
    When I initialise the overlay with real slash command specs
    Then the overlay text should contain "  /session:create"
    And the overlay text should contain "Create a new session tab"
    And the overlay text should contain "  /settings"
    And the overlay text should contain "Open settings"
