Parent
#196 — PRD: Angular web client for SubVora (parity minus reminders)
What to build
The settings screen's profile card: the signed-in email (read-only), the preferred (home) currency, and the default alert days that per-subscription alerts inherit. Changing the currency must invalidate the dashboard so totals refetch converted into the new home currency rather than sitting there wrong.
Implementation Steps
- API service —
core/api/users-api.service.ts with getMe() and updateMe({ preferredCurrency, defaultAlertDaysAdvance }), both typed to UserProfile.
- Store —
features/settings/settings.store.ts: profile signal, load(), saveProfile(); failures via the write-failure mapper.
- Screen —
features/settings/settings.component.ts with a profile card: email shown but disabled, currency select over the ISO-4217 list from slice 6, default alert days (blank allowed, otherwise 1–365). Lazily-loaded /settings route behind authGuard, linked from the shell nav.
- Invalidate dependents — after a successful currency change, clear the dashboard store's cached burn rate so the next visit refetches; if the dashboard is the active screen, reload it immediately.
- Spec —
settings.store.spec.ts: a save sends both fields and updates the profile signal; blank alert days is sent as null, not 0; a currency change invalidates the dashboard; a 400 maps onto the right control.
Agent Routing
agent_routing:
complexity_hint: easy
required_capability: balanced
parallel_safe: true
cost_preference: low
speed_preference: balanced
ownership_scope:
- src/SubVora.Web/src/app/core/api/users-api.service.ts
- src/SubVora.Web/src/app/features/settings/**
- src/SubVora.Web/src/app/app.routes.ts
verification:
- cd src/SubVora.Web && npx ng test --no-watch
Technical Context Snapshot
Current stack in scope
- UI: Angular (20+) standalone components with signals and built-in control flow, Angular Material (Material 3) as the only component library, SCSS. Static SPA — no SSR, no service worker.
- State: signal-backed injectable stores, one per domain area, mirroring the MAUI ViewModel split in
src/SubVora.Mobile/ViewModels one-to-one. No NgRx.
- API access: hand-written models plus one service per API controller under
src/SubVora.Web/src/app/core/api. Enums travel as JSON strings (JsonStringEnumConverter in Program.cs), so TypeScript string-literal unions are exact.
- Backend consumed unchanged: ASP.NET Core
net10.0, /api/v1/, JWT bearer in the Authorization header, tokens in JSON bodies (no cookies).
- Tests: Angular CLI unit-test builder (Vitest runner; Karma is deprecated) with
HttpTestingController. Stores, interceptors, mappers and utils only — no component-DOM or browser automation.
Dependencies in scope
- Reuse:
@angular/*, @angular/material, rxjs, and the utilities already added under src/SubVora.Web/src/app/core. No chart library, no date library, no HTTP wrapper library.
- New dependency additions allowed for this slice: no. If a dependency looks unavoidable, stop and raise it on the issue rather than adding it.
Architecture alignment
- Preserve the repo's load-bearing rules (CLAUDE.md): burn-rate maths is server-side and counts cycles, never days; currency conversion is a read-time projection and stored amounts are never overwritten; nothing advances
next_billing_date on a timer; provider matching stays one SQL query; the mobile SQLite cache stays a read-only mirror.
- There is deliberately no shared DTO project. Web models mirror the API's JSON contract by convention — a contract change means editing both sides.
create-git-issue provides routing hints only and assigns no concrete agent or model.
run-with-it remains the final runtime routing authority.
Integration touchpoints
- Consumes GET and PUT /api/v1/users/me returning { id, email, preferredCurrency, defaultAlertDaysAdvance }.
- Mirrors UpdateUserProfileRequestValidator: currency required, 3 characters, valid ISO-4217; default alert days null or 1-365.
- The preferred currency is the home currency the server converts dashboard totals into, so changing it changes every total.
- This default does not change any subscription's own alert_days_advance override.
Acceptance criteria
Blocked by
Parent
#196 — PRD: Angular web client for SubVora (parity minus reminders)
What to build
The settings screen's profile card: the signed-in email (read-only), the preferred (home) currency, and the default alert days that per-subscription alerts inherit. Changing the currency must invalidate the dashboard so totals refetch converted into the new home currency rather than sitting there wrong.
Implementation Steps
core/api/users-api.service.tswithgetMe()andupdateMe({ preferredCurrency, defaultAlertDaysAdvance }), both typed toUserProfile.features/settings/settings.store.ts:profilesignal,load(),saveProfile(); failures via the write-failure mapper.features/settings/settings.component.tswith a profile card: email shown but disabled, currency select over the ISO-4217 list from slice 6, default alert days (blank allowed, otherwise 1–365). Lazily-loaded/settingsroute behindauthGuard, linked from the shell nav.settings.store.spec.ts: a save sends both fields and updates the profile signal; blank alert days is sent asnull, not0; a currency change invalidates the dashboard; a 400 maps onto the right control.Agent Routing
Technical Context Snapshot
Current stack in scope
src/SubVora.Mobile/ViewModelsone-to-one. No NgRx.src/SubVora.Web/src/app/core/api. Enums travel as JSON strings (JsonStringEnumConverterinProgram.cs), so TypeScript string-literal unions are exact.net10.0,/api/v1/, JWT bearer in theAuthorizationheader, tokens in JSON bodies (no cookies).HttpTestingController. Stores, interceptors, mappers and utils only — no component-DOM or browser automation.Dependencies in scope
@angular/*,@angular/material,rxjs, and the utilities already added undersrc/SubVora.Web/src/app/core. No chart library, no date library, no HTTP wrapper library.Architecture alignment
next_billing_dateon a timer; provider matching stays one SQL query; the mobile SQLite cache stays a read-only mirror.create-git-issueprovides routing hints only and assigns no concrete agent or model.run-with-itremains the final runtime routing authority.Integration touchpoints
Acceptance criteria
null.Blocked by