From 48a2421fc7203cd4e19e48fc0cd313f0a2273d5c Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Mon, 2 Nov 2026 09:30:46 +0000 Subject: [PATCH] Record final Development house-theme verification and remove test timing ambiguity --- Docs/ApplicationTheme/Deployment.md | 48 ++++++++++++++++++++++ PlotLine.Tests/Browser/house-theme-dev.cjs | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 Docs/ApplicationTheme/Deployment.md diff --git a/Docs/ApplicationTheme/Deployment.md b/Docs/ApplicationTheme/Deployment.md new file mode 100644 index 00000000..40d2e479 --- /dev/null +++ b/Docs/ApplicationTheme/Deployment.md @@ -0,0 +1,48 @@ +# Development deployment and live inspection + +Runtime: **`cf1dc11`**. Initial theme implementation: `2d78d65`. Baseline: `ccdae5d`. + +- Release: `/srv/apps/plotdirector-dev/releases/cf1dc11-20261102T092715Z`. +- Previous application: `/srv/apps/plotdirector-dev/current-before-cf1dc11-20261102T092715Z`. +- Published and deployed DLL SHA-256: `0cd0e1af77c2cb64c806406bae11aae98b0b821a31a8c71275b87f73a5533a8b`. +- Pre-stop Development query found no active/queued imports, Story Intelligence, synthesis or enrichment work. Service active; local/public TLS GETs 200; no warning/error journal entries during verification. + +Forward-only migration `207_PlotDirectorApplicationTheme.sql` applied only to verified `PlotDirector_Development`. Backup with COPY_ONLY/CHECKSUM verified before migration: `/var/opt/mssql/backup/PlotDirector_Development_solver_20261102_091731_a78d29963e5747acafe11f2aaf8f90a1.bak`, 228,749,312 bytes. This was not a restore test. The migration only expands the allowed theme keys; it does not update stored preferences. + +## Real Development verification + +A separate temporary test identity owned the project/book/chapter, six scenes, two characters, two plot lines with shared-scene contributions, a relationship and eleven varying metric series. This was actual persisted Development data, provisioned through normal UI/stored procedures after backup, isolated from existing authors. No import/AI analysis or manuscript upload was needed. + +All pages returned 200 with the house theme in both normal web and a genuinely installed Chromium PWA, at 1440px and 390px: + +| Page/workspace | Route | +| --- | --- | +| Application home | `/Projects` | +| Series dashboard | `/Projects/Details/{projectId}` | +| Chapters | `/Books/Details/{bookId}` | +| Edit Scene | `/Scenes/Edit/{sceneId}` | +| Timeline | `/Timeline?projectId=…&bookId=…` | +| Plot Lines Focus | `/PlotLineWorkspace?…&plotLineId=…` | +| Plot Lines Weave | `/PlotLineWorkspace?…&plotLineId=…&plotLineId=…` | +| Relationships | `/RelationshipMap?projectId=…` | +| Story Flow / scene metric shape | Existing `/Analytics?projectId=…&bookId=…` Story Health metric view | +| Normal form | `/Projects/Edit/{projectId}` | + +Live screenshots inspected for dense panes, selected states, readable event/character labels, relationship canvas/strips/Details/scrubber, chart series and controls, and the six Scene areas. PWA Scene commands were exercised through their existing ribbon bindings; the original page controls correctly remain hidden. Right-click chapter context menu and Customise PlotDirector modal were opened and inspected after animation settled. No PWA layout/command behaviour was changed. + +New account with NULL preference rendered PlotDirector on its first authenticated visit and persisted it through the existing migration workflow. Selecting Modern Dark, reloading, then selecting PlotDirector exercised actual server preference persistence without overriding another user. + +Public isolation tested with three cached application themes (PlotDirector, Modern Dark, Baby Blue): home, Features, solver entry/result and ordinary web login all retained the public theme without `data-app-theme`. Public home/solver also stayed public in the installed window. Installed PWA login adopted PlotDirector as expected. + +The final analytical surface correction removed literal white from the filter/analytics panels and themed native range controls; the complete live suite passed again after deployment. Internal screenshots remain in `/tmp/house-theme-live-*.png`; they were not added to public screenshot assets or solver placeholders. + +## Regression evidence + +- Normal solution build: passed; 392 full-harness checks passed. +- Existing application toolbar, Timeline metric geometry/interaction, narrative map, relationship workspace, PWA metadata/service worker and installed desktop suites passed. +- Installed fixture suite covered 20 real Razor pages and all seven themes at 2560/1440/900, including first-paint stability and menus. House palette coverage also included 768px tablet. +- Browser-measured token contrast: text >=10.45:1; muted text >=4.59:1; primary button >=11.55:1; focus >=5.77:1; input boundary 3.24:1; status badge foreground >=5.69:1; all data colours >=4.0988:1 across workspace/nested/surface backgrounds. + +Existing application theme identifiers, explicit preferences and legacy light/dark migration remain intact. No public redesign, solver changes, final marketing assets or Production deployment occurred. + +Temporary identity, its fixture data and private credentials were removed successfully through the normal authenticated account-deletion workflow after verification. Existing author data was untouched. diff --git a/PlotLine.Tests/Browser/house-theme-dev.cjs b/PlotLine.Tests/Browser/house-theme-dev.cjs index c7fe3cee..dc7cd25f 100644 --- a/PlotLine.Tests/Browser/house-theme-dev.cjs +++ b/PlotLine.Tests/Browser/house-theme-dev.cjs @@ -17,7 +17,7 @@ stage='theme persistence';await page.goto(base+'/Projects');await page.locator(' stage='install';await page.goto(base+'/Projects');const manifestId=base+'/Projects';await cdp.send('PWA.install',{manifestId,installUrlOrBundleUrl:base+'/Projects'});installed=true;await cdp.send('PWA.changeAppUserSettings',{manifestId,displayMode:'standalone'});const opened=ctx.waitForEvent('page');await cdp.send('PWA.launch',{manifestId,url:base+'/Projects'});const app=await opened;await app.waitForLoadState();assert(await app.evaluate(()=>matchMedia('(display-mode: standalone)').matches));await inspect(app,'pwa',1440);await inspect(app,'pwa',390); stage='scene areas';await app.setViewportSize({width:1440,height:1000});await app.goto(base+'/Scenes/Edit/'+id.SceneID);for(const area of ['overview','story','people','world','writer','continuity']){if(await app.locator('#ribbon-surface').isHidden())await app.locator('[data-ribbon-tab][aria-selected=true]').click();const g=app.locator('.pd-context-group[aria-label="Edit Scene"]');const compact=g.locator('details[data-compact=true]');if(await compact.count()&&!await compact.getAttribute('open'))await compact.locator('summary').click();await g.locator('button.pd-context-command').filter({hasText:new RegExp('^'+area+'$','i')}).click();assert.equal(await app.locator('[data-scene-workspace]').getAttribute('data-scene-area'),area);} stage='context menu';await app.goto(base+'/Books/Details/'+id.BookID);const target=app.locator('[data-pd-context]').first();assert(await target.count());await target.click({button:'right'});assert(await app.locator('body > .pd-context-popup').isVisible());await app.screenshot({path:'/tmp/house-theme-live-context-menu.png'});await app.keyboard.press('Escape'); -stage='modal';await app.locator('#customiseToolbar').evaluate(e=>bootstrap.Modal.getOrCreateInstance(e).show());await app.locator('#customiseToolbar.show').waitFor();await app.screenshot({path:'/tmp/house-theme-live-modal.png'});await app.locator('#customiseToolbar').evaluate(e=>bootstrap.Modal.getInstance(e).hide()); +stage='modal';await app.locator('#customiseToolbar').evaluate(e=>bootstrap.Modal.getOrCreateInstance(e).show());await app.locator('#customiseToolbar.show').waitFor();await app.waitForFunction(()=>getComputedStyle(document.getElementById('customiseToolbar')).opacity==='1'&&getComputedStyle(document.querySelector('#customiseToolbar .modal-dialog')).transform==='none');await app.screenshot({path:'/tmp/house-theme-live-modal.png'});await app.locator('#customiseToolbar').evaluate(e=>bootstrap.Modal.getInstance(e).hide()); stage='public isolation';for(const theme of ['plotdirector','modern-dark','baby-blue']){await page.evaluate(t=>localStorage.setItem('plotdirector.applicationTheme',t),theme);for(const url of ['/','/features','/writing-problems','/writing-problems/comparing-different-story-versions','/Account/Login']){await page.goto(base+url);assert.equal(await page.locator('html').getAttribute('data-site-theme'),'public');assert.equal(await page.locator('html').getAttribute('data-app-theme'),null);}} stage='PWA login';await app.evaluate(()=>localStorage.setItem('plotdirector.applicationTheme','plotdirector'));await app.goto(base+'/Account/Login');assert.equal(await app.locator('html').getAttribute('data-app-theme'),'plotdirector');await app.screenshot({path:'/tmp/house-theme-live-pwa-login.png'}); for(const url of ['/','/writing-problems']){await app.goto(base+url);assert.equal(await app.locator('html').getAttribute('data-site-theme'),'public');assert.equal(await app.locator('html').getAttribute('data-app-theme'),null);}