Move form state ownership from Home to leaf controls

This commit is contained in:
2026-02-26 09:54:04 +01:00
parent b17490e5ac
commit 4d728f91cf
16 changed files with 315 additions and 143 deletions

View File

@@ -93,7 +93,8 @@ This pattern is a strong baseline for low to medium scale and should be the defa
- Blazor component tree rooted in `Components/App.razor` and `Components/Pages/Home.razor`.
- Home page logic split by concern with partials (`Home.State/Auth/Campaign/Character/Skill/Lifecycle/Realtime/Api/Presentation/Validation.cs`) to keep churn localized.
- Form UX state uses reusable `FormState<TModel>` containers (`Home.Models.cs`) rather than parallel form/error/message property sets.
- Form UX state uses reusable `FormState<TModel>` containers in leaf controls (`HomeControls/*`) rather than parallel form/error/message property sets in `Home`.
- `Home` workflows return `FormSubmissionResult` so controls can render field and summary errors without parent-owned form wiring.
- Browser API calls and SSE are handled via `wwwroot/js/rpgroller-api.js` interop.
- UI state is maintained server-side per circuit with session/tab persistence for campaign + screen selection.
- SSE-driven campaign refresh with reconnect backoff and explicit offline/manual-refresh fallback.