From c427e717d5d1c266bd6bb6fac40d79441e52a2ec Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 5 May 2026 00:20:37 +0200 Subject: [PATCH] refactor: remove crash workaround scaffolding --- README.md | 18 +- RpgRoller/Components/App.razor | 9 +- .../Pages/AdminWorkspaceContent.razor | 130 +++---- .../Pages/AdminWorkspaceContent.razor.cs | 25 -- .../Pages/CampaignsWorkspaceContent.razor | 54 +-- .../Pages/CampaignsWorkspaceContent.razor.cs | 25 -- .../Pages/HomeControls/AppHeader.razor.cs | 20 -- .../HomeControls/CampaignLogPanel.razor.cs | 18 - .../HomeControls/CharacterPanel.razor.cs | 19 - .../RolemasterSkillRollModal.razor.cs | 8 - .../HomeControls/SkillFormModal.razor.cs | 8 - .../Pages/PlayWorkspaceContent.razor | 165 ++++----- .../Pages/PlayWorkspaceContent.razor.cs | 25 -- RpgRoller/Components/Pages/Workspace.razor | 78 +--- RpgRoller/Components/Pages/Workspace.razor.cs | 136 +------ .../WorkspaceCampaignScopeCoordinator.cs | 28 +- .../Pages/WorkspaceDiagnosticSummary.cs | 40 --- .../Pages/WorkspaceLiveStateController.cs | 17 +- .../Components/Pages/WorkspacePageContext.cs | 7 - .../Components/Pages/WorkspaceRenderPhase.cs | 9 - .../Components/Pages/WorkspaceRouteView.razor | 47 --- .../Pages/WorkspaceSessionCoordinator.cs | 49 +-- RpgRoller/Program.cs | 5 +- RpgRoller/wwwroot/js/rpgroller-api.js | 334 +----------------- TASKS.md | 8 + 25 files changed, 206 insertions(+), 1076 deletions(-) delete mode 100644 RpgRoller/Components/Pages/AdminWorkspaceContent.razor.cs delete mode 100644 RpgRoller/Components/Pages/CampaignsWorkspaceContent.razor.cs delete mode 100644 RpgRoller/Components/Pages/PlayWorkspaceContent.razor.cs delete mode 100644 RpgRoller/Components/Pages/WorkspaceDiagnosticSummary.cs delete mode 100644 RpgRoller/Components/Pages/WorkspaceRenderPhase.cs diff --git a/README.md b/README.md index cab8527..f05ad9c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Frontend: Current repo note: - `POSTMORTEM.md` documents why the previous authenticated workspace architecture was fragile under Firefox plus RoboForm. -- `TASKS.md` records the route-first rewrite that addressed that architecture. +- `TASKS.md` records the route-first rewrite and the final Blazor configuration change that resolved the Firefox plus RoboForm crash. ## Runtime and Persistence @@ -115,6 +115,16 @@ Authenticated interactivity is route-local instead of global: - Blazor startup is manual with `Blazor.start({ ssr: { disableDomPreservation: true } })` so the app can disable enhanced SSR DOM preservation during interactive attach - Header route changes now use full document navigation so moving between authenticated routes remounts the target per-page interactive root instead of trying to reuse the previous page circuit +Firefox plus RoboForm resolution: + +- the route-first rewrite reduced the authenticated surface area, but it was not the final fix +- the crash stopped only after the app stopped using global Blazor interactivity +- the working combination is: + - per-page `InteractiveServerRenderMode(prerender: false)` on `/play`, `/campaigns`, and `/admin` + - manual `Blazor.start({ ssr: { disableDomPreservation: true } })` + - full document navigation between authenticated routes with `forceLoad: true` +- earlier phased first-render shells and heavy diagnostics were investigative steps and have been removed + Interactive bootstrap is now route-local: - `WorkspaceRouteView.razor` performs the first-render JS-dependent session initialization for the authenticated route that mounted @@ -201,10 +211,8 @@ SQLite migration rule: - Static assets are linked through Blazor's `@Assets[...]` pipeline for fingerprinted cache-busting URLs. - Workspace reads are resolved through API requests in `WorkspaceQueryService`; browser interop stays focused on auth forms, session storage, SSE wiring, and small DOM helpers. - Interactive authenticated startup begins in `WorkspaceRouteView.razor` after first render because `RpgRollerApiClient` still depends on JS interop-backed `fetch`. -- Workspace startup diagnostics now log route initialization, route-content render phases, and browser-side workspace mutation snapshots to help isolate the remaining Firefox startup crash documented in `POSTMORTEM.md`. -- Pre-Blazor diagnostics also watch the static `#rr-interactive-host` container before `_framework/blazor.web.js` connects, so extension-driven DOM mutations can be compared against the first failing interactive batch. -- Authenticated routes now avoid global `Routes @rendermode` because upstream issue `dotnet/aspnetcore#58824` reports Firefox-specific failures with global interactivity and explicitly calls out per-page mode as the safer path. -- Authenticated routes now mount through phased interactive batches: minimal shell first, then a simple header placeholder, then route skeletons, and only then the real header and control-heavy route content after route initialization succeeds. +- Authenticated routes avoid global `Routes @rendermode` because upstream issue `dotnet/aspnetcore#58824` reports Firefox-specific failures with global interactivity and explicitly calls out per-page mode as the safer path. +- Authenticated route changes use full document navigations so each route remounts its own per-page interactive root. - Live workspace refresh compares separate roster, per-character sheet, and log versions so unrelated changes do not trigger full reloads. - Campaign log data is loaded in bounded slices: campaign summaries, one selected roster, one selected character sheet, and a 25-row incremental log window from `/api/campaigns/{campaignId}/log/page`. - Log rows return compact summary data first and lazy-load full detail from `/api/rolls/{rollId}` when expanded. diff --git a/RpgRoller/Components/App.razor b/RpgRoller/Components/App.razor index 460090d..7fe0908 100644 --- a/RpgRoller/Components/App.razor +++ b/RpgRoller/Components/App.razor @@ -25,16 +25,11 @@ } else { -
- -
+ } @if (UseInteractiveApp) { -