launcher: main/beta branch menu in the status corner #3414

Manually merged
leonida/mandy
leonida merged 2 commits from oreofr/launcher-branch-dropdown into main 2026-12-04 01:59:41 +00:00 AGit

Pull request successfully merged and closed

Member

What

A main / beta menu at the top of the launcher's bottom-left status corner, dark like the Settings page's dropdowns (the same read-only ttk.Combobox style).

  • Two copies side by side. beta (main + the pull requests under test, BETA.md) lives in its own folder beside the main copy: <main copy>-beta (%LOCALAPPDATA%\Mandy\repo-beta for the installed app; setting beta_dir). The first time beta is picked, the launcher's dark dialog asks once (less stable, a second copy about the size of this one is downloaded, main and the saves are not touched, report with Copy my info, back to main here any time), then runs git clone --branch beta with its output in the Output panel, copies the F1 menu's settings and game_path.txt into the new copy, saves channel: beta and restarts on it.
  • Switching to beta again (copy already there) asks the same question without the download part and restarts; back to main restarts on the main copy at once, nothing in the beta folder is touched (and beta never touches main's).
  • Update Mandy updates the copy in use along its branch (beta in the beta copy): the existing flow, so local-changes refusal, the backup/before-update-* branch on a rewritten history and restart-on-launcher-update all work as before.
  • On beta, a violet Beta mark sits next to the menu; the rail already shows beta <commit>. Settings > Mandy repository says the beta copy is in use and where.
  • Copy my info and Copy info for a bug report now name the branch (Branch: ...), and on beta add Channel: beta and BETA.md's Built on ... line (the bug report keeps its allowlist: a branch name or the build line that does not match goes through safe_text).
  • Custom setups: a branch set in Settings (custom repository/branch) stays the main copy's and is shown as the menu's value, with main and beta as the other choices; picking main then makes the main copy follow main again through the normal Update Mandy. The list is fixed (main, beta, plus that custom one): no network call.

Data, caches, saves

  • Caches separate: on beta, PLAY passes -Data <data folder>-beta (%LOCALAPPDATA%\Leonida\d3d12-beta), so beta's cache-2 (translated shaders, pipelines) never mixes with main's. Clear shader cache clears the cache of the copy in use.
  • Saves shared: on beta, PLAY sets LEONIDA_DATA_DIR to main's <data>\data (where the saves are, data/7952987A/saves), unless Advanced already names one. The Saves page shows the same saves on both.
  • Each copy builds its own runtime (play-d3d12.ps1 builds it at the first PLAY when missing). Linux keeps its XDG folders shared (no change there).

Why

OreoFR wants a clean main/beta choice in the status corner for the new beta branch on git.leonida.now, with two folders so going back to main is instant and main's copy is never rewritten by beta's history.

Tests

  • python -I tests/test_leonida_launcher.py: 250 tests OK (new BranchMenuTests: menu value and choices incl. a custom branch, plan per choice (confirmation only for beta, settings written are the ones Settings reads), choosing runs the existing update/restart/clone paths (mocked), first beta = git clone --branch beta into the beta folder (seed copies without overwriting), back to main leaves the beta folder alone, each channel's data folder and shared saves in the PLAY command, Copy info / bug report lines, BETA.md parsing).
  • tests/test_bug_report_info.py, tests/test_docs_links.py, tests/test_text_write_line_endings.py, tests/test_win_launchers.py: OK. scripts/check_no_game_data.py on every changed file: clean.
  • Screenshots (English, launcher window only, temporary APPDATA, neutral paths, the game not started): the closed menu on main, the open menu, the beta confirmation dialog, and the status corner on beta (a temporary local beta worktree with a sample BETA.md, removed afterwards). Available on request.

docs/launcher.md: one paragraph under Updates.

Launcher change: needs OreoFR's review. Self-contained (new functions and a rail row; #3405 AUTO-DETECT touches other parts of the same file).

AI-assisted (Claude Code). No GPU run: the game was not launched.

🤖 Generated with Claude Code

## What A **main / beta** menu at the top of the launcher's bottom-left status corner, dark like the Settings page's dropdowns (the same read-only `ttk.Combobox` style). - **Two copies side by side.** beta (main + the pull requests under test, `BETA.md`) lives in its own folder beside the main copy: `<main copy>-beta` (`%LOCALAPPDATA%\Mandy\repo-beta` for the installed app; setting `beta_dir`). The first time beta is picked, the launcher's dark dialog asks once (less stable, a second copy about the size of this one is downloaded, main and the saves are not touched, report with *Copy my info*, back to main here any time), then runs `git clone --branch beta` with its output in the Output panel, copies the F1 menu's settings and `game_path.txt` into the new copy, saves `channel: beta` and restarts on it. - **Switching** to beta again (copy already there) asks the same question without the download part and restarts; **back to main** restarts on the main copy at once, nothing in the beta folder is touched (and beta never touches main's). - **Update Mandy** updates the copy in use along its branch (`beta` in the beta copy): the existing flow, so local-changes refusal, the `backup/before-update-*` branch on a rewritten history and restart-on-launcher-update all work as before. - **On beta**, a violet **Beta** mark sits next to the menu; the rail already shows `beta <commit>`. Settings > Mandy repository says the beta copy is in use and where. - **Copy my info** and **Copy info for a bug report** now name the branch (`Branch: ...`), and on beta add `Channel: beta` and `BETA.md`'s `Built on ...` line (the bug report keeps its allowlist: a branch name or the build line that does not match goes through `safe_text`). - **Custom setups**: a branch set in Settings (custom repository/branch) stays the main copy's and is shown as the menu's value, with main and beta as the other choices; picking main then makes the main copy follow `main` again through the normal Update Mandy. The list is fixed (main, beta, plus that custom one): no network call. ## Data, caches, saves - **Caches separate**: on beta, PLAY passes `-Data <data folder>-beta` (`%LOCALAPPDATA%\Leonida\d3d12-beta`), so beta's `cache-2` (translated shaders, pipelines) never mixes with main's. *Clear shader cache* clears the cache of the copy in use. - **Saves shared**: on beta, PLAY sets `LEONIDA_DATA_DIR` to main's `<data>\data` (where the saves are, `data/7952987A/saves`), unless Advanced already names one. The Saves page shows the same saves on both. - Each copy builds its own runtime (`play-d3d12.ps1` builds it at the first PLAY when missing). Linux keeps its XDG folders shared (no change there). ## Why OreoFR wants a clean main/beta choice in the status corner for the new `beta` branch on git.leonida.now, with two folders so going back to main is instant and main's copy is never rewritten by beta's history. ## Tests - `python -I tests/test_leonida_launcher.py`: 250 tests OK (new `BranchMenuTests`: menu value and choices incl. a custom branch, plan per choice (confirmation only for beta, settings written are the ones Settings reads), choosing runs the existing update/restart/clone paths (mocked), first beta = `git clone --branch beta` into the beta folder (seed copies without overwriting), back to main leaves the beta folder alone, each channel's data folder and shared saves in the PLAY command, Copy info / bug report lines, `BETA.md` parsing). - `tests/test_bug_report_info.py`, `tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`, `tests/test_win_launchers.py`: OK. `scripts/check_no_game_data.py` on every changed file: clean. - Screenshots (English, launcher window only, temporary `APPDATA`, neutral paths, the game not started): the closed menu on main, the open menu, the beta confirmation dialog, and the status corner on beta (a temporary local `beta` worktree with a sample `BETA.md`, removed afterwards). Available on request. `docs/launcher.md`: one paragraph under Updates. Launcher change: needs OreoFR's review. Self-contained (new functions and a rail row; #3405 AUTO-DETECT touches other parts of the same file). AI-assisted (Claude Code). No GPU run: the game was not launched. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A dark read-only menu (the Settings page's combobox style) at the top of the
rail's bottom-left corner picks main or beta. Beta lives in a second copy of
its own beside the main one (<main copy>-beta, setting beta_dir), cloned with
git clone --branch beta the first time, after one question in the launcher's
dark dialog; the launcher then restarts on it (setting channel) and shows a
violet Beta mark. Picking main restarts on the main copy at once and never
touches the beta copy. Update Mandy updates the copy in use along its branch
(beta in the beta copy), with the existing rewritten-history backup.

Beta's caches go to the data folder + "-beta"; the saves stay shared (PLAY
sets LEONIDA_DATA_DIR to main's <data>/data on beta unless Advanced names
one). Copy my info and the bug report name the branch, and on beta add
"Channel: beta" and BETA.md's "Built on ..." line. A custom branch set in
Settings is shown as the menu's value, main and beta stay the choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ttk combobox (grey box, native arrow, square list) becomes a pill drawn
on a canvas: the launcher's surface, a thin border, a coloured dot, the
branch's name and a thin chevron; on beta the border, dot and name take the
violet accent, so the separate Beta tag is gone. It spans the status column.

A click (or Enter, Space, Down) opens a borderless popup above it with round
corners (transparent outside them on Windows), a hover highlight, a check
mark on the branch in use and "changes under test" under beta; Up/Down/Enter
choose, Escape, a click outside or another program taking the focus close it.
The choice runs the same pick_branch as before (question, two folders,
restart). branch_menu_rows and menu_step hold the popup's logic, with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leonida manually merged commit 6c2e22fb10 into main 2026-12-04 01:59:38 +00:00
Author
Member

Merged into main together with #3405 in 4d9e4d05d (one combined change, OreoFR's request): see https://git.leonida.now/leonida/mandy/pulls/3405 for the merge note and CI.

AI-assisted (Claude Code).

Merged into main together with #3405 in 4d9e4d05d (one combined change, OreoFR's request): see https://git.leonida.now/leonida/mandy/pulls/3405 for the merge note and CI. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.