diff --git a/Docs/Writer/Unified-Context-Workspace-Foundation-20261121.md b/Docs/Writer/Unified-Context-Workspace-Foundation-20261121.md index af98b9d1..69a96ae7 100644 --- a/Docs/Writer/Unified-Context-Workspace-Foundation-20261121.md +++ b/Docs/Writer/Unified-Context-Workspace-Foundation-20261121.md @@ -96,7 +96,7 @@ The Scene editor, Writer Chapter workflows, full Maps/Floor Plans/Relationships/ - Normal `dotnet build PlotLine.slnx`: clean build, zero warnings/errors at the recorded gate. - Full executable regression harness: 673 PASS lines, exit 0; includes updated native session/access/ownership/reference-data checks and existing native command/authentication suites. Additional notification-boundary assertions are included in focused Writing integration qualification. - `--writing-integration`: authoritative reference hydration, scope/access, exact native session, unsaved/stale mappings, during-load changes, chronology/provenance and request reuse. -- `Browser/context-workspace-foundation.cjs`: real compiled Razor shell and both partials in the isolated loopback host, with synthetic reference data and controllable HTTP/SignalR inputs. Covers layouts, pointer/keyboard divider, same/different tabs, shared reads, hidden staleness, same-scene invalidation, rapid chapter/scene races, dirty/busy deferral, access/session failures, reconnect, native ambiguity/document selection, Office fallback/native precedence, independent windows, cloned storage (BroadcastChannel and storage-event fallback), denied storage, persistence, pinned snapshots and Office/Intent launch compatibility. +- `Browser/context-workspace-foundation.cjs`: real compiled Razor shell and both partials in the isolated loopback host, with synthetic reference data and controllable HTTP/SignalR inputs. Covers layouts, pointer/keyboard divider, same/different tabs, shared reads, generic None/Book/Chapter/Scene/Paragraph hierarchy using test-only registration metadata, hidden staleness, same-scene invalidation, rapid chapter/scene races, dirty/busy deferral, access/session failures, reconnect, native ambiguity/document selection, Office fallback/native precedence, independent windows, cloned storage (BroadcastChannel and storage-event fallback), denied storage, persistence, pinned snapshots and Office/Intent launch compatibility. - Browser sizes include 1366×768, 760×768, 683×384 and 480×700 at 125% CSS zoom; shell/card reflow and no document-wide horizontal overflow are checked. The 683×384 viewport approximates the CSS space at 200% on a 1366×768 display. - Shared notifications browser checks pass in browser and simulated standalone presentation. Existing Evidence request/cancel/isolation checks remain applicable. - Standalone presentation is simulated Chromium qualification. Physical installed-PWA, Windows Word/VSTO and OS-level zoom/assistive-technology acceptance remain manual; these are not claimed as automated physical tests. diff --git a/PlotLine.Tests/Browser/context-workspace-foundation.cjs b/PlotLine.Tests/Browser/context-workspace-foundation.cjs index 77bae486..0ea53aa2 100644 --- a/PlotLine.Tests/Browser/context-workspace-foundation.cjs +++ b/PlotLine.Tests/Browser/context-workspace-foundation.cjs @@ -71,6 +71,17 @@ const lease=(extra={})=>({instanceId:'11111111-1111-4111-8111-111111111111',sess } await page.evaluate(()=>{document.documentElement.style.zoom='1';Object.defineProperty(navigator,'standalone',{value:true});}); step='pinned snapshot';leases=[lease({sceneId:23,chapterId:11})];const pinned=await context.newPage();await pinned.goto(base+'/Writing/Context?pinned=true&sceneId=22');await pinned.waitForSelector('[data-context-tab-fragment]');assert.equal(await pinned.evaluate(()=>contextConnections.length),0);assert.equal(await pinned.locator('[data-context-tab-fragment]').getAttribute('data-scene-id'),'22');await pinned.selectOption('[data-context-scene]','23');await pinned.waitForSelector('[data-context-tab-fragment][data-scene-id="23"]');await pinned.close(); + step='generic hierarchical registration scopes'; + for(const declared of ['None','Book','Chapter','Scene','Paragraph']){ + const generic=await context.newPage();let count=0; + await generic.route('**/Writing/Context?pinned=true*',async route=>{const response=await route.fetch();await route.fulfill({response,body:(await response.text()).replaceAll('"scope":"Scene"','"scope":"'+declared+'"')});}); + await generic.route('**/Writing/Context/Tabs/*',async route=>{count++;const params=new URL(route.request().url()).searchParams,level=['None','Book','Chapter','Scene','Paragraph'].indexOf(declared),fields=['projectId','bookId','chapterId','sceneId','paragraphId'];const attributes=fields.slice(0,level===0?0:level+1).filter(f=>params.has(f)).map(f=>'data-'+f.replace(/[A-Z]/g,c=>'-'+c.toLowerCase())+'="'+params.get(f)+'"').join(' ');await route.fulfill({contentType:'text/html',body:'
Generic reference