Implement milestone 2 route navigation
This commit is contained in:
20
README.md
20
README.md
@@ -39,13 +39,14 @@ Frontend:
|
||||
- `RpgRoller/Components/App.razor`: current HTML shell and the request-time branch that decides whether `/` serves the static auth page or the interactive app
|
||||
- `RpgRoller/Components/Routes.razor`: Blazor router and layout hookup
|
||||
- `RpgRoller/Components/Layout/MainLayout.razor`: default layout
|
||||
- `RpgRoller/Components/Pages/Home.razor`: current root route component for `/`; it only renders `Workspace`
|
||||
- `RpgRoller/Components/Pages/Home.razor.cs`: logout navigation helper that force-loads `/` and carries auth status query text
|
||||
- `RpgRoller/Components/Pages/LoginPage.razor`: route marker for the static `/login` auth document
|
||||
- `RpgRoller/Components/Pages/PlayPage.razor`, `CampaignsPage.razor`, and `AdminPage.razor`: authenticated route entry points for the interactive workspace
|
||||
- `RpgRoller/Components/Pages/AuthenticatedPageBase.cs`: shared logout-to-`/login` redirect helper for authenticated route pages
|
||||
- `RpgRoller/Components/Pages/Workspace.razor`: authenticated workspace UI with play, campaign management, admin, toasts, and modals
|
||||
- `RpgRoller/Components/Pages/Workspace.razor.cs`: workspace composition root, lifecycle, coordinator wiring, JS-invokable entry points, and menu item construction
|
||||
- `RpgRoller/Components/Pages/WorkspaceState.cs`: workspace UI state plus pure computed and formatting projections used directly by the Razor view
|
||||
- `RpgRoller/Components/Pages/WorkspaceSessionCoordinator.cs`, `WorkspaceCampaignCoordinator.cs`, `WorkspaceCampaignScopeCoordinator.cs`, `WorkspacePlayCoordinator.cs`, `WorkspaceAdminCoordinator.cs`, `WorkspaceLiveStateController.cs`, `WorkspaceFeedbackService.cs`, and `WorkspaceToast.cs`: session bootstrap, campaign scope, play and log, admin, live update, and toast concerns used by `Workspace`
|
||||
- `RpgRoller/Components/Pages/HomeControls/StaticAuthPage.razor`: plain HTML login and registration page used when `/` is requested without a valid session
|
||||
- `RpgRoller/Components/Pages/HomeControls/StaticAuthPage.razor`: plain HTML login and registration page used at `/login`
|
||||
- `RpgRoller/Components/Pages/HomeControls/`: workspace child components, forms, header, panels, and modal controls
|
||||
- `RpgRoller/Components/RpgRollerApiClient.cs`: browser API client for write actions
|
||||
- `RpgRoller/Components/WorkspaceQueryService.cs`: browser-facing read client for workspace data
|
||||
@@ -96,19 +97,20 @@ Rolemaster support:
|
||||
|
||||
The current frontend is in an intermediate state that was created while mitigating the Firefox and RoboForm failure documented in `POSTMORTEM.md`.
|
||||
|
||||
Today, `/` is dual-purpose:
|
||||
Today, `/` is an auth-aware entry redirect:
|
||||
|
||||
- when the request has no valid session cookie, `RpgRoller/Components/App.razor` renders `StaticAuthPage.razor` as plain HTML and `RpgRoller/wwwroot/js/rpgroller-api.js` handles login and registration through `fetch`
|
||||
- when the request has a valid session cookie, `App.razor` renders the interactive Blazor app and `Home.razor` loads the authenticated `Workspace`
|
||||
- anonymous `GET /` redirects to `/login`
|
||||
- authenticated `GET /` redirects to `/play`
|
||||
- `RpgRoller/Components/App.razor` still decides between the static `/login` document and the interactive route set based on the request path, not auth state
|
||||
|
||||
Inside the authenticated app, the hamburger menu does not navigate to different URLs. Instead, `WorkspaceSessionCoordinator.cs` stores a `screen` preference in `sessionStorage`, and `Workspace.razor` conditionally swaps between play, campaign management, and admin screens inside one large component tree.
|
||||
Inside the authenticated app, `/play`, `/campaigns`, and `/admin` are now real Blazor routes, and the hamburger menu navigates between those URLs. The interactive shell is still structurally transitional, because `Workspace.razor` continues to own all three major authenticated subtrees behind one component.
|
||||
|
||||
This architecture works functionally but remains structurally fragile because:
|
||||
|
||||
- the root shell still branches on request-time `HttpContext`
|
||||
- the HTML shell still branches on request path to keep `/login` static
|
||||
- the authenticated workspace still performs staged startup in `OnAfterRenderAsync`
|
||||
- the app coordinates state across Blazor component state, browser `sessionStorage`, `fetch`, and SSE during early startup
|
||||
- the route URL does not represent the authenticated screen the user is actually viewing
|
||||
- the shared `Workspace` component still conditionally renders play, campaign management, and admin DOM instead of letting each route own its own subtree
|
||||
|
||||
## Approved Rewrite Direction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user