launcher: What's new page, update toast and Direct3D 12 runtime choice (LAUNCHER-WHATS-NEW, LAUNCHER-D3D12-RUNTIME) #3455

Merged
leonida/mandy
OreoFR merged 17 commits from oreofr/launcher-whats-new into main 2026-12-04 20:26:49 +00:00 AGit

Pull request successfully merged and closed

Member

Items: LAUNCHER-WHATS-NEW and LAUNCHER-D3D12-RUNTIME (claimed in #3312); both are launcher changes approved by the launcher owner, so they share this one global launcher PR
Depends on: #3454 (adds CHANGELOG.md; this branch contains its commits; this PR's own commits are d2be00d6f (What's new) and f982e288c (Direct3D 12 runtime))

What

  • A What's new page in the launcher's rail (before Help). It shows the CHANGELOG.md entries that the last Update Mandy brought, grouped by day (headings shown as written, e.g. "December 4, 2026") and category. It has a filter row (All plus the categories present), Known issues in the warning colour, and an Earlier changes › toggle that shows the whole file. The pull request numbers at the end of a line are shown on the side, in a muted colour.
  • After an update that brings new entries, a Mandy updated: N changes banner appears with the first entry's text and "and N-1 more", plus See what's new / Later. The rail shows a count badge until the page is opened. Later hides only the banner; the badge stays.
  • Each copy reads its own CHANGELOG.md. On the beta copy, a line links to BETA.md. A copy without CHANGELOG.md (an old copy) says so and shows no badge.

How

  • New entries. The launcher reads the file at the commit before the update (git show <old>:CHANGELOG.md, only a hex hash goes to git) and the file on disk after it. It parses both (parse_changelog) and compares whole entries as a multiset (changelog_news). An entry is a top-level bullet with its wrapped lines and - sub-lines. A rewrapped or moved entry is therefore not new, and an edited one is. I chose this over parsing git diff added lines, which breaks on rewraps and on the multi-line entries this file already has.
  • First run. With no previous commit noted (a first start, a zip copy), or with no days in the old file, the page shows the latest day and nothing is counted.
  • State. One record per copy (main / beta) in the existing settings file, %APPDATA%\Leonida\launcher.json, new key whats_new (a JSON string, like last_switches). It holds the commit last seen, the update shown (from/to), the unseen count and whether the banner is still due. It is written with only that key changed, the same way as write_channel, so an unsaved edit on the Settings page stays unsaved.
  • Update flow. run() already notes launcher_fingerprint (HEAD) before Update Mandy. after_update now computes and saves the record on the window's thread before the restart decision (update_restart), so after a restart for changed launcher files the new window finds the banner still due and shows it. At every start read_news also checks whether the copy moved since the last noted commit (for example a git pull of the player's own). Two updates before the page is opened add up: the count starts from the commit before the first one.
  • No network. Everything comes from the local repository after the update.
  • UI. Strings go through t(), with French, Spanish, Portuguese and German added to tools/launcher_i18n/*.json (test_every_language_translates_every_text). Colours, fonts and widgets are the launcher's own (PANEL, PINK, VIOLET_DEEP, WARN, the ttk scrollbar). The page fits the default window; only the list scrolls.
  • docs/launcher.md: the page is described under Pages.

Tests (Windows 11, Python 3.12)

  • python -I tests/test_launcher_whats_new.py: 22 OK. Covers days and categories, wrapped and sub-lines, refs and Markdown removal, headings kept as written, the intro not counted, Known issues and the filter, only the added entries, rewrapped or moved entries not new, an edited entry or a new sub-line counted, a duplicate counted, first run and no previous file showing the latest day, the banner text, the settings round trip per copy (beta's record leaves main's alone), bad records, first start only noting, the badge and banner after an update and after a restart, two updates adding up, an update without entries, an unreadable old commit, a missing file, and real git repositories (main and a -beta copy, a copy from before the file).
  • python -I tests/test_leonida_launcher.py: 307 OK (1 skipped), including the translations test.
  • python -I tests/test_tool_stdout_encoding.py OK, python -I tests/test_text_write_line_endings.py OK, python -m compileall -q tools OK.
  • python -I scripts/check_no_game_data.py on every changed file: clean.

Screenshots

These were taken locally without the game: the worktree's launcher, settings in a temporary APPDATA, English, and a demo "before" file made by removing seven entries from CHANGELOG.md. They show only the launcher and changelog text, no game data. They are kept locally by the author and not attached here: whatsnew-toast.png (Play page with the banner and the rail badge "7"), whatsnew-page.png (the page with the 7 new entries, filter row, Known issues in yellow), whatsnew-filter-known.png (filter on Known issues) and whatsnew-earlier.png (Earlier changes: the whole file). The window was closed after the captures. No game was launched.

Direct3D 12 runtime choice (f982e288c, LAUNCHER-D3D12-RUNTIME)

  • Where: Settings > General, diagnostics & advanced, under Graphics card: Direct3D 12 runtime. It applies at once and only to the copy in use: main and beta each have their own d3d12\target\diag\D3D12\ folder, and the choice is kept per copy in launcher.json (d3d12_runtime).
  • Windows 11 (build >= 22000): the default is Windows (built in). Picking it removes the copy's D3D12\ folder beside leonida.exe, so the exe asks Windows for its own runtime (apps/leonida/src/agility.rs, play-nvidia.ps1).
  • Windows 10: there is no Windows choice, because its D3D12 stops at SM 6.5 (d3d12/README.md). The default is 1.614.1.
  • Picking a version runs d3d12\scripts\get-d3d12.ps1 -Version <v>, non-blocking, with its output in the Output box. The script downloads from nuget.org and checks the package SHA-256, the DLL SHA-256 and Microsoft's signature, and nothing skips these. I run the .ps1 directly because Get-D3D12.cmd only adds a pause, which would hang a child without a console; the launcher already does the same for Get-AMD-FidelityFX. The script replaces the DLL only once every check has passed, so a failed download keeps the previous runtime, and the launcher says so.
  • Menu content, from the script, not hardcoded: the cases of switch ($Version) that carry a marker on the first line of their block.
    • # recommended: listed first as "(recommended)". Only one version may carry it; a second one counts as tested. No version carries it today.
    • # tested in game: PASS: plain label. Today 1.614.1: it is the Windows 10 runtime the project has always used, and it was the control of #3330's A/B.
    • # experimental:: listed after the tested versions as "(experimental)", with its warning when picked: "Experimental: it stuttered on an RTX 3090. Go back if anything goes wrong." Today 1.621.0: present_gap FAIL on an RTX 3090 and no fps gain on the RTX 4070 Laptop, both in #3330.
    • # preview:: at most one, listed last as "(preview, needs Developer Mode)", warning "Preview: may break anything. Go back if needed." It is only usable with Windows Developer Mode on. The launcher reads AllowDevelopmentWithoutDevLicense = 1 under HKLM AppModelUnlock or Policies\Microsoft\Windows\Appx, the same check as host.rs developer_mode(), and never changes it. A ttk combobox cannot grey out one entry, so without Developer Mode the entry is listed, and picking it shows the "needs Windows Developer Mode (Settings → System → For developers)" hint and goes back. No preview block exists yet: 1.722.1-preview waits for its verified hashes.
    • Unmarked versions stay hidden but remain usable from the command line. A test confirms that get-d3d12.ps1 takes a -preview version string: it has no ValidateSet or pattern, and an unpinned one stops at its own "Unsupported" line before any download.
    • Experimental and preview versions are never the default.
  • Adding a version to the menu takes three things: its verified hashes in the script, one PASS run in game, and the marker line.
  • Help line: "Agility SDK versions appear here once they pass an in-game run; go back to Windows if anything goes wrong."
  • Last start line: leonida.exe logs which runtime it loaded only for a folder version other than 1.614 ("... is the D3D12 Agility SDK 1.621: asking Windows for that version.", agility.rs), and only into a log file when -Log is on. So the line beside the menu shows "Last start: Agility 1." when the newest play-*.log holds that line. Otherwise it shows the folder's D3D12Core.dll file version (its VS_FIXEDFILEINFO), or with no folder "Windows' own runtime (built in )", e.g. 10.0.26100.10068 here.
  • docs/launcher.md describes the setting and the markers.

Tests (Windows 11): python -I tests/test_launcher_d3d12_runtime.py: 18 OK. They cover the markers, unmarked versions hidden, the order (recommended, tested, experimental, one preview), only one recommended or none, choices and defaults by Windows build (Windows 10 without any tested version falls back to 1.614.1), Developer Mode on or off from either key, the warnings, the folder action, the command, the choice on disk, settings per copy, file versions, the log line and the newest log, the status lines, and the -preview version string reaching the script's own check (PowerShell, nothing downloaded). Get-D3D12.cmd and the download are never run. tests/test_get_d3d12.py OK with the marker comments, plus the launcher, i18n, line-ending and encoding tests above. Screenshots, kept locally and not attached: d3d12-settings.png and d3d12-settings-menu.png (the row on Windows 11 with no D3D12 folder, and the open menu: Windows (built in), Agility SDK 1.614.1, Agility SDK 1.621.0 (experimental)).

GPUs tested: none needed (launcher UI only; screenshots on Windows 11 with an RTX 4070 Laptop, driver 621.40).

AI-assisted (Claude Code), launcher change for review by the launcher owner @OreoFR. Not to be merged before #3454.

  • Game language (16a9022bf): PLAY passes Settings' Language to the game as LEONIDA_LANGUAGE=<code> through -More (which play-nvidia.ps1 keeps when it clears the other LEONIDA_*; the Linux env too). "Follow the system" passes nothing: the runtime reads Windows' language itself. Harmless until the runtime side lands. Tests: tests/test_launcher_language_env.py.
  • A play log for every start (1d5109516, LAUNCHER-PLAY-LOG): PLAY opens %LOCALAPPDATA%\Leonida\logs\play-launcher-<date>-<time>-<pid>.log at its first step (time, channel, branch, commit, switches, LEONIDA_* values, command), copies the scripts' and game's output in (max 32 MB) and ends with a Result: line: exit code, or why the game never started (no game folder, missing build tools, script could not start, downloads stopped). Home folders scrubbed to %USERPROFILE%, newest ten kept; play-nvidia.ps1 prunes only its own logs. Copy info uses the runtime's -Log file of the same start, else this one, and shows Last start:. Idea ported from Darner's record_startup_error (Upstream-Commit: ce600b4d5eb1), rewritten in Python. Tests: tests/test_launcher_play_log.py.
  • Mod manager on the installed app: Mandy.exe runs the repository tools with its own frozen Python; manifest_verifier.py imported concurrent.futures, which the app was not built with, so the mod manager stopped with No module named 'concurrent'. Without the module it now hashes one file at a time (fixes installed apps after Update Mandy), and release.yml adds --hidden-import concurrent.futures for the next Setup. Tests in tests/test_manifest_verifier.py.
  • F1 menu and Settings kept in sync (a0b80ec8a, LAUNCHER-F1-SYNC): at open and on every return to the front the launcher reads the F1 file of the copy in use (beta's own on beta); for the profile, DLSS, Smooth Motion, frame generation, ray tracing, window shape and picture in the window the newest wins per setting (file mtime vs the launcher's last change, kept as menu_sync; no time yet = the scripts' -Chosen rule). F1's values go into launcher.json and the controls; Save/PLAY changes are written into the file (line replaced in place, other lines/order/CRLF kept, atomic). F1-only values show in Advanced mode; -CardMask settings untouched without an NVIDIA card; the "F1 menu: ..." note only while they still disagree. play-nvidia.ps1 unchanged. Tests: tests/test_launcher_menu_sync.py (20).
  • Custom branch on beta (LAUNCHER-CUSTOM-BRANCH, 3f3346282): a branch other than main/beta typed in Settings > Mandy repository > Branch while on beta was silently ignored. Save (or Update Mandy with the field changed) now asks, switches to the main copy and moves it to that branch through the normal Update Mandy (backup branch, refused over local changes) after the restart; No keeps beta with an output line. Picking that branch in the bottom-left menu from beta does the same; empty = main; invalid names keep the existing refusal. Tests: tests/test_launcher_custom_branch.py (new).
  • PLAY checks the game's files first (LAUNCHER-FILE-CHECK): every file of game/xbox-1.0.2.1.json must be in the game folder with its size (108 stats, no hashing); otherwise no start, a dialog + Output name the files (first 10, all of them in the play log and Copy my info) and say the copy is incomplete or from another packaging. Found when a folder without data/ttdb/*.ttpf stopped at +0x3e42541 with no explanation. LEONIDA_SKIP_FILE_CHECK=1 skips it; no manifest = starts with a note. Ported from Darner (#421 there), idea only. Tests: tests/test_launcher_file_check.py.
  • Tools > Check game files (full, a few minutes) (LAUNCHER-FULL-CHECK, 32b8b5c6f): the SHA-256 of every file against the copy's game/xbox-1.0.2.1.json (tools/manifest_verifier.py loaded in-process, worker thread, one file at a time), progress in the Output panel (files, GiB, MiB/s) and a Cancel that stops within 8 MiB; PLAY waits while it runs, the button is greyed while the game runs. Result: dialog + Output ("OK - all 108 files match" / "N problems: X missing, Y changed", first 10 names), full list in logs/game-files-check.txt (relative names), in Copy my info (all) and Copy info for a bug report (first 10); files not in the manifest are informational. Tests: tests/test_launcher_full_check.py.

🤖 Generated with Claude Code

**Items:** `LAUNCHER-WHATS-NEW` and `LAUNCHER-D3D12-RUNTIME` (claimed in #3312); both are launcher changes approved by the launcher owner, so they share this one global launcher PR **Depends on:** #3454 (adds `CHANGELOG.md`; this branch contains its commits; this PR's own commits are `d2be00d6f` (What's new) and `f982e288c` (Direct3D 12 runtime)) ## What - A **What's new** page in the launcher's rail (before Help). It shows the `CHANGELOG.md` entries that the last **Update Mandy** brought, grouped by day (headings shown as written, e.g. "December 4, 2026") and category. It has a filter row (All plus the categories present), **Known issues** in the warning colour, and an **Earlier changes ›** toggle that shows the whole file. The pull request numbers at the end of a line are shown on the side, in a muted colour. - After an update that brings new entries, a **Mandy updated: N changes** banner appears with the first entry's text and "and N-1 more", plus **See what's new** / **Later**. The rail shows a count badge until the page is opened. **Later** hides only the banner; the badge stays. - Each copy reads its own `CHANGELOG.md`. On the beta copy, a line links to `BETA.md`. A copy without `CHANGELOG.md` (an old copy) says so and shows no badge. ## How - **New entries.** The launcher reads the file at the commit before the update (`git show <old>:CHANGELOG.md`, only a hex hash goes to git) and the file on disk after it. It parses both (`parse_changelog`) and compares whole entries as a multiset (`changelog_news`). An entry is a top-level bullet with its wrapped lines and ` - ` sub-lines. A rewrapped or moved entry is therefore not new, and an edited one is. I chose this over parsing `git diff` added lines, which breaks on rewraps and on the multi-line entries this file already has. - **First run.** With no previous commit noted (a first start, a zip copy), or with no days in the old file, the page shows the latest day and nothing is counted. - **State.** One record per copy (`main` / `beta`) in the existing settings file, `%APPDATA%\Leonida\launcher.json`, new key `whats_new` (a JSON string, like `last_switches`). It holds the commit last seen, the update shown (`from`/`to`), the unseen count and whether the banner is still due. It is written with only that key changed, the same way as `write_channel`, so an unsaved edit on the Settings page stays unsaved. - **Update flow.** `run()` already notes `launcher_fingerprint` (HEAD) before Update Mandy. `after_update` now computes and saves the record on the window's thread **before** the restart decision (`update_restart`), so after a restart for changed launcher files the new window finds the banner still due and shows it. At every start `read_news` also checks whether the copy moved since the last noted commit (for example a `git pull` of the player's own). Two updates before the page is opened add up: the count starts from the commit before the first one. - **No network.** Everything comes from the local repository after the update. - **UI.** Strings go through `t()`, with French, Spanish, Portuguese and German added to `tools/launcher_i18n/*.json` (`test_every_language_translates_every_text`). Colours, fonts and widgets are the launcher's own (PANEL, PINK, VIOLET_DEEP, WARN, the ttk scrollbar). The page fits the default window; only the list scrolls. - `docs/launcher.md`: the page is described under Pages. ## Tests (Windows 11, Python 3.12) - `python -I tests/test_launcher_whats_new.py`: 22 OK. Covers days and categories, wrapped and sub-lines, refs and Markdown removal, headings kept as written, the intro not counted, Known issues and the filter, only the added entries, rewrapped or moved entries not new, an edited entry or a new sub-line counted, a duplicate counted, first run and no previous file showing the latest day, the banner text, the settings round trip per copy (beta's record leaves main's alone), bad records, first start only noting, the badge and banner after an update and after a restart, two updates adding up, an update without entries, an unreadable old commit, a missing file, and real git repositories (main and a `-beta` copy, a copy from before the file). - `python -I tests/test_leonida_launcher.py`: 307 OK (1 skipped), including the translations test. - `python -I tests/test_tool_stdout_encoding.py` OK, `python -I tests/test_text_write_line_endings.py` OK, `python -m compileall -q tools` OK. - `python -I scripts/check_no_game_data.py` on every changed file: clean. ## Screenshots These were taken locally without the game: the worktree's launcher, settings in a temporary `APPDATA`, English, and a demo "before" file made by removing seven entries from `CHANGELOG.md`. They show only the launcher and changelog text, no game data. They are kept locally by the author and not attached here: `whatsnew-toast.png` (Play page with the banner and the rail badge "7"), `whatsnew-page.png` (the page with the 7 new entries, filter row, Known issues in yellow), `whatsnew-filter-known.png` (filter on Known issues) and `whatsnew-earlier.png` (Earlier changes: the whole file). The window was closed after the captures. No game was launched. ## Direct3D 12 runtime choice (`f982e288c`, LAUNCHER-D3D12-RUNTIME) - **Where:** Settings > General, diagnostics & advanced, under Graphics card: **Direct3D 12 runtime**. It applies at once and only to the copy in use: main and beta each have their own `d3d12\target\diag\D3D12\` folder, and the choice is kept per copy in `launcher.json` (`d3d12_runtime`). - **Windows 11 (build >= 22000):** the default is **Windows (built in)**. Picking it removes the copy's `D3D12\` folder beside `leonida.exe`, so the exe asks Windows for its own runtime (`apps/leonida/src/agility.rs`, `play-nvidia.ps1`). - **Windows 10:** there is no Windows choice, because its D3D12 stops at SM 6.5 (`d3d12/README.md`). The default is 1.614.1. - **Picking a version** runs `d3d12\scripts\get-d3d12.ps1 -Version <v>`, non-blocking, with its output in the Output box. The script downloads from nuget.org and checks the package SHA-256, the DLL SHA-256 and Microsoft's signature, and nothing skips these. I run the `.ps1` directly because `Get-D3D12.cmd` only adds a `pause`, which would hang a child without a console; the launcher already does the same for `Get-AMD-FidelityFX`. The script replaces the DLL only once every check has passed, so a failed download keeps the previous runtime, and the launcher says so. - **Menu content, from the script, not hardcoded:** the cases of `switch ($Version)` that carry a marker on the first line of their block. - `# recommended`: listed first as "(recommended)". Only one version may carry it; a second one counts as tested. No version carries it today. - `# tested in game: PASS`: plain label. Today 1.614.1: it is the Windows 10 runtime the project has always used, and it was the control of #3330's A/B. - `# experimental:`: listed after the tested versions as "(experimental)", with its warning when picked: "Experimental: it stuttered on an RTX 3090. Go back if anything goes wrong." Today 1.621.0: `present_gap` FAIL on an RTX 3090 and no fps gain on the RTX 4070 Laptop, both in #3330. - `# preview:`: at most one, listed last as "(preview, needs Developer Mode)", warning "Preview: may break anything. Go back if needed." It is only usable with Windows Developer Mode on. The launcher reads `AllowDevelopmentWithoutDevLicense` = 1 under HKLM `AppModelUnlock` or `Policies\Microsoft\Windows\Appx`, the same check as host.rs `developer_mode()`, and never changes it. A ttk combobox cannot grey out one entry, so without Developer Mode the entry is listed, and picking it shows the "needs Windows Developer Mode (Settings → System → For developers)" hint and goes back. No preview block exists yet: 1.722.1-preview waits for its verified hashes. - Unmarked versions stay hidden but remain usable from the command line. A test confirms that `get-d3d12.ps1` takes a `-preview` version string: it has no ValidateSet or pattern, and an unpinned one stops at its own "Unsupported" line before any download. - Experimental and preview versions are never the default. - **Adding a version to the menu** takes three things: its verified hashes in the script, one PASS run in game, and the marker line. - **Help line:** "Agility SDK versions appear here once they pass an in-game run; go back to Windows if anything goes wrong." - **Last start line:** `leonida.exe` logs which runtime it loaded only for a folder version other than 1.614 ("... is the D3D12 Agility SDK 1.621: asking Windows for that version.", `agility.rs`), and only into a log file when `-Log` is on. So the line beside the menu shows "Last start: Agility 1.<v>" when the newest `play-*.log` holds that line. Otherwise it shows **the folder's `D3D12Core.dll` file version** (its VS_FIXEDFILEINFO), or with no folder "Windows' own runtime (built in <System32 D3D12Core.dll version>)", e.g. 10.0.26100.10068 here. - `docs/launcher.md` describes the setting and the markers. Tests (Windows 11): `python -I tests/test_launcher_d3d12_runtime.py`: 18 OK. They cover the markers, unmarked versions hidden, the order (recommended, tested, experimental, one preview), only one recommended or none, choices and defaults by Windows build (Windows 10 without any tested version falls back to 1.614.1), Developer Mode on or off from either key, the warnings, the folder action, the command, the choice on disk, settings per copy, file versions, the log line and the newest log, the status lines, and the `-preview` version string reaching the script's own check (PowerShell, nothing downloaded). `Get-D3D12.cmd` and the download are never run. `tests/test_get_d3d12.py` OK with the marker comments, plus the launcher, i18n, line-ending and encoding tests above. Screenshots, kept locally and not attached: `d3d12-settings.png` and `d3d12-settings-menu.png` (the row on Windows 11 with no D3D12 folder, and the open menu: Windows (built in), Agility SDK 1.614.1, Agility SDK 1.621.0 (experimental)). GPUs tested: none needed (launcher UI only; screenshots on Windows 11 with an RTX 4070 Laptop, driver 621.40). AI-assisted (Claude Code), launcher change for review by the launcher owner @OreoFR. Not to be merged before #3454. - **Game language** (`16a9022bf`): PLAY passes Settings' Language to the game as `LEONIDA_LANGUAGE=<code>` through `-More` (which `play-nvidia.ps1` keeps when it clears the other `LEONIDA_*`; the Linux env too). "Follow the system" passes nothing: the runtime reads Windows' language itself. Harmless until the runtime side lands. Tests: `tests/test_launcher_language_env.py`. - **A play log for every start** (`1d5109516`, LAUNCHER-PLAY-LOG): PLAY opens `%LOCALAPPDATA%\Leonida\logs\play-launcher-<date>-<time>-<pid>.log` at its first step (time, channel, branch, commit, switches, `LEONIDA_*` values, command), copies the scripts' and game's output in (max 32 MB) and ends with a `Result:` line: exit code, or why the game never started (no game folder, missing build tools, script could not start, downloads stopped). Home folders scrubbed to `%USERPROFILE%`, newest ten kept; `play-nvidia.ps1` prunes only its own logs. Copy info uses the runtime's `-Log` file of the same start, else this one, and shows `Last start:`. Idea ported from Darner's `record_startup_error` (`Upstream-Commit: ce600b4d5eb1`), rewritten in Python. Tests: `tests/test_launcher_play_log.py`. - **Mod manager on the installed app:** Mandy.exe runs the repository tools with its own frozen Python; `manifest_verifier.py` imported `concurrent.futures`, which the app was not built with, so the mod manager stopped with `No module named 'concurrent'`. Without the module it now hashes one file at a time (fixes installed apps after *Update Mandy*), and `release.yml` adds `--hidden-import concurrent.futures` for the next Setup. Tests in `tests/test_manifest_verifier.py`. - **F1 menu and Settings kept in sync** (`a0b80ec8a`, LAUNCHER-F1-SYNC): at open and on every return to the front the launcher reads the F1 file of the copy in use (beta's own on beta); for the profile, DLSS, Smooth Motion, frame generation, ray tracing, window shape and picture in the window the newest wins per setting (file mtime vs the launcher's last change, kept as `menu_sync`; no time yet = the scripts' -Chosen rule). F1's values go into launcher.json and the controls; Save/PLAY changes are written into the file (line replaced in place, other lines/order/CRLF kept, atomic). F1-only values show in Advanced mode; -CardMask settings untouched without an NVIDIA card; the "F1 menu: ..." note only while they still disagree. play-nvidia.ps1 unchanged. Tests: `tests/test_launcher_menu_sync.py` (20). - **Custom branch on beta** (LAUNCHER-CUSTOM-BRANCH, 3f3346282): a branch other than main/beta typed in Settings > Mandy repository > Branch while on beta was silently ignored. Save (or Update Mandy with the field changed) now asks, switches to the main copy and moves it to that branch through the normal Update Mandy (backup branch, refused over local changes) after the restart; No keeps beta with an output line. Picking that branch in the bottom-left menu from beta does the same; empty = main; invalid names keep the existing refusal. Tests: `tests/test_launcher_custom_branch.py` (new). - **PLAY checks the game's files first** (LAUNCHER-FILE-CHECK): every file of `game/xbox-1.0.2.1.json` must be in the game folder with its size (108 stats, no hashing); otherwise no start, a dialog + Output name the files (first 10, all of them in the play log and Copy my info) and say the copy is incomplete or from another packaging. Found when a folder without `data/ttdb/*.ttpf` stopped at +0x3e42541 with no explanation. `LEONIDA_SKIP_FILE_CHECK=1` skips it; no manifest = starts with a note. Ported from Darner (#421 there), idea only. Tests: `tests/test_launcher_file_check.py`. - **Tools > Check game files (full, a few minutes)** (LAUNCHER-FULL-CHECK, 32b8b5c6f): the SHA-256 of every file against the copy's `game/xbox-1.0.2.1.json` (`tools/manifest_verifier.py` loaded in-process, worker thread, one file at a time), progress in the Output panel (files, GiB, MiB/s) and a Cancel that stops within 8 MiB; PLAY waits while it runs, the button is greyed while the game runs. Result: dialog + Output ("OK - all 108 files match" / "N problems: X missing, Y changed", first 10 names), full list in `logs/game-files-check.txt` (relative names), in Copy my info (all) and Copy info for a bug report (first 10); files not in the manifest are informational. Tests: `tests/test_launcher_full_check.py`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every merge into main reaches players at their next Update Mandy, so the
changelog goes by date, not by version. The 2026-12-04 section comes from
the v1.1.0 release notes MoonEyes wrote (release removed: only OreoFR
publishes releases), plus #3448 and #3453 merged after them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "What's new" page in the rail shows the CHANGELOG.md entries the last
Update Mandy brought: the file at the commit before the update against the
file after it, compared entry by entry (a rewrapped or moved entry is not
new), grouped by day (headings as written) and category, with a filter row,
Known issues in the warning colour and "Earlier changes" for the whole
file. Before any update is noted it shows the latest day. After an update
that brings entries, a "Mandy updated: N changes" banner offers See what's
new / Later and the rail shows the count until the page is opened. The
record (commit last seen, update shown, count, banner) is kept per copy in
the settings' whats_new key, so it survives the restart after an update of
the launcher. Each copy reads its own file; the beta copy links BETA.md. A
copy without CHANGELOG.md says so and shows no count. No network.

Depends on: #3454

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > General gets "Direct3D 12 runtime", applied at once for the copy
in use: "Windows (built in)" on Windows 11 (the copy's D3D12 folder beside
leonida.exe removed) or an Agility SDK version, fetched by
d3d12/scripts/get-d3d12.ps1 -Version <v> (nuget.org, package and DLL SHA-256
and Microsoft's signature checked; a failed download keeps the previous
runtime and says so). Windows 10 has no Windows choice and defaults to
1.614.1.

The menu lists only the script's versions marked on their block's first
line: "# recommended" (one at most, first), "# tested in game: PASS",
"# experimental:" (after the tested ones, with a warning) and "# preview:"
(one at most, last, only with Windows Developer Mode on, read from HKLM as
host.rs developer_mode() does, never changed). get-d3d12.ps1 marks 1.614.1
tested and 1.621.0 experimental (present_gap FAIL on an RTX 3090, #3330).
Beside the menu: the Agility version the newest play log names (leonida.exe
logs it only for a version other than 1.614), else the folder's
D3D12Core.dll version, or Windows' own. The choice is kept per copy in
launcher.json (d3d12_runtime).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OreoFR changed title from launcher: What's new page and update toast from CHANGELOG.md (LAUNCHER-WHATS-NEW) to launcher: What's new page, update toast and Direct3D 12 runtime choice (LAUNCHER-WHATS-NEW, LAUNCHER-D3D12-RUNTIME) 2026-12-04 13:44:59 +00:00
1.620.2 stays out of the launcher's menu until an in-game run passes;
1.722.1-preview is marked preview (needs Windows Developer Mode).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enlighted's runs on 2026-12-04 (RTX 3090, driver 621.40, 300 s in the world, 0 device lost, 0 crash). 1.620.2 now shows in the launcher's Direct3D 12 menu; the preview keeps its Developer Mode marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings' Language goes to the game as LEONIDA_LANGUAGE=<code> through -More
(extra_variables), which play-nvidia.ps1 keeps when it clears the other
LEONIDA_* before the start; on Linux it goes into play-linux.sh's
environment. "" (follow the system) passes nothing: the runtime reads
Windows' language itself, with the same table. An Advanced
LEONIDA_LANGUAGE still wins. Harmless until the runtime reads it.

Tests: tests/test_launcher_language_env.py ("fr" reaches -More and the
Linux env, "" sets nothing, Advanced wins, the script keeps -More).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Players posted "no play log found" or a bare device-lost report: without
-Log nothing was written, and a start that failed before the runtime ran
left nothing at all. Now PLAY opens
%LOCALAPPDATA%\Leonida\logs\play-launcher-<date>-<time>-<pid>.log at its
first step (before the build tools, the game folder and the scripts are
checked) with the time, channel, branch, commit, switches, LEONIDA_*
values and the command, copies the scripts' and the game's output in
(at most 32 MB) and ends with a Result: line: the exit code, or why the
game never started (no game folder, missing build tools, a script that
could not start, downloads stopped). Home folders are written as
%USERPROFILE%; the newest ten are kept, and play-nvidia.ps1 now prunes
only its own play-*.log.

Copy info for a bug report reads the runtime's -Log file when it was
written for the same start, else this log, and shows "Last start:".

Ported from Darner (GPL-3.0): the idea of apps/darner/src/play.rs
record_startup_error / log_file (a log for a start that fails while it
is prepared, the process id in the name, ten kept), written again in
Python for this launcher; no code copied.

Tests: tests/test_launcher_play_log.py (early failures in the window:
no game folder, missing build tools, a script that exits 1, a script
that cannot start; scrubbing, cap, pruning, Copy info's choice).

Upstream-Commit: ce600b4d5eb1ac29fa66bba20299c314083085e6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mandy.exe runs the repository's tools with its own frozen Python, which only carries the standard library modules it was built with; manifest_verifier.py imported concurrent.futures, which the app's PyInstaller build did not include, so the mod manager stopped with ModuleNotFoundError on every installed app. Without the module the files are now hashed one at a time (works on the apps already installed, after Update Mandy), and the release build names concurrent.futures as a hidden import for the next Setup. Tests: the verifier runs with concurrent blocked; release.yml carries the hidden import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The launcher reads the F1 menu's file of the copy in use (beta's own on beta)
when its window opens and every time it comes back to the front, and keeps the
seven settings both have the same: the profile, DLSS, Smooth Motion, frame
generation, ray tracing, the window shape and the picture in the window.

- Newest wins, one setting at a time: the file's modification time against
  the time the launcher last changed that setting (menu_sync in
  launcher.json); the file wins a tie. Without a time yet, the scripts' own
  rule (the launcher's when its switch changed since the last PLAY). The rule
  is written once, above sync_menu.
- What the menu wins goes into launcher.json and the controls (a control with
  an unsaved edit is left alone). What Save or PLAY changes is written into the
  file: its line replaced where it stands, the other lines, their order, the
  line ending and BOM kept, an atomic replace.
- Values Settings has no control for stay in the file and show on their rows
  in Advanced mode ("F1 menu: <value>"), never in the Advanced field.
- Without an NVIDIA card the -CardMask settings are neither taken nor written.
- The "F1 menu: ..." note now shows only while the two still disagree;
  "F1 menu file not read: ..." when the file is there but unreadable. A file
  that cannot be written is reported in the output and written on a later pass.

play-nvidia.ps1 is unchanged: its merge at every start stays the safety net.

Tests: tests/test_launcher_menu_sync.py (round trips both ways, newest wins,
Advanced-only names, beta copy, masked settings, broken and locked files, the
Tk window withdrawn: open, focus refresh, Save).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On beta, the Settings branch field (Mandy repository -> Branch) was silently
ignored: the beta copy always follows beta. A valid branch other than main and
beta typed there now asks at Save (or at Update Mandy with the field changed),
then switches to the main copy, saves the branch and update_on_start, and the
restarted launcher runs the normal Update Mandy (backup branch, refused over
local changes) once its first update check is over. No leaves beta as it is
with an output line. Picking that branch in the menu from beta does the same.
Empty is main again; an invalid name keeps the existing refusal. The F1 sync
still reads the copy in use (REPO).

Tests: tests/test_launcher_custom_branch.py (new), the branch menu plan test
updated; docs/launcher.md; de/es/fr/pt strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First-time contributor

Verification — Merge, Repo Checks & Launcher Unit Tests (Windows 11)

Tested PR head 3f33462825 merged cleanly onto main (6491bc1a1, 21 files changed):

  • git diff --check origin/main — PASS
  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md — PASS
  • python -I scripts/check_no_game_data.py — PASS
  • Launcher unit test modules (7/7 non-GUI/isolated modules PASS — 171 passed, 3 skipped, 0 failed):
    • tests.test_launcher_custom_branch — 9/9 OK (0.2 s)
    • tests.test_launcher_d3d12_runtime — 18/18 OK (0.4 s)
    • tests.test_launcher_language_env — 7/7 OK (0.2 s)
    • tests.test_launcher_menu_sync — 20/20 OK (2.1 s)
    • tests.test_launcher_play_log — 16/16 OK (5.3 s)
    • tests.test_launcher_whats_new — 22/22 OK (1.4 s)
    • tests.test_manifest_verifier — 82 ran (79 passed, 3 skipped, 5.7 s)
  • Note: tests.test_leonida_launcher timed out on this host both with this PR and identically on untouched main (6491bc1a1, >60 s), so it was excluded as a pre-existing host Tk/network timeout.

Clean merge and all six new launcher test suites plus test_manifest_verifier pass cleanly.

AI-assisted.

### Verification — Merge, Repo Checks & Launcher Unit Tests (Windows 11) Tested PR head `3f33462825` merged cleanly onto `main` (`6491bc1a1`, `21` files changed): - `git diff --check origin/main` — **PASS** - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` — **PASS** - `python -I scripts/check_no_game_data.py` — **PASS** - Launcher unit test modules (`7/7` non-GUI/isolated modules **PASS** — `171` passed, `3` skipped, `0` failed): - `tests.test_launcher_custom_branch` — `9/9` OK (`0.2 s`) - `tests.test_launcher_d3d12_runtime` — `18/18` OK (`0.4 s`) - `tests.test_launcher_language_env` — `7/7` OK (`0.2 s`) - `tests.test_launcher_menu_sync` — `20/20` OK (`2.1 s`) - `tests.test_launcher_play_log` — `16/16` OK (`5.3 s`) - `tests.test_launcher_whats_new` — `22/22` OK (`1.4 s`) - `tests.test_manifest_verifier` — `82` ran (`79` passed, `3` skipped, `5.7 s`) - Note: `tests.test_leonida_launcher` timed out on this host both with this PR and identically on untouched `main` (`6491bc1a1`, >60 s), so it was excluded as a pre-existing host Tk/network timeout. Clean merge and all six new launcher test suites plus `test_manifest_verifier` pass cleanly. AI-assisted.
Tests that open the real window with load_settings patched let it save their fake settings (data_dir a temp folder, game_dir empty) into %APPDATA%\Leonida\launcher.json of whoever ran them: Moon's and OreoFR's copies lost their game folder that way. The module now runs with a throw-away APPDATA, LOCALAPPDATA and XDG_CONFIG_HOME, and a test checks config_path() points into it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game folder that lacked all 46 data/ttdb/*.ttpf files started, then stopped at the title's own breakpoint
(0x80000003 at image+0x3e42541) as the intro loaded, with nothing to say why. Before PLAY starts the game, the
launcher now stats every file game/xbox-1.0.2.1.json lists (108, names and sizes only, no hashing) and refuses a
folder where any is missing or of another size: a dialog and the Output panel name the first 10 ("and N more"),
say the copy is incomplete or from another packaging and needs a complete copy from the player's own Xbox, and
point at tools/manifest_verifier.py for the SHA-256 check. The play log and Copy my info name every file; Copy info
for a bug report ends with the count and the first 10. LEONIDA_SKIP_FILE_CHECK=1 (advanced options or the
launcher's environment) skips it; a copy without the manifest starts as before with a line in the play log.
Standard library only (the installed app's frozen Python).

Ported from Darner (their issue/PR #421, DARNER_SKIP_FILE_CHECK, GPL-3.0): the idea, not its code.

Tests: tests/test_launcher_file_check.py (fake folders and a tiny fake manifest, throw-away APPDATA/LOCALAPPDATA).
Translations for fr, es, pt, de; docs/launcher.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PLAY's gate only compares sizes; support still had to ask players to paste the manifest_verifier.py command for the
full check. Tools now has "Check game files (full, a few minutes)": tools/manifest_verifier.py, loaded in the
launcher's own process by path as the mod manager loads it (beside the launcher from source, the copy's tools/ in the
installed app), runs verify_manifest against the copy's game/xbox-1.0.2.1.json on a worker thread, one file at a time
(no concurrent.futures needed). The Output panel shows files done / to hash, GiB and MiB/s on one line updated in
place; the same button becomes "Cancel the file check", which stops the read within one 8 MiB chunk (a new optional
on_chunk hook of sha256_file / verify_manifest, unused by every other caller). PLAY and the other runs wait while it
checks; the button is greyed while the game runs and refused while one started elsewhere runs.

The end: a dialog and the Output panel say "OK - all N files match" or "N problems: X missing, Y changed" (unreadable
when any) with the first 10 names and "and N more"; files the manifest does not list (caches, logs) are counted as
information only. The full list goes to %LOCALAPPDATA%\Leonida\logs\game-files-check.txt with names relative to the
game folder; Copy my info adds the last result with every file, Copy info for a bug report the first 10.

Tests: tests/test_launcher_full_check.py (fake manifest and small files in temp, throw-away APPDATA/LOCALAPPDATA:
all match, one missing, same size with other bytes caught only by the full check, other files, cancel, result file,
both Copy infos). Translations for fr, es, pt, de; docs/launcher.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manifest_verifier.py and report_paths.py imported unicodedata, which the frozen Mandy.exe may not carry (only the launcher's own imports and the hidden-import list are bundled): the full game file check and the mod manager would stop on an ImportError there. Without it, names are compared case-folded only; the next Setup bundles unicodedata as a hidden import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OreoFR merged commit 0036195a72 into main 2026-12-04 20:26:49 +00:00
Author
Member

Merged at OreoFR's request (launcher owner).

  • Head 098d22303 checked with the local CI against main 6b0498d37: merge clean, no game data (tracked and under another name), Python compile, make_game.py --help, Python tests (standard library) all PASS; no Rust changed.
  • Main had moved, so the branch got a merge commit (fa4252087) whose tree is exactly the tree the CI tested; merge commit 0036195a7.
  • Not tried in the real launcher window yet: covered by the unit tests only (each feature has its own test file).
  • release.yml now bundles concurrent.futures and unicodedata: the installed app gets them at the next Setup; until then manifest_verifier.py and report_paths.py fall back without them.
Merged at OreoFR's request (launcher owner). - Head `098d22303` checked with the local CI against main `6b0498d37`: merge clean, no game data (tracked and under another name), Python compile, `make_game.py --help`, Python tests (standard library) all PASS; no Rust changed. - Main had moved, so the branch got a merge commit (`fa4252087`) whose tree is exactly the tree the CI tested; merge commit `0036195a7`. - Not tried in the real launcher window yet: covered by the unit tests only (each feature has its own test file). - `release.yml` now bundles `concurrent.futures` and `unicodedata`: the installed app gets them at the next Setup; until then `manifest_verifier.py` and `report_paths.py` fall back without them.
OreoFR referenced this pull request from a commit 2026-12-04 20:30:51 +00:00
Sign in to join this conversation.
No description provided.