frontend(store): rework store/sync and API client, add service tests

This commit is contained in:
Andras Schmelczer 2026-05-31 10:49:26 +01:00
parent d50aa53a73
commit 85d565ba7b
7 changed files with 636 additions and 150 deletions

View file

@ -9,6 +9,8 @@ export interface Block {
tag: string;
description: string;
is_done: boolean;
/** How many squares this block draws in the tower (>= 1). */
difficulty: number;
created_at: number;
}
@ -38,7 +40,7 @@ export type SaveStatus =
| 'saving'
| 'saved'
| 'retrying'
| 'error' // generic / network — will keep trying
| 'too-large' // 413 — payload exceeds the server cap, won't retry
| 'error' // generic / network — retries exhausted until the next mutation
| 'too-large' // 413 — payload exceeds the server cap, will not retry
| 'rate-limited' // 429 — will retry after Retry-After
| 'invalid'; // 400 — server rejected the body, won't retry
| 'invalid'; // 400 — server rejected the body, will not retry