Update in-app Guide for this session's features, extend passing purge to Clear data
The in-app Guide page hadn't been updated for the guided practice exercises, their mobile self-service controls, the end-of-practice summary, or the new Resultatarkiv view - none of it was documented anywhere a user would find it. Added three new Training walkthrough steps and a new Resultatarkiv section (overview card + 5-step guide). While correcting guide text that claimed raw SQLite passing rows are always retained, found the same gap the results-archive work already fixed for deleting a single event/session also applies to "Rensa data" (Settings -> Clear data): the drivers/cars/races/all-competition-data scopes all reset resultsBySession for every current session, not just ones tied to the cleared scope, so every session's raw rows became orphaned at once. clearDataScope now purges those sessions' rows too, through the same /api/passings/purge endpoint. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,8 +128,12 @@ Implemented 2026-09-09.
|
||||
|
||||
Verified 2026-09-09: unit tests (`tests/server_persistence.integration.test.js`) cover the purge endpoint (scoped deletion, an unrelated session's rows untouched, empty-input no-op) and (`tests/race_timing_logic.test.js`) a real bug found while building this: `ensureSessionResult` guarded `adjustments`/`splits`/`pitEvents`/`pitStops` against being missing on an already-existing result (e.g. an older/imported race package) but not `passings` itself, so opening a session's lap-history detail crashed outright for any such result - now guarded the same way as the other four. A full headless-browser run against an isolated temp SQLite instance seeded a finished session with two competitors and a penalty, confirmed all four filters (search, class, driver, date) correctly include/exclude it, confirmed the detail panel shows standings/penalties/lap-history correctly, and confirmed deleting the event through the real Events UI actually purges its session's raw passing rows from SQLite end to end.
|
||||
|
||||
Extended 2026-09-09: while updating the in-app Guide page to document this session's new features (see Documentation maintenance below), found that "Rensa data" (Settings -> Clear data) for the `drivers`/`cars`/`races`/`all` scopes has the exact same gap the "define what remains after deleting a race" bullet above already fixed for individual event/session deletion - all four scopes reset `resultsBySession` for every current session, not just ones tied to the cleared scope, so every session's raw passing rows became orphaned at once. `clearDataScope` now purges those same sessions' rows too, using the same `/api/passings/purge` endpoint. Verified with a headless-browser run: clearing race data through the real Settings UI empties `resultsBySession` and confirms the raw passing rows for the affected session are gone from SQLite afterward.
|
||||
|
||||
## 5. More natural race speech
|
||||
|
||||
Deferred 2026-09-09 at the user's request - requires a paid third-party neural TTS provider (API account/credentials) the user hasn't chosen yet, unlike everything else on this list. Revisit once a provider is picked.
|
||||
|
||||
- [ ] Optional backend-generated neural speech.
|
||||
- [ ] Cache announcements and driver names before race day.
|
||||
- [ ] Keep credentials on the backend, outside exports and public responses.
|
||||
@@ -139,6 +143,8 @@ Verified 2026-09-09: unit tests (`tests/server_persistence.integration.test.js`)
|
||||
|
||||
## 6. Permissions and mobile Race Control
|
||||
|
||||
Deferred 2026-09-09 at the user's request - the largest remaining item, on par with or bigger than the full optimistic-locking rework already deferred under section 2. Today there is no login or authorization at all: anyone reaching the server on the network has full admin access. Building this needs an identity system that doesn't exist yet (no user accounts, no sessions), server-side authorization on every mutating endpoint (not just hiding UI controls), and a genuinely new "compact mobile Race Control" surface (start/stop, track call, flags, next heat) - plus a real decision on how login should work in practice on a shared trackside laptop (PIN codes per role? named accounts? offline/LAN-only requirement?) before any of it can be designed, let alone built. Revisit as its own dedicated design conversation.
|
||||
|
||||
- [ ] Define Admin, Race Director, Speaker and Read-only capabilities.
|
||||
- [ ] Enforce permissions on server endpoints, not only in the UI.
|
||||
- [ ] Keep public overlays and training links restricted.
|
||||
@@ -150,5 +156,6 @@ Verified 2026-09-09: unit tests (`tests/server_persistence.integration.test.js`)
|
||||
- [ ] Update the architecture's module/dependency inventory as modules change.
|
||||
- [ ] Complete state/settings/SQLite contracts and critical form-to-controller mappings.
|
||||
- [x] Consolidate older future-work notes so this file remains the primary roadmap.
|
||||
- [x] Update the in-app Guide page for this session's shipped features. Added three new "Träningsstatistik" steps (guided-exercise config, mobile self-service, the end-of-practice summary) and a new "Resultatarkiv" section (overview card + 5-step walkthrough); corrected `guide.sqlite_2`/`_6`, which claimed raw SQLite passings are always retained - no longer true now that deletion/clear-data purges them. Verified 2026-09-09 with a headless-browser check confirming the new content renders as real translated text (sv), not raw `guide.*` keys.
|
||||
|
||||
Consolidated 2026-09-09: the raw "Träningsstat" brainstorm notes (Pyramiden, Konsistens-jakten) were folded into section 3's "Guided practice exercises" as a proper specification and removed from here.
|
||||
Reference in New Issue
Block a user