Stage 17 #2: Connecting indicator + auto-retry (no more red toasts) #29

Merged
developer merged 4 commits from feature/connecting-indicator into development 2026-06-09 05:46:43 +00:00
Owner

Replaces the red "Connection problem / Retrying…" toast with connectivity state.

Indicator: a global online signal (lib/connection.svelte.ts) flips on a transport unavailable / rate_limited (and on the live stream's drop), and the header swaps its title for a pure-CSS spinner + "Connecting…" (an arc with a gap, no bundled graphics). The in-game server actions (commit / exchange / pass / hint) soft-disable; local board / rack / reset stay live.

Auto-retry (your choice): exec retries with capped exponential backoff — every op on a rate-limit (rejected before processing → safe), reads only on unavailable. A mutation is never blindly re-sent on a dropped connection (its response could have been lost after the backend applied it) — its button is disabled while offline and you re-issue it on reconnect. The idempotency caveat you accepted.

Recovery: a reachability watcher (profile.get probe) and any successful traffic clear the signal. A server-data screen (profile/stats/friends) still opens with the spinner and fills on reconnect (global indicator + read auto-retry) — navigation is never dead, matching your "open with spinner" pick.

Tests: pure retry policy unit-tested (retry.ts); a mock-only window.__conn hook drives a Chromium+WebKit e2e (indicator shows offline, action disables, both clear on reconnect). Full e2e suite (72) + unit (121) + build green.

Also records #1 as investigated → no change (the bot already drains every delivered update; you chose to leave allowed_updates at the default).

Note: other server-action buttons (chat send, profile save, …) are not yet visually disabled but degrade to a safe no-op offline (suppressed toast + indicator). Easy to extend if you want them greyed too — say the word.

Replaces the red "Connection problem / Retrying…" toast with **connectivity state**. **Indicator:** a global `online` signal (`lib/connection.svelte.ts`) flips on a transport `unavailable` / `rate_limited` (and on the live stream's drop), and the header swaps its title for a **pure-CSS spinner + "Connecting…"** (an arc with a gap, no bundled graphics). The in-game server actions (commit / exchange / pass / hint) **soft-disable**; local board / rack / reset stay live. **Auto-retry (your choice):** `exec` retries with capped exponential backoff — **every op on a rate-limit** (rejected before processing → safe), **reads only on `unavailable`**. A mutation is **never blindly re-sent** on a dropped connection (its response could have been lost after the backend applied it) — its button is disabled while offline and you re-issue it on reconnect. The idempotency caveat you accepted. **Recovery:** a reachability watcher (`profile.get` probe) and any successful traffic clear the signal. A server-data screen (profile/stats/friends) still **opens with the spinner** and fills on reconnect (global indicator + read auto-retry) — navigation is never dead, matching your "open with spinner" pick. **Tests:** pure retry policy unit-tested (`retry.ts`); a mock-only `window.__conn` hook drives a Chromium+WebKit e2e (indicator shows offline, action disables, both clear on reconnect). Full e2e suite (72) + unit (121) + build green. Also records **#1** as investigated → **no change** (the bot already drains every delivered update; you chose to leave `allowed_updates` at the default). Note: other server-action buttons (chat send, profile save, …) are not yet visually disabled but degrade to a safe **no-op** offline (suppressed toast + indicator). Easy to extend if you want them greyed too — say the word.
developer added 1 commit 2026-06-08 23:48:34 +00:00
Stage 17 #2: Connecting indicator + auto-retry, instead of red toasts
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 36s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 55s
ef61b778fc
Connectivity failures become state, not a toast on every attempt. A global online
signal (lib/connection.svelte.ts) flips on a transport unavailable / rate_limited and
on the live stream's drop, driving a pure-CSS header spinner + 'Connecting…' in place
of the title and softly disabling the in-game server actions (commit / exchange / pass
/ hint; local board/rack/reset stay live).

- transport: exec auto-retries with capped exponential backoff — every op on a
  rate-limit (rejected before processing, safe), reads only on unavailable (a mutation
  is never blindly re-sent, to avoid double-applying one whose response was lost; its
  button is disabled while offline so the player re-issues on reconnect). A reachability
  watcher (profile.get probe) and any successful traffic clear the signal.
- the old red error.unavailable toast is gone (handleError suppresses connection codes;
  the indicator replaces it). A server-data screen still opens with the spinner and
  fills on reconnect (global indicator + read auto-retry), so navigation is never dead.
- pure retry policy unit-tested (retry.ts); a mock-only window.__conn hook drives a
  Chromium+WebKit e2e (indicator shows offline, the action disables, both clear on
  reconnect). Full suite + build green.
- docs: ARCHITECTURE transport note, FUNCTIONAL (+ _ru), PLAN tracker (incl. #1 — the
  bot already drains all updates, no change).

Also records #1 as investigated/no-change in PLAN. Other server-action buttons (chat
send, profile save, …) still degrade to a safe no-op offline; visual disable is easy to
extend.
developer added 1 commit 2026-06-09 05:23:34 +00:00
Stage 17 #2: extend the offline soft-disable to all server-action buttons
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 35s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m6s
efa1d0bd22
Following the in-game bar, the Connecting indicator now also visually disables the
other proactive (server-sending) controls while offline: chat send + nudge, profile
save / link email|telegram / merge-confirm, friends (redeem, get-code, accept/decline,
unfriend, block, unblock), New Game (auto-match variant + send-invitation) and the
lobby hide . Purely local controls (board/rack/reset, menus, navigation, settings,
copy-code) stay live. Each reads the global connection.online signal; full e2e + check
green.
developer added 2 commits 2026-06-09 05:42:48 +00:00
A dropped/reset/timed-out connection can surface as a Connect code other than
Unavailable (Canceled/DeadlineExceeded/Unknown/…) which fell through to the generic
'internal' -> a red 'something went wrong' toast appeared alongside the Connecting
spinner. Now toGatewayError (moved to the pure retry.ts, unit-tested) collapses every
transport-level code to 'unavailable' so it is retried + flips offline; and handleError
suppresses the toast for any connection code AND whenever the app is mid-reconnect
(!connection.online), covering the race where a unary error lands before the stream
reports the drop. Genuine server-internal / domain errors still toast while online.
Stage 17: cap display-name special characters at 5 (ui + backend)
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 35s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m3s
d87c0fb10b
display_name validation gains a rule: at most 5 special characters — the '.' / '_'
punctuation (spaces, which separate words, don't count) — so a still-well-formed name
can't be mostly punctuation. Mirrored in the Go ValidateDisplayName and the UI
validDisplayName; both unit-tested (5 ok, 6 rejected, 'J. R. R. Tolkien' ok). Docs:
FUNCTIONAL (+ _ru).
owner approved these changes 2026-06-09 05:46:02 +00:00
developer merged commit 265e442252 into development 2026-06-09 05:46:43 +00:00
developer deleted branch feature/connecting-indicator 2026-06-09 05:46:43 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#29