Release 2.1.0
Some checks failed
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
Release / version (push) Has been cancelled
Release / macos (push) Has been cancelled
Release / android (push) Has been cancelled
Release / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / publish (push) Has been cancelled

Preparing against an opponent (openings), one fixed engine search for the game
review everywhere, !! and ! recalibrated on chess.com (check set of 15 games),
100 classic sample games that update with the program. Formatting by cargo fmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-28 20:37:06 +03:00
parent dd26e7261a
commit 262c0b1711
28 changed files with 1621 additions and 495 deletions

View file

@ -13,11 +13,11 @@ use crate::analysis::Analysis;
use crate::assets::Sound;
use crate::game_view::{GameAction, GameSource, GameView};
use crate::library::{Library, LibraryAction};
use crate::prep_ui::{DialogOutcome, PrepAction, PrepDialog, PrepScreen};
use crate::own_db::{
self, Answer, ChooserFor, ChooserOutcome, EditorMode, EditorOutcome, NewBaseOutcome,
QuestionKind,
};
use crate::prep_ui::{DialogOutcome, PrepAction, PrepDialog, PrepScreen};
use crate::settings::{EngineConfig, Settings};
use crate::settings_ui::{SettingsAction, SettingsWindow, Tab};
use crate::sound::SoundPlayer;

View file

@ -787,7 +787,8 @@ impl GameView {
if std::mem::take(&mut self.review_asked) {
if self.engine_busy {
actions.push(GameAction::Toast(
tr("Opening errors are being searched — wait or stop it in the report").to_owned(),
tr("Opening errors are being searched — wait or stop it in the report")
.to_owned(),
));
} else {
self.start_review(false, ui.ctx(), &mut actions);

View file

@ -13775,15 +13775,7 @@ const ROWS: &[[&str; 9]] = &[
"Екеуі",
],
[
"None",
"Нет",
"Aucun",
"Keines",
"Ninguno",
"Nessuno",
"Nenhum",
"Yo‘q",
"Жоқ",
"None", "Нет", "Aucun", "Keines", "Ninguno", "Nessuno", "Nenhum", "Yo‘q", "Жоқ",
],
[
"A book is a large database that shows up to which move his line is common and where he plays a rare move. A rare move is not a mistake.",
@ -13819,15 +13811,7 @@ const ROWS: &[[&str; 9]] = &[
"Аты немесе оның бөлігі",
],
[
"Colour",
"Цвет",
"Couleur",
"Farbe",
"Color",
"Colore",
"Cor",
"Rang",
"Түс",
"Colour", "Цвет", "Couleur", "Farbe", "Color", "Colore", "Cor", "Rang", "Түс",
],
[
"Book",
@ -14919,15 +14903,7 @@ const ROWS: &[[&str; 9]] = &[
"{n} жүріс",
],
[
"{n} m.",
"{n} х.",
"{n} c.",
"{n} Z.",
"{n} j.",
"{n} m.",
"{n} l.",
"{n} yur.",
"{n} ж.",
"{n} m.", "{n} х.", "{n} c.", "{n} Z.", "{n} j.", "{n} m.", "{n} l.", "{n} yur.", "{n} ж.",
],
[
"Continue ≈ {time}",

View file

@ -1306,7 +1306,10 @@ impl LargeView {
// dialog offers the names that match the text (opponent-prep.md §2.1).
if player_set {
let label = match self.form.player.exact {
Some(_) => trf("♟ Prepare against {name}…", &[("name", &self.form.player.text)]),
Some(_) => trf(
"♟ Prepare against {name}…",
&[("name", &self.form.player.text)],
),
None => tr("♟ Prepare against an opponent…").to_owned(),
};
if ui

View file

@ -652,7 +652,10 @@ impl Library {
if !matches!(self.slots.get(&path), Some(Slot::Ready(_))) {
return None;
}
Some((path.clone(), self.large.get(&path).and_then(|v| v.prep_entry())))
Some((
path.clone(),
self.large.get(&path).and_then(|v| v.prep_entry()),
))
}
fn notes_window(&mut self, ctx: &egui::Context) {

File diff suppressed because it is too large Load diff

View file

@ -15,9 +15,7 @@ use std::sync::atomic::AtomicBool;
use chess_core::{Game, NodeId};
use chess_import::Database;
use chess_import::position::{
Match, MoveStat, PositionOutcome, PositionQuery, Tally, theory_end,
};
use chess_import::position::{Match, MoveStat, PositionOutcome, PositionQuery, Tally, theory_end};
use egui::{RichText, Sense, Ui, vec2};
use egui_extras::{Column, TableBuilder};
use shakmaty::uci::UciMove;

View file

@ -124,16 +124,10 @@ impl Review {
let spawned = std::thread::Builder::new()
.name("game-review".into())
.spawn(move || {
let result = game_review::run(
config,
&settings,
targets,
&cancel_w,
&mut |e| {
let _ = tx.send(JobMsg::Event(e));
ctx_w.request_repaint();
},
);
let result = game_review::run(config, &settings, targets, &cancel_w, &mut |e| {
let _ = tx.send(JobMsg::Event(e));
ctx_w.request_repaint();
});
let msg = match result {
Ok(()) => JobMsg::Done,
Err(JobFailure::Start(e) | JobFailure::Engine(e)) => JobMsg::Failed(e),
@ -541,8 +535,11 @@ impl Review {
let can_update = self.analysis.meta.as_ref().is_some_and(|m| m.nodes > 0);
if can_update {
// Stale: everything again («Обновить»); otherwise the gaps («Дополнить»).
let mut button =
ui.button(if stale { tr("Analyse again") } else { tr("Update") });
let mut button = ui.button(if stale {
tr("Analyse again")
} else {
tr("Update")
});
if stale {
button = button.on_hover_text(tr(
"Every position is analysed again, the same way on every computer",

View file

@ -242,15 +242,13 @@ impl Settings {
};
migrate_legacy_config(&path);
match std::fs::read(&path) {
Ok(bytes) => {
serde_json::from_slice(&bytes).unwrap_or_else(|e| {
eprintln!(
"settings: cannot parse {}: {e}; using defaults",
path.display()
);
Self::default()
})
}
Ok(bytes) => serde_json::from_slice(&bytes).unwrap_or_else(|e| {
eprintln!(
"settings: cannot parse {}: {e}; using defaults",
path.display()
);
Self::default()
}),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Self::first_start(),
Err(_) => Self::default(),
}