From 869e305267a9f24af96fa2c76d0c3a44458efe53 Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Tue, 3 Nov 2026 23:27:20 +0000 Subject: [PATCH] Verify maximised workspaces and preserve Locations selection contrast --- .../2026-11-03-phase2-visual-coverage.md | 30 +++++++++++++++++++ Docs/Sprints/2026-11-03-phase2.md | 8 +++++ PlotLine.Tests/Browser/location-controls.cjs | 4 ++- PlotLine.Tests/Browser/visual-audit.cjs | 5 ++++ PlotLine/wwwroot/css/application-shell.css | 2 +- 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 Docs/Sprints/2026-11-03-phase2-visual-coverage.md diff --git a/Docs/Sprints/2026-11-03-phase2-visual-coverage.md b/Docs/Sprints/2026-11-03-phase2-visual-coverage.md new file mode 100644 index 00000000..b186551e --- /dev/null +++ b/Docs/Sprints/2026-11-03-phase2-visual-coverage.md @@ -0,0 +1,30 @@ +# Phase 2 rendered visual coverage + +Real compiled Razor pages and production scripts in the isolated browser fixture; synthetic models. This is not authenticated live Development acceptance or a physical installed-PWA/touch-device test. Browser and PWA fixture modes use Chromium at 1440×1000 and 390×1000, in Modern Light, Modern Dark, Warm Light and Warm Dark: 16 cases per page. + +Screenshots and machine-readable manifests: `/srv/repos/plotdirector-phase2-artifacts/visual/`. Contact sheets and selected full-size captures were inspected; script/overflow checks are recorded separately and are not visual proof. CSS theme transitions settle before final capture. + +| Area | Fixture query | Captured cases | Inspection / findings | +|---|---|---:|---| +| project-overview | `page=dashboard&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| projects | `page=projects&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| book | `desktop=Books&layout=full` | 16 | Inspected; touching metadata/chapter panels separated. | +| chapters | `desktop=Chapters&layout=full` | 16 | Inspected; mobile PWA table wrapping repaired; superseded by chapter-final captures and 24-case layout regression. | +| writer | `page=writer&layout=full` | 16 | Inspected; missing panel insets and inconsistent heading/gap hierarchy repaired. | +| characters | `desktop=Characters&context=objects&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| locations | `desktop=Locations&layout=full` | 16 | Inspected; separate depressed icon commands and right-edge grips; final foreground correction in locations-final captures. | +| floorplans | `desktop=FloorPlans&layout=full` | 16 | Inspected; touching create/empty surfaces separated. | +| floorplan-editor | `page=floorplans&layout=full` | 16 | Inspected; intentional flush grid/side panels retained. | +| maps | `page=maps&layout=full` | 16 | Inspected; intentional canvas/palette/details structure retained. | +| timeline | `page=timeline-render&layout=full` | 16 | Inspected actual Timeline/Index; intentional horizontal timeline retained. Earlier mislabelled calendar capture excluded. | +| plot-lines | `desktop=PlotLineWorkspace&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| calendar | `desktop=StoryCalendar&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| story-bible | `desktop=StoryBible&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| writing-plans | `desktop=WritingPlans&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| project-edit | `desktop=ProjectEdit&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | +| relationships | `page=relationships&layout=full` | 16 | Inspected; graph/timeline split retained. | +| scenes | `page=scene-edit&layout=full` | 16 | Inspected; no additional confirmed spacing defect in the rendered fixture. | + +Maps, Floor Plan Editor and Relationships additionally have 48 captured and inspected maximised cases across the same modes, widths and themes. Restore/maximise labels and production controls were exercised. No script errors or document overflow in the 288-case settled normal inventory or 48-case maximised inventory. Local scroll regions remain intentional. + +Writer/Locations commands, native handle dragging, confirmation/cancellation, saved selection and quick-access routes/icons have separate behavioural regressions. Native dragging was verified with a mouse; Edit remains the accessible parent-change alternative. No physical touch claim is made. diff --git a/Docs/Sprints/2026-11-03-phase2.md b/Docs/Sprints/2026-11-03-phase2.md index 9982dd72..3ec19d0e 100644 --- a/Docs/Sprints/2026-11-03-phase2.md +++ b/Docs/Sprints/2026-11-03-phase2.md @@ -111,3 +111,11 @@ Final Writer checkpoint: full harness passed again (405 checks, exit 0); both Wr Final settled-theme capture covers 18 named pages / 288 cases with no script errors or document overflow. Inspection of the newly added Chapter Details page exposed a real mobile PWA failure: inherited `overflow-wrap:anywhere` from record forms split scene-table headers and content into individual letters. Responsive record-table containers now restore normal word wrapping and horizontal scrolling. Verified the actual PWA screenshot: a compact row, 804px internal table scroll width contained within a 316px container and a 390px document. New browser regression passed at 390/800/1440 in both modes and four themes. Updated Chapter screenshots are being captured; the original affected cases remain evidence of the defect. Maps/Floor Plans quick-access customisation/routes/distinct SVG checks passed in the broader toolbar browser suite. Schema-only test environment now created successfully using the Development SQL container's administrative connection, after the application's limited login correctly refused database creation. The helper refuses existing targets, permits only a uniquely named synthetic database, copies no table data, excludes database users/permissions, and grants the existing Development application login access only within the synthetic database. Verified 167 tables / zero projects / zero users at creation. All further test writes target `PlotDirector_Phase2_20261103_2305`, never the running Development database. The synthetic round-trip harness remains under development; no data-transfer completeness claims yet. + +### Visual acceptance checkpoint and first SQL round-trip findings + +Maximised Maps, Floor Plan Editor and Relationships: 48 cases captured and inspected, with no script errors/document overflow. Settled normal inventory: 18 pages / 288 cases; coverage and limitations are recorded in `2026-11-03-phase2-visual-coverage.md`. Updated Chapter table captures and Locations selected-button foreground captures supplement superseded cases. The actual selected Locations page button retained white primary text against its new pale recessed surface; explicitly using the theme foreground repairs that confirmed contrast issue. Full-layout controls/native drag/selection suite passed again in both modes and four themes. + +Isolated SQL round trip reproduced silent map loss: import returned success, but no map appeared in the new project. Added map identity/project/hierarchy remapping, map feature/relationship/journey reference remapping and new GUIDs for copied embedded images/placement references. Verified parent/child maps, geometry JSON, Unicode labels, relationship distance/map references, exact image bytes, changed asset IDs, placement reference and original-project preservation. Eleven invalid JSON/data/map/version preview cases fail before project allocation. Book era and primary locale were also lost; new forward-only migration 213 and metadata projection repair them, verified only in the synthetic database so far. Persistent writing-plan fixture confirms a separate omission (one source plan / zero imported); repair pending. + +Further reproduced failure atomicity defect: an invalid scene→chapter reference failed SQL restore, but project count increased from 13 to 14, leaving the earlier-created empty shell despite the message saying no data was saved. A transaction around shell creation/remapping/apply is now under isolated verification. No current Development schema/data changes or Phase 2 deployment have occurred. diff --git a/PlotLine.Tests/Browser/location-controls.cjs b/PlotLine.Tests/Browser/location-controls.cjs index ed2cdde1..1c8e1b77 100644 --- a/PlotLine.Tests/Browser/location-controls.cjs +++ b/PlotLine.Tests/Browser/location-controls.cjs @@ -7,7 +7,7 @@ const assert=require('node:assert/strict'); const page=await context.newPage(),errors=[];page.on('pageerror',e=>errors.push(e.message)); for(const theme of ['modern-light','modern-dark','warm-light','warm-dark']){ await page.goto('http://127.0.0.1:5238/fixture?desktop=Locations&layout=full'); - await page.evaluate(theme=>document.documentElement.dataset.appTheme=theme,theme); + await page.evaluate(theme=>PlotDirectorApplyApplicationTheme(theme),theme); const toolbar=page.locator('.location-hierarchy-toolbar'); assert.equal(await toolbar.isVisible(),!pwa); const group=pwa?page.locator('[data-pwa-context-controls] .pd-context-group[aria-label="Location hierarchy"]'):toolbar; @@ -28,6 +28,8 @@ const assert=require('node:assert/strict'); assert.equal(await relationship.getAttribute('aria-pressed'),'true','Persisted preference restores through ribbon binding'); assert.notEqual(await relationship.evaluate(node=>getComputedStyle(node).boxShadow),'none','Selected command is recessed'); await parent.click(); + await page.waitForTimeout(200); + assert.equal(await parent.evaluate(node=>{const probe=document.createElement('span');probe.style.color='var(--pd-text)';node.append(probe);const expected=getComputedStyle(probe).color;probe.remove();return getComputedStyle(node).color===expected;}),true,'Depressed command retains readable theme foreground'); const source=page.locator('[data-drag-id="1"]'),target=page.locator('[data-drag-id="2"]'); assert.equal(await source.getAttribute('draggable'),null,'Row links and controls are not drag initiators'); const handle=source.locator('[data-location-drag-handle]'); diff --git a/PlotLine.Tests/Browser/visual-audit.cjs b/PlotLine.Tests/Browser/visual-audit.cjs index 004c5cbf..55e6cf10 100644 --- a/PlotLine.Tests/Browser/visual-audit.cjs +++ b/PlotLine.Tests/Browser/visual-audit.cjs @@ -16,6 +16,11 @@ const pages = process.env.PD_VISUAL_PAGES ? JSON.parse(process.env.PD_VISUAL_PAG const response=await page.goto('http://127.0.0.1:5238/fixture?'+query+'&layout=full'); await page.waitForTimeout(250);await page.evaluate(theme=>window.PlotDirectorApplyApplicationTheme(theme),theme); await page.waitForTimeout(350); // Let the production theme transition settle before judging contrast. + if(process.env.PD_VISUAL_MAXIMISE==='1'){ + await page.getByRole('button',{name:'Maximise workspace',exact:true}).click(); + await page.waitForFunction(()=>!!document.querySelector('.pd-workspace-maximised')); + await page.waitForTimeout(350); + } const file=`${stage}-${name}-${pwa?'pwa':'browser'}-${width}-${theme}.png`; await page.screenshot({path:path.join(output,file),fullPage:true,animations:'disabled'}); const metrics=await page.evaluate(()=>({viewport:innerWidth,scroll:document.documentElement.scrollWidth,panels:[...document.querySelectorAll('.story-bible-section')].map(p=>({padding:getComputedStyle(p).padding, width:p.getBoundingClientRect().width}))})); diff --git a/PlotLine/wwwroot/css/application-shell.css b/PlotLine/wwwroot/css/application-shell.css index 1881a8df..f54622b5 100644 --- a/PlotLine/wwwroot/css/application-shell.css +++ b/PlotLine/wwwroot/css/application-shell.css @@ -695,7 +695,7 @@ html[data-standalone="true"] .story-calendar-toolbar .button-row .btn { /* Toggle commands retain the ordinary ribbon shape, with a recessed selected state. */ .pd-shell .pd-ribbon-command[aria-pressed="true"], .location-drag-commands > button[aria-pressed="true"] { - background: var(--pd-selected); border: 1px solid var(--pd-border); + color: var(--pd-text); background: var(--pd-selected); border: 1px solid var(--pd-border); box-shadow: inset 0 2px 3px color-mix(in srgb, var(--pd-text) 24%, transparent), inset 0 -1px 0 var(--pd-surface); } .location-drag-commands { display: flex; flex-wrap: wrap; gap: 8px; }