AEROSIM-TS-59
Bootstrap the active pilot profile in the browser
After authentication, the Web Application loads and retains the profile linked to the active Keycloak subject and reuses it in later sessions.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-31
- Component
- Web Application — Profile and catalogue API client and pilot-session state
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Add the typed current-profile client, authenticated startup state, loading and recoverable-error handling, logout cleanup, and session restoration. The browser must not send or select a Keycloak subject or persist another pilot's profile as authoritative state. Concrete artifacts are applications/web/src/bootstrap-the-active-pilot-profile-in-the-browser.ts and applications/web/test/bootstrap-the-active-pilot-profile-in-the-browser.spec.ts; ownership is limited to the listed artifacts and their focused verification.
Implementation contract
Implementation artifacts
- applications/web/src/bootstrap-the-active-pilot-profile-in-the-browser.ts
- applications/web/test/bootstrap-the-active-pilot-profile-in-the-browser.spec.ts
Inputs
- Established authenticated browser session and current-profile API response
- Pilot-profile startup states: loading, ready, recoverable failure, signed out
- Session restoration and logout events
Outputs
- After authentication, the Web Application loads and retains the profile linked to the active Keycloak subject and reuses it in later sessions.
Failure boundaries
- Do not mark startup ready when the profile response is absent, malformed, or bound to a different session subject
- Clear the in-memory pilot profile on logout or session replacement; a cached profile cannot authorize later activity
Excluded scope
- Allowing the browser to choose or submit a Keycloak subject
- Using browser storage as the authoritative pilot-profile record
Verification steps
- Run applications/web/test/bootstrap-the-active-pilot-profile-in-the-browser.spec.ts against the exact implementation revision and retain the complete passing result.
- Exercise the positive contract with established authenticated browser session and current-profile api response, then assert: After authentication, the Web Application loads and retains the profile linked to the active Keycloak subject and reuses it in later sessions.
- Exercise every negative boundary: Do not mark startup ready when the profile response is absent, malformed, or bound to a different session subject; Clear the in-memory pilot profile on logout or session replacement; a cached profile cannot authorize later activity
Traceability
Dependencies
- AEROSIM-TS-58Canonical ID: TASK-0058
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 #70 reviewed head dd8cb326718e005c2c049aa1b73350c12a8d5917, exact-head required validation tasks 2273, 2274, and 2275 succeeded, merged as df17a52206a85c87627c2fc2290b0bc786bc116f; current integrated application head 79cf7ff67a72b65a89854382e147ef9bda664cbf passed required validation task 2322, publish task 2318, and validate task 2319. 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.