Expand description
The xil gui web dashboard. Port of xil_gui.py, with Gradio replaced by
axum and htmx.
The Python dashboard is a Gradio Blocks app with twelve tabs and three
FastAPI routes the timeline editor calls. This crate serves the same tabs
as server-rendered HTML, swapped in place by htmx, and keeps the three
/xil/* JSON routes to their exact contracts, so a timeline written by
either implementation’s xil daw --timeline-html works against either
server.
What does not carry over is Gradio’s plumbing: /gradio_api/file= becomes
a workspace file server under /ws/ (the timeline’s audio links are
relative, so they resolve the same way), progress bars become htmx
indicators, and generator callbacks become a job table streamed over
server-sent events. Stages run as subprocesses of the Rust xil.
Modules§
- activity
- The optional session activity log (
xil gui --output FILE). - audio
- A bounded local copy of workspace audio, so playback of a NAS workspace reads the network once, and the “play all” concatenation preview.
- configs
- Config file listing, the workspace path boundary, and JSON load/save for the Project, Speakers, Cast Config and SFX Config tabs.
- entries
- The Dialogue sub-tab and the Timeline’s dialogue-edit modal: read,
search and edit one dialogue line’s speaker and text in
parsed/{slug}/parsed_{tag}.json. - episodes
- Episode discovery, dropdown labels, the Episodes table and stem listing.
- grades
- The Audio Grading tab: SFX library grades kept in each MP3’s
TXXX:XIL_GRADEframe, with a persisted(size, mtime)cache so a rescan of a NAS library is one walk plus stats. - html 🔒
- Small HTML builders. Every value from disk or from a request goes through
escbefore it lands in markup. - pages 🔒
- The dashboard page and the htmx fragments behind each tab.
- parsed
- The Edit Parsed JSON tab: load and save
parsed/{slug}/parsed_{tag}.jsonfor an episode chosen from the usual Episode dropdown. - runner
- The Run Stage tab: command builders for each stage, extra-flag validation, and subprocess jobs whose merged output streams to the page.
- scripts
- The Scripts sub-tab: script listing, header analysis and save.
- sfx_
routes - The timeline editor’s JSON routes, with the contracts of
_register_sfx_routesinxil_gui.py, plus two routes of our own for the Timeline’s dialogue-edit modal:
Structs§
- AppState
- Everything a handler needs. Workspace paths are read from the environment on each call, as the Python module does.
- Choices
- The dropdown lists every tab draws from. Listing configs and scripts crosses the network on a NAS workspace, so they are built once and rebuilt only on ⟳ Refresh or after something that can change them (a finished stage, a saved script) — as the Python app builds them at startup and refreshes them from the same events.
- Stage
Cells - Freshness glyphs for one Episodes-table row, from
xil status’s engine.
Enums§
- JobEvent
- One line of a running stage’s output, or its exit.
Functions§
- print_
workspace_ banner _print_workspace_banner(): say which workspace this process is frozen to before anything else starts.- router
- Every route the dashboard serves.
- serve
- Bind and serve until the process is stopped.