Add F9/F10 screenshots, fix duplicate widget ID in motor screen

Generate motor.svg and survey.svg for the new TUI screens. Fix
MotorScreen bug: two Horizontal widgets shared id="motor-usals-inputs",
causing MountError. Replaced with classes="usals-input-row" since both
rows need the same styling. Regenerated all 13 screenshots.
This commit is contained in:
Ryan Malloy 2026-02-15 18:05:15 -07:00
parent cc3a0707a1
commit 592898dd7a
16 changed files with 3121 additions and 1545 deletions

View file

@ -5,7 +5,7 @@ Uses Textual's headless run_test() + Pilot API to programmatically navigate
each screen and export SVG renders. Requires no hardware runs entirely
with DemoDevice synthetic signal data.
Output: ../site/src/assets/tui/*.svg (11 screenshots)
Output: ../site/src/assets/tui/*.svg (13 screenshots)
Usage:
cd tui && uv run python scripts/generate_screenshots.py
@ -122,6 +122,42 @@ async def capture_config_screen() -> None:
_save(svg, "config")
async def capture_motor_screen() -> None:
"""Capture F9 Motor screen — 3-column layout with signal gauge."""
app = _new_app(show_splash=False)
async with app.run_test(size=TERM_SIZE, headless=True) as pilot:
await pilot.pause(MOUNT_PAUSE)
# Switch to Motor screen
await pilot.press("f9")
await pilot.pause(MODE_SWITCH_PAUSE)
# Wait for signal gauge to populate
await pilot.pause(1.0)
svg = app.export_screenshot(title="SkyWalker-1 — Motor Control")
_save(svg, "motor")
async def capture_survey_screen() -> None:
"""Capture F10 Survey screen — Full Band tab with spectrum plot."""
app = _new_app(show_splash=False)
async with app.run_test(size=TERM_SIZE, headless=True) as pilot:
await pilot.pause(MOUNT_PAUSE)
# Switch to Survey screen (Full Band tab is default)
await pilot.press("f10")
await pilot.pause(MODE_SWITCH_PAUSE)
# Wait for demo spectrum data to render
await pilot.pause(1.5)
svg = app.export_screenshot(title="SkyWalker-1 — Carrier Survey")
_save(svg, "survey")
async def capture_dark_mode() -> None:
"""Capture dark-mode toggle with Star Wars notification toast."""
app = _new_app(show_splash=False)
@ -182,6 +218,8 @@ async def main() -> None:
("Device screen (F6)", capture_device_screen),
("Stream screen (F7)", capture_stream_screen),
("Config screen (F8)", capture_config_screen),
("Motor screen (F9)", capture_motor_screen),
("Survey screen (F10)", capture_survey_screen),
("Dark mode toggle", capture_dark_mode),
("Splash screen", capture_splash),
("Star Wars easter egg", capture_starwars),