launcher: an optional native launcher (Rust, iced) to check, build and start the port #851

Open
github-bot wants to merge 16 commits from github-bot/gh-851 into main AGit
Owner

@⁠aslan2142 on GitHub · 2026-11-24 14:33 UTC · original
aslan2142:launcher-ui → main · +26493 −2 · 70 files · 16 commits · open

Claimed in the coordination issue as: OLD-4578 #14

Restoration of my original pull request, old upstream PR 4578 in ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at d0da7dade8. The rebase changed one thing in code: in tests/test_docs_cli_flags.py, the launcher's three cargo flags join main's newer FOREIGN set, which now also lists the spirv-opt passes. The two commit messages that cited the old number now say "old upstream PR 4578". launcher/ and .github/workflows/launcher.yml are byte for byte the old final head.

Depends on: #659 (small text conflict in tests/test_docs_cli_flags.py's FOREIGN set)

What and why

An optional native launcher in launcher/ (Rust, stock iced 0.14). It checks your copy, builds the port with make_game.py, and starts the loader the way docs/boot.md §2 describes. Outside launcher/ it adds only two things:

  • its CI workflow, .github/workflows/launcher.yml;
  • three cargo flags in the docs flag check, tests/test_docs_cli_flags.py.

Related: LEONIDA-LEGACY-APP (claimed in #14, a Windows desktop launcher) covers similar ground; happy to coordinate.

Screenshots

The launcher's own tests drew all of these. Every path and line of output in them is made up.

Play, dark Play, light
Play page, dark Play page, light
A build running A failed check
A build running A failed check
Game files Performance
Game files page Performance page

A narrow window folds the sidebar away:

Narrow window

Why this launcher

  • From your copy to Play in one window.
    • Check, Build and Play share one main button, which follows what already exists. Cancel takes its place while something runs.
    • Play passes the loader its documented arguments. While the package has no executable, the launcher explains why Play is disabled.
  • Nothing hidden.
    • Every setting names the exact flag or variable it sets.
    • The output panel shows the exact command line that runs.
    • Settings are kept in a small versioned file in the user's config folder.
  • One native program for Windows and Linux (Wayland and X11). macOS support is planned (see below).
    • The fonts and the logo are built in, so the launcher itself needs nothing installed. make_game.py still needs Python, as it does today.
    • It draws on the GPU (Vulkan or DX12, through wgpu), and on the CPU where neither works.
  • Nothing online.
    • No telemetry and no update check.
    • It reads no game file itself. make_game.py does that, as it does on the command line.
  • Keyboard first, and checked for contrast.
    • Shortcuts: Tab, Enter and Space; Ctrl+L switches light/dark; Ctrl+Page Up/Down moves between pages. The focus ring is always visible.
    • Every text colour is tested at 4.5:1 on every surface, in both modes.
    • LEONIDA_REDUCE_MOTION=1 turns animation off.
  • Light when idle.
    • Nothing animates or redraws once it has settled.
    • The Play page's background is generated from the theme's colours, once per window size and theme, off the interface thread.
  • Tested without a GPU or game files, which lets CI run the tests:
    • unit tests;
    • keyboard tests;
    • screenshot tests drawn offscreen.
  • Self-contained: everything lives in launcher/, apart from its CI workflow and the docs flag check.

What it does

  • Play:
    • Check runs make_game.py --game <package> --check.
    • Build runs make_game.py --game <package> --out <output> [--work <work>] with the chosen options.
    • Play runs gta6rt --run <exe> --game-dir <package> with LEONIDA_D3D12=vulkan. On Linux it goes through gta6rt.sh.
    • A progress bar follows the build's stages, and the last lines of output show live.
    • It also reads @@stage, @@progress and @@error lines, in case make_game.py prints them one day.
  • Game files: --game, --out, --work, --full-check.
  • Build: --stages, --wav.
  • Performance: LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION, --wave64-emulate, --jobs.
  • Diagnostics: --trace-d3d12, --overlay, LEONIDA_UNIMPLEMENTED.
  • Window:
    • its own header bar, with the light/dark switch;
    • a sidebar that folds away below 640 px wide;
    • rounded corners drawn by the app (LEONIDA_WINDOW_FRAME=0 gives a plain window). On Windows it uses Windows 11's own corners instead.
  • Cancel before the process has started: if Cancel is pressed before the process reports Started, the process is stopped as soon as it starts (launcher/tests/cancel.rs).

Planned for later versions

  • Updates:
    • a check for new versions of the port, and a rebuild of what changed;
    • opt-in, and the only part that would go online.
  • A Tools page:
    • checks the build's prerequisites (Python, .NET SDK, Vulkan SDK, llvm-mc);
    • says what is missing and where to get it.
  • A Compatibility page:
    • the translator's fallback flags (--no-float-controls, --bary-fallback, --texel-offset-fallback, --f16-interp-fallback, --mesh-compute, --pc-tail-ubo);
    • --runtime-build.
  • macOS support: iced already runs there (through Metal), and so do the folder picker and the settings folder. Still to add:
    • Cmd for the shortcuts where Ctrl is used today;
    • the native window buttons over a transparent title bar;
    • a setting for the Wine or CrossOver that runs the loader, as on Linux;
    • a macOS compile check.
  • Windows and packaging: testing on Windows, then a single download per platform.
  • Once the game boots:
    • launch options;
    • a view of the startup trace (--trace, tools/boot_trace.py).

Relation to old upstream PR 3558 (BUILD-1041)

  • That pull request was a Python/Tk front end for make_game.py. It also downloaded the build tools and updated the checkout with git.
  • This one:
    • is native on Windows and Linux;
    • adds the Play step;
    • leaves installing tools and updating for later, as opt-in features.
  • If the project wants one launcher, I'm glad to fold what's useful from either into the other.

Reviews on the old repository

These checks were made on the old repository, before it went private:

  • cynbun re-checked the final head: read the code and ran the CPU tests on Linux.
  • tedin7 pointed out that nothing tested the Cancel-before-Started fix. launcher/tests/cancel.rs was added for that. Removing the fix's lines makes it fail.
  • Kam471 built and tested it on Windows 11 (MSVC, Rust 1.98): 174 tests passed, with clippy and fmt clean.

For the maintainer to decide

  • A Rust toolchain for one optional tool. CONTRIBUTING.md covers Python only.
  • New binary files:
    • four font files, about 620 KB, under the SIL OFL 1.1 with their licence texts beside them;
    • a 5,264-line Cargo.lock.
  • A new CI workflow, .github/workflows/launcher.yml, on Windows and Ubuntu.
    • It runs cargo fmt --check, cargo clippy and cargo test.
    • It runs only when launcher/**, assets/logo.png or the workflow itself changes.
    • It needs no GPU, no display and no game files.

Tested

Linux 7.3.5, Rust 1.100.0, on the rebased branch. Nothing opened a window: DISPLAY and WAYLAND_DISPLAY were unset, and every page was drawn offscreen on the CPU (tiny-skia).

  • cargo test --locked: everything passes.
    • 152 unit tests (2 ignored: a right-to-left text case that depends on system fonts, and a timing run).
    • The integration suites: screenshots 8, keyboard 9, launch 3, scene cache 2, cancel 1, glows 1, chips 1 and polish 1.
    • 1 doctest (2 ignored).
  • What the tests cover:
    • the command lines, for Windows and Linux;
    • the process handling, through a stand-in script in place of make_game.py;
    • every page, drawn in both modes at three window sizes.
  • Lints and build:
    • cargo clippy --locked --all-targets -- -D warnings and cargo fmt --check are clean;
    • cargo build --release --locked succeeds.
  • The fonts: launcher/fonts/SHA256SUMS matches all four font files.
  • Repository checks:
    • all 12 tests/test_docs_*.py pass, including test_docs_cli_flags.py;
    • actionlint 1.7.7 is clean on .github/workflows/launcher.yml;
    • python -I scripts/check_no_game_data.py passes on every changed file.
  • git diff --check flags only trailing spaces on one line of each of the three OFL licence texts. Those spaces are in the upstream licence text, which is kept verbatim.
  • Earlier, on the old repository:
    • the release binary ran in a real window on Linux (Wayland, RX 7900 XTX, Mesa 26.3.1 RADV);
    • clippy was clean for x86_64-pc-windows-gnu too.
  • Not tested:
    • the real window on Windows;
    • macOS;
    • a complete build, and a real launch (the package has no executable).

GPUs tested: n/a (this run was CPU-only; the earlier real-window run used an AMD Radeon RX 7900 XTX, Mesa 26.3.1 RADV, Linux)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase). It merges cleanly with main at d0da7dade; #659 edits the same FOREIGN lines.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
    • The screenshots and tests use made-up paths and output.
    • The Play page's scene is generated in code from the theme's colours.
    • The only files the launcher builds in are the repository's own assets/logo.png and four OFL fonts.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No translator change.)

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 14:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/851) `aslan2142:launcher-ui` → `main` · +26493 −2 · 70 files · 16 commits · open Claimed in the coordination issue as: OLD-4578 https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 Restoration of my original pull request, old upstream PR 4578 in `ItsNotRexed/Leonida`, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at d0da7dade8b688f2e0f7f23f4155d6cbb438809e. The rebase changed one thing in code: in `tests/test_docs_cli_flags.py`, the launcher's three cargo flags join main's newer `FOREIGN` set, which now also lists the spirv-opt passes. The two commit messages that cited the old number now say "old upstream PR 4578". `launcher/` and `.github/workflows/launcher.yml` are byte for byte the old final head. Depends on: #659 (small text conflict in tests/test_docs_cli_flags.py's FOREIGN set) ### What and why An optional native launcher in `launcher/` (Rust, stock iced 0.14). It checks your copy, builds the port with `make_game.py`, and starts the loader the way `docs/boot.md` §2 describes. Outside `launcher/` it adds only two things: - its CI workflow, `.github/workflows/launcher.yml`; - three cargo flags in the docs flag check, `tests/test_docs_cli_flags.py`. Related: LEONIDA-LEGACY-APP (claimed in #14, a Windows desktop launcher) covers similar ground; happy to coordinate. #### Screenshots The launcher's own tests drew all of these. Every path and line of output in them is made up. | Play, dark | Play, light | |---|---| | ![Play page, dark](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/1-play-dark.png) | ![Play page, light](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/2-play-light.png) | | A build running | A failed check | |---|---| | ![A build running](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/3-building-dark.png) | ![A failed check](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/4-failed-dark.png) | | Game files | Performance | |---|---| | ![Game files page](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/5-game-files-dark.png) | ![Performance page](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/6-performance-light.png) | A narrow window folds the sidebar away: ![Narrow window](https://raw.githubusercontent.com/aslan2142/Leonida/344dd983f65c21b208bd6c9866dca12e4c2ba7f3/7-narrow-dark.png) #### Why this launcher - **From your copy to Play in one window.** - Check, Build and Play share one main button, which follows what already exists. Cancel takes its place while something runs. - Play passes the loader its documented arguments. While the package has no executable, the launcher explains why Play is disabled. - **Nothing hidden.** - Every setting names the exact flag or variable it sets. - The output panel shows the exact command line that runs. - Settings are kept in a small versioned file in the user's config folder. - **One native program for Windows and Linux** (Wayland and X11). macOS support is planned (see below). - The fonts and the logo are built in, so the launcher itself needs nothing installed. `make_game.py` still needs Python, as it does today. - It draws on the GPU (Vulkan or DX12, through wgpu), and on the CPU where neither works. - **Nothing online.** - No telemetry and no update check. - It reads no game file itself. `make_game.py` does that, as it does on the command line. - **Keyboard first, and checked for contrast.** - Shortcuts: Tab, Enter and Space; Ctrl+L switches light/dark; Ctrl+Page Up/Down moves between pages. The focus ring is always visible. - Every text colour is tested at 4.5:1 on every surface, in both modes. - `LEONIDA_REDUCE_MOTION=1` turns animation off. - **Light when idle.** - Nothing animates or redraws once it has settled. - The Play page's background is generated from the theme's colours, once per window size and theme, off the interface thread. - **Tested without a GPU or game files**, which lets CI run the tests: - unit tests; - keyboard tests; - screenshot tests drawn offscreen. - **Self-contained:** everything lives in `launcher/`, apart from its CI workflow and the docs flag check. #### What it does - **Play:** - **Check** runs `make_game.py --game <package> --check`. - **Build** runs `make_game.py --game <package> --out <output> [--work <work>]` with the chosen options. - **Play** runs `gta6rt --run <exe> --game-dir <package>` with `LEONIDA_D3D12=vulkan`. On Linux it goes through `gta6rt.sh`. - A progress bar follows the build's stages, and the last lines of output show live. - It also reads `@@stage`, `@@progress` and `@@error` lines, in case `make_game.py` prints them one day. - **Game files:** `--game`, `--out`, `--work`, `--full-check`. - **Build:** `--stages`, `--wav`. - **Performance:** `LEONIDA_VK_DEVICE`, `LEONIDA_VK_VALIDATION`, `--wave64-emulate`, `--jobs`. - **Diagnostics:** `--trace-d3d12`, `--overlay`, `LEONIDA_UNIMPLEMENTED`. - **Window:** - its own header bar, with the light/dark switch; - a sidebar that folds away below 640 px wide; - rounded corners drawn by the app (`LEONIDA_WINDOW_FRAME=0` gives a plain window). On Windows it uses Windows 11's own corners instead. - **Cancel before the process has started:** if Cancel is pressed before the process reports Started, the process is stopped as soon as it starts (`launcher/tests/cancel.rs`). #### Planned for later versions - **Updates:** - a check for new versions of the port, and a rebuild of what changed; - opt-in, and the only part that would go online. - **A Tools page:** - checks the build's prerequisites (Python, .NET SDK, Vulkan SDK, `llvm-mc`); - says what is missing and where to get it. - **A Compatibility page:** - the translator's fallback flags (`--no-float-controls`, `--bary-fallback`, `--texel-offset-fallback`, `--f16-interp-fallback`, `--mesh-compute`, `--pc-tail-ubo`); - `--runtime-build`. - **macOS support:** iced already runs there (through Metal), and so do the folder picker and the settings folder. Still to add: - Cmd for the shortcuts where Ctrl is used today; - the native window buttons over a transparent title bar; - a setting for the Wine or CrossOver that runs the loader, as on Linux; - a macOS compile check. - **Windows and packaging:** testing on Windows, then a single download per platform. - **Once the game boots:** - launch options; - a view of the startup trace (`--trace`, `tools/boot_trace.py`). #### Relation to old upstream PR 3558 (BUILD-1041) - **That pull request** was a Python/Tk front end for `make_game.py`. It also downloaded the build tools and updated the checkout with git. - **This one:** - is native on Windows and Linux; - adds the Play step; - leaves installing tools and updating for later, as opt-in features. - If the project wants one launcher, I'm glad to fold what's useful from either into the other. #### Reviews on the old repository These checks were made on the old repository, before it went private: - **cynbun** re-checked the final head: read the code and ran the CPU tests on Linux. - **tedin7** pointed out that nothing tested the Cancel-before-Started fix. `launcher/tests/cancel.rs` was added for that. Removing the fix's lines makes it fail. - **Kam471** built and tested it on Windows 11 (MSVC, Rust 1.98): 174 tests passed, with `clippy` and `fmt` clean. #### For the maintainer to decide - **A Rust toolchain for one optional tool.** `CONTRIBUTING.md` covers Python only. - **New binary files:** - four font files, about 620 KB, under the SIL OFL 1.1 with their licence texts beside them; - a 5,264-line `Cargo.lock`. - **A new CI workflow,** `.github/workflows/launcher.yml`, on Windows and Ubuntu. - It runs `cargo fmt --check`, `cargo clippy` and `cargo test`. - It runs only when `launcher/**`, `assets/logo.png` or the workflow itself changes. - It needs no GPU, no display and no game files. ### Tested Linux 7.3.5, Rust 1.100.0, on the rebased branch. Nothing opened a window: `DISPLAY` and `WAYLAND_DISPLAY` were unset, and every page was drawn offscreen on the CPU (tiny-skia). - **`cargo test --locked`:** everything passes. - 152 unit tests (2 ignored: a right-to-left text case that depends on system fonts, and a timing run). - The integration suites: screenshots 8, keyboard 9, launch 3, scene cache 2, cancel 1, glows 1, chips 1 and polish 1. - 1 doctest (2 ignored). - **What the tests cover:** - the command lines, for Windows and Linux; - the process handling, through a stand-in script in place of `make_game.py`; - every page, drawn in both modes at three window sizes. - **Lints and build:** - `cargo clippy --locked --all-targets -- -D warnings` and `cargo fmt --check` are clean; - `cargo build --release --locked` succeeds. - **The fonts:** `launcher/fonts/SHA256SUMS` matches all four font files. - **Repository checks:** - all 12 `tests/test_docs_*.py` pass, including `test_docs_cli_flags.py`; - `actionlint` 1.7.7 is clean on `.github/workflows/launcher.yml`; - `python -I scripts/check_no_game_data.py` passes on every changed file. - **`git diff --check`** flags only trailing spaces on one line of each of the three OFL licence texts. Those spaces are in the upstream licence text, which is kept verbatim. - **Earlier, on the old repository:** - the release binary ran in a real window on Linux (Wayland, RX 7900 XTX, Mesa 26.3.1 RADV); - `clippy` was clean for `x86_64-pc-windows-gnu` too. - **Not tested:** - the real window on Windows; - macOS; - a complete build, and a real launch (the package has no executable). GPUs tested: n/a (this run was CPU-only; the earlier real-window run used an AMD Radeon RX 7900 XTX, Mesa 26.3.1 RADV, Linux) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). It merges cleanly with main at d0da7dade; #659 edits the same `FOREIGN` lines. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - The screenshots and tests use made-up paths and output. - The Play page's scene is generated in code from the theme's colours. - The only files the launcher builds in are the repository's own `assets/logo.png` and four OFL fonts. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No translator change.) AI-assisted (Claude Code, Claude Opus 5.5).
A new Cargo package in launcher/ for a desktop launcher. src/ui/ is its
UI kit: the design language's tokens (colors, type, spacing, radii,
motion, glow), the theme, text roles, fonts and focus model, and the
widgets the window shows, each with its states, focus and keys: button
(with a large variant), text field and its editing rules, checkbox,
choice, switch, toggle group (draggable), loader, progress, status chip,
scroll area, sidebar list, settings groups, form, the window's own
decorations, the folded window, and the window's state with a theme
crossfade and a LEONIDA_WINDOW_FRAME switch.

Two palettes, Sunset dark and light, come from the logo's pixels. Its
light orange and dark purple are the two colours: orange the main and
purple the secondary in light, the other way round in dark; every glow
takes the secondary. Tests check every ink on every surface at 4.5:1.

The window's rounded corners use iced_wgpu's public primitive API, with
rounded quads where the renderer can't draw it. On Windows, where stock
iced can't present a transparent window, the frame asks for Windows 11's
rounded corners and draws its line at their radius.

The four fonts the text roles use are embedded with their SIL Open Font
License texts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The launcher's logic, without a window:

- config: a versioned settings file in the user's configuration folder;
  missing, broken or newer files give the defaults.
- repo: the repository found by --repo or by walking up to make_game.py;
  the executable's name from the version manifests.
- commands: make_game.py's check and build (python -I -u, python3 off
  Windows) and the loader as docs/boot.md section 2 runs it, on Windows
  and through gta6rt.sh and Wine on Linux; each setting's flag or
  environment variable (--stages, --wav, --full-check, --jobs,
  --wave64-emulate, LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION,
  LEONIDA_UNIMPLEMENTED, gta6rt --trace-d3d12 and --overlay).
- output: make_game.py's log lines to a build's stages, and @@stage,
  @@progress, @@eta, @@check, @@done and @@error lines if it prints them.
- state: the primary action (Check, Build, Play or Cancel), why it's
  blocked, and the status line; "not bootable yet" reads as an
  explanation.
- process: a command's output read on background threads; cancelling
  ends its process tree. Tested with a stand-in shell script.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Buttons' and window buttons' glows fade in and out with the pointer
  (transition::Lit).
- The light and dark pill drags as a switch does: its highlight follows
  the pointer, slides into place, and the choice changes when it's let go;
  a click or a key slides it too. The header bar leaves that drag to it.
- The sidebar's chosen-row mark is the logo's orange in both modes, for
  contrast against the purple-tinted row.
- The gap between the pill and the close button is the close button's
  own margin, as at the window's edge.
- The app's name in capitals sits on the bar's middle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
src/scene.rs draws a dusk (dark) or a morning (light) over water, with a
shore and two palms in silhouette, as one RGBA picture of the page's size,
from the theme alone: its gradient's six stops, its background, its mode,
and its outline and shadow colours. No image files.

The soft layers (sky, water, glow, clouds, sun, reflection, horizon line)
are computed per pixel; the shore and palms are filled as anti-aliased
paths with tiny-skia, the version iced already builds. The scene's 16:10
frame covers the page from its bottom right. The page's background lies
at 0.97 over the text column and fades out beside it, so the muted ink
keeps 4.5:1 there; however narrow the page, the scene stays. A floating
window's rounded corner is cleared in the picture.

About 30-34 ms for a 1040x754 page in a release build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
One window: the header bar with the app's name, the light and dark pill
and the close button; a sidebar with five pages that folds below 640
pixels; one focus scope round all of it; Ctrl+Page Down and Ctrl+Page Up
step through the pages, Ctrl+L switches light and dark with a crossfade.

- Play: the logo, the launcher's and the game copy's versions, the status
  line and one big main button (Check, Build, Play or Cancel) in the text
  column over the scene; the progress bar and the output on an opaque
  panel.
- Game files: the package, output and work folders, each a field with the
  native folder picker; the full check.
- Build: the stages and WAV audio, as switches.
- Performance: LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION, --wave64-emulate
  and --jobs.
- Diagnostics: gta6rt --trace-d3d12, LEONIDA_UNIMPLEMENTED and
  gta6rt --overlay.

The scene is generated off the interface's thread, once per page size,
scale, theme, mode and column, after the size has held for 150 ms, and
cached for both modes; drawing a frame only shows the cached picture.
The logo is decoded once.

`leonida-launcher [--repo PATH]`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tests/keyboard.rs drives the window by keys alone, offscreen: Tab and
  Shift+Tab through the header bar, sidebar and pages; Enter and Space on
  the main and close buttons and the switches; arrows in the sidebar and
  the pill; typing into a field; Ctrl+Page Down and Up, Ctrl+L.
- tests/backdrop.rs counts the scene's generations with a stand-in: one
  per distinct final key through redraws, pointer and focus moves, page
  switches, a burst of resizes and mode switches back and forth (3 in
  all); and the last scene stays on the page while a resize goes on.
- tests/screenshots.rs draws every page in both modes on tiny-skia (CPU,
  no display), the Play page's states, the scene at two window sizes and
  the folded window. The renderer can be chosen with
  LEONIDA_TEST_RENDERER.
- launcher/README.md: building and running, the pages and the flag or
  variable each control drives, the keys, the window frame on Linux and
  Windows, the scene, the design system, the licence, and what isn't done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Play page's scene didn't appear after launch: nothing scheduled the
first tick at boot, and later ticks came only when the scene's key
changed, which at scale 1.0 and the default size it never did. The scene
cache is rebuilt so that no wanted picture is stranded:

- Launcher::boot, which main uses, schedules the first tick at once; after
  every message, a wanted picture that isn't made, isn't in flight and has
  no tick due gets one.
- At start both modes' pictures are made at once, the current one first,
  off the interface's thread; only after a resize does the size have to
  hold for 150 ms, while the last picture shows, scaled to cover.
- A picture fades in when it's ready (motion::SCENE_IN, 500 ms), a mode
  switch crossfades between the two made pictures, a resize's new picture
  crossfades over the old; frames are asked for only while a fade runs.
- The sun's radial glow is gone from the scene.

Glows fade in over motion::GLOW_IN (500 ms) and out over
motion::GLOW_OUT (700 ms): hover on buttons and window buttons, and their
focus rings' glow. The waiting status chip's ring and small light are the
secondary colour in dark, the logo's orange, instead of muted purple.

Tests: a real launch as main boots it, its tasks run on threads, at the
default size and scale, on another page, folded and with the frame off;
two generations per page, none on mode switches; the fade starts only
once a picture is ready and asks for nothing once it's whole; every chip's
word on its tint at 4.5:1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The scene's picture is the scene alone again, its sun's glow back; the
fade that was baked into it, which followed the text column and so
looked wrong on small windows, is gone, and with it the column's width
from the scene's key.

Over the scene the window lays a veil: the page's background at 0.85,
held a little in from the top left (0.15 of the way), then thinning on
a straight line to nothing at the bottom right corner, the bend rounded
over 0.10. It is a 512 by 512 picture, dithered against banding, made
once per mode at start and stretched over the page as it is drawn, so
it follows a resize at once. A mode switch crossfades the two veils
with the theme (Chrome::theme_fade).

Tests: the veil holds, then falls in equal steps with no jump or step
in slope; its picture is the background at the veil's opacity in each
mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Text fields took the control radius (10) while buttons took 8; fields
now take the buttons' radius, so a field and the button beside it match.

Every glow fades in over motion::GLOW_IN and out over motion::GLOW_OUT,
as the buttons' do: a switch's glow while on had ridden its knob's
150 ms slide, and a text field's hover glow came at once; both have their
own fade now.

Tests: a button and a text field under the pointer, and a switch turned
on, are part lit halfway through GLOW_IN and whole at its end, in both
modes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The status line sent the player to "Settings", a page the window doesn't
have; it names the Game files page now.

A test draws every page and the Play page's states, in both modes, at
the smallest window, the default and 1920x1080, for a look over the
whole launcher, and checks that none is blank.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Focus rings appeared and vanished at once on the switch, the header bar's pill, the sidebar,
text fields, the output area and the choice cards; on buttons and the close button the ring's glow
faded in but the ring was dropped the moment focus left, so it never faded out. Each now keeps
its ring in a Lit and draws it, line and glow together, at that share, while it fades out too
(paint::outline_lit and outline_faded).

The Performance page's choice cards faded nothing: their hover glow, chosen glow and the radio
circle's glow now each have their own fade, and the hover glow gives way to the chosen one as a
card is chosen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The main action's fill in dark is the logo's orange with the logo's shadow as its ink, as in
  light, so it stands out on the purple page; its hover glow was orange already. Pressed, its
  line is the main purple where the secondary would vanish on the fill.
- The buttons beside the main one (Check, Build) are large too, so the row lines up.
- The veil over the scene holds full strength to 0.35 of the way (was 0.15), still at 0.85.
- Its color is the background tinted toward the logo's purple in dark (18%) and its orange in
  light (12%), Palette::veil; every ink keeps 4.5:1 on it, and a test checks it.
- On a mode change the old veil now fades out as the new one fades in. It stayed whole under
  the new one, and as both are see-through it showed through to the end and then vanished at
  once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two points from the review of old upstream PR 4578:

- A Cancel pressed before the process's Started event arrived set `cancelled` but had no pid to stop, and
  Started then stored the pid without looking, so the command ran on. Started now stops it when Cancel came
  first (launcher/src/app.rs).
- tests/test_docs_cli_flags.py was red: launcher/README.md quotes cargo's `--all-targets` and the test runner's
  `--ignored` and `--nocapture`, which no scanned source names. They join FOREIGN, the other programs' flags the
  docs quote.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
.github/workflows/launcher.yml builds and tests launcher/ on Windows and Ubuntu: `cargo fmt --check`,
`cargo clippy --locked --all-targets -- -D warnings` and `cargo test --locked`. It needs no GPU, no display and no
game files, as the tests draw the window offscreen on the CPU and run a stand-in script for make_game.py.

It runs on pushes to main and on pull requests that touch launcher/**, assets/logo.png (built into the launcher)
or the workflow itself, as the Runtime workflow lists what can break it. Actions pinned to a commit as elsewhere,
Rust from the runners' own rustup, read-only permissions, a concurrency group and a timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the review of old upstream PR 4578: nothing tested the fix in `follow`, so removing it failed no test. tests/cancel.rs
starts a stand-in that would run for half a minute, as the launcher starts a command (its own process group;
a tree `taskkill /T` ends on Windows), presses Cancel while `running` has no pid yet and checks the stand-in runs
on, then sends `Process(Started(pid))` and checks it ends within 10 s.

With the fix's lines removed the test fails ("a Cancel before Started left the process running"); with them it
passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:24:32 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 14:42 UTC · original · approved these changes

Clean-Room Audit & Architectural Review — PR #851 (OLD-4578 Native Launcher)

Tremendous work on restoring the iced native launcher!

Technical Verification & Security Audit

  1. Clean-Room & Legal Conformance:
    • Repository-wide scripts/check_no_game_data.py scan across all 70 files: 0 violations.
    • Zero game assets or proprietary binaries. Bundled fonts (Chakra Petch, IBM Plex Sans, JetBrains Mono) are verified open-source under SIL Open Font License v1.1 (OFL-1.1) with SHA-256 checksums in launcher/fonts/SHA256SUMS.
    • Strictly clean branding using repository's own assets/logo.png.
  2. Security & Offline Hermeticity:
    • [lints.rust] unsafe_code = "forbid" enforced.
    • Evaluated entire dependency tree in Cargo.lock: Zero networking / telemetry crates (no reqwest, hyper, tokio::net, or socket usage). Completely offline.
    • Child process lifecycle and tree cancellation (taskkill /T on Windows / process groups on Unix) thoroughly verified in launcher/src/process.rs and tests/cancel.rs.
  3. CI & Integration:
    • .github/workflows/launcher.yml path filters are tightly scoped to launcher/**.
    • tests/test_docs_cli_flags.py passes all 4 tests.
    • Re-evaluated 3-way merge against upstream main: 0 merge conflicts.

Verdict: APPROVED

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 14:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/851#pullrequestreview-6041333600) · **approved these changes** ### Clean-Room Audit & Architectural Review — PR #851 (`OLD-4578` Native Launcher) Tremendous work on restoring the iced native launcher! #### Technical Verification & Security Audit 1. **Clean-Room & Legal Conformance**: - Repository-wide `scripts/check_no_game_data.py` scan across all 70 files: **0 violations**. - Zero game assets or proprietary binaries. Bundled fonts (`Chakra Petch`, `IBM Plex Sans`, `JetBrains Mono`) are verified open-source under SIL Open Font License v1.1 (`OFL-1.1`) with SHA-256 checksums in `launcher/fonts/SHA256SUMS`. - Strictly clean branding using repository's own `assets/logo.png`. 2. **Security & Offline Hermeticity**: - `[lints.rust] unsafe_code = "forbid"` enforced. - Evaluated entire dependency tree in `Cargo.lock`: **Zero networking / telemetry crates** (no `reqwest`, `hyper`, `tokio::net`, or socket usage). Completely offline. - Child process lifecycle and tree cancellation (`taskkill /T` on Windows / process groups on Unix) thoroughly verified in `launcher/src/process.rs` and `tests/cancel.rs`. 3. **CI & Integration**: - `.github/workflows/launcher.yml` path filters are tightly scoped to `launcher/**`. - `tests/test_docs_cli_flags.py` passes all 4 tests. - Re-evaluated 3-way merge against upstream `main`: **0 merge conflicts**. **Verdict: APPROVED**
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 14:44 UTC · original · approved these changes

Audited and verified. Restores upstream PR 4578 providing an optional, native desktop launcher in Rust/iced under launcher/. Clean-room compliant with zero game data or proprietary assets, SIL OFL-1.1 fonts with verified checksums, unsafe_code = 'forbid', zero network capabilities in dependency tree, robust process group tree cancellation ( askkill /T), and isolated CI workflow. Approved.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 14:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/851#pullrequestreview-6041383408) · **approved these changes** Audited and verified. Restores upstream PR 4578 providing an optional, native desktop launcher in Rust/iced under launcher/. Clean-room compliant with zero game data or proprietary assets, SIL OFL-1.1 fonts with verified checksums, unsafe_code = 'forbid', zero network capabilities in dependency tree, robust process group tree cancellation ( askkill /T), and isolated CI workflow. Approved.
github-bot changed title from OLD-4578: restore old upstream PR 4578 - launcher: an optional native launcher (Rust, iced) to check, build and start the port to launcher: an optional native launcher (Rust, iced) to check, build and start the port 2026-11-26 14:40:49 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/851/head:github-bot/gh-851'
git switch 'github-bot/gh-851'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-851'
git switch 'github-bot/gh-851'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-851'
git switch 'github-bot/gh-851'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-851'
git switch 'main'
git merge --squash 'github-bot/gh-851'
git switch 'main'
git merge --ff-only 'github-bot/gh-851'
git switch 'main'
git merge 'github-bot/gh-851'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.