# 2CHESS independent browser mirror — version 0.6.1, 2026-10-30

This is an independent, limited deployment of Lichess client-side tools, not the official Lichess service.

Lila UI and server templates: Copyright the Lichess contributors, GNU Affero General Public License v3 or later.
Frontend source: https://github.com/lichess-org/lila/tree/0394ab752795c60102e56b4dd57746faa7c73a0d
HTML templates: https://github.com/lichess-org/lila/tree/b551752d2a0e7a63459d9812825d95a633a98737
Chessground: https://github.com/lichess-org/chessground (GPL-3.0-or-later).
Chessops: https://github.com/niklasf/chessops (GPL-3.0-or-later).
Stockfish Web: https://github.com/lichess-org/stockfish-web (GPL-3.0-or-later, package 0.5.0).
Third-party assets retain their respective upstream licenses; see the pinned lila repository COPYING.md and public asset directories.

Changes by 2CHESS: self-host asset URLs; disable WebSocket connection and pending send queue in lib.UPGSM6ER.js; restrict engine list in lib.W5OCLUYF.js to bundled SF19 Smallnet and Fairy Stockfish HCE; adapt FEN route initialization; add independent-site notice and feature status page. All adapter code is AGPL-3.0-or-later. Exact replacements and checks are published in /source/build.mjs. Original asset hashes are published in /source/assets-lock.json.

This release includes no Lila server or account database. Account authentication, network games, tournaments, cloud studies, the full Lichess puzzle database, full online opening explorer, tablebases and cloud analysis are unavailable. Local studies, offline games, basic puzzles and a curated opening sample are implemented independently by 2CHESS. The UI has no Lichess password collection. No original service cookies or account data are included.

Rebuild: Node.js 24; run `npm install && node build.mjs` with the supplied snapshots and lockfile. The build downloads public immutable resources from lichess.org and verifies all SHA-256 values before publishing. MIRROR_ASSET_CACHE may point to a local cache instead. See vercel.json for hosting headers and routes.

Additional compatibility changes: prevent the lightweight asset manifest from overwriting the initialized loader; disable the original push service worker; save appearance preferences in local browser storage; limit language selection to the bundled Russian translations. Full adapter, captured templates and build manifest are downloadable as /mirror-source.zip.

## New standalone tools in the 2CHESS mirror (October 29, 2026)

Local two-player games, browser-based computer games, clocks, moves, promotion, FEN/PGN export and local game archive (`/play.js`, `/play.css`). The optional local computer engine reuses the bundled Fairy Stockfish 14 WebAssembly runner, with corrected self-hosted worker URL; if unavailable, the game falls back to a clearly lower-strength local search. Local studies (`/study-local.js`, `/study-local.css`) save PGN chapters and per-move notes in the user's browser, with no cloud synchronization. These tools are created as independent additions, not copies of Lichess backend services.

The standalone move generator and PGN implementation use chess.js 1.4.0 by Jeff Hlywa, licensed under BSD-2-Clause; a verbatim copy of its license is published at `/vendor/chess-LICENSE.txt` and chess.js source at `/vendor/chess.js`. See https://github.com/jhlywa/chess.js. The 2CHESS adapter and additional tools are provided under AGPL-3.0-or-later; source files are available under `/source/` (including `play.js`, `study-local.js`, `engine-worker.js`, `build.mjs` and CSS). The `/mirror-source.zip` archive contains the complete adapter source of version 0.6.1, captured HTML templates, tests, asset checksums and build instructions. Public immutable upstream assets are downloaded and verified during build.

## UI fidelity update (October 29, 2026)

To preserve upstream visuals, the public lobby, study catalog, training page, opening catalog and PGN import form are taken from the current Lichess HTML/CSS templates on October 29, 2026, pinned for reproducible builds and retained as captured source in `/source/captured-native/`. The local adaptation in `/source/native.js` disables server-dependent controllers and wires local functions without replacing the original page layout. `mirror.js` no longer substitutes the upstream Lichess brand or injects new custom top-menu entries. Additional standalone functionality (game and local study editor) remains under its own `/play/computer`, `/play/local`, and `/study/local` routes. These standalone routes are not represented as pixel-identical Lichess game pages.

Version 0.5.2: native Lichess page-specific CSS assets that are absent from the original immutable asset lock are now copied from their upstream content-hashed URLs during build. Their SHA-256 digests and byte counts are published as `/source/captured-native-assets.json`. This closes missing-stylesheet regressions in the lobby, puzzle, and opening pages.

## Version 0.6.0

All native-page captures are now pinned in `native-snapshots/`, and their styles in `assets-lock.json`. Builds run only the shared, pinned upstream site shell on these pages, removing backend page controllers and using the compatible manifest. This prevents missing scripts and duplicate form handlers after upstream deployments.

PGN imports and local study chapters use Lichess's original analysis board, PGN parser and variation tree. Studies preserve notes keyed by FEN and save before switching chapters. Opening cards use 25 complete legal lines and local name/ECO search, with no copied popularity/win statistics. Puzzle training includes 48 verified positions, including board symmetries of 8 original seed positions; any legal mating solution is accepted, revealed solutions do not count as solved. Puzzle themes and dashboard show actual local progress.

Game controls use original site button styles, board textures, pieces and sound preferences. FEN games, PGN results, engine cancellation and full-game analysis were repaired. All links pass through an explicit availability policy; missing account/network functions are visibly disabled. The original main 2CHESS site is unaffected.

Verification: `npm install` then `npm test` runs DOM/unit integration tests without a browser. This does not replace visual or real-browser verification. Build: `npm run build`. Node.js 24 is required. The source archive excludes user data and credentials.

## Version 0.6.1 (October 30, 2026)

Restores puzzle-board geometry and keyboard-operable squares. Fixes first-move clock increments, elapsed-time restoration, per-mode game persistence, custom FEN restoration and move numbers, terminal positions, and archive navigation that preserves active games. Adds debounced study autosave, validates chapter indexes consistently and keeps the full local study catalog. Removes unavailable lobby cards and improves opening-card labels. Tests cover these regressions.

Computer play resumes after returning through browser history and falls back safely if its worker fails during calculation. Study editor sessions dispose obsolete observers and retain the last PGN during native analysis redraws, preventing stale autosaves from replacing the active chapter.
