Record Family tree Development delivery and live qualification evidence

This commit is contained in:
Nick Beckley 2026-11-22 20:24:44 +00:00
parent 6ba409220a
commit 0fc459a270
3 changed files with 12 additions and 1 deletions

View File

@ -61,3 +61,13 @@ Predeployment evidence: `/tmp/context-family-final-build2.log`, `/tmp/context-fa
- Physical phones/tablets, installed PWA windowing and screen-reader review remain manual acceptance. Editorial review of representative author-owned complex families is recommended; those records were not modified for testing.
Final exploration-state acceptance also verified re-centring on a visible relative and searching back into a previously visited family: zoom and expanded branches are retained, with at most one bounded restoration retry after the server resolves the canonical component. Evidence: `/tmp/context-family-state-browser.log`, `/tmp/context-family-state-story.log`, `/tmp/context-family-state-touch.log`. The Story regression uses normal keyboard pan to reach an offscreen branch at the restored zoom. No .NET domain changes followed the 770-PASS run.
## Development delivery
Deployed source commit **`6ba409220aa3d8071d447c722e5ecdb7fc342427`** (implementation `f357cbd`, exploration-state follow-up `6ba4092`). Release: `/srv/apps/plotdirector-dev/releases/context-family-final-6ba4092-20261122T201055Z`. The active import/Story Intelligence/synthesis/enrichment guard passed immediately before restart. Service active; local/public HTTP200 with normal TLS verification; deployed assembly informational commit and all 12 published/live assembly/assets SHA-256 hashes matched. Deployment manifest: `/tmp/context-family-final-deployment.json`.
Actual authenticated API acceptance initially returned a useful empty index on the old qualification scene, which correctly had no POV and no explicitly physical participants. Only that disposable fixture was then prepared through the existing `SceneCharactersEditor`/`SaveSceneCharacters` form: its two known synthetic participants were marked Present, any Mentioned Only role was changed to an available ordinary role, and its first synthetic character became POV. Other submitted participation fields were preserved. No real manuscript participation or POV was modified.
Live focused Family acceptance then established a canonical family connection between those synthetic characters: two index entries became one. A further focused correction persisted, refreshed the selected connection in a second authenticated window and produced no receiving success toast. Each Context retained one SignalR connection and sent no Word navigation. The general live character/name/life-status/relationship edit regression passed as well; its Names step now waits for the already-queued originating-panel refresh before repeating an identity lookup. Actual main-window navigation passed Scene, Characters, Names and Relationships without an extra window or changed Context/Word position. The original main editors remain functional.
Postdeployment evidence: `/tmp/context-family-live-prepared.log`, `/tmp/context-family-presence-confirmed.log`, `/tmp/context-family-live-editing-final.log`, `/tmp/context-family-live-navigation.log`. Development journal had no error categories and only the pre-existing HTTPS-redirection warning. Production was not accessed or changed; the original two untracked investigation files were preserved. Existing Context windows should reload once to acquire the updated scripts. Physical-device/PWA and screen-reader/editorial acceptance remain the manual items listed above.

View File

@ -1,6 +1,6 @@
// Opt-in Development acceptance; only the explicitly disposable qualification characters may be edited.
const {chromium}=require('playwright'),fs=require('node:fs'),assert=require('node:assert/strict');
(async()=>{assert(process.env.PD_CONTEXT_IDENTITY&&process.env.PD_CONTEXT_SCOPE);const who=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_IDENTITY)),scope=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_SCOPE));assert.equal(who.Database,'PlotDirector_Development');assert.equal(who.UserID,scope.user);assert(who.Email.startsWith('pwa-browser-'));assert.equal(scope.characters.length,2);const b=await chromium.launch();let step='login';try{const pages=[],counts=[];for(let i=0;i<2;i++){const c=await b.newContext({viewport:{width:1366,height:1000}}),p=await c.newPage();await p.goto('https://dev.plotdirector.com/Account/Login');await p.locator('[name=Email]').fill(who.Email);await p.locator('[name=Password]').fill(who.Password);await Promise.all([p.waitForURL(u=>u.pathname!='/Account/Login'),p.locator('button[type=submit]').click()]);const counter={hubs:0,word:0};counts.push(counter);p.on('request',r=>{if(r.url().includes('/hubs/native-companion/negotiate'))counter.hubs++;if(/\/(Writing\/Context|WriterWord)\/Navigate/.test(new URL(r.url()).pathname))counter.word++;});await p.goto('https://dev.plotdirector.com/Writing/Context?'+new URLSearchParams({projectId:scope.project,bookId:scope.book,sceneId:scope.scene}));await p.selectOption('[data-context-tab]','relationships');await p.locator('[data-family-key]').first().waitFor();await p.locator('[data-graph-node]').first().waitFor();await p.waitForFunction(()=>document.querySelector('[data-context-workspace]').contextController.connection?.state==='Connected');await p.evaluate(()=>{window.successes=0;const before=PlotDirector.toast.success;PlotDirector.toast.success=(...a)=>{successes++;before(...a);};});pages.push(p);}
(async()=>{assert(process.env.PD_CONTEXT_IDENTITY&&process.env.PD_CONTEXT_SCOPE);const who=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_IDENTITY)),scope=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_SCOPE));assert.equal(who.Database,'PlotDirector_Development');assert.equal(who.UserID,scope.user);assert(who.Email.startsWith('pwa-browser-'));assert.equal(scope.characters.length,2);const b=await chromium.launch();let step='login';try{const pages=[],counts=[];for(let i=0;i<2;i++){const c=await b.newContext({viewport:{width:1366,height:1000}}),p=await c.newPage();await p.goto('https://dev.plotdirector.com/Account/Login');await p.locator('[name=Email]').fill(who.Email);await p.locator('[name=Password]').fill(who.Password);await Promise.all([p.waitForURL(u=>u.pathname!='/Account/Login'),p.locator('button[type=submit]').click()]);if(i===0&&process.env.PD_CONTEXT_PREPARE_FAMILY==='1'){step='prepare isolated physical-presence fixture';await p.goto('https://dev.plotdirector.com/Scenes/SceneCharactersEditor?sceneId='+scope.scene);const ids=await p.locator('input[name$=".CharacterID"]').evaluateAll(ns=>ns.map(n=>Number(n.value)));assert.deepEqual([...ids].sort((a,b)=>a-b),[...scope.characters].sort((a,b)=>a-b));assert.equal(Number(await p.locator('[name=SceneID]').inputValue()),scope.scene);for(let row=0;row<ids.length;row++){const presence=p.locator(`[name="Characters[${row}].PresenceTypeID"]`),present=await presence.locator('option').evaluateAll(ns=>ns.find(n=>n.textContent.trim()==='Present')?.value);assert(present);await presence.selectOption(present);const role=p.locator(`[name="Characters[${row}].RoleInSceneTypeID"]`);if((await role.locator('option:checked').innerText()).trim()==='Mentioned Only'){const physicalRole=await role.locator('option').evaluateAll(ns=>ns.find(n=>n.value&&n.textContent.trim()!=='Mentioned Only')?.value);assert(physicalRole);await role.selectOption(physicalRole);}}await p.locator(`[name=POVCharacterID][value="${scope.characters[0]}"]`).check();await Promise.all([p.waitForURL(u=>u.pathname==='/Scenes/SaveSceneCharacters'),p.locator('[data-scene-editor-save]').click()]);assert.equal(JSON.parse(await p.locator('body').innerText()).success,true);step='login';}const counter={hubs:0,word:0};counts.push(counter);p.on('request',r=>{if(r.url().includes('/hubs/native-companion/negotiate'))counter.hubs++;if(/\/(Writing\/Context|WriterWord)\/Navigate/.test(new URL(r.url()).pathname))counter.word++;});await p.goto('https://dev.plotdirector.com/Writing/Context?'+new URLSearchParams({projectId:scope.project,bookId:scope.book,sceneId:scope.scene}));await p.selectOption('[data-context-tab]','relationships');await p.locator('[data-family-key]').first().waitFor();await p.locator('[data-graph-node]').first().waitFor();await p.waitForFunction(()=>document.querySelector('[data-context-workspace]').contextController.connection?.state==='Connected');await p.evaluate(()=>{window.successes=0;const before=PlotDirector.toast.success;PlotDirector.toast.success=(...a)=>{successes++;before(...a);};});pages.push(p);}
const [p,remote]=pages;async function index(page){return page.evaluate(async args=>{const response=await fetch('/Writing/Context/Relationships/FamilyIndex?'+new URLSearchParams(args));if(!response.ok)throw Error('Index read failed');return response.json();},{bookId:scope.book,sceneId:scope.scene});}let current=await index(p);assert(scope.characters.every(id=>current.groups.some(g=>g.sceneMembers.includes(id))),'both qualification characters must be explicitly eligible scene participants');const merged=()=>current.groups.some(g=>scope.characters.every(id=>g.sceneMembers.includes(id)));
async function save(){await p.locator('[data-context-edit-form] [type=submit]').click();await p.waitForFunction(()=>!document.querySelector('[data-context-edit-dialog]').open);}
if(!merged()){step='focused family connection groups two scene entries';await p.locator('[data-relationship-add]').click();await p.waitForSelector('[data-context-edit-form]');await p.selectOption('[name=SourceID]',String(scope.characters[0]));await p.selectOption('[name=TargetID]',String(scope.characters[1]));const type=await p.locator('[name=TypeID] option').evaluateAll(ns=>ns.find(n=>n.value&&/Parent/.test(n.textContent))?.value);assert(type);await p.selectOption('[name=TypeID]',type);const state=await p.locator('[name=StateID] option').evaluateAll(ns=>ns.find(n=>n.value)?.value);if(state)await p.selectOption('[name=StateID]',state);await p.locator('[name=Notes]').fill('Synthetic family grouping qualification');await save();await remote.waitForFunction(()=>document.querySelectorAll('[data-family-key]').length===1);current=await index(p);assert(merged());}

View File

@ -13,6 +13,7 @@ const {chromium}=require('playwright'),fs=require('node:fs'),assert=require('nod
step='cancel persists nothing';await open('description');assert.equal(await p.locator('[name=Value]').inputValue(),stamp);await p.locator('[name=Value]').fill('Discarded synthetic draft');p.once('dialog',d=>d.accept());await p.click('[data-context-edit-cancel]');await open('description');assert.equal(await p.locator('[name=Value]').inputValue(),stamp);await p.click('[data-context-edit-cancel]');
async function lookupIdentity(query){const details=p.locator('[data-established-names]');if(!await details.evaluate(n=>n.open))await details.locator('summary').first().click();await p.locator('[data-context-name-lookup] [name=search]').fill(query);await p.locator('[data-context-name-lookup] [type=submit]').click();await p.locator('[data-context-name-identities] [data-name-usage-fragment]').waitFor();await p.locator(`[data-context-name-identities] [data-name-identity="${id}"]`).click();await p.waitForSelector('[data-name-identity-fragment]');}
step='names alias add and persisted spelling';await p.selectOption('[data-context-tab]','names');await p.waitForSelector('[data-context-names]');await lookupIdentity('Synthetic Context person one');await p.locator(`[data-context-edit="alias-add"][data-character-id="${id}"]`).click();await p.waitForSelector('[data-context-edit-form]');const alias='Synthetic alias '+Date.now();await p.locator('[name=Value]').fill(alias);await save();await p.waitForSelector('[data-context-names]');await lookupIdentity(alias);assert.match(await p.locator('[data-name-identity-fragment]').innerText(),new RegExp(alias));
await p.waitForTimeout(350);await p.waitForFunction(()=>!document.querySelector('[data-context-pane="0"] [aria-busy="true"]'));await lookupIdentity(alias);
step='live inline validation retains failed draft';await p.locator(`[data-context-edit="name"][data-character-id="${id}"]`).click();await p.waitForSelector('[data-context-edit-form]');await p.locator('[name=Value]').fill('');await p.locator('[data-context-edit-form] [type=submit]').click();await p.waitForSelector('.validation-summary-errors');assert(await p.locator('[data-context-edit-dialog]').isVisible());assert.equal(await p.locator('[name=Value]').inputValue(),'');p.once('dialog',d=>d.accept());await p.click('[data-context-edit-cancel]');
if(process.env.PD_CONTEXT_RELATIONSHIPS==='1'){
step='live one-relationship create and correction';await p.selectOption('[data-context-tab]','relationships');await remote.selectOption('[data-context-tab]','relationships');await p.waitForSelector('[data-context-relationships]');await remote.waitForSelector('[data-context-relationships]');