feat: on-device move preview (local eval) with network fallback
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 15s
CI / ui (pull_request) Successful in 58s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m17s
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 15s
CI / ui (pull_request) Successful in 58s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m17s
Score and validate a tentative move on-device instead of a per-arrangement network
round trip. The dawg reader and the validate/score/direction slice of the
scrabble-solver engine are ported to TypeScript (ui/src/lib/dict), pinned
byte-for-byte to the Go engine by a `conformance` CI job (full-dictionary reader
parity plus a battery of plays across every variant and both cross-word rules,
including the inferred orientation). The server stays authoritative — submit_play
re-validates — so the local result is an advisory accelerator only.
- backend: Registry.DictBytes + an authed GET /api/v1/user/dict/{variant}/{version}
(immutable) streaming the pinned per-game dawg; caddy routes /dict to the gateway.
- gateway: a session-gated /dict edge route proxying it; fetchDict on the transport.
- client: the dictionary loads on game open (low priority so it never starves the
game on a slow link; aborted at a 5s cap or when leaving the game), is cached in
IndexedDB (best-effort, self-healing on a rejected blob) and reused across
sessions; a warm-up overlay covers a cold load, then the network preview is the
fallback; a bad-connection breaker stops warming after repeated misses; the move
preview cancels its in-flight request when the tiles change.
- parity generators backend/cmd/{dictgen,validategen} + gated Vitest suites, run in
CI against the release dictionaries. A hidden debug readout lists the cached
dictionaries + breaker state, and its reset clears the cache.
- docs: ARCHITECTURE §5, TESTING, UI_DESIGN, FUNCTIONAL (+ru).
This commit is contained in:
@@ -427,6 +427,20 @@ enabled on the first, uncached load) and flip in place when an event refreshes t
|
||||
raises a badge on the lobby ⚙️ tab (combined with the friend-request count) and a "1" on the
|
||||
Info tab.
|
||||
|
||||
## Dictionary warm-up overlay (`components/DictWarmup.svelte`)
|
||||
|
||||
Opening a game whose local move-preview dictionary is not yet cached shows a brief,
|
||||
non-dismissable warm-up overlay while it downloads (a returning player's cached
|
||||
dictionary loads from IndexedDB in a few ms, so the flash-guard suppresses it then).
|
||||
A darker-than-onboarding scrim covers
|
||||
the board; centred on it, a large emoji cycles through a fixed playful sequence — one
|
||||
per 500 ms tick (300 ms still, then a 200 ms clockwise spin with the current glyph
|
||||
fading out and the next fading in), looping — under a constant "Loading…" caption.
|
||||
Reduce-motion drops the spin to a plain cross-fade. A ~120 ms flash-guard suppresses
|
||||
the overlay for a disk-cached dictionary that loads in a few ms; a cold (network) load
|
||||
shows it until the dictionary is ready or a 5 s cap elapses, after which the preview
|
||||
falls back to the network. See docs/ARCHITECTURE.md §5 (the local eval).
|
||||
|
||||
## Caveat
|
||||
|
||||
Emoji are rendered by the platform's system emoji font, so their exact look varies across
|
||||
|
||||
Reference in New Issue
Block a user