Commit graph

15 commits

Author SHA1 Message Date
vrubelroman
45a37fc65b Android: the game's data form (players, ratings, event, date, result); a new game's first save asks for it
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
mobile-api: set_data keeps the Seven Tag Roster whole and in order, as the
desktop does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 00:56:54 +03:00
vrubelroman
d9f37f1283 mobile-api: a move's id is its node id, kept across edits
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
New moves come at the end and a removed one stays unreachable, so the
cursor and the report's marks stay on their moves when the game changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 00:33:55 +03:00
vrubelroman
5041834825 mobile-api: GameSession (moves, variations, undo, data, PGN) and own databases
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
The Android app gets a game it can change: moves go into the tree as on the
desktop (followed when they exist, a variation elsewhere, never overwritten),
with undo/redo, main line / delete, an engine line as moves, tags and result,
PGN. Own databases: PGN files in the app's folder created, saved into
(append or replace through chess_core::pgn::store) and removed from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 00:23:08 +03:00
vrubelroman
1edbbda368 Count installations that run: the update check goes through the site
The programs (desktop, Android) ask https://chess.vrubel.xyz/api/update for the latest
release instead of GitHub, with a random id of the installation (made once, kept in the
settings), the version and the platform; the site passes GitHub's answer on and keeps one
row per installation and day (no IP; the country of the address). Without the site the
programs ask GitHub, uncounted; with the update check off nothing is sent. /stats shows
installations that ran today, in 7 and 30 days, in all and new ones, by platform and
version. The texts about the update check and the site's privacy line say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:45:15 +03:00
vrubelroman
e8deec7b27 Downloaded games newest first on the desktop too; the games list counts a download as it goes
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
- Desktop: in a database from Lichess and Chess.com the «№» order is the time the games
  were played, the most recent first (as on the phone); a click turns it around.
- chess-core GameEntry::played_at: the shared key (UTCDate+UTCTime, else Date).
- Android: over a downloaded database's games list the number of games grows with its
  download (it stood still until the end), as on the list of databases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:08:40 +03:00
vrubelroman
7f23bca320 Android: the app updates itself; one release check for the desktop and the phone
Some checks are pending
CI / macos-build (push) Waiting to run
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
- crates/releases: the latest release on GitHub, its files and SHA-256 sums, shared by
  the desktop updater and the phone (desktop update.rs keeps its installers).
- mobile-api check_release: a newer release with its APKs and sums; a desktop-only
  release is no update, one without the light APK's sum cannot be checked.
- Android (android-ui.md §25): a check at start and on return once a day (switch and
  «Check now» in About), a card over the databases, a sheet through the install
  permission, the download (DownloadManager), the SHA-256, the full build keeping its
  engine network, and PackageInstaller; the state survives restarts, the update's
  snackbar waits for a screen. Network state permission for both builds (the full one
  crashed without it). Debug builds may ask a test server (CP_UPDATE_API).
- Release notes on GitHub come from this version's CHANGELOG section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:42:27 +03:00
vrubelroman
f6072cb7c3 Android: games from Lichess and Chess.com, newest first, with «Download new games»
The downloads of the desktop (lookup by nickname, one database per site or both in one,
resuming without duplicates, games still being played fetched once they end) move into a
shared crate, online-games; the desktop keeps its window on top of it.

On Android, «Add a database» → «Games from Lichess and Chess.com»: a nickname, what each
site has, the download with its progress. It belongs to the app, not to the screen: the
list of databases shows how it goes and says how it ended. «Download new games» in the
database's menu and over its games list fetches only the new ones. The games of a
downloaded database are listed from the most recent one (by UTC date and time, both sites
interleaved). Both builds may now use the internet, only when the user asks.

