Two fixes from contour testing of the offline-in-game UX:
- The dictionary word check was unusable offline (Check button disabled) when the
panel was reached while already offline: CheckScreen fetched the variant + pinned
version over the network in onMount, which fails offline, leaving the default
variant so input sanitising stripped every letter. Seed both from the cached game
(present once the board has opened) so the input and the on-device dawg fallback
work without a round-trip; the network refresh still runs when online and on a
cold deep-link.
- The resign and chat controls were only functionally disabled (chat) or not gated
at all (resign) offline, so they still looked active. Hide both while offline,
matching the frozen social controls.
Tests: the in-game offline e2e now asserts the drawer action icons are hidden (not
disabled); a new e2e guards the offline dictionary flow. Docs updated.
CheckScreen's static import of dict/check pulled the dawg loader/reader into the app
entry bundle, pushing it 0.8 KB over the 130 KB budget (CI bundle-size gate). The
dict subsystem is lazy everywhere else, so import localWordCheck dynamically in the
offline branch — it loads only when an offline check actually runs. Main entry back
to 129.0 KB.
When an online game loses the connection the game screen now says so and freezes
instead of silently greying out: a "connection lost" banner appears and the rack,
the move controls, the add-friend/block controls and the chat/dictionary entry all
disable (a started move stays a draft, committed by the player on reconnect). It is
driven off the net-state machine (netState.offline), so it also covers the
Telegram/VK mini-apps, where a lost connection was previously mute in-game.
If the player is already in the dictionary when the drop happens, the word check
falls back to the game's pinned on-device dictionary (exact when that dawg is
cached; "unavailable offline" otherwise) and the network-only complaint + external
look-up hide. Chat, when already open, keeps its existing read-only degrade
(send/nudge disable). New pure helper localWordCheck is unit-tested; the in-game
gating gets an e2e.