feat(profiles): a profile's game language, kept with its settings so an update keeps it #364

Merged
HumanBean merged 10 commits from llun/LongshotLauncher:feat/profile-game-language into main 2026-11-29 19:59:23 +00:00
Member

A player reported that their game, set to Chinese, went back to English after every update through the new launcher (the old one kept it). There were two causes. The update wizard pre-fills the game language from the version's language.txt, but read the whole file as the code. The builder and the game write a comment and the list of codes around the code line, so the read never matched, and the wizard fell back to the language last picked in the launcher (English for most) and passed it as --language. And language.txt is a build file, so any update that names a language overwrites a choice made in the game's menu.

The game now keeps the player's language in the profile's own settings, game_language=<code> in its settings.ini, which no build writes and which the game reads over language.txt: MagicBeanDev/Longshot#2794. This PR gives the launcher the same setting.

What changed:

  • Settings → Game: a Game language row for the current profile. It writes that profile's settings.ini game_language= line and keeps the game's other lines as they are (src/players/language.rs); the game reads it at its next start, so no build is needed. It's refused while a game plays that profile, since the game would write its settings back over it. The check runs under the profile's edit lock, which the builder's play also takes before it starts the game. While this launcher's game plays, the row is disabled and says "Close the game first.". It shows the current profile's choice (and follows a profile switch), else the language the game of the profile's version is in now (an older build's language.txt), else the language its builds are asked for (profile.json's language), else en-US.

  • The build wizard: its Game language starts on the profile's choice, else the language the version's game is in now. language.txt is now read as the game reads it: the first line that isn't blank or a comment, a BOM or CRLF allowed, any case (builder_cli::built_language). After a build of the profile's own version (not an update of another one), a profile that has a choice takes the wizard's, so the two never disagree; under the same edit lock and running-game check, and left as it is while a game plays the profile. A profile with no choice is left as it is: the builder of Longshot#2794 puts the line there at the end of a build when there is none.

  • language.txt removed (Longshot#2794, the maintainer's call: the new launcher only runs builds of the new builder): a build whose record has the game_language feature has no language.txt. A new install that copies an identical build (the builder doesn't run then) puts the language asked for into the profile's settings.ini when it has none, as the builder would, instead of writing a language.txt the game no longer reads. A copy of an older build keeps its language.txt.

  • Language names: both Game language dropdowns (Settings → Game and the update wizard) list each language by its own name, as the game's menu does (Español (Latinoamérica), 简体中文, 日本語), instead of codes like es-419 or zh-Hans; the codes stay what is saved and passed to the builder (game::LANGUAGE_NAMES, ui/game-language.slint).
    The launcher's own language still never decides the game's.

Tested on Windows 11, by hand, with a separate launcher home (LONGSHOT_LAUNCHER_HOME) holding a copy of an installed nightly-880 whose language.txt said zh-Hans, and the wizard's saved language en-US:

  • main @ 6ae8497: Versions → Update → Advanced showed Game language en-US (the bug).
  • Here: Profiles → Game language → zh-Hans (the row has since moved to Settings → Game; there, ja wrote game_language=ja the same way) wrote game_language=zh-Hans into the profile's settings.ini, and the page showed "Profile options: Saved". A screenshot is in the first comment.
  • The game side of MagicBeanDev/Longshot#2794, with a profile whose settings.ini held only that line over a build whose language.txt said en-US, started in Chinese: oe: language zh-Hans (game_language in the settings), the Chinese text pack opened. main's game started in English there.

Checks: new players::language::tests::the_profile_keeps_its_game_language_in_its_settings (with a game playing: nothing written), wizard::tests::updating_an_inactive_version_uses_its_source_and_preserves_profile_defaults extended (the profile's language stays) and reuse_tests::copies_verified_artifacts_without_sharing_files_or_profile_data extended (a game_language build: no language.txt, the profile seeded); both are Unix-only, so CI's Linux job runs them, and builder_cli::tests::an_update_keeps_the_language_the_player_chose_in_the_game, which fails on main (the whole file comes back instead of zh-Hans). cargo fmt --check and cargo clippy --locked --workspace --all-targets -D warnings are clean; test_release.py passes. cargo test passes but for the same Windows folder and link tests that fail on main on this PC: folders::tests::* (3), game::recovery, game::registry (3), game::releases, game::steam::library, home::tests::moving_a_portable_install…, storage::reclaim::preservation, storage::tests::only_current_installed_versions…. None of them touches this change.

Not tested here: an update from the launcher to a game build that has game_language= (none is released yet; it needs MagicBeanDev/Longshot#2794 in a nightly). With an older game, the row's choice is saved but that game still reads language.txt.

🤖 Generated with Claude Code

A player reported that their game, set to Chinese, went back to English after every update through the new launcher (the old one kept it). There were two causes. The update wizard pre-fills the game language from the version's `language.txt`, but read the whole file as the code. The builder and the game write a comment and the list of codes around the code line, so the read never matched, and the wizard fell back to the language last picked in the launcher (English for most) and passed it as `--language`. And `language.txt` is a build file, so any update that names a language overwrites a choice made in the game's menu. The game now keeps the player's language in the profile's own settings, `game_language=<code>` in its `settings.ini`, which no build writes and which the game reads over `language.txt`: [MagicBeanDev/Longshot#2794](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2794). This PR gives the launcher the same setting. What changed: - **Settings → Game:** a **Game language** row for the current profile. It writes that profile's `settings.ini` `game_language=` line and keeps the game's other lines as they are (`src/players/language.rs`); the game reads it at its next start, so no build is needed. It's refused while a game plays that profile, since the game would write its settings back over it. The check runs under the profile's edit lock, which the builder's `play` also takes before it starts the game. While this launcher's game plays, the row is disabled and says "Close the game first.". It shows the current profile's choice (and follows a profile switch), else the language the game of the profile's version is in now (an older build's `language.txt`), else the language its builds are asked for (`profile.json`'s `language`), else en-US. - **The build wizard:** its Game language starts on the profile's choice, else the language the version's game is in now. `language.txt` is now read as the game reads it: the first line that isn't blank or a comment, a BOM or CRLF allowed, any case (`builder_cli::built_language`). After a build of the profile's own version (not an update of another one), a profile that has a choice takes the wizard's, so the two never disagree; under the same edit lock and running-game check, and left as it is while a game plays the profile. A profile with no choice is left as it is: the builder of Longshot#2794 puts the line there at the end of a build when there is none. - **language.txt removed (Longshot#2794, the maintainer's call: the new launcher only runs builds of the new builder):** a build whose record has the `game_language` feature has no `language.txt`. A new install that copies an identical build (the builder doesn't run then) puts the language asked for into the profile's `settings.ini` when it has none, as the builder would, instead of writing a `language.txt` the game no longer reads. A copy of an older build keeps its `language.txt`. - **Language names:** both Game language dropdowns (Settings → Game and the update wizard) list each language by its own name, as the game's menu does (Español (Latinoamérica), 简体中文, 日本語), instead of codes like `es-419` or `zh-Hans`; the codes stay what is saved and passed to the builder (`game::LANGUAGE_NAMES`, `ui/game-language.slint`). The launcher's own language still never decides the game's. **Tested** on Windows 11, by hand, with a separate launcher home (`LONGSHOT_LAUNCHER_HOME`) holding a copy of an installed nightly-880 whose `language.txt` said zh-Hans, and the wizard's saved language en-US: - main @ 6ae8497: Versions → Update → Advanced showed Game language **en-US** (the bug). - Here: Profiles → Game language → zh-Hans (the row has since moved to Settings → Game; there, ja wrote `game_language=ja` the same way) wrote `game_language=zh-Hans` into the profile's `settings.ini`, and the page showed "Profile options: Saved". A screenshot is in the first comment. - The game side of [MagicBeanDev/Longshot#2794](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2794), with a profile whose `settings.ini` held only that line over a build whose `language.txt` said en-US, started in Chinese: `oe: language zh-Hans (game_language in the settings)`, the Chinese text pack opened. main's game started in English there. **Checks:** new `players::language::tests::the_profile_keeps_its_game_language_in_its_settings` (with a game playing: nothing written), `wizard::tests::updating_an_inactive_version_uses_its_source_and_preserves_profile_defaults` extended (the profile's language stays) and `reuse_tests::copies_verified_artifacts_without_sharing_files_or_profile_data` extended (a `game_language` build: no `language.txt`, the profile seeded); both are Unix-only, so CI's Linux job runs them, and `builder_cli::tests::an_update_keeps_the_language_the_player_chose_in_the_game`, which fails on main (the whole file comes back instead of `zh-Hans`). `cargo fmt --check` and `cargo clippy --locked --workspace --all-targets -D warnings` are clean; `test_release.py` passes. `cargo test` passes but for the same Windows folder and link tests that fail on main on this PC: `folders::tests::*` (3), `game::recovery`, `game::registry` (3), `game::releases`, `game::steam::library`, `home::tests::moving_a_portable_install…`, `storage::reclaim::preservation`, `storage::tests::only_current_installed_versions…`. None of them touches this change. **Not tested here:** an update from the launcher to a game build that has `game_language=` (none is released yet; it needs [MagicBeanDev/Longshot#2794](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2794) in a nightly). With an older game, the row's choice is saved but that game still reads `language.txt`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(profiles): a profile's game language, kept with its settings so an update keeps it
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 13s
PR title / Conventional Commit title (pull_request) Successful in 5s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
66b16349b3
A player's Chinese game went back to English at each update: the update wizard passed the language it
read back from the version's language.txt, and that read never matched (the file holds a comment and the
list of codes around the code line), so the language last picked in the launcher won. The game now keeps
the player's language in the profile's settings.ini (game_language=, Longshot's game reads it over the
build's language.txt), and the launcher sets the same line.

- Profiles: a Game language row on the selected profile writes the profile's settings.ini
  game_language= (the game's own lines kept); not while a game plays that profile, which would write its
  settings over it. The row shows the profile's choice, else the language its builds are made in.
- The build wizard's Game language starts on the profile's choice, else the language the version's game
  is in now (language.txt read as the game reads it), and a profile that has a choice takes the wizard's
  after the build, so the two never disagree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40, a separate launcher home: Profiles -> Game language -> zh-Hans wrote game_language=zh-Hans into the profile's settings.ini; with that line the game of MagicBeanDev/Longshot#2794 started in Chinese (oe: language zh-Hans (game_language in the settings)). On main the update wizard pre-filled en-US for a version whose language.txt said zh-Hans.

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40, a separate launcher home: Profiles -> Game language -> zh-Hans wrote game_language=zh-Hans into the profile's settings.ini; with that line the game of MagicBeanDev/Longshot#2794 started in Chinese (oe: language zh-Hans (game_language in the settings)). On main the update wizard pre-filled en-US for a version whose language.txt said zh-Hans.
Author
Member

Before, main @ 6ae8497: Versions → Update → Advanced pre-fills Game language en-US for a version whose language.txt says zh-Hans.

main: the update wizard pre-fills en-US

Here: Profiles → Game language → zh-Hans, saved to the profile's settings.ini (Profile options: Saved).

this PR: the profile's Game language row

Before, main @ 6ae8497: Versions → Update → Advanced pre-fills Game language en-US for a version whose language.txt says zh-Hans. ![main: the update wizard pre-fills en-US](https://git.magicbean.dev/attachments/35a5a07b-da2b-42cf-8ebd-906c0a01a180) Here: Profiles → Game language → zh-Hans, saved to the profile's settings.ini (Profile options: Saved). ![this PR: the profile's Game language row](https://git.magicbean.dev/attachments/204f6b32-6c2b-4d3c-956a-63e3d552bb8d)
Member

Possibly related, for context:

  • PR MagicBeanDev/Longshot#2794 WIP: fix(menu): the game's language is kept with the player's settings, so an update keeps it — Game-side support for the same profile game_language setting; coordinated prerequisite
Possibly related, for context: - PR MagicBeanDev/Longshot#2794 WIP: fix(menu): the game's language is kept with the player's settings, so an update keeps it — Game-side support for the same profile game_language setting; coordinated prerequisite
llun changed title from WIP: feat(profiles): a profile's game language, kept with its settings so an update keeps it to feat(profiles): a profile's game language, kept with its settings so an update keeps it 2026-11-29 07:04:26 +00:00
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. Updating an inactive version can change the active profile’s language, and a new build can overwrite settings while that profile is playing. The profile row can also show English for a game built in another language.

The launcher reads formatted language files and lets players save a language per profile. The parser addresses the reported update fallback, but the new profile writes need to respect which version is being updated and whether the profile is in use.

Blocking (2): must change before merging.

  1. L1 src/game/wizard.rs:666: Updating an inactive installation also changes the active profile’s saved language. (more on the line) Do: Only synchronize the profile language when the built installation is the profile’s current installation, using the same ownership check as remember_build_options.
  2. L2 src/game/wizard.rs:666: A new installation can rewrite a profile’s settings while its game is running. (more on the line) Do: Protect the settings update against a running game for both new builds and updates, and coordinate the check and write with the game’s profile-use lock.

Should fix (2): not blocking, but worth doing before merging.

  • L3 src/players/rows.rs:42: The fallback does not reliably show the language of the profile’s game. (more on the line) Do: Resolve the profile’s selected version and read its built language when there is no profile choice, falling back to en-US only when that cannot be determined.
  • L4 ui/profiles.slint:304: The disabled language control does not explain why it cannot be changed while a game is playing. (more on the line) Do: Show a localized explanation beside the disabled control while the game is running.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

@fix can do L1, L2, L3 and L4.

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Yes for the reported parser failure: the new test covers the formatted language file, and the author observed the old wizard selecting en-US for a zh-Hans build. The profile override was tested with Longshot#2794, but an end-to-end launcher update to a released game with that support has not yet been tested.

Other systems: The settings write affects games using the profile, including independently launched games. Older game builds ignore game_language; the profile override requires Longshot#2794. Windows was tested by the author; no Linux run was reported.

Switches: None.

Reviewed: 66b16349b3 against 6ae84979a2: Read AGENTS.md, CONTRIBUTING.md, the commit and diff, and the changed language and profile-row code; inspected the changed wizard, builder, player binding and Slint code and their relevant callers, locks and running-process checks. The large combined file output was truncated, so portions of the changed files outside those paths were only skimmed. No review checklist or pull request template was present.; nothing run (a code review).

Checked and fine:

  • The commit has an AI co-author trailer.
  • The new parser test uses synthetic text and covers comments, BOM, CRLF and case.
  • No game-derived output is apparent in the diff.
  • The author supplied a screenshot of the new row.

Testing: Read-only review; no tests or project commands were run. The author reports Windows manual testing and local checks; both CI jobs are still running.

Overlaps and merge order: Longshot#2794 supplies the game-side setting and must be available for the profile override to affect the game.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Updating an inactive version can change the active profile’s language, and a new build can overwrite settings while that profile is playing. The profile row can also show English for a game built in another language. The launcher reads formatted language files and lets players save a language per profile. The parser addresses the reported update fallback, but the new profile writes need to respect which version is being updated and whether the profile is in use. **Blocking (2)**: must change before merging. 1. **L1** `src/game/wizard.rs:666`: Updating an inactive installation also changes the active profile’s saved language. (more on the line) **Do:** Only synchronize the profile language when the built installation is the profile’s current installation, using the same ownership check as remember_build_options. 2. **L2** `src/game/wizard.rs:666`: A new installation can rewrite a profile’s settings while its game is running. (more on the line) **Do:** Protect the settings update against a running game for both new builds and updates, and coordinate the check and write with the game’s profile-use lock. **Should fix (2)**: not blocking, but worth doing before merging. - **L3** `src/players/rows.rs:42`: The fallback does not reliably show the language of the profile’s game. (more on the line) **Do:** Resolve the profile’s selected version and read its built language when there is no profile choice, falling back to en-US only when that cannot be determined. - **L4** `ui/profiles.slint:304`: The disabled language control does not explain why it cannot be changed while a game is playing. (more on the line) **Do:** Show a localized explanation beside the disabled control while the game is running. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. `@fix` can do L1, L2, L3 and L4. **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported parser failure: the new test covers the formatted language file, and the author observed the old wizard selecting en-US for a zh-Hans build. The profile override was tested with Longshot#2794, but an end-to-end launcher update to a released game with that support has not yet been tested. **Other systems:** The settings write affects games using the profile, including independently launched games. Older game builds ignore game_language; the profile override requires Longshot#2794. Windows was tested by the author; no Linux run was reported. **Switches:** None. **Reviewed:** 66b16349b340 against 6ae84979a256: Read AGENTS.md, CONTRIBUTING.md, the commit and diff, and the changed language and profile-row code; inspected the changed wizard, builder, player binding and Slint code and their relevant callers, locks and running-process checks. The large combined file output was truncated, so portions of the changed files outside those paths were only skimmed. No review checklist or pull request template was present.; nothing run (a code review). **Checked and fine:** - The commit has an AI co-author trailer. - The new parser test uses synthetic text and covers comments, BOM, CRLF and case. - No game-derived output is apparent in the diff. - The author supplied a screenshot of the new row. **Testing:** Read-only review; no tests or project commands were run. The author reports Windows manual testing and local checks; both CI jobs are still running. **Overlaps and merge order:** Longshot#2794 supplies the game-side setting and must be available for the profile override to affect the game. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -658,6 +663,7 @@ fn build_and_register(
}
let selected = versions::selected(&p.ctx.home, Some(&folder))?;
remember_build_options(p, options, &selected)?;
players::language_follows_build(&p.ctx.profile, &options.language)?;
Member

L1 (blocking): Updating an inactive installation also changes the active profile’s saved language.

When: A profile with game_language=ja is using version A. The player updates inactive version B and selects fr; remember_build_options deliberately leaves the active profile alone, but language_follows_build changes its setting to fr, so version A next starts in French.

Do: Only synchronize the profile language when the built installation is the profile’s current installation, using the same ownership check as remember_build_options.

**L1** (blocking): Updating an inactive installation also changes the active profile’s saved language. *When:* A profile with game_language=ja is using version A. The player updates inactive version B and selects fr; remember_build_options deliberately leaves the active profile alone, but language_follows_build changes its setting to fr, so version A next starts in French. **Do:** Only synchronize the profile language when the built installation is the profile’s current installation, using the same ownership check as remember_build_options.
Member

L2 (blocking): A new installation can rewrite a profile’s settings while its game is running.

When: New builds do not take the update-only ensure_paths_idle check. If the profile has a saved language and the wizard selects a different one while its game is running, follow_build writes settings.ini; the running game can subsequently overwrite that choice with its in-memory settings.

Do: Protect the settings update against a running game for both new builds and updates, and coordinate the check and write with the game’s profile-use lock.

**L2** (blocking): A new installation can rewrite a profile’s settings while its game is running. *When:* New builds do not take the update-only ensure_paths_idle check. If the profile has a saved language and the wizard selects a different one while its game is running, follow_build writes settings.ini; the running game can subsequently overwrite that choice with its in-memory settings. **Do:** Protect the settings update against a running game for both new builds and updates, and coordinate the check and write with the game’s profile-use lock.
@ -39,1 +39,4 @@
let has_options = super::disk::is_file(&profile.dir.join("settings.ini"));
// (the player's choice, else the language its builds are made in, else the game's default)
let game_language = super::language::chosen(&profile.dir)
.or_else(|| data["language"].as_str().and_then(super::language::code))
Member

L3 (should fix): The fallback does not reliably show the language of the profile’s game.

When: A newly created profile inherits the active profile’s game path but no language field. If its selected build is Chinese and it has no game_language setting, this row falls back to en-US even though the game reads zh-Hans from language.txt.

Do: Resolve the profile’s selected version and read its built language when there is no profile choice, falling back to en-US only when that cannot be determined.

**L3** (should fix): The fallback does not reliably show the language of the profile’s game. *When:* A newly created profile inherits the active profile’s game path but no language field. If its selected build is Chinese and it has no game_language setting, this row falls back to en-US even though the game reads zh-Hans from language.txt. **Do:** Resolve the profile’s selected version and read its built language when there is no profile choice, falling back to en-US only when that cannot be determined.
@ -287,0 +301,4 @@
language := Dropdown {
max-width: Ink.form-control-width;
enabled: !root.player.damaged && !Game.playing;
Member

L4 (should fix): The disabled language control does not explain why it cannot be changed while a game is playing.

When: When Game.playing is true, the dropdown is disabled, so its callback cannot produce the error message and the profile page offers no explanation.

Do: Show a localized explanation beside the disabled control while the game is running.

**L4** (should fix): The disabled language control does not explain why it cannot be changed while a game is playing. *When:* When Game.playing is true, the dropdown is disabled, so its callback cannot produce the error message and the profile page offers no explanation. **Do:** Show a localized explanation beside the disabled control while the game is running.
fix(profiles): a build changes a profile's game language only for its own version, and never under a running game
Some checks failed
CI / What the change needs (pull_request) Successful in 5s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
PR title / Conventional Commit title (pull_request) Successful in 4s
CI / Release packages and stable upgrades (pull_request) Failing after 50s
CI / Rust formatting, lint and tests (pull_request) Successful in 12m58s
65a9fc3b59
Review of #364: the profile's game language followed every build, so updating an inactive version changed
the language of the version the profile plays, and a new build could write the profile's settings while
its game was running (the game writes them back over the change).

- The wizard's language reaches the profile's settings inside remember_build_options, after its check that
  the build is the profile's own version, under the profile's edit lock; and only when no game plays the
  profile (it is left as it is otherwise, with a log line).
- The Profiles row asks the same running-game check under the profile's edit lock, which the builder's
  play also takes before it starts the game, so no play starts between the check and the write.
- The row's fallback is the language the profile's version's game is in now (its language.txt), before
  the language its builds are asked for.
- While a game plays, the disabled row says "Close the game first.".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Thanks. Fixed in 65a9fc3:

  • L1 (inactive update): the wizard's language now reaches the profile's settings inside remember_build_options, after its check that the build is the profile's own version, so an update of another version returns before it. updating_an_inactive_version_uses_its_source_and_preserves_profile_defaults now gives the profile game_language=zh-Hans, picks fr for the inactive version, and checks it stays zh-Hans.
  • L2 (running game): both writers ask the running-game check (saves_idle for the profile's folder) under the profile's edit lock, right before writing. The builder's play takes that same lock before it starts the game, so no play starts between the check and the write. The Profiles row refuses and says why; a build, new or update, leaves the profile's choice as it is and logs it. the_profile_keeps_its_game_language_in_its_settings covers both refusing.
  • L3 (fallback): the row now shows the profile's choice, else the language the game of the profile's version is in now (its language.txt, via game::profile_built_language), else the profile.json language, else en-US.
  • L4 (disabled row): while this launcher's game plays, the row shows "Close the game first." under it (an existing text, already in every catalog).
  • L5: agreed. It needs MagicBeanDev/Longshot#2794 in a nightly. Until then it's listed under "Not tested here" in the description.

Checks: fmt and clippy (-D warnings) clean; on Windows cargo test is unchanged (the same 12 Windows folder and link tests fail on main); the wizard's tests are Unix-only and run in CI.

Thanks. Fixed in 65a9fc3: - **L1** (inactive update): the wizard's language now reaches the profile's settings inside `remember_build_options`, after its check that the build is the profile's own version, so an update of another version returns before it. `updating_an_inactive_version_uses_its_source_and_preserves_profile_defaults` now gives the profile `game_language=zh-Hans`, picks `fr` for the inactive version, and checks it stays zh-Hans. - **L2** (running game): both writers ask the running-game check (`saves_idle` for the profile's folder) under the profile's edit lock, right before writing. The builder's `play` takes that same lock before it starts the game, so no play starts between the check and the write. The Profiles row refuses and says why; a build, new or update, leaves the profile's choice as it is and logs it. `the_profile_keeps_its_game_language_in_its_settings` covers both refusing. - **L3** (fallback): the row now shows the profile's choice, else the language the game of the profile's version is in now (its `language.txt`, via `game::profile_built_language`), else the `profile.json` language, else en-US. - **L4** (disabled row): while this launcher's game plays, the row shows "Close the game first." under it (an existing text, already in every catalog). - **L5**: agreed. It needs MagicBeanDev/Longshot#2794 in a nightly. Until then it's listed under "Not tested here" in the description. Checks: fmt and clippy (`-D warnings`) clean; on Windows `cargo test` is unchanged (the same 12 Windows folder and link tests fail on main); the wizard's tests are Unix-only and run in CI.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The fixes preserve the profile language in the cases raised by the earlier review. The complete update workflow still needs a run with a game that reads the profile setting. Recommend approval; not approved on the forge.

The launcher saves a game language per profile and uses the installed game's language when preparing an update. The change adds profile-setting and process-check logic to preserve the player's choice.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

Since the last review (on 66b16349b3)
Resolved: L1 (Updating an inactive installation also changes the active profile’s saved language.); L2 (A new installation can rewrite a profile’s settings while its game is running.); L3 (The fallback does not reliably show the language of the profile’s game.); L4 (The disabled language control does not explain why it cannot be changed while a game is pl…)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven for the complete update workflow: the reported Windows run confirms the profile setting is written and the companion game reads it, but does not exercise an update with that game.

Other systems: The settings and running-game checks apply on Windows and Linux. The reported hands-on run was on Windows; the inactive-version test is Unix-only. Older game builds continue to read language.txt rather than the new profile setting.

Switches: None.

Reviewed: 65a9fc3b59 against 6ae84979a2: Read AGENTS.md, CONTRIBUTING.md, the complete diff and commit list, src/players/language.rs, src/players/rows.rs, and src/players/running.rs; inspected the relevant sections and callers in the other changed files. The remaining changed files and recorded test results were skimmed, not read in full. No review checklist or pull request template was present at the named paths.; nothing run (a code review).

Checked and fine:

  • The inactive-version test checks that the profile's saved language remains unchanged.
  • The language writer preserves other settings lines and refuses a change when the idle check fails.
  • The description explains the companion game dependency and includes a launcher screenshot.

Testing: No commands that build or execute project code were run. The author reports Windows manual testing, formatting and lint checks; CI is still running. The complete update workflow remains untested with a game that reads the profile setting.

Overlaps and merge order: MagicBeanDev/Longshot#2794 supplies the game-side setting; a nightly containing it is needed for the outstanding workflow run.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The fixes preserve the profile language in the cases raised by the earlier review. The complete update workflow still needs a run with a game that reads the profile setting. Recommend approval; not approved on the forge. The launcher saves a game language per profile and uses the installed game's language when preparing an update. The change adds profile-setting and process-check logic to preserve the player's choice. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. **Since the last review** (on 66b16349b340) Resolved: L1 (Updating an inactive installation also changes the active profile’s saved language.); L2 (A new installation can rewrite a profile’s settings while its game is running.); L3 (The fallback does not reliably show the language of the profile’s game.); L4 (The disabled language control does not explain why it cannot be changed while a game is pl…) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the complete update workflow: the reported Windows run confirms the profile setting is written and the companion game reads it, but does not exercise an update with that game. **Other systems:** The settings and running-game checks apply on Windows and Linux. The reported hands-on run was on Windows; the inactive-version test is Unix-only. Older game builds continue to read language.txt rather than the new profile setting. **Switches:** None. **Reviewed:** 65a9fc3b59f0 against 6ae84979a256: Read AGENTS.md, CONTRIBUTING.md, the complete diff and commit list, src/players/language.rs, src/players/rows.rs, and src/players/running.rs; inspected the relevant sections and callers in the other changed files. The remaining changed files and recorded test results were skimmed, not read in full. No review checklist or pull request template was present at the named paths.; nothing run (a code review). **Checked and fine:** - The inactive-version test checks that the profile's saved language remains unchanged. - The language writer preserves other settings lines and refuses a change when the idle check fails. - The description explains the companion game dependency and includes a launcher screenshot. **Testing:** No commands that build or execute project code were run. The author reports Windows manual testing, formatting and lint checks; CI is still running. The complete update workflow remains untested with a game that reads the profile setting. **Overlaps and merge order:** MagicBeanDev/Longshot#2794 supplies the game-side setting; a nightly containing it is needed for the outstanding workflow run. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
llun force-pushed feat/profile-game-language from 65a9fc3b59
Some checks failed
CI / What the change needs (pull_request) Successful in 5s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
PR title / Conventional Commit title (pull_request) Successful in 4s
CI / Release packages and stable upgrades (pull_request) Failing after 50s
CI / Rust formatting, lint and tests (pull_request) Successful in 12m58s
to 6696c2b107
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 12s
PR title / Conventional Commit title (pull_request) Successful in 4s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
2026-11-29 18:28:10 +00:00
Compare
Author
Member

Rebased onto main 21a83d2 and adapted to MagicBeanDev/Longshot#2794, which now removes language.txt (the maintainer's call: the new launcher only runs builds of the new builder). That builder writes no language.txt and puts game_language= in the profile's settings at the end of a build when there is none.

6696c2b: a new install that copies an identical build skips the builder, so for a build whose record has the game_language feature it now seeds the profile's settings.ini the same way (only when there is no line) instead of writing a language.txt that the game no longer reads and verify would report as extra. A copy of an older build keeps its language.txt. The reuse test covers both (Unix-only; CI's Linux job runs it). fmt and clippy are clean, and the language tests pass on Windows.

Rebased onto main 21a83d2 and adapted to MagicBeanDev/Longshot#2794, which now removes language.txt (the maintainer's call: the new launcher only runs builds of the new builder). That builder writes no language.txt and puts `game_language=` in the profile's settings at the end of a build when there is none. 6696c2b: a new install that copies an identical build skips the builder, so for a build whose record has the `game_language` feature it now seeds the profile's `settings.ini` the same way (only when there is no line) instead of writing a `language.txt` that the game no longer reads and `verify` would report as extra. A copy of an older build keeps its `language.txt`. The reuse test covers both (Unix-only; CI's Linux job runs it). fmt and clippy are clean, and the language tests pass on Windows.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The profile language setting has been shown working with the game, but the complete update workflow with a released build that reads it has not yet been exercised. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The launcher keeps a profile’s game language in its settings and uses it when preparing builds. Reused builds also seed that setting when needed, though that new write can race a running game.

Should fix (2): not blocking, but worth doing before merging.

  • L6 src/players/language.rs:57: Seeding the profile does not check whether its game is running under the edit lock. (more on the line) Do: Check that the profile is idle under the edit lock before seeding, and leave its settings unchanged while the game is running.
  • L7 src/game/reuse.rs:221: The profile is seeded before the copied build is verified or committed. (more on the line) Do: Seed the profile only after the copied build has passed verification and is ready to be committed, with appropriate handling if the final commit fails.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

@fix can do L6 and L7.

Since the last review (on 65a9fc3b59)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)
New: L6 (Seeding the profile does not check whether its game is running under the edit lock.); L7 (The profile is seeded before the copied build is verified or committed.)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven: the reported Windows test shows the profile setting starts the game in Chinese, but does not exercise an update to a released game build that reads the setting.

Other systems: The setting is shared with the game and the builder. The copied-build path can write it while the profile’s game is running; the end-to-end update remains untested.

Switches: None.

Reviewed: 6696c2b107 against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the full diff, and the reused-build and profile-language implementations and reuse test in full. Other changed files and their surrounding paths were inspected through the diff and targeted searches.; nothing run (a code review).

Checked and fine:

  • The copied-build path retains language.txt for older build records and omits it for records with game_language.
  • An existing game_language line is left intact by the seed operation.

Testing: The author reports Windows profile and game tests and passing language tests. CI is still running; no commands or tests were run for this review.

Overlaps and merge order: Longshot #2794 supplies the game and builder support required for the new profile setting.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The profile language setting has been shown working with the game, but the complete update workflow with a released build that reads it has not yet been exercised. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The launcher keeps a profile’s game language in its settings and uses it when preparing builds. Reused builds also seed that setting when needed, though that new write can race a running game. **Should fix (2)**: not blocking, but worth doing before merging. - **L6** `src/players/language.rs:57`: Seeding the profile does not check whether its game is running under the edit lock. (more on the line) **Do:** Check that the profile is idle under the edit lock before seeding, and leave its settings unchanged while the game is running. - **L7** `src/game/reuse.rs:221`: The profile is seeded before the copied build is verified or committed. (more on the line) **Do:** Seed the profile only after the copied build has passed verification and is ready to be committed, with appropriate handling if the final commit fails. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. `@fix` can do L6 and L7. **Since the last review** (on 65a9fc3b59f0) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) New: L6 (Seeding the profile does not check whether its game is running under the edit lock.); L7 (The profile is seeded before the copied build is verified or committed.) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the reported Windows test shows the profile setting starts the game in Chinese, but does not exercise an update to a released game build that reads the setting. **Other systems:** The setting is shared with the game and the builder. The copied-build path can write it while the profile’s game is running; the end-to-end update remains untested. **Switches:** None. **Reviewed:** 6696c2b1074b against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the full diff, and the reused-build and profile-language implementations and reuse test in full. Other changed files and their surrounding paths were inspected through the diff and targeted searches.; nothing run (a code review). **Checked and fine:** - The copied-build path retains language.txt for older build records and omits it for records with game_language. - An existing game_language line is left intact by the seed operation. **Testing:** The author reports Windows profile and game tests and passing language tests. CI is still running; no commands or tests were run for this review. **Overlaps and merge order:** Longshot #2794 supplies the game and builder support required for the new profile setting. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -227,0 +218,4 @@
if feature("game_language") {
// The game reads its language from the profile's settings, and no build writes a language.txt: the language
// asked for goes there when the profile has none, as the builder puts it there at the end of a build.
players::seed_game_language(&p.ctx.profile, &options.language)?;
Member

L7 (should fix): The profile is seeded before the copied build is verified or committed.

When: If verification fails or the player cancels after seeding, the staged build is discarded but settings.ini retains the language choice, even though the installation did not complete.

Do: Seed the profile only after the copied build has passed verification and is ready to be committed, with appropriate handling if the final commit fails.

**L7** (should fix): The profile is seeded before the copied build is verified or committed. *When:* If verification fails or the player cancels after seeding, the staged build is discarded but settings.ini retains the language choice, even though the installation did not complete. **Do:** Seed the profile only after the copied build has passed verification and is ready to be committed, with appropriate handling if the final commit fails.
@ -0,0 +54,4 @@
let Some(language) = code(language) else {
return Ok(false);
};
with_edit_lock(profile, || {
Member

L6 (should fix): Seeding the profile does not check whether its game is running under the edit lock.

When: When a new installation reuses a game_language build for a profile whose running game has no game_language line, seed writes the line while that game is active. The game can subsequently save its older settings and remove the seeded choice.

Do: Check that the profile is idle under the edit lock before seeding, and leave its settings unchanged while the game is running.

**L6** (should fix): Seeding the profile does not check whether its game is running under the edit lock. *When:* When a new installation reuses a game_language build for a profile whose running game has no game_language line, seed writes the line while that game is active. The game can subsequently save its older settings and remove the seeded choice. **Do:** Check that the profile is idle under the edit lock before seeding, and leave its settings unchanged while the game is running.
fix(profiles): a copied build sets the profile's language only once it is in place, and not under a running game
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
PR title / Conventional Commit title (pull_request) Successful in 9s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 15s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
a29d4fbe95
Review of #364 (L6, L7): a new install that copies an identical build of a game_language game set the
profile's game_language= before the copy was verified and moved into place, and without the running-game
check the other writers ask.

- copy_candidate says whether the profile is to get the language; existing sets it only after the copy is
  verified and moved into place, so a copy that fails, or is cancelled, leaves the profile's settings as
  they were.
- seed asks the running-game check under the profile's edit lock, as choose and follow_build do, and
  leaves the settings as they are while a game plays the profile, with a log line.
- existing_with takes that check, so the reuse test covers a game playing the profile (copy made, no
  line) and a copy that fails verification (no line).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Thanks. Both fixed in a29d4fb.

  • L6: seed now asks the same running-game check as choose and follow_build (saves_idle for the profile's folder), under the profile's edit lock. While a game plays the profile, its settings stay as they are and a log line says why.
  • L7: the seed moved out of copy_candidate. That now only says whether the profile is to get the language; existing sets it only after the copy has been verified and moved into place, so a copy that fails or is cancelled leaves settings.ini as it was.

Tests: reuse_tests now covers a copy that fails verification (no line) and a game playing the profile (existing_with with a failing check: the copy is made, no line). language::tests covers a seed refused while a game plays. fmt and clippy are clean, and the language tests pass on Windows. reuse_tests is Unix-only, so CI's Linux job is its first run.

Thanks. Both fixed in `a29d4fb`. - **L6:** `seed` now asks the same running-game check as `choose` and `follow_build` (`saves_idle` for the profile's folder), under the profile's edit lock. While a game plays the profile, its settings stay as they are and a log line says why. - **L7:** the seed moved out of `copy_candidate`. That now only says whether the profile is to get the language; `existing` sets it only after the copy has been verified and moved into place, so a copy that fails or is cancelled leaves `settings.ini` as it was. Tests: `reuse_tests` now covers a copy that fails verification (no line) and a game playing the profile (`existing_with` with a failing check: the copy is made, no line). `language::tests` covers a seed refused while a game plays. fmt and clippy are clean, and the language tests pass on Windows. `reuse_tests` is Unix-only, so CI's Linux job is its first run.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The running-game and failed-copy cases are fixed. The complete update workflow still needs a run with a released game build that reads the profile setting. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The launcher keeps a profile’s game language in its settings and uses it for builds and updates. The fix protects those settings while a game is running and seeds them only after a copied build is verified and installed.

Should fix (1): not blocking, but worth doing before merging.

  • L8 src/game/reuse.rs:122: A failed language seed is logged but the copied build is still reported as successfully reused. (more on the line) Do: Propagate the seed failure or fall back to a build path that can establish the requested language before reporting success.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

@fix can do L8.

Since the last review (on 6696c2b107)
Resolved: L6 (Seeding the profile does not check whether its game is running under the edit lock.); L7 (The profile is seeded before the copied build is verified or committed.)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)
New: L8 (A failed language seed is logged but the copied build is still reported as successfully re…)

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven end to end: the reported Windows test shows the profile setting is written and the companion game change reads it, but no complete launcher update with a released build that reads the setting has been exercised.

Other systems: The setting is shared with the game and builder. Older builds continue to use language.txt; the copied-build test covers the new and old record formats using Unix-only fixtures. An end-to-end update remains outstanding.

Switches: None.

Reviewed: a29d4fbe95 against 21a83d2b44: Read the repository rules, the diff, src/players/language.rs, src/game/reuse.rs and src/game/wizard/reuse_tests.rs; inspected the related wizard, profile locking and running-game paths. Other changed files were reviewed through their diffs, not read in full.; nothing run (a code review).

Checked and fine:

  • A running-game refusal leaves profile settings untouched under the edit lock.
  • A failed verification does not seed the profile.
  • The fix retains copied-build reuse and does not undo the feature.

Testing: No commands that build or run project code were executed. The author reports Windows language tests and formatting and lint checks passing; CI is still running.

Overlaps and merge order: Longshot #2794 supplies the game and builder support and needs to land before the end-to-end update can be exercised.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The running-game and failed-copy cases are fixed. The complete update workflow still needs a run with a released game build that reads the profile setting. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The launcher keeps a profile’s game language in its settings and uses it for builds and updates. The fix protects those settings while a game is running and seeds them only after a copied build is verified and installed. **Should fix (1)**: not blocking, but worth doing before merging. - **L8** `src/game/reuse.rs:122`: A failed language seed is logged but the copied build is still reported as successfully reused. (more on the line) **Do:** Propagate the seed failure or fall back to a build path that can establish the requested language before reporting success. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. `@fix` can do L8. **Since the last review** (on 6696c2b1074b) Resolved: L6 (Seeding the profile does not check whether its game is running under the edit lock.); L7 (The profile is seeded before the copied build is verified or committed.) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) New: L8 (A failed language seed is logged but the copied build is still reported as successfully re…) **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven end to end: the reported Windows test shows the profile setting is written and the companion game change reads it, but no complete launcher update with a released build that reads the setting has been exercised. **Other systems:** The setting is shared with the game and builder. Older builds continue to use language.txt; the copied-build test covers the new and old record formats using Unix-only fixtures. An end-to-end update remains outstanding. **Switches:** None. **Reviewed:** a29d4fbe95cc against 21a83d2b4420: Read the repository rules, the diff, src/players/language.rs, src/game/reuse.rs and src/game/wizard/reuse_tests.rs; inspected the related wizard, profile locking and running-game paths. Other changed files were reviewed through their diffs, not read in full.; nothing run (a code review). **Checked and fine:** - A running-game refusal leaves profile settings untouched under the edit lock. - A failed verification does not seed the profile. - The fix retains copied-build reuse and does not undo the feature. **Testing:** No commands that build or run project code were executed. The author reports Windows language tests and formatting and lint checks passing; CI is still running. **Overlaps and merge order:** Longshot #2794 supplies the game and builder support and needs to land before the end-to-end update can be exercised. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -100,0 +119,4 @@
players::seed_game_language(&p.ctx.profile, &options.language, || {
idle(&p.ctx.profile)
})
{
Member

L8 (should fix): A failed language seed is logged but the copied build is still reported as successfully reused.

When: If another editor holds the profile lock long enough for seeding to fail, a new profile without game_language gets a copied build with no language.txt. The later follow_build call leaves the missing setting alone, so the game can start in its default language instead of the language requested in the wizard.

Do: Propagate the seed failure or fall back to a build path that can establish the requested language before reporting success.

**L8** (should fix): A failed language seed is logged but the copied build is still reported as successfully reused. *When:* If another editor holds the profile lock long enough for seeding to fail, a new profile without game_language gets a copied build with no language.txt. The later follow_build call leaves the missing setting alone, so the game can start in its default language instead of the language requested in the wizard. **Do:** Propagate the seed failure or fall back to a build path that can establish the requested language before reporting success.
Author
Member

Thanks. L8 is fixed in 6d22294. The copy of an existing build is now used only when the profile's language could be set for it. The language goes into the profile's settings once the copy is verified, right before it is moved into place. If that can't be done (a game playing the profile, the profile's lock held, or a write failing), the copy isn't used, and the normal build runs instead, which sets the language at its end as the builder does. If the copy then can't be moved into place, unseed_game_language puts the profile's settings back to their text before.

Tests: language::tests covers seed refused while a game plays (an error, nothing written), seed then undo (no file, and a file of the game's own lines put back as it was). reuse_tests now expects no copy while a game plays the profile (Unix-only; CI's Linux job runs it). fmt and clippy are clean, and the language tests pass on Windows.

L5: still needs MagicBeanDev/Longshot#2794 in a nightly.

Thanks. **L8** is fixed in `6d22294`. The copy of an existing build is now used only when the profile's language could be set for it. The language goes into the profile's settings once the copy is verified, right before it is moved into place. If that can't be done (a game playing the profile, the profile's lock held, or a write failing), the copy isn't used, and the normal build runs instead, which sets the language at its end as the builder does. If the copy then can't be moved into place, `unseed_game_language` puts the profile's settings back to their text before. Tests: `language::tests` covers seed refused while a game plays (an error, nothing written), seed then undo (no file, and a file of the game's own lines put back as it was). `reuse_tests` now expects no copy while a game plays the profile (Unix-only; CI's Linux job runs it). fmt and clippy are clean, and the language tests pass on Windows. **L5:** still needs MagicBeanDev/Longshot#2794 in a nightly.
Author
Member
@review
fix(profiles): a copied build is used only when the profile's language could be set for it
Some checks failed
CI / What the change needs (pull_request) Successful in 12s
PR title / Conventional Commit title (pull_request) Successful in 15s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 20s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
6d2229497d
Review of #364 (L8): when setting the profile's language failed (a game playing the profile, the profile's
lock held, a write failing), the copied build was still reported reused, and its game, which reads only
the profile's settings, started in its default language.

- The language goes into the profile's settings once the copy is verified, right before it is put in
  place. When that cannot be done, the copy is not used: the build that runs instead sets the language,
  as the builder does at the end of a build.
- When the copy then cannot be put in place, the profile's settings go back to their text before it
  (players::unseed_game_language).
- seed returns the error (a game playing the profile included) and the settings' text before it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
BeanBot left a comment

Recommendation: Request changes. The reuse fix can overwrite or delete profile settings changed after seeding if the copied build cannot be moved into place. The end-to-end update with a released game that reads the profile setting also remains untested.

The launcher preserves a profile’s game language across updates and seeds it when reusing a compatible build. The latest fix falls back to a normal build when seeding fails, but its rollback can lose newer profile settings.

Blocking (1): must change before merging.

  1. L9 src/game/reuse.rs:300: Rollback restores a stale snapshot after releasing the profile edit lock, so it can discard settings written in the meantime. (more on the line) Do: Keep the profile edit lock across seeding, the rename and any rollback, so no other profile edit or game start can intervene.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

@fix can do L9.

Since the last review (on a29d4fbe95)
Resolved: L8 (A failed language seed is logged but the copied build is still reported as successfully re…)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)
New: L9 (Rollback restores a stale snapshot after releasing the profile edit lock, so it can discar…)

Checks: they run again on this head; a failure shows on the pull request.

More: does it help, other systems, switches, what was read

Does it help: Unproven for the complete update workflow: the author demonstrated saving zh-Hans and starting the related game build in Chinese on Windows, but has not exercised an update using a released build that reads game_language.

Other systems: The setting is shared with the game and its builder; reuse and rollback touch the profile’s settings on both Windows and Linux. The reported game run was on Windows; the reuse tests are Unix-only.

Switches: None.

Reviewed: 6d2229497d against 21a83d2b44: Read AGENTS.md and CONTRIBUTING.md, the changed reuse and language code, the latest fix diff, and the relevant wizard and locking paths. Skimmed the remaining pull-request diff, tests, UI changes and reported runs; not every changed code file was read in full. No review checklist or pull request template was found.; nothing run (a code review).

Checked and fine:

  • A failed seed no longer reports the copied build as successfully reused.
  • An existing game_language line is left unchanged by seeding.
  • The description explains the unreleased game dependency and includes screenshots and reported test results.

Testing: No commands from the project or tests were run. The author reports Windows language tests, formatting and Clippy passing; CI has not run on this head.

Overlaps and merge order: MagicBeanDev/Longshot#2794 supplies the game and builder behavior; the described end-to-end update needs a nightly containing it.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The reuse fix can overwrite or delete profile settings changed after seeding if the copied build cannot be moved into place. The end-to-end update with a released game that reads the profile setting also remains untested. The launcher preserves a profile’s game language across updates and seeds it when reusing a compatible build. The latest fix falls back to a normal build when seeding fails, but its rollback can lose newer profile settings. **Blocking (1)**: must change before merging. 1. **L9** `src/game/reuse.rs:300`: Rollback restores a stale snapshot after releasing the profile edit lock, so it can discard settings written in the meantime. (more on the line) **Do:** Keep the profile edit lock across seeding, the rename and any rollback, so no other profile edit or game start can intervene. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. `@fix` can do L9. **Since the last review** (on a29d4fbe95cc) Resolved: L8 (A failed language seed is logged but the copied build is still reported as successfully re…) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) New: L9 (Rollback restores a stale snapshot after releasing the profile edit lock, so it can discar…) **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the complete update workflow: the author demonstrated saving zh-Hans and starting the related game build in Chinese on Windows, but has not exercised an update using a released build that reads game_language. **Other systems:** The setting is shared with the game and its builder; reuse and rollback touch the profile’s settings on both Windows and Linux. The reported game run was on Windows; the reuse tests are Unix-only. **Switches:** None. **Reviewed:** 6d2229497d31 against 21a83d2b4420: Read AGENTS.md and CONTRIBUTING.md, the changed reuse and language code, the latest fix diff, and the relevant wizard and locking paths. Skimmed the remaining pull-request diff, tests, UI changes and reported runs; not every changed code file was read in full. No review checklist or pull request template was found.; nothing run (a code review). **Checked and fine:** - A failed seed no longer reports the copied build as successfully reused. - An existing game_language line is left unchanged by seeding. - The description explains the unreleased game dependency and includes screenshots and reported test results. **Testing:** No commands from the project or tests were run. The author reports Windows language tests, formatting and Clippy passing; CI has not run on this head. **Overlaps and merge order:** MagicBeanDev/Longshot#2794 supplies the game and builder behavior; the described end-to-end update needs a nightly containing it. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -259,0 +297,4 @@
};
if let Err(error) = fs::rename(&staged, target) {
if let players::Seeded::Put(before) = seeded
&& let Err(undo) = players::unseed_game_language(&p.ctx.profile, before)
Member

L9 (blocking): Rollback restores a stale snapshot after releasing the profile edit lock, so it can discard settings written in the meantime.

When: After seed releases its lock, a game can start or the player can change the profile language. If the subsequent rename fails, unseed reacquires the lock and restores the earlier file or removes it, losing those newer settings.

Do: Keep the profile edit lock across seeding, the rename and any rollback, so no other profile edit or game start can intervene.

**L9** (blocking): Rollback restores a stale snapshot after releasing the profile edit lock, so it can discard settings written in the meantime. *When:* After seed releases its lock, a game can start or the player can change the profile language. If the subsequent rename fails, unseed reacquires the lock and restores the earlier file or removes it, losing those newer settings. **Do:** Keep the profile edit lock across seeding, the rename and any rollback, so no other profile edit or game start can intervene.
Author
Member

Thanks. L9 is fixed in 3b065e0. Setting the profile's language, moving the copy into place, and putting the settings back after a failed move now all run under one hold of the profile's edit lock. The builder's play takes that same lock before it starts the game, so no other profile edit and no game start can come in between. seed and unseed are now called with the lock already held. fmt and clippy are clean, and the language tests pass on Windows. L5: still needs MagicBeanDev/Longshot#2794 in a nightly.

Thanks. **L9** is fixed in `3b065e0`. Setting the profile's language, moving the copy into place, and putting the settings back after a failed move now all run under one hold of the profile's edit lock. The builder's `play` takes that same lock before it starts the game, so no other profile edit and no game start can come in between. `seed` and `unseed` are now called with the lock already held. fmt and clippy are clean, and the language tests pass on Windows. **L5:** still needs MagicBeanDev/Longshot#2794 in a nightly.
Author
Member
@review
fix(profiles): a copied build's language, its move into place and any undo under one hold of the profile's lock
Some checks failed
CI / What the change needs (pull_request) Successful in 11s
PR title / Conventional Commit title (pull_request) Successful in 11s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 18s
CI / Rust formatting, lint and tests (pull_request) Successful in 11m5s
CI / Release packages and stable upgrades (pull_request) Has been cancelled
3b065e02ed
Review of #364 (L9): the profile's language was set under its edit lock, the lock let go, the copy moved
into place, and on a failed move the lock taken again to put the settings back, so an edit between the
two (the player's language, the start of the profile's game) could be undone with the stale text.

The seed, the move and the undo now run under one hold of the profile's edit lock (which the builder's
play also takes before it starts the game); seed and unseed are called with it held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The rollback now holds the profile edit lock through seeding, moving the copy, and any undo. The complete update workflow still needs a run with a released game build that reads the profile language. Recommend approval; not approved on the forge.

Keeps a profile’s game language in its settings and uses it when preparing builds. This addresses the reported reset, at the cost of coordinating settings writes with game launches and copied builds.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

Since the last review (on 6d2229497d)
Resolved: L9 (Rollback restores a stale snapshot after releasing the profile edit lock, so it can discar…)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven end to end: the reported Windows run shows the profile setting being saved and a development game reading it, but an update to a released game build with game_language has not been exercised.

Other systems: The settings change affects builds and copied builds on Windows and Linux. The reported game and UI checks were on Windows; the copy tests are Unix-only and CI is still running.

Switches: None.

Reviewed: 3b065e02ed against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the full new src/players/language.rs, and the diffs for src/game/reuse.rs and src/players/language.rs. Searched callers and lock use; the other changed files and their full surrounding code were not read.; nothing run (a code review).

Checked and fine:

  • The fix retains copied-build reuse and restores the previous settings if moving the staged copy fails.
  • The description explains the missing end-to-end run and includes a screenshot.

Testing: No commands that run project code or tests were executed. The author reports Windows language tests passing; CI checks are still running.

Overlaps and merge order: Longshot#2794 supplies the game and builder behavior needed for the end-to-end update; it needs a nightly build for that run.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The rollback now holds the profile edit lock through seeding, moving the copy, and any undo. The complete update workflow still needs a run with a released game build that reads the profile language. Recommend approval; not approved on the forge. Keeps a profile’s game language in its settings and uses it when preparing builds. This addresses the reported reset, at the cost of coordinating settings writes with game launches and copied builds. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. **Since the last review** (on 6d2229497d31) Resolved: L9 (Rollback restores a stale snapshot after releasing the profile edit lock, so it can discar…) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven end to end: the reported Windows run shows the profile setting being saved and a development game reading it, but an update to a released game build with game_language has not been exercised. **Other systems:** The settings change affects builds and copied builds on Windows and Linux. The reported game and UI checks were on Windows; the copy tests are Unix-only and CI is still running. **Switches:** None. **Reviewed:** 3b065e02ed14 against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the full new src/players/language.rs, and the diffs for src/game/reuse.rs and src/players/language.rs. Searched callers and lock use; the other changed files and their full surrounding code were not read.; nothing run (a code review). **Checked and fine:** - The fix retains copied-build reuse and restores the previous settings if moving the staged copy fails. - The description explains the missing end-to-end run and includes a screenshot. **Testing:** No commands that run project code or tests were executed. The author reports Windows language tests passing; CI checks are still running. **Overlaps and merge order:** Longshot#2794 supplies the game and builder behavior needed for the end-to-end update; it needs a nightly build for that run. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

On "does it really need a rebuild to update the language?": no. With MagicBeanDev/Longshot#2794 the language is no longer part of the build:

  • The game reads game_language= from the profile's settings.ini at every start (HOS_LANGUAGE still overrides it for one run). A change applies at the next start of the same build.
  • It is out of the profile's build key (Profile::key in play.rs), so play's fast check never rebuilds for a language change. build --profile --language X on a current folder only updates profile.json.
  • The ways to change it are writes to that one line, with no build: the Insert menu's Game language row, and MagicBeanDev/LongshotLauncher#364's Game language row on the Profiles page.

Builds touch it only twice:

  • a profile's first build by this builder writes the line when the profile has none (the starting language);
  • the first update of a folder an older game built carries a language chosen in that game's menu (kept in language.txt) into the line once.

In #364 the update wizard's Game language is only applied as part of an update the player is already running. Nothing in the launcher builds for a language change.

On "does it really need a rebuild to update the language?": no. With MagicBeanDev/Longshot#2794 the language is no longer part of the build: - The game reads `game_language=` from the profile's `settings.ini` at every start (`HOS_LANGUAGE` still overrides it for one run). A change applies at the next start of the same build. - It is out of the profile's build key (`Profile::key` in `play.rs`), so play's fast check never rebuilds for a language change. `build --profile --language X` on a current folder only updates `profile.json`. - The ways to change it are writes to that one line, with no build: the Insert menu's Game language row, and MagicBeanDev/LongshotLauncher#364's Game language row on the Profiles page. Builds touch it only twice: - a profile's first build by this builder writes the line when the profile has none (the starting language); - the first update of a folder an older game built carries a language chosen in that game's menu (kept in `language.txt`) into the line once. In #364 the update wizard's Game language is only applied as part of an update the player is already running. Nothing in the launcher builds for a language change.
Owner

Should be in settings tab

Should be in settings tab
feat(settings): the Game language row moves to Settings → Game, for the current profile
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 17s
PR title / Conventional Commit title (pull_request) Successful in 9s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
0ef2878eda
The user's call: the game's language is a setting, so its row belongs on the Settings tab, not the
Profiles page. It stays the current profile's: Settings → Game's Game language writes that profile's
settings.ini game_language= (the same callback and checks as before: refused while a game plays the
profile), shows the current profile's after a profile switch, and is disabled with "Close the game
first." while the launcher's game plays. The Profiles page no longer has the row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

The Game language row moved from the Profiles page to Settings → Game, in 0ef2878. It's still the current profile's: it writes that profile's settings.ini game_language= through the same callback and checks as before, follows a profile switch, and is disabled with "Close the game first." while the game plays. No new texts. Checked by hand: choosing ja in the row wrote game_language=ja into the profile's settings.ini.

Settings → Game: the Game language row

The Game language row moved from the Profiles page to **Settings → Game**, in `0ef2878`. It's still the current profile's: it writes that profile's `settings.ini` `game_language=` through the same callback and checks as before, follows a profile switch, and is disabled with "Close the game first." while the game plays. No new texts. Checked by hand: choosing ja in the row wrote `game_language=ja` into the profile's `settings.ini`. ![Settings → Game: the Game language row](https://git.magicbean.dev/attachments/e58f8a23-6cd9-49ec-9671-a252899de5ec)
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The language choice and the moved Settings row have been exercised, but the complete update workflow still needs a run with a released game that reads the profile setting. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The launcher saves a game language per profile and carries it through updates. The Settings row makes the choice available without a build; the change also adds coordination around profile writes and copied builds.

Should fix (1): not blocking, but worth doing before merging.

  • L10 ui/settings.slint:71: A failed language change reports its error on the Profiles page, where it is not visible from this Settings row. (more on the line) Do: Display the profile-language callback's error beside the Settings row, and clear or replace it appropriately after a successful choice.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

@fix can do L10.

Since the last review (on 3b065e02ed)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)
New: L10 (A failed language change reports its error on the Profiles page, where it is not visible f…)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven for the complete update workflow. The reported Windows test showed the old wizard selecting en-US for a zh-Hans build and the new game starting in Chinese from the profile setting, but did not exercise an update with a released game that reads it.

Other systems: The setting is shared with the game and builder. The profile edit lock and running-game check protect launcher writes; the complete integration with the new game and builder still needs an update run. Linux reuse tests are reported as awaiting CI.

Switches: None.

Reviewed: 0ef2878eda against 21a83d2b44: Read the changed Settings row, Profiles page, dropdown, option row, profile language writer and callback, and repository rules. Skimmed the change summary, commit list and recorded runs; the rest of the changed code was not read in full on this check. The named review checklist and pull request template were absent.; nothing run (a code review).

Checked and fine:

  • The Settings row follows the current profile and disables selection while this launcher reports a game playing.
  • The reported screenshot covers the row in its new location.

Testing: No commands that run project code or tests were executed. The author reports Windows hand testing and clean formatting and lint checks; CI was still running.

Overlaps and merge order: Longshot#2794 supplies the game and builder support needed for the complete update workflow.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The language choice and the moved Settings row have been exercised, but the complete update workflow still needs a run with a released game that reads the profile setting. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The launcher saves a game language per profile and carries it through updates. The Settings row makes the choice available without a build; the change also adds coordination around profile writes and copied builds. **Should fix (1)**: not blocking, but worth doing before merging. - **L10** `ui/settings.slint:71`: A failed language change reports its error on the Profiles page, where it is not visible from this Settings row. (more on the line) **Do:** Display the profile-language callback's error beside the Settings row, and clear or replace it appropriately after a successful choice. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. `@fix` can do L10. **Since the last review** (on 3b065e02ed14) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) New: L10 (A failed language change reports its error on the Profiles page, where it is not visible f…) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the complete update workflow. The reported Windows test showed the old wizard selecting en-US for a zh-Hans build and the new game starting in Chinese from the profile setting, but did not exercise an update with a released game that reads it. **Other systems:** The setting is shared with the game and builder. The profile edit lock and running-game check protect launcher writes; the complete integration with the new game and builder still needs an update run. Linux reuse tests are reported as awaiting CI. **Switches:** None. **Reviewed:** 0ef2878eda34 against 21a83d2b4420: Read the changed Settings row, Profiles page, dropdown, option row, profile language writer and callback, and repository rules. Skimmed the change summary, commit list and recorded runs; the rest of the changed code was not read in full on this check. The named review checklist and pull request template were absent.; nothing run (a code review). **Checked and fine:** - The Settings row follows the current profile and disables selection while this launcher reports a game playing. - The reported screenshot covers the row in its new location. **Testing:** No commands that run project code or tests were executed. The author reports Windows hand testing and clean formatting and lint checks; CI was still running. **Overlaps and merge order:** Longshot#2794 supplies the game and builder support needed for the complete update workflow. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -55,0 +68,4 @@
model: Game.languages;
current-value: root.value;
selected(value) => {
Players.profile-language(root.profile, value);
Member

L10 (should fix): A failed language change reports its error on the Profiles page, where it is not visible from this Settings row.

When: If another game process holds the profile or writing settings.ini fails, the callback sets Players.message and restores the displayed choice, but Settings → Game does not display that message, so the player cannot see why the change failed.

Do: Display the profile-language callback's error beside the Settings row, and clear or replace it appropriately after a successful choice.

**L10** (should fix): A failed language change reports its error on the Profiles page, where it is not visible from this Settings row. *When:* If another game process holds the profile or writing settings.ini fails, the callback sets Players.message and restores the displayed choice, but Settings → Game does not display that message, so the player cannot see why the change failed. **Do:** Display the profile-language callback's error beside the Settings row, and clear or replace it appropriately after a successful choice.
Author
Member

Thanks. L10 is fixed in 9614ccd. A Game language choice that can't be saved now shows its reason under the row on Settings → Game (Players.language-message), and the next choice that is saved clears it. Checking it by hand also showed the row kept displaying a refused choice: the dropdown follows its selected index, not the text the handler put back. The row now follows the saved language's index (PlayerRow.game-language-index), so a refused choice snaps back.

Checked by hand with the profile's settings.ini made read-only: picking ru showed "Cannot save … Access is denied" under the row and the row went back to ja, with the file unchanged. Made writable again, ru saved (game_language=ru) and the message cleared. fmt and clippy are clean, and the language tests pass.

Thanks. **L10** is fixed in `9614ccd`. A Game language choice that can't be saved now shows its reason under the row on Settings → Game (`Players.language-message`), and the next choice that is saved clears it. Checking it by hand also showed the row kept displaying a refused choice: the dropdown follows its selected index, not the text the handler put back. The row now follows the saved language's index (`PlayerRow.game-language-index`), so a refused choice snaps back. Checked by hand with the profile's `settings.ini` made read-only: picking ru showed "Cannot save … Access is denied" under the row and the row went back to ja, with the file unchanged. Made writable again, ru saved (`game_language=ru`) and the message cleared. fmt and clippy are clean, and the language tests pass.
fix(settings): the Game language row says why a choice was not saved, and goes back to the saved one
Some checks failed
CI / What the change needs (pull_request) Successful in 6s
PR title / Conventional Commit title (pull_request) Successful in 7s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
9614ccda9c
Review of #364 (L10): a Game language choice that could not be saved (the profile's game playing, the
file not writable) reported its error on the Profiles page, out of sight of the Settings row; and the
row kept showing the choice, because the dropdown follows its index, not the text put back.

- The error goes to Players.language-message, shown under the row on Settings → Game, and cleared by
  the next choice that is saved.
- The row follows the saved language's place in the list (PlayerRow.game-language-index), so a choice
  that was not saved goes back to the saved one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The language choice and its save errors are shown in Settings, and the reported failed-save case is fixed. The complete update workflow still needs a run with a released game build that reads the profile setting. Recommend approval; not approved on the forge.

The launcher preserves a profile’s game language across updates and lets players change it without rebuilding. The change adds coordination with profile locks and build reuse; its full update path remains unverified.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

Since the last review (on 0ef2878eda)
Resolved: L10 (A failed language change reports its error on the Profiles page, where it is not visible f…)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)

Checks: Still running: 5 checks.

Also noticed (2; not asked for, not blocking)
  • A failed language choice’s message remains visible after switching profiles until another choice is saved.
  • The comment above GameLanguageRow still says the Profiles page reports a refused choice.
More: does it help, other systems, switches, what was read

Does it help: Unproven: the author demonstrated the setting being saved and a development game build starting in Chinese, but has not tested a complete launcher update to a released build that reads game_language.

Other systems: The change affects profile settings, build reuse and update flows on Windows and Linux. The author reports Windows manual checks; the Unix-only reuse and wizard tests depend on the still-running Linux CI job.

Switches: No switches added, changed or removed.

Reviewed: 9614ccda9c against 21a83d2b44: Read the repository rules, the change since the ledger head, the affected language and row code, and the relevant update and reuse diffs. Skimmed the remaining changed files and recorded test evidence; not every changed code file was read in full.; nothing run (a code review).

Checked and fine:

  • The language dropdown index uses the same LANGS ordering as Game.languages.
  • A refused choice resets the dropdown to the saved profile language.
  • The author reports a manual read-only settings check showing the error and recovery.

Testing: No commands or tests were run. The author reports Windows manual checks, formatting and Clippy checks, and language tests; CI is still running.

Overlaps and merge order: Longshot#2794 supplies the game and builder support and needs to reach a nightly for the outstanding end-to-end update run.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The language choice and its save errors are shown in Settings, and the reported failed-save case is fixed. The complete update workflow still needs a run with a released game build that reads the profile setting. Recommend approval; not approved on the forge. The launcher preserves a profile’s game language across updates and lets players change it without rebuilding. The change adds coordination with profile locks and build reuse; its full update path remains unverified. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. **Since the last review** (on 0ef2878eda34) Resolved: L10 (A failed language change reports its error on the Profiles page, where it is not visible f…) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) **Checks:** Still running: 5 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - A failed language choice’s message remains visible after switching profiles until another choice is saved. - The comment above GameLanguageRow still says the Profiles page reports a refused choice. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the author demonstrated the setting being saved and a development game build starting in Chinese, but has not tested a complete launcher update to a released build that reads game_language. **Other systems:** The change affects profile settings, build reuse and update flows on Windows and Linux. The author reports Windows manual checks; the Unix-only reuse and wizard tests depend on the still-running Linux CI job. **Switches:** No switches added, changed or removed. **Reviewed:** 9614ccda9cc9 against 21a83d2b4420: Read the repository rules, the change since the ledger head, the affected language and row code, and the relevant update and reuse diffs. Skimmed the remaining changed files and recorded test evidence; not every changed code file was read in full.; nothing run (a code review). **Checked and fine:** - The language dropdown index uses the same LANGS ordering as Game.languages. - A refused choice resets the dropdown to the saved profile language. - The author reports a manual read-only settings check showing the error and recovery. **Testing:** No commands or tests were run. The author reports Windows manual checks, formatting and Clippy checks, and language tests; CI is still running. **Overlaps and merge order:** Longshot#2794 supplies the game and builder support and needs to reach a nightly for the outstanding end-to-end update run. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

Following up on L10 in 6d41d34: a choice that can't be saved now also says which language the row went back to. The message under the row starts "The game language stays ru: …" before the reason. It's a new text, translated in 12 catalogs; es-419 and fr-CA fall back to es and fr, and en-GB to English. Checked by hand with a read-only settings.ini (saved: ru; picked: pl): the row went back to ru and said "The game language stays ru: Cannot save … Access is denied", and the file was unchanged. fmt and clippy are clean; cargo test fails only on the same Windows folder tests as main.

Following up on L10 in `6d41d34`: a choice that can't be saved now also says which language the row went back to. The message under the row starts "The game language stays ru: …" before the reason. It's a new text, translated in 12 catalogs; es-419 and fr-CA fall back to es and fr, and en-GB to English. Checked by hand with a read-only `settings.ini` (saved: ru; picked: pl): the row went back to ru and said "The game language stays ru: Cannot save … Access is denied", and the file was unchanged. fmt and clippy are clean; `cargo test` fails only on the same Windows folder tests as main.
fix(settings): a Game language choice that was not saved says which language stays
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
PR title / Conventional Commit title (pull_request) Successful in 10s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 15s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
6d41d34127
The user's ask: the row went back to the saved language when a choice could not be saved, but only the
reason said so. The message under the row now names it: "The game language stays ru: <why>", in the
launcher's language (a new text in 12 catalogs; es-419 and fr-CA take es's and fr's, en-GB English).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

@HumanBean done: the Game language row is in the Settings tab now, under Settings → Game, its first row. I put it there because that section holds the game's own setup (your game copy, data and cache folders), while Settings → Launcher is for the launcher's own language and updates. It still sets the current profile's language, the same game_language= line in that profile's settings.ini, so nothing about what the game reads changed. It follows a profile switch, is disabled with "Close the game first." while the game plays, and a choice that can't be saved goes back to the saved one and says so ("The game language stays …"). The Profiles page no longer has the row. Commits: 0ef2878 (the move), 9614ccd and 6d41d34 (the error and snap-back). The branch is on current main.

Before, on the Profiles page:

before: Profiles page

After, on Settings → Game:

after: Settings → Game

@HumanBean done: the Game language row is in the Settings tab now, under **Settings → Game**, its first row. I put it there because that section holds the game's own setup (your game copy, data and cache folders), while Settings → Launcher is for the launcher's own language and updates. It still sets the current profile's language, the same `game_language=` line in that profile's `settings.ini`, so nothing about what the game reads changed. It follows a profile switch, is disabled with "Close the game first." while the game plays, and a choice that can't be saved goes back to the saved one and says so ("The game language stays …"). The Profiles page no longer has the row. Commits: `0ef2878` (the move), `9614ccd` and `6d41d34` (the error and snap-back). The branch is on current main. Before, on the Profiles page: ![before: Profiles page](https://git.magicbean.dev/attachments/8d69dec5-12c7-4c66-96d6-79034f14d53b) After, on Settings → Game: ![after: Settings → Game](https://git.magicbean.dev/attachments/e6b6e673-d548-4008-81de-57c088df5d46)
feat(settings): the Game language dropdowns list each language by its own name
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 14s
PR title / Conventional Commit title (pull_request) Successful in 6s
CI / Rust formatting, lint and tests (pull_request) Successful in 12m13s
CI / Release packages and stable upgrades (pull_request) Failing after 26m20s
a6b923ff95
The user's call: few players know codes like es-419 or zh-Hans. Both Game language dropdowns, on
Settings → Game and in the update wizard, now list each language by its own name, as the game's menu
does (Español (Latinoamérica), 简体中文, 日本語), so a player finds theirs whatever language the
launcher is in; the codes stay what is saved and passed to the builder.

- game::LANGUAGE_NAMES beside LANGS, in the game menu's names; Game.language-names in the UI.
- GameLanguageDropdown (ui/game-language.slint): names shown, a code in and out, back to the saved one
  after a choice that was not saved; used by both places. PlayerRow's index field is gone with it.
- "The game language stays …" names the language the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

In a6b923f both Game language dropdowns (Settings → Game and the update wizard) list each language by its own name, as the game's menu does (Español (Latinoamérica), 简体中文, 日本語), instead of codes like es-419 or zh-Hans. Few players know those codes. The codes are still what's saved in game_language= and passed to the builder. One shared GameLanguageDropdown (ui/game-language.slint) takes and gives back the code and goes back to the saved one after a refused choice. "The game language stays …" names the language the same way. Checked by hand on Settings → Game.

Already on main and not from this PR: on this Windows PC the first character of 简体中文 (简) draws as a box in every dropdown, the launcher's own Launcher language list included. The system's fallback font has Traditional characters but not that Simplified one. I'll raise that separately.

Settings → Game: the languages by their own names

In `a6b923f` both Game language dropdowns (Settings → Game and the update wizard) list each language by its own name, as the game's menu does (Español (Latinoamérica), 简体中文, 日本語), instead of codes like `es-419` or `zh-Hans`. Few players know those codes. The codes are still what's saved in `game_language=` and passed to the builder. One shared `GameLanguageDropdown` (`ui/game-language.slint`) takes and gives back the code and goes back to the saved one after a refused choice. "The game language stays …" names the language the same way. Checked by hand on Settings → Game. Already on main and not from this PR: on this Windows PC the first character of 简体中文 (简) draws as a box in every dropdown, the launcher's own Launcher language list included. The system's fallback font has Traditional characters but not that Simplified one. I'll raise that separately. ![Settings → Game: the languages by their own names](https://git.magicbean.dev/attachments/d880de3b-29aa-48b2-bd66-e25596d5c233)
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The profile language setting and the language-name dropdowns have been exercised by hand, but the complete update workflow still needs a game build that reads the profile setting. That end-to-end run remains necessary before merge. Recommend approval; not approved on the forge.

The launcher keeps a game language with each profile, preserves it through builds and updates, and displays languages by their own names. The change adds coordination with the builder and profile edit lock in exchange for preserving the player's choice.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The complete update workflow with a game that reads the profile setting has not been exercised. When: The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. Do: After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language.

Since the last review (on 9614ccda9c)
Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven for the complete update workflow: the author demonstrated the settings write and a game reading it on Windows, but has not exercised an update to a released build with game_language support.

Other systems: The settings affect the game and builder as well as the launcher; Longshot#2794 supplies the corresponding game and builder behavior. The recorded hand checks are on Windows; the reuse and wizard tests are Unix-only and their CI run is still pending.

Switches: No switches added, changed or removed.

Reviewed: a6b923ff95 against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the changes since 9614ccda9c, the profile language implementation, the dropdown implementation and the relevant builder, reuse and wizard diffs. Skimmed the translation additions and recorded runs; the remaining changed files were not read in full.; nothing run (a code review).

Checked and fine:

  • The language names and codes are listed in matching order, and the dropdown passes codes to its callers.
  • The refused-choice message uses the saved profile language and clears after a successful choice.

Testing: No code or tests were run. The author reports Windows hand checks and passing formatting and lint checks; both CI jobs are still running.

Overlaps and merge order: Longshot#2794 supplies the game and builder support and needs to be available in a nightly for the outstanding update run.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The profile language setting and the language-name dropdowns have been exercised by hand, but the complete update workflow still needs a game build that reads the profile setting. That end-to-end run remains necessary before merge. Recommend approval; not approved on the forge. The launcher keeps a game language with each profile, preserves it through builds and updates, and displays languages by their own names. The change adds coordination with the builder and profile edit lock in exchange for preserving the player's choice. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The complete update workflow with a game that reads the profile setting has not been exercised. *When:* The reported runs cover saving the setting and starting the modified game separately, but do not cover a launcher update followed by starting that updated game. **Do:** After Longshot#2794 is available, update a profile with a saved language through the launcher and verify the updated game starts in that language. **Since the last review** (on 9614ccda9cc9) Still open: L5 (The complete update workflow with a game that reads the profile setting has not been exerc…) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the complete update workflow: the author demonstrated the settings write and a game reading it on Windows, but has not exercised an update to a released build with game_language support. **Other systems:** The settings affect the game and builder as well as the launcher; Longshot#2794 supplies the corresponding game and builder behavior. The recorded hand checks are on Windows; the reuse and wizard tests are Unix-only and their CI run is still pending. **Switches:** No switches added, changed or removed. **Reviewed:** a6b923ff9506 against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the changes since 9614ccda9cc9, the profile language implementation, the dropdown implementation and the relevant builder, reuse and wizard diffs. Skimmed the translation additions and recorded runs; the remaining changed files were not read in full.; nothing run (a code review). **Checked and fine:** - The language names and codes are listed in matching order, and the dropdown passes codes to its callers. - The refused-choice message uses the saved profile language and clears after a successful choice. **Testing:** No code or tests were run. The author reports Windows hand checks and passing formatting and lint checks; both CI jobs are still running. **Overlaps and merge order:** Longshot#2794 supplies the game and builder support and needs to be available in a nightly for the outstanding update run. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch feat/profile-game-language 2026-11-29 19:59:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!364
No description provided.