Reviewed by an independent tester and designer (docs/design/android-ui.md §23, §24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:37:16 +03:00
vrubelroman
1661e238d8 Android: game report — mistakes, blunders and accuracy, as on the desktop
The game analysis of the desktop (evaluations of the main line, judgements, accuracy,
cache and the engine job) moves into a shared crate, game-review, so both apps give the
same numbers. The desktop uses it unchanged in behaviour.

On Android, ⋮ → «Game analysis» runs Stockfish over the main line in its own process
(the live engine waits): an evaluation graph and a status row between the board and the
notation, marks in the notation, the better line of an error on the board, a report sheet
with both players side by side. Games with [%eval] and games analysed before show their
report at once. The analysis stops with the screen and goes on after it, also after the
phone is turned, and is cached as it goes.

Reviewed by an independent tester and designer (docs/design/android-ui.md §21, §22).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:10:58 +03:00
vrubelroman
7d77a1aaef Android: paste PGN, open files from other apps, a calmer screen while the engine thinks
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
- Paste: «Add a database» offers the clipboard's games when it holds text; they are kept
  in the app as a copy (one game opens on the board). Text with no game is said so.
- Open with / Share: PGN, ZIP, 7z, .cbv from other apps are copied in, listed and opened;
  one copy at a time, the last one shown; not again from Recents; a lone .cbh says to
  add its folder. A copy is marked «copy» and removing it deletes it.
- Engine: the button turns it off again; its words reach the screen up to 5 times a
  second and redraw only the strip and the arrows; Stockfish runs at nice 10 (uci
  EngineConfig::nice) with 2 threads by default.
- PGN scan: tags right after a result on the same line start the next game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 02:06:08 +03:00
vrubelroman
a8978c765b Android: add a folder — every database in it, ChessBase databases (.cbh) too
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
«Добавить базу» offers a file or a folder. A folder is looked through two levels down;
the databases found are offered with tick boxes: PGN, archives, .cbv and ChessBase sets
(.cbh with the files beside it, names in any case), each a separate entry. A .cbv beside
its own set is not offered twice, a set without its .cbg is shown but not added, and
databases already on the list (also picked as a file) are marked. The folder's read
permission is kept while one of its databases is on the list or can still be restored
with Undo, and access no entry uses is given back at start. A moved file or a missing
.cbg is said in plain words. Reviewed by the designer and the tester.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:27:14 +03:00
vrubelroman
3cb6730692 Android: the engine's download through the system, four more languages, a themed icon
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 / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / macos (push) Has been cancelled
Release / android (push) Has been cancelled
Release / publish (push) Has been cancelled
The network is downloaded by DownloadManager: it goes on with the app closed, waits for
the network and shows a notification; the app picks the finished download up, checks its
SHA-256 and moves it in. German, French, Spanish and Italian, as on the site. A monochrome
layer for themed icons. UniFFI's Android mode picks the cleaner by the API level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:16:36 +03:00
vrubelroman
7eac8db29a Android: fixes from the tester's report
- An old evaluation never shows for a new position, not even for a frame:
  every snapshot carries its position and the screen compares it with the
  board; the engine handle is held for 40 ms at most.
- Turning the engine off while it starts no longer leaves a Stockfish process
  behind (generations in EngineSession).
- Landscape: the board on the left, the notation, engine and buttons beside it.
- "Undo" after removing a database keeps the access to its file; picking a
  file again restores the access.
- After Android restarts the app the same game comes back (the search is kept).
- Mate and stalemate are named instead of waiting for the engine.
- The download sheet shows progress and "Cancel" at once; a cancelled download
  stops reading and never writes the file together with the next one.
- Plain error texts with "Remove from list"; evaluations rounded ("+0.5",
  "0.0", "#−2"); search results start at the top; tag names translated;
  "PGN copied" / "FEN copied".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 02:44:40 +03:00
vrubelroman
de5ca02a82 Android: design review fixes, icon, signed releases, the site's Android downloads
- The design review (docs/design/android-ui.md §17): the move buttons in the
  bottom bar (snackbars above them), ripple on press, larger ◀ ▶, coordinates
  over the pieces, readable NAG colors in the light theme, 16 dp edges, the
  ⋮ menu (game details, copy PGN/FEN, share), "Deeper" next to ▾, TalkBack
  states, no "*" for unfinished games, "Found N of M", texts.
- The penguin as the adaptive icon and on the splash screen; dark window.
- Release builds: R8, signing from the environment, androidApp/scripts/release.sh
  (two APKs, apksigner and 16 KB alignment checks); the release workflow builds
  them from the repository secrets.
- Website: the Android tab with both APKs, "Download for Android" on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 01:57:03 +03:00
vrubelroman
68fcabd691 Android stage 1: databases, games, the game viewer and the engine
androidApp/: Kotlin + Jetpack Compose over the Rust core (mobile-api, UniFFI).
- Databases: the desktop samples on the list from the first start, files added
  with the system picker and read in place, rename, remove with undo.
- Games: a paged list with a search by players, event, site and date.
- Game: the green board with Merida pieces, the notation as on the desktop
  (variations, comments, NAG), forks, paging games, hold-to-repeat steps,
  comment arrows and squares, the check glow, Latin/figurine/local notation.
- Engine: Stockfish 19 built from the pinned source (scripts/stockfish.sh) and
  run from nativeLibraryDir through the uci crate. Two builds: "full" with the
  network inside, "light" downloading it on request (resume, SHA-256 check).
  The time per position, lines, line preview on the board; the engine quits
  when the screen goes away.
- Settings and About with the licenses.

mobile-api: game search, UCI moves and comment marks for nodes, the Analyzer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 01:40:37 +03:00
vrubelroman
0c912ac669 Android stage 0: the core opens databases without paths; the mobile-api bridge
chess-import opens a database from its content (PGN, zip, 7z, cbv) and a
ChessBase database from the contents of its files: Android hands over file
descriptors, not paths. The text of comments as shown moves to chess-core
(comment_display_text), so the phone and the desktop show the same.

crates/mobile-api: a thin UniFFI bridge — open a database from a descriptor, a
ChessBase folder's files, or a path (tests); game rows a page at a time; a game
as a tree of moves with positions, last-move squares, NAGs and comments. It
builds for arm64-v8a and x86_64 with cargo-ndk (NDK r30, API 31) and its Kotlin
bindings generate with `cargo run -p mobile-api --features bindgen --bin
uniffi-bindgen`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 00:43:54 +03:00