fix status and roadmap

This commit is contained in:
larssand
2026-09-08 17:26:55 +02:00
parent 9e6fe2386d
commit 443434d569
14 changed files with 401 additions and 8 deletions

View File

@@ -2652,3 +2652,12 @@ The application currently has no authentication or role model. Race-control soun
### 20.8 Tests
`tests/race_audio.test.js` covers normalization, language/event mapping, custom-file fallback, critical interruption, start-light order, random delay, and tone/timestamp callback order. Existing decoder, runtime persistence, audio fallback, race timing, and server integration suites remain the regression boundary.
## Reliability status and browser checks (2026-09)
- `src/sync_status.js` exports pure `getSyncStatus(backend, dirty, now)`. Its precedence is active writes, write failure, pending local changes, connection availability/staleness, then saved/connected. It does not mutate race state or initiate network calls.
- `src/runtime_services.js` records active state writes in `backend.pendingWrites`, keeps `writeError` distinct from contact status, records `lastSavedAt` only after a successful state POST, and records `lastLoadedAt` after applying a backend state response. A failed POST leaves local dirty/version tracking intact.
- Existing app-version polling reports server contact through an optional `onContact` callback. `src/app.js` updates `lastContactAt`/`connectionChecked` and renders status text once per second without rebuilding forms. Contact older than 15 seconds is stale. Decoder connectivity remains separate.
- `index.html` owns `syncStatus`, `syncStatusLabel`, `syncStatusDetail`, `syncStatusRetry`, and `syncWarning`. Retry uses the existing full-state POST when local changes or write errors exist. Successful full-state synchronization at the current local version clears the passing error too. Keep the page open when unsaved changes exist; this is not a new durable offline queue or a multi-controller conflict-resolution mechanism.
- `tests/sync_status.test.js` verifies status precedence and state-write failure/retry. `tests/browser_smoke.js` drives Chrome/Chromium/Edge over its local debugging protocol with Node's WebSocket API. It launches an isolated server using `RC_TIMING_DATA_DIR` and a temporary browser profile. `CHROME_PATH` overrides discovery. `RC_BROWSER_NO_SANDBOX=1` is an explicit opt-in for restricted test environments; normal runs keep the browser sandbox enabled.
- The browser suite covers register CRUD creation/editing (not deletion), drafts through two version polls, reload persistence, failed offline saves and retry. Session/team flows and CI platform coverage remain tracked in ROADMAP.md.