Skip to main content

Module tui

Module tui 

Source
Expand description

Terminal UI module.

This module contains all ratatui / crossterm code and is responsible purely for presentation and interaction. It talks to the rest of the application through:

  • RommClient (HTTP / data access),
  • core::cache::RomCache (disk-backed ROM cache), and
  • core::download::DownloadManager (background ROM downloads).

Keeping those "service" types UI-agnostic makes it easy to add other frontends (e.g. a GUI) reusing the same core logic.

Modules§

app
Application state and TUI event loop.
keyboard_help
Static keyboard shortcut reference for the help overlay.
openapi
Parse a subset of OpenAPI 3.x JSON into a flat endpoint list for the TUI expert browser.
openapi_sync
Load the RomM OpenAPI spec for the API browser: prefer the live server, fall back to cache, then a bundled copy shipped in the binary so the TUI always starts without manual openapi.json.
screens
Collection of individual TUI screens.
text_search
Shared filter/jump search state and string matching for library list and ROM panes.
utils

Functions§

run
Launch the TUI when the caller already has a RommClient and Config.
run_interactive
Load config, run first-time setup in the terminal if API_BASE_URL is missing, then start the TUI.