Add TCP alongside serial and BLE as a first-class companion transport, end to end: discovery/connection/selection learn a tcp: stable_id and host:port target, --tcp and TCP config profiles reach a WiFi board or network proxy, and a network companion -- which isn't discoverable -- is rebuilt into the picker from its remembered endpoint. Device picker gains the network-device affordances: - "Add a network device" prompts for host:port, smoke-tests it, and remembers it. The row is marked "- experimental" in the cautionary hue. - Delete on a network row opens a chromeless Cancel/Remove confirm (Cancel left, Remove right and default: Enter removes, Esc cancels), then DeviceStore.forget prunes it and re-draws the list. Serial/BLE rows stay inert. - The "Del remove" footer atom now follows the highlight, surfacing on the box's bottom border only while the cursor sits on a deletable row; the box is sized to the fullest footer so it never widens mid-navigation. Folds in the accompanying courier, channels, and config refinements built along the way. Screens stay readable at 72 cols; full suite green (745 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
1.4 KiB
Python
50 lines
1.4 KiB
Python
"""A small, centralized, reusable full-screen text-UI library.
|
|
|
|
Built on prompt_toolkit (for the terminal, input, and resize handling) and Rich (for all
|
|
content rendering), this package gives the interactive app a consistent, bounded, layered
|
|
UI: screens never overflow the terminal, long content scrolls, going deeper stacks dialogs
|
|
over a dimmed parent, and Esc always dismisses the current layer.
|
|
|
|
Public API:
|
|
- :class:`~meshterm.ui.tui.session.TuiSession` — the running session and prompt helpers.
|
|
- :class:`~meshterm.ui.tui.select.Choice` / :class:`~meshterm.ui.tui.select.Separator`
|
|
— items for ``session.select``.
|
|
- Screen classes for advanced/custom layers.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .overlay import BusyOverlay
|
|
from .progress import ProgressScreen
|
|
from .prompt import (
|
|
AutocompleteScreen,
|
|
ConfirmScreen,
|
|
ReconnectDialog,
|
|
TextScreen,
|
|
TypedConfirmDialog,
|
|
)
|
|
from .screen import CANCEL, BusyScreen, Screen, ScrollScreen
|
|
from .select import Choice, DeleteRequest, SelectScreen, Separator
|
|
from .session import TuiSession
|
|
from .spinner import Spinner
|
|
|
|
__all__ = [
|
|
"TuiSession",
|
|
"Screen",
|
|
"ScrollScreen",
|
|
"BusyScreen",
|
|
"SelectScreen",
|
|
"Choice",
|
|
"DeleteRequest",
|
|
"Separator",
|
|
"TextScreen",
|
|
"ConfirmScreen",
|
|
"AutocompleteScreen",
|
|
"ReconnectDialog",
|
|
"TypedConfirmDialog",
|
|
"ProgressScreen",
|
|
"Spinner",
|
|
"BusyOverlay",
|
|
"CANCEL",
|
|
]
|