3.4 KiB
Scene Edit focus following
Cause
NarrativeNavigationFilter already commits explicit successful Scene Edit opens to the authoritative narrative focus, but the presentation adapter registry omitted Scene Edit. Header/ribbon changes therefore persisted correctly while leaving the editing document and all its targets unchanged.
Correction
The Scene Edit view identifies its stable SceneID and authorised project/book scope. The shared workspace adapter subscribes to the existing authoritative focus event and navigates the whole document to /Scenes/Edit/{SceneID}?retainNarrativeFocus=true. It also aligns initial stale documents and implements Go to Focus. A matching SceneID is a no-op. The existing controller loads every panel again; no partial scene data are substituted. The retain flag prevents the destination GET from writing focus back or changing history again.
Chapter-only focus opens /Chapters/Details/{ChapterID}?retainNarrativeFocus=true, the existing chapter-view route. It never invents a SceneID. Chapter Edit retains its specialised independent editing contract.
Scene Inspector's existing overlay data-dirty and save-button state are reused. A small optional adapter lifecycle hook checks unsaved changes before /NarrativeFocus/Set. Cancel means no request, no history/version change and no event. Approval temporarily makes the scene editing workspace inert until the request finishes, preventing a new draft while the guarded navigation is pending. Failure unlocks the editor and retains its draft. An active save blocks navigation. Normal document departures also get a beforeunload guard.
Focus changed in another window is already authoritative: a dirty scene stays open with an explicit mismatch/recovery notice. It does not roll back another window's focus. Go asks before discarding the draft. Independent visualisation adapters and the service/persistence contracts are unchanged.
Qualification
Automated Chromium and genuinely installed standalone Chromium PWA checks use isolated compiled Razor fixtures with canonical scenes 31, 101 and 32 across two chapters. No real author's scene is edited. They cover whole-document identity and six panel reloads; Previous/Next across chapters; header/history; stale-document recovery; aligned Go; cancel before persistence; failed request draft retention and unlock; external focus with dirty draft and explicit Go recovery; chapter-only navigation and internal installed-app navigation. Screenshots inspect the rendered Scene Edit workspace.
Existing focus-synchronisation tests cover Review's accepted paragraph identity/offset, chapter following, stale responses and dirty editing guards. Scene workspace and narrative-focus regressions cover the existing editor, local Scene Explorers, objectives and related isolation. Build and executable harness results are recorded in the completion report.
Qualified: solution build (0 warnings/errors), executable regression harness (632 PASS), scene-focus.cjs normal/installed, focus-synchronisation.cjs normal/installed, scene-workspace.cjs normal/installed, and narrative-focus.cjs normal/installed all passed. Visual screenshots include normal desktop and 950px dark installed-app rendering. Browser checks use isolated application fixtures, not the live author record 9126. No schema, SQL procedures, objective targets, Word verification, or local Scene Explorer behaviour were changed.