launcher: What's new page, update toast and Direct3D 12 runtime choice (LAUNCHER-WHATS-NEW, LAUNCHER-D3D12-RUNTIME) #3455
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
2 participants
Due date
No due date set.
Reference
leonida/mandy!3455
Loading…
Reference in a new issue
No description provided.
Delete branch "oreofr/launcher-whats-new"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Items:
LAUNCHER-WHATS-NEWandLAUNCHER-D3D12-RUNTIME(claimed in #3312); both are launcher changes approved by the launcher owner, so they share this one global launcher PRDepends on: #3454 (adds
CHANGELOG.md; this branch contains its commits; this PR's own commits ared2be00d6f(What's new) andf982e288c(Direct3D 12 runtime))What
CHANGELOG.mdentries 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.CHANGELOG.md. On the beta copy, a line links toBETA.md. A copy withoutCHANGELOG.md(an old copy) says so and shows no badge.How
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 parsinggit diffadded lines, which breaks on rewraps and on the multi-line entries this file already has.main/beta) in the existing settings file,%APPDATA%\Leonida\launcher.json, new keywhats_new(a JSON string, likelast_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 aswrite_channel, so an unsaved edit on the Settings page stays unsaved.run()already noteslauncher_fingerprint(HEAD) before Update Mandy.after_updatenow 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 startread_newsalso checks whether the copy moved since the last noted commit (for example agit pullof the player's own). Two updates before the page is opened add up: the count starts from the commit before the first one.t(), with French, Spanish, Portuguese and German added totools/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-betacopy, 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.pyOK,python -I tests/test_text_write_line_endings.pyOK,python -m compileall -q toolsOK.python -I scripts/check_no_game_data.pyon 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 fromCHANGELOG.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) andwhatsnew-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)d3d12\target\diag\D3D12\folder, and the choice is kept per copy inlauncher.json(d3d12_runtime).D3D12\folder besideleonida.exe, so the exe asks Windows for its own runtime (apps/leonida/src/agility.rs,play-nvidia.ps1).d3d12/README.md). The default is 1.614.1.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.ps1directly becauseGet-D3D12.cmdonly adds apause, which would hang a child without a console; the launcher already does the same forGet-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.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_gapFAIL 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 readsAllowDevelopmentWithoutDevLicense= 1 under HKLMAppModelUnlockorPolicies\Microsoft\Windows\Appx, the same check as host.rsdeveloper_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.get-d3d12.ps1takes a-previewversion string: it has no ValidateSet or pattern, and an unpinned one stops at its own "Unsupported" line before any download.leonida.exelogs 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-Logis on. So the line beside the menu shows "Last start: Agility 1." when the newestplay-*.logholds that line. Otherwise it shows the folder'sD3D12Core.dllfile version (its VS_FIXEDFILEINFO), or with no folder "Windows' own runtime (built in )", e.g. 10.0.26100.10068 here.docs/launcher.mddescribes 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-previewversion string reaching the script's own check (PowerShell, nothing downloaded).Get-D3D12.cmdand the download are never run.tests/test_get_d3d12.pyOK with the marker comments, plus the launcher, i18n, line-ending and encoding tests above. Screenshots, kept locally and not attached:d3d12-settings.pngandd3d12-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.
16a9022bf): PLAY passes Settings' Language to the game asLEONIDA_LANGUAGE=<code>through-More(whichplay-nvidia.ps1keeps when it clears the otherLEONIDA_*; 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.1d5109516, LAUNCHER-PLAY-LOG): PLAY opens%LOCALAPPDATA%\Leonida\logs\play-launcher-<date>-<time>-<pid>.logat 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 aResult: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.ps1prunes only its own logs. Copy info uses the runtime's-Logfile of the same start, else this one, and showsLast start:. Idea ported from Darner'srecord_startup_error(Upstream-Commit: ce600b4d5eb1), rewritten in Python. Tests:tests/test_launcher_play_log.py.manifest_verifier.pyimportedconcurrent.futures, which the app was not built with, so the mod manager stopped withNo module named 'concurrent'. Without the module it now hashes one file at a time (fixes installed apps after Update Mandy), andrelease.ymladds--hidden-import concurrent.futuresfor the next Setup. Tests intests/test_manifest_verifier.py.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 asmenu_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).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).game/xbox-1.0.2.1.jsonmust 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 withoutdata/ttdb/*.ttpfstopped at +0x3e42541 with no explanation.LEONIDA_SKIP_FILE_CHECK=1skips it; no manifest = starts with a note. Ported from Darner (#421 there), idea only. Tests:tests/test_launcher_file_check.py.32b8b5c6f): the SHA-256 of every file against the copy'sgame/xbox-1.0.2.1.json(tools/manifest_verifier.pyloaded 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 inlogs/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
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)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>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>Verification — Merge, Repo Checks & Launcher Unit Tests (Windows 11)
Tested PR head
3f33462825merged cleanly ontomain(6491bc1a1,21files changed):git diff --check origin/main— PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md— PASSpython -I scripts/check_no_game_data.py— PASS7/7non-GUI/isolated modules PASS —171passed,3skipped,0failed):tests.test_launcher_custom_branch—9/9OK (0.2 s)tests.test_launcher_d3d12_runtime—18/18OK (0.4 s)tests.test_launcher_language_env—7/7OK (0.2 s)tests.test_launcher_menu_sync—20/20OK (2.1 s)tests.test_launcher_play_log—16/16OK (5.3 s)tests.test_launcher_whats_new—22/22OK (1.4 s)tests.test_manifest_verifier—82ran (79passed,3skipped,5.7 s)tests.test_leonida_launchertimed out on this host both with this PR and identically on untouchedmain(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_verifierpass cleanly.AI-assisted.
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>Merged at OreoFR's request (launcher owner).
098d22303checked with the local CI against main6b0498d37: 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.fa4252087) whose tree is exactly the tree the CI tested; merge commit0036195a7.release.ymlnow bundlesconcurrent.futuresandunicodedata: the installed app gets them at the next Setup; until thenmanifest_verifier.pyandreport_paths.pyfall back without them.