Files
leaguerecorder/app/TODO.txt
T
vhaudiquet 47510c88b5 app: drop the old Tauri front end
tauri-app/ was kept while the native app caught up, and the screens it had
are covered now. Its 48 tracked files go; the 7.6 GB of node_modules,
dist and target beside them were never tracked and are gone from the
working copy too.

The docs that said it was still in the tree name two programs now, and
the comments that pointed at a file inside it name the old app's file
instead, so nothing refers to a folder that is no longer there. The design
plans under plans/ keep their wording: they are dated documents, not
instructions.
2026-11-24 00:18:31 +01:00

73 lines
3.8 KiB
Plaintext

Rune app
Decided
- UI framework: rune (github.com/anomalyco/rune, pin a dev rev). gpui is the
fallback if rune fights back. Decide via a time-boxed spike on the Settings
screen; it exercises switches, dropdowns, tables and text input.
- Video: libmpv2 crate (repo kohsine/libmpv-rs, v7.0.1, render feature on by
default). Requires libmpv >= 2.0 (mpv 0.35+); bundle libmpv-2.dll from the
shinchiro mpv-winbuild mpv-dev archive, same as we bundle obs.dll.
- Installers: cargo-packager (CrabNebula), NSIS target. Replaces what the
Tauri bundler gave us. Revisit plain NSIS or Inno in CI if cargo-packager
lags.
Open question before the spike commits to a render path
- libmpv2's render API is OpenGL-based (anlumo's example renders to an SDL2
GL window) and rune/gpui render with wgpu. Options, in order:
1. software render into an RGBA buffer, upload as a texture each frame;
need to verify libmpv2 exposes MPV_RENDER_PARAM_SW (its docs only show
the GL path)
2. share the GL texture with wgpu (external texture interop, painful)
3. embed a native child window with --wid and drive mpv over JSON IPC
(mpvipc crate); this is FFI-free but mpv then owns the video surface
Spike 1 first, fall back to 3. All recordings are H.264 today
(jim_nvenc, amd_amf_h264, qsv, x264) so every path can decode them.
Initial plan
Each phase ends with something that runs. Phase 1 doubles as the
rune-vs-gpui decision: if the Settings screen keeps fighting the
framework, stop and switch to gpui before writing anything else.
1. Skeleton: new app/ crate, rune pinned to one dev rev, window opens
on Windows and renders headlessly to PNG.
2. Pipe client: port daemon_ipc.rs, keep the serde types identical to
record-daemon/src/ipc/protocol.rs. Done when the app reads settings
and status from a running daemon.
3. Settings screen: general, recording and audio source tabs; device
dropdowns from getAudioDevices; volume sliders. Done when changes
save through updateSettings and survive a daemon restart.
4. Game history: port get_game_history, list games from the timeline
JSON in the recordings dir. Done when it matches GameHistory.vue.
5. Video spike: libmpv2 in a standalone example first, software render
to RGBA and upload as a texture. Done when a clip plays and
frame-seeks to a timestamp. Fall back to --wid plus mpvipc if the
software path is not exposed.
6. Game review: timeline scrubber with event markers over the video.
Done when clicking an event seeks the video to that timestamp.
7. OS integration: tray icon, autostart via the registry Run key,
single instance, notifications for recording start and end.
8. Installer: cargo-packager NSIS target with the bundle list below.
Done when the installer works on a clean Windows VM and the app
records a real game end to end.
Stable contracts
- record-daemon does not change. The IPC protocol (IpcCommand serde types
over named pipes) is the versioned interface between app and daemon.
- The pipe client came from the old Tauri app's daemon_ipc.rs (645 lines),
ported into app/ nearly as-is; it is plain Rust + tokio.
- The disk-side helpers came from its lib.rs: get_game_history, export_clip,
find_video_file and the ffmpeg_sidecar download logic.
Installer contents
- app exe, record-daemon.exe, obs.dll, ffmpeg sidecar, libmpv-2.dll.
- NSIS fits our layout (small install, OBS and ffmpeg downloaded at first
run). MSI would want a self-contained package; skip unless we need AD
deployment.
- Code signing: unsigned exes that hook games and open named pipes hit
SmartScreen. Budget for an EV cert or Azure Trusted Signing before
shipping installers.
OS integration to reimplement (was Tauri plugins)
- tray icon, launch at Windows startup (registry Run key or Startup folder
shortcut), single instance, notifications for recording start/end.