- review_engine: ChessPenguin's Stockfish 19, else a Stockfish 19 of the user's
(settings, PATH) whose probe (game_review::probe: id name and three searches of the
analysis's fixed mode at 100k nodes) matches the reference of ours; probed in the
background, the verdict kept by path, size and time. Other engines: the offer names
them («В настройках указан …»).
- Dropped files and folders open as «Add database» does (.pgn/.cbh/.cbv/.zip/.7z, the
.cbh of any ChessBase part); others get a toast; «Release to open» while dragging.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
platform::size_text takes the units from the translations ({n} GB …) and
the decimal comma where the language writes one; every size the web version
shows goes through it. chessbase.mjs takes CP_LANG.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A .cbh chosen alone brings a window: its folder (Chrome, Edge:
showDirectoryPicker opening beside the file, the folder remembered; others:
webkitdirectory) or all its files; the files are grouped into databases by
name (chess_import::group_chosen), the reader opens a ChessBase one with
open_chessbase_owned. The user's files stay the browser's File objects: the
worker reads them, the page never holds a database's bytes; a kept copy
takes the whole database. Over 2 GB of the files read: refused with the way
to the desktop program. A reader out of memory says so in the user's words.
Paths like /opened/... are no longer shown (platform::files::shown).
chess-core: detect_letter_substitution decodes the text a piece at a time;
it held the whole text as chars (four times its size): a 1 GB cp1251 PGN
could not be read in a browser (capacity overflow) and cost gigabytes on a
computer. Now 1.95 GB opens in Firefox and Chromium.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page's reader: a Web Worker with a second instance of the program reads
a database (PGN, CBV, ZIP, 7Z) and gives back its text and index; the page
puts it together without reading it again (chess_core::PgnIndex,
PgnDatabase::into_index / from_index, serde behind a feature). A 13 MB CBV:
the longest frame 17 ms in Firefox, 67 ms in Chromium (1000 ms before).
platform::open_database is the same on both sides: away from the screen,
done when read. The shelf's cards count the games the same way (one file
at a time); the counts are kept through platform::fs.
Chrome, Edge (File System Access): a chosen file's handle is kept in the
browser's storage; at the next visit the file is read again by itself when
the browser allows it, else the card offers «Allow reading» (the browser's
own question). Files of different visits get folders of their own.
Checks: t.choose(files, open) for both browsers (in Chromium the handles of
the site's private file system stand for the dialog's); app.mjs checks the
draft, the question on leaving and the remembered file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EngineLocation: an engine starts from its program on a computer, from the
address of its Web Worker's script in a browser; analysis, the review job,
the judge and the settings take it instead of a path.
platform::page: a game on the screen is an entry of the browser's history,
so Back is «← Library» (with the same questions); unsaved changes or a
running review make the browser ask before the page is left. The draft of an
unsaved game is written every 5 s while it has changes and offered at the
next start (Open / Delete); a saved or left game takes it away.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
game-review: what the job does for one target (the full search, the second
best without the move played, the shallow ones) becomes a machine without I/O
(job/work.rs), driven by the engine processes on a computer (job/engines.rs,
the same searches as before) and by Web Workers in a browser
(job/workers.rs: a dispatcher polled from the frames, never blocking). The
analysis cache goes through a CacheStore (a folder, or the program's files of
the platform).
The browser's engine: Stockfish.js 19.0.1 (npm stockfish, GPL-3.0), its
single-threaded build served beside /app/ (engine/, build.sh checks the
package's sha512), its 99 MB wasm downloaded only through the engine offer,
checked against its SHA-256 and kept in Cache Storage; workers get it as a
blob: address. Live analysis (lines, arrows, the bar) and the review run on it;
the review uses one worker per logical CPU, at most 8.
My games (the web version): a PGN in the browser's storage, always on the
shelf; Ctrl+S puts a game there (its own record, or a new one); deleting with
undo. chess-core's store gives the bytes of append/replace/remove/restore, so
the platform writes them into the browser's files; on a computer the files
are written as before. Settings: Browser data (used and free space, keeping
the data for good, Download all as PGN, deleting the engine).
Files: a file of the last visit offers Choose the file again; Keep a copy in
the browser (refused with the room it needs when the browser gives too
little); files over 1 GB are not opened, with a word on why. No reference tab
and no search by position in the web version. Keys: Alt+Left, plain 1-6,
Ctrl+C, N in the library (the browser keeps Ctrl+W/N/1-6/Shift+C).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The site serves precompressed copies next to its files (the program is 19 MB,
6.3 MB in Brotli); the built program goes to website/static/app (ignored by git,
taken into the image); the device page's screenshots by the site's own paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apps/desktop becomes a library (chesspenguin_app: the interface) and a thin
binary; apps/web starts the same interface in a page's canvas (eframe's
WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser.
The platform layer (apps/desktop/src/platform): the program's folders, files,
background work, the files the user opens or saves, the clipboard and what
the platform offers (CAPS). On a computer it is the system as before; in a
browser the program's data lives in IndexedDB behind an in-memory file tree
loaded before the start, the files the user opens are read into it for the
session (only read), background jobs run on the page's thread after the
frame, the clipboard is read through the browser's API, sounds play through
audio elements, a game is saved as a download.
What a browser does not have is not built for it: updates, the online games
window and its probe, engine processes (analysis starts a Web Worker there;
the review and preparation jobs, Rodent and the judge are native), blocking
requests (engine, Maia and Rodent downloads report no download for the
platform, translation reports that it makes no requests). The desktop
program behaves as before; its build finds unused code (the web build
compiles parts it never shows).
apps/web: the entry point, the page /app/ (device check before anything large
is loaded: phones and tablets get the page about the apps in the site's nine
languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile
web), a static server and headless Firefox checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trainer keeps its deadline in web_time::Instant (std's panics in a browser; on a
computer it is std's). play: the Judge type is on every target, only starting
it (an engine process) is native. chess-import: files are closed by the end of
their block before a rename instead of drop(), which a browser's File (no
destructor) makes a lint there. rustfmt of the earlier changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
online-games: the network part (lookups, probes, downloads into the database,
with their tests) moves to net.rs, built where a request may block a thread;
ureq is a dependency there only. The names, paths and states of the online
databases stay for every target.
play: the engines that play (Rodent) or judge (Maia's resignations) run as
processes driven from threads: not built for WebAssembly. getrandom has its
browser backend there.
prep: analyse (the job in engine processes) is native.
Nothing changes on the computer or Android; the tests pass as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On WebAssembly the engine is a Web Worker: a line of UCI is one message each
way, the protocol machine is driven by the worker's messages and by timers set
for its deadlines; the handshake does not block (Engine::start_worker gives a
Starting, polled until readyok). EngineHandle has the same methods as the
process one, minus those that block or name a process. Option and search
checks are shared by both transports.
tests/worker.rs runs the worker transport against a fake engine in JavaScript
in headless Firefox (apps/web/check/uci-worker.mjs: wasm-bindgen-test-runner
serves, a WebDriver BiDi client reads the outcome): handshake, analysis and
stop, coalescing of rapid requests without mixing output, an engine hung on
stop, a crash, and every handshake failure. 5 of 5 pass.
game-review: the job in engine processes (run and its workers) moves to
job/engines.rs, built where there are processes. .cargo/config.toml: the
getrandom backend of WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The handshake and the session after it move to uci::protocol: lines, commands
and the time go in, lines to write and events come out, deadlines are named
instead of waited for. The child process with its reader and supervisor
threads is now one transport of it (process.rs, not built for WebAssembly).
Behaviour on the computer and Android is unchanged; the fake engine tests pass
as before, and the machine has its own tests.
chess-import: the parallel passes (booster, position search, opening tallies)
go through parallel::map, which runs a single worker on the calling thread;
on WebAssembly there is one worker (std threads panic there). read_at and
write_all_at have a portable form through the file cursor for targets other
than Unix and Windows. The bench command is not built for WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
90.Ra4+ of the owner's son's game, a skewer, is a textbook blow - the owner
calls it plain. The checks of a mating attack stay (22.Bf5+, 23.Bd7+ of the
Evergreen game). ChessCom rules only; the son's game now lists Ra4+ among the
owner's plain moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brilliant moves for a hard only move a shallow search misses; surer great moves
(no ! for a quiet step away or the king out of check). Formatting by cargo fmt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three of our ! chess.com did not give (23.Kd3, 20...Ka7, 32.Kd2) and three it
did (22.Ke3, 25...Kb6, 20.Ke2) go; the owner counts the move plain. Our ! are now
chess.com's 27 times of 28. ChessCom rules only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shallow search (5 000 nodes) is on: the only good move (10 % ahead) that a
shallow search ranks 30 % lower is !! even without a sacrifice - 17...Be6!! of
Byrne - Fischer and 33.c3+!! of Kasparov - Topalov; !! of chess.com found 35 of 39
(was 32), 95 % of ours right, no wrong one added. Not used for ! (it would take
nearly every ! away). The owner's two games with 10.Be2 and Ra7, which he calls
plain, join the set with an OwnerPlain tag the checker enforces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a move that could be brilliant or great and was the engine's best, an
optional shallow search (same fixed search, go nodes SHALLOW_NODES = 5000)
keeps its best move and evaluation and the move played at that depth
(PosEval.shallow, serde default; SEARCH_VERSION unchanged). Ply.difficulty
says how much the shallow search underrates the move (Measure::Choice:
against its own best move; Measure::Depth: against the deep search).
Hardness (report.rs) says how the difficulty counts in !! and ! of the
ChessCom rules: ! only for hard moves, gaps, the capture/quiet-retreat bans,
!! for a very hard only move. The default changes nothing and makes no
shallow search; rules that use it fill old analyses in like the second
search (seconds_missing). chesscom_check takes CP_SHALLOW_NODES and the
rule parameters for experiments; review_bench CP_SHALLOW_NODES. fake_uci
learns --searchmoves and --shallow for the job test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10.Be2 of the owner's online game (the bishop on d3 under c4, the only square
that keeps f3) was ! - plain, the owner says. A step away with check can still be
great (19...Ne2+, 23.Bd7+ are chess.com's !). ChessCom rules only; 13.Qa4! of the
Evergreen game is given up for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 requests for one APK within a minute from one Windows browser made 18
downloads out of two people. Repeats are now kind 'repeat' (out of the counts,
as they were out of the notices); rows from before are marked at start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opponent preparation, !! and ! in the game review, the reference tab, search by
position, 100 classic games and the Android app (no longer alpha); the gallery
takes the current English screenshots of the website plus the opponent
preparation. AppStream's default screenshot follows the new file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>