AEROSIM-TS-63
Save and restore supported preferences in the Web Application
Preference changes are saved for the active pilot and the last valid supported values are restored and applied after a later authenticated session.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-32
- Component
- Web Application — Persistence API client and preference state
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Add typed preference client calls, explicit save-state and failure feedback, authenticated startup retrieval, deterministic merge with defaults, and application of restored current settings. Concrete artifacts are applications/web/src/preferences/pilot-preferences.ts and applications/web/src/preferences/pilot-preferences.test.ts; ownership is limited to the listed artifacts and their focused verification.
Implementation contract
Implementation artifacts
- applications/web/src/preferences/pilot-preferences.ts
- applications/web/src/preferences/pilot-preferences.test.ts
Inputs
- Authenticated current-pilot profile and typed preference API client
- Supported local defaults and the persisted preference response
- User change to one supported setting plus save, logout, and later-login events
Outputs
- Preference changes are saved for the active pilot and the last valid supported values are restored and applied after a later authenticated session.
Failure boundaries
- Keep the last applied valid value when a save fails and show that persistence did not succeed
- Discard malformed server values, do not apply another pilot’s values, and clear pilot-bound settings on logout before defaults are restored
Excluded scope
- Treating unsaved browser state as the persisted preference source
- Synchronizing unsupported settings or preferences between pilots
Verification steps
- Run applications/web/src/preferences/pilot-preferences.test.ts against the exact implementation revision and retain the complete passing result.
- Exercise the positive contract with authenticated current-pilot profile and typed preference api client, then assert: Preference changes are saved for the active pilot and the last valid supported values are restored and applied after a later authenticated session.
- Exercise every negative boundary: Keep the last applied valid value when a save fails and show that persistence did not succeed; Discard malformed server values, do not apply another pilot’s values, and clear pilot-bound settings on logout before defaults are restored
Traceability
Dependencies
- AEROSIM-TS-62Canonical ID: TASK-0062
UI/UX applicability
non_visual
This Task owns technical or behavioral acceptance and does not claim direct visual conformance to the approved UI/UX package.
Acceptance evidence
Verified delivery: application PR #113 exact head 0843b1e005ebbd5c624324f4b0b891f0bf7b7a08 passed main-session review and all eight exact-head jobs in run 4129 attempt 2. Ten focused TASK-0063 tests passed, including save/restore across authenticated sessions, malformed response rejection, explicit save failure feedback, no unauthenticated writes, logout/default restoration, stale cross-pilot result rejection, and concurrent unsaved-change preservation. Merge revision 4988d3c83417a79fab28e9674a71798a1e48b88f passed integration, publication, and exact-revision validation in runs 4130 and 4131 attempt 2. Immutable Harbor tags for that revision were independently read back for Nebula and Singularity. Release completion verified on product 1.0.0.0 at GitOps revision 5d3712d89dfbf7dacd993348e55f497d126c7bf9 with Argo Synced/Healthy, exact image digests, authenticated API/database access, and three-world configured-flight acceptance.
Current evidence boundary
No current implementation, acceptance, release, or deployment evidence is claimed for this planned Task. Any prior implementation may be used only as prototype and discovery evidence.