fix(tauri): make game-directory changes observable

Game-directory selection could reach update_game_directory and then fail before
peer startup, while the frontend only logged the rejected invoke. Preserve the
last accepted root until peer acknowledgement, surface backend rejection in
the settings and main-window UI, and avoid holding the published control lock
across runtime replies. Startup preflight remains fail-closed; synchronous
setup stays lexically owned through scoped_blocking so cancellation cannot
strand a partially published runtime.

Add peer-cli scenario S50 to verify invalid changes preserve the existing
library and valid changes acknowledge and refresh the library in both
directions. Modernize the fixed-size hex decoders to satisfy the current
workspace Clippy lint without changing their behavior.

Test Plan:
- `just fmt` -- passed
- `just clippy` -- passed
- `just test` -- passed
- `just frontend-test` -- passed
- `deno task build` -- passed
- `just peer-cli-tests S50` -- passed
- `just build` -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
ddidderr committed 2026-08-25 00:10:01 +02:00
1 parent 3bbfe919d2
commit a49b51d3d8
9 files changed
+118 -8

No files matched your search

@@ -856,7 +856,9 @@ fn decode_lower_hex_key(key: &str, prefix: &str) -> eyre::Result<Vec<u8>> {
}
encoded
.as_bytes()
.chunks_exact(2)
.as_chunks::<2>()
.0
.iter()
.map(|chunk| {
let digits = std::str::from_utf8(chunk)?;
Ok(u8::from_str_radix(digits, 16)?)