Regalia v1.0.8 #24
YDW99
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What's Changed
Full Changelog: v1.0.7...v1.0.8
Regalia v1.0.8 — Personified Chess, Reimagined ♔
versionCode 108·versionName 1.0.8· 30 development phases (Phase 22 → Phase 51)🎯 What's New in v1.0.8
This is the biggest release in Regalia's history. v1.0.8 completely redesigns the move-animation and sound system around a single idea: every piece has a personality. A pawn shouldn't sound or move like a queen. Combined with full light/dark theme support and the Stockfish 18
arm64-v8a-dotprodengine, v1.0.8 is both the most expressive and the most robust version ever shipped.✨ Headline Features
if/else ifchain) — never a muddy double-buzz.UiModeManager+ JSdata-theme+ CSSprefers-color-scheme). Light mode uses an elegant silver palette; dark mode keeps the warm brown-red + bright gold. The ♔/♚ king icon flips to match the on-board pieces.arm64-v8a-dotprodvariant (ARMv8.6-A DOTPROD instructions for NN inference acceleration) — the strongest Stockfish build available for modern ARM devices.🎬 The Six Piece Personalities
Every piece now has a coherent animation + sound + haptic triad designed to feel like that piece's "character."
🛡️ Robustness & Stability
v1.0.8 went through 5 independent first-principles code reviews (Phase 24, 28, 30, 46, 49), culminating in a 5-parallel-subagent audit of all ~27,000 lines. Every "避坑" (pitfall-avoidance) item is verified correct.
Bug fixes that mattered (Phase 49 highlights)
Kxg1with the king on f1) was silently destroying pieces. Fixed with an empty-destination guard.importPGNdata-loss on malformed[FEN]— an invalid FEN tag destroyed all persisted review evals across all games and corrupted the Chess960 mode, even though the import failed. Fixed by validatingstartStatebefore any side effects.onHintMoveapplied to the wrong position — if you moved between requesting a hint and the engine responding, the stale hint landed on the new position. Fixed with anisHintLoadingstaleness guard mirroringonBestMove's pattern.new Worker(url)failures leaked the Blob URL forever. Fixed by hoistingurland revoking on failure.The button-width saga (Phase 44 → 50)
A single UI bug — compact buttons stretching to full row width — survived seven fix attempts before the true root cause was found:
width: fit-contentflex: 0 0 auto.btn-compact+!importantflex.btn-compactto click selector.btn-rowopts out of the grid transformLesson: When
flexproperties have no visible effect, check whether the parent is secretly a CSS Grid.🔧 Phase 51 — Three Final Fixes
After the button-width fix, three remaining issues were addressed:
1. PGN round-trip castling failure (HIGH)
Symptom: A game exported as PGN and re-imported would silently drop moves after any castling move (O-O / O-O-O). For example, a game ending
6.O-O O-O 7.Re1 a6would import as6.O-O O-O 7. _ a6— theRe1move vanished.Root cause:
pseudoMoves()attaches thecastleflag to thetoobject ({row, col, castle}), andlegalMoves()builds the full move as{from, to:{row,col,castle}, piece}. Somv.castle(top-level) isundefinedfor moves fromlegalMoves(). The UI path (executeMove) copies the flag tomv.castlebefore callingmakeMv, but the PGN-replay path (_applySANMove) callsmakeMvInPlacedirectly —mv.castlewasundefined, so_castleSide()fell through to a heuristic that read the wrong board state. Result: castling only moved the king, not the rook. Subsequent rook moves failed to parse.Fix:
_castleSide()now checks bothmv.castle(top-level, set byexecuteMove) andmv.to.castle(set bypseudoMoves). Verified: full Italian Game round-trips perfectly.2. Move-classification label: "Book" → "Mediocre"
The review-mode move classification label for near-equal moves (eval delta < 50cp) was "Book"/"开局库". Changed to "Mediocre"/"平常" per user request — "Book" was misleading (it doesn't mean the move came from an opening book). The CSS class
.bookis unchanged.3. Eval-chart dark-mode line invisibility
The review eval-trend chart's negative-eval line color (
--chart-fill) was#1A1A2E(near-black) in dark mode — invisible against the#1a0a0abackground. Changed to#5dade2(light blue) for dark mode, clearly visible and hue-distinct from the positive-eval line (#E8E8F0light cream). Light mode unchanged.📱 Xiaomi HyperOS 3 Compatibility
Regalia is tested on Xiaomi HyperOS 3 and hardened against its aggressive process management:
EngineServicekeeps the Stockfish subprocess alive when the app goes to backgroundprefers-color-schemealone is unreliable on HyperOS 3, so we also readUiModeManageron the Java side and mirror it to adata-themeattributeonRenderProcessGonerecovery♟️ Full Feature List
Click to expand the complete feature list
Engine & Play
arm64-v8a-dotprodnative build (ARMv8.6-A DOTPROD for NN acceleration)UCI_Chess960optionPGN & Analysis
[%eval]/[%clk]/[%emt]annotations$1–$19NAGs; auto-cached[%csl]highlights +[%cal]arrows[%clk]UI / UX
StabilizationHelper)clamp()+vwscalingenv(safe-area-inset)support📥 Download & Install
APK
Download
Regalia-v1.0.8-release.apkfrom the Releases page.Source Code
The source tarball
Regalia-v1.0.8-src.tar.gzcontains the complete source minus the Stockfish engine binary (to keep the tarball small — the 114 MB engine is downloadable separately). SeeBUILDING.mdin the repo for build instructions.Documentation
Self-contained HTML user manuals are included:
Regalia-v1.0.8-manual-en.html— EnglishRegalia-v1.0.8-manual-zh.html— 中文Each contains wireframe diagrams of every screen, a full feature walkthrough, and a complete version changelog (newest-to-oldest).
📜 Licensing
Regalia is a combined work under dual licensing:
libstockfish.so)Per GPL v3 Section 13, these licenses are compatible for combination. Since AGPL v3 imposes stricter network-interaction provisions, its obligations effectively extend to the entire combined work.
Third-Party Attribution
See
NOTICEfor the full, file-by-file license classification.🏗️ Build From Source
Prerequisites: JDK 21, Android SDK (API 35, Build-Tools 34.0.0, NDK 27.2.12479018, CMake 3.22.1), Gradle 8.11.1 (wrapper included).
🔬 Development Phases (Phase 22 → 51)
v1.0.8 evolved through 30 development phases. Here's the arc:
Full Phase-by-Phase Changelog
Phase 51 — Three final fixes: (1) PGN round-trip castling failure —
_castleSide()now checksmv.to.castle(set bypseudoMoves) in addition tomv.castle(set byexecuteMove); the PGN-replay path was callingmakeMvInPlacedirectly with a move object whose top-levelcastleflag was undefined, so castling only moved the king and subsequent rook moves failed to parse. (2) Move-classification label "Book"→"Mediocre" / "开局库"→"平常". (3) Eval-chart dark-mode negative-eval line color#1A1A2E(invisible) →#5dade2(light blue).Phase 50 — Button-width TRUE root-cause fix:
.btn-rowopts out of the portrait grid transform. The buttons were grid items, not flex items — which is why every flex-based fix (Phase 44/47/48/49) failed.Phase 49 — Comprehensive 5-parallel-subagent review: 6 bugs (Chess960 king-capture, importPGN data-loss, onHintMove staleness, Blob URL leak, PGN comment truncation, heatmap cache collision), 12 robustness hardenings (parseInt radix, HapticManager re-init, volatile fields, ChessApp stack-trace sanitization, chmod zombie cleanup), redundancy removal (dead
lastRec.variation, dead CSS rules, dead worker round-trip), and NOTICE/README.license license-classification reconciliation.Phase 48 —
.btn-compactCSS class with 7!importantdeclarations.Phase 47 — Inline
display:inline-flex;flex:0 0 auto;width:auto.Phase 46 — Sound-haptic decoupling (sound = independent
if, haptic = exclusiveif/else if);importPGNAsyncsuccess detection viagameStatereference comparison.Phase 45 — Fixed Phase 44's sed-eaten closing quote.
Phase 44 —
width:fit-content(ineffective in WebView flex).Phase 43 —
♻️ Reset BoardseedssetupCastleMarks; Phase 38-42 redundancy cleanup.Phase 42 —
_exitSetupImplcastle-rights re-validation root cause.Phase 41 — Haptic/sound matching audit; single-haptic-per-turn invariant; CASTLE/PROMOTION throttle entries.
Phase 40 —
computeVisibleCastleMarks/computeVisibleEpMarkchecksetupModeflag.Phase 39 — PGN cache "Tagged"/"Untagged" filter buttons; engine config compact layout.
Phase 38 — PGN cache horizontal button layout;
getCapturedPiecesempty-on-no-history.Phase 37 — Final license classification (6 files → AGPL v3, 3 files → GPL v3).
Phase 36 — GPL v3 reclassification (partially reverted by Phase 37).
Phase 35 — Phase 34 robustness:
terminateWorkerPoolrejects pending + queued.Phase 34 — Worker-pool officially enabled for async PGN import.
Phase 33 —
isDeadPositionknight-guard; 42 stale comments cleaned.Phase 32 —
_escJsXSS fix;StabilizationHelperdt; worker-pool queue cap; parseInt radix.Phase 31 —
getCtrlMaphidden-class stabilization; ECO pre-indexing.Phase 30 — 2 high + 8 medium bugs (XSS hardening, dead code, header consistency).
Phase 29 — Setup ⚡ normalization; castle sound/haptic redesign; light-mode contrast; Safe Browsing;
onRenderProcessGone; 6-step WebView destroy.Phase 28 — 8 bug fixes (
_reattachActiveAnimations, pawn-rank formula,_checkPVDivergencefield name, Chess960 FEN corruption, stats dark palette, heatmap cache, PWLE fallback, landscape safe-area).Phase 27 — Knight / bishop / rook dedicated haptics; all six pieces now have personality.
Phase 26 — Personified animation/sound/haptic upgrade; notch adaptation; shake/anti-shake coexistence; landscape board shrink; Worker race fix.
Phase 25 — Worker-pool rewrite (N workers, Blob-URL, 30s timeout, taskId map).
Phase 24 — First-principles review: 7 subagents, ~135 issues, 21 bug fixes, dead worker-pool.js removed.
Phase 23 — ⚡ marker CSS selector fix; WAAPI overlay retention; Stockfish 18 dotprod.
Phase 22 — Full move-animation + sound redesign; light mode.
🙏 Acknowledgements
Regalia stands on the shoulders of giants:
📊 Stats
Source code: https://github.com/YDW99/Regalia
Regalia v1.0.8 — where every piece has a soul. ♔
AI-GEN
This discussion was created from the release Regalia v1.0.8.
All reactions