Skip to content

Add interactive nested menu for sports and commands#2

Merged
prrockzed merged 1 commit into
mainfrom
feat/issue-1-interactive-nested-menu
Jun 14, 2026
Merged

Add interactive nested menu for sports and commands#2
prrockzed merged 1 commit into
mainfrom
feat/issue-1-interactive-nested-menu

Conversation

@prrockzed

@prrockzed prrockzed commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Closes #1

What changed

  • core/display.py: Added select_from_menu() using Rich's IntPrompt
  • chess/app.py: _show_menu() + callback — numbered command menu on sports chess with no subcommand
  • cricket/app.py: _show_menu() + callback — scorecard auto-runs live first, then prompts for match ID
  • football/app.py: _show_menu() + callback — standings/fixtures prompt for league code inline
  • cli.py: Root callback shows compact header + sport selector in TTY; static welcome in non-TTY (tests/CI unaffected)

Behaviour unchanged

All direct commands (sports chess live, sports football standings pl, etc.) work exactly as before.

Test plan

  • 185/185 tests pass locally
  • CI matrix (3.10, 3.11, 3.12) green

- core/display.py: add select_from_menu() using Rich IntPrompt
- Each sport app: add _show_menu() + @app.callback(invoke_without_command=True)
  - chess: numbered menu → tournaments/live/broadcasts/player (prompts username)
  - cricket: numbered menu → live/scorecard/schedule; scorecard auto-runs live
    first to show match IDs, then prompts for ID
  - football: numbered menu → live/standings/fixtures; standings and fixtures
    prompt for league code inline
- cli.py: root callback shows compact header + sport selector when TTY;
  falls back to static welcome screen in non-TTY (CI, pipes, tests)
- All existing direct commands unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@prrockzed prrockzed self-assigned this Jun 14, 2026
@prrockzed prrockzed merged commit 7cb00bd into main Jun 14, 2026
3 checks passed
@prrockzed prrockzed mentioned this pull request Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add interactive nested menu for sports and commands

1 participant