diff --git a/Docs/HomeSolverInvitation/Report.md b/Docs/HomeSolverInvitation/Report.md new file mode 100644 index 00000000..1700ba19 --- /dev/null +++ b/Docs/HomeSolverInvitation/Report.md @@ -0,0 +1,42 @@ +# Home Writing Solver invitation and canonical marketing screenshots + +## Home invitation + +The new section follows “Sound familiar?” and precedes “Meet PlotDirector”. The hero, manuscript composition, primary Start writing route, new public photography and the remainder of the Home sequence remain intact. + +**Not sure what’s getting in the way?** + +“Characters, storylines, scene order, continuity. You can feel something getting tangled without knowing what to call it.” + +“Tell us what’s becoming difficult. We’ll help you narrow down what’s happening, what to look at next and where PlotDirector may help.” + +Four illustrative frustrations are plain list items, not controls: + +- I’m losing track of things +- Something doesn’t feel right +- Changing things causes problems elsewhere +- There’s simply too much to manage + +The plum **Help me find the problem →** link performs ordinary server navigation to `/writing-problems`. “No sign-up needed.” makes its anonymous availability explicit. The cream/sage example cards, plum heading, editorial serif and compact responsive grid use the public palette. The section stacks below 900px and the examples below 600px. The link has an evident keyboard focus outline. No solver logic or recommendations were changed. + +## Tour contrast amendment + +The public visual unification changed the Plot Lines section’s background to cream through an alternating-section rule, while the former dark section retained pale foreground variables and explicit pale olive details. The shared public visual stylesheet now pairs that section’s cream surface with dark ink/muted text and darker olive emphasis, annotation and checkmarks. Its screenshot frame also uses the warm surface. + +The rest of the Tour was checked too. All eight other small section labels failed normal-text contrast (approximately 3.58–3.73:1). Tour labels now use `#62664f`, including on sage. Browser checks walk rendered Tour text nodes against their solid ancestor surfaces and require WCAG AA normal/large-text ratios at all four widths. Decorative/photo regions also receive visual review; this automated check is not an assertion about text baked into screenshots. + +## Screenshot amendment + +See [the inventory and capture report](../PublicMarketingScreenshots/Report.md). Principal Home and all Tour application screenshots now use PlotDirector. One later Home composition deliberately demonstrates Modern Dark, labelled “A different mood, still your workspace. Shown in Modern Dark.” + +Existing angled layouts and cropped fragments remain. The common `_MarketingScreenshot` partial uses lazy AVIF/WebP 640/960/1280 variants and intrinsic dimensions. The 14 approved Solver captures and derivatives remain unchanged. No application theme or author preference code changed. + +## Verification before deployment + +- `dotnet build PlotLine.slnx`: passed; two existing nullable warnings on the first build, no new errors. +- Existing executable regression harness: **395 passed**, exit 0. +- `home-solver-marketing.cjs`: Home placement, four noninteractive examples, anonymous JavaScript-disabled CTA, keyboard focus, canonical-theme clusters, AVIF decode, full Home/Tour captures, Tour text contrast and no horizontal overflow at **390/768/1440/1920px**. +- `public-visual-identity.cjs`: existing coordinated photos, one responsive background per page, intact hero/manuscript/Tour/Pricing structure and ten other public page types passed at all four widths. +- `writing-solver-clean-urls.cjs`: all 52 permanent pages, personalised/private evidence, fresh sharing, Back/Forward, revised diagnosis, JS/no-JS, 390/1440, metadata/canonical/OG/schema and Development noindex passed. + +Development deployment and measured performance are recorded in Deployment.md. Production remains unchanged. diff --git a/Docs/PublicMarketingScreenshots/Captures.json b/Docs/PublicMarketingScreenshots/Captures.json new file mode 100644 index 00000000..3f16f0d6 --- /dev/null +++ b/Docs/PublicMarketingScreenshots/Captures.json @@ -0,0 +1,127 @@ +[ + { + "asset": "scene", + "route": "/Scenes/Edit/{id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "plotdirector", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "writing", + "route": "/Scenes/Edit/{id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "plotdirector", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "import", + "route": "/onboarding", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "plotdirector", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "dark-overview", + "route": "/Timeline?projectId={id}&bookId={id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "modern-dark", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "dark-knowledge", + "route": "/Dynamics/Knowledge/{id}?projectId={id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "modern-dark", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "dark-plot-lines", + "route": "/PlotLineWorkspace?projectId={id}&bookId={id}&plotLineId={id}&plotLineId={id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "modern-dark", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "person-fragment", + "source": "scene.png", + "crop": { + "left": 860, + "top": 306, + "width": 380, + "height": 110 + }, + "theme": "plotdirector", + "width": 380, + "height": 110, + "presentation": "crop-of-actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "knowledge-fragment", + "source": "character-knowledge.png", + "crop": { + "left": 26, + "top": 362, + "width": 1000, + "height": 175 + }, + "theme": "plotdirector", + "width": 1000, + "height": 175, + "presentation": "crop-of-actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "dark-knowledge-fragment", + "source": "dark-knowledge.png", + "crop": { + "left": 26, + "top": 362, + "width": 1000, + "height": 82 + }, + "theme": "modern-dark", + "width": 1000, + "height": 82, + "presentation": "crop-of-actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "calendar", + "route": "/StoryCalendar?projectId={id}&bookId={id}&month={id}-{id}&date={id}-{id}-{id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "plotdirector", + "presentation": "actual-installed-pwa", + "privacyChecked": true + }, + { + "asset": "characters", + "route": "/Characters/Details/{id}?projectId={id}", + "width": 1280, + "height": 800, + "cropY": 44, + "theme": "plotdirector", + "presentation": "actual-installed-pwa", + "privacyChecked": true + } +] \ No newline at end of file diff --git a/Docs/PublicMarketingScreenshots/Masters/calendar.png b/Docs/PublicMarketingScreenshots/Masters/calendar.png new file mode 100644 index 00000000..4d46cdf7 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/calendar.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/characters.png b/Docs/PublicMarketingScreenshots/Masters/characters.png new file mode 100644 index 00000000..5f17dbde Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/characters.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/dark-knowledge-fragment.png b/Docs/PublicMarketingScreenshots/Masters/dark-knowledge-fragment.png new file mode 100644 index 00000000..24356c49 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/dark-knowledge-fragment.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/dark-knowledge.png b/Docs/PublicMarketingScreenshots/Masters/dark-knowledge.png new file mode 100644 index 00000000..8a7d89d9 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/dark-knowledge.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/dark-overview.png b/Docs/PublicMarketingScreenshots/Masters/dark-overview.png new file mode 100644 index 00000000..9d63ba07 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/dark-overview.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/dark-plot-lines.png b/Docs/PublicMarketingScreenshots/Masters/dark-plot-lines.png new file mode 100644 index 00000000..f21ee991 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/dark-plot-lines.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/import.png b/Docs/PublicMarketingScreenshots/Masters/import.png new file mode 100644 index 00000000..653caaca Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/import.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/knowledge-fragment.png b/Docs/PublicMarketingScreenshots/Masters/knowledge-fragment.png new file mode 100644 index 00000000..520929ca Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/knowledge-fragment.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/person-fragment.png b/Docs/PublicMarketingScreenshots/Masters/person-fragment.png new file mode 100644 index 00000000..2f7cd932 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/person-fragment.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/scene.png b/Docs/PublicMarketingScreenshots/Masters/scene.png new file mode 100644 index 00000000..737dba98 Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/scene.png differ diff --git a/Docs/PublicMarketingScreenshots/Masters/writing.png b/Docs/PublicMarketingScreenshots/Masters/writing.png new file mode 100644 index 00000000..da186dab Binary files /dev/null and b/Docs/PublicMarketingScreenshots/Masters/writing.png differ diff --git a/Docs/PublicMarketingScreenshots/Report.md b/Docs/PublicMarketingScreenshots/Report.md new file mode 100644 index 00000000..70a6a103 --- /dev/null +++ b/Docs/PublicMarketingScreenshots/Report.md @@ -0,0 +1,50 @@ +# Canonical public application screenshots + +## Policy and inventory + +**PlotDirector is the canonical marketing screenshot theme.** Another application theme must be an intentional, labelled demonstration of appearance choice, and an entire composition must remain coherent. This is asset policy; application theme behaviour is unchanged. + +Audited Home, Tour (`/features`), feature detail rendering, discovery/How-To metadata and Writing Problem results. The ten legacy JPEG application assets were referenced by Home/Tour. The current feature-detail graph has no separate screenshot assignments, so its pages need no replacement. Social branding images and decorative photography are not application screenshots. + +| Legacy asset | Finding | Current principal replacement | +|---|---|---| +| scene.jpg | Older light fixture/chrome | New actual PWA Scene Inspector, PlotDirector | +| writing.jpg | Older light fixture/chrome | New actual PWA Writer/notes, PlotDirector | +| workspace.jpg | Older light fixture/chrome | Reuse approved `series-project` project/books overview | +| calendar.jpg | Older light fixture/chrome | New actual PWA Story Calendar, PlotDirector; selected day and dated scene visible | +| plot-lines.jpg | Legacy dark map, inconsistent principal story | Reuse approved `plot-lines-weave`, PlotDirector | +| characters.jpg | Older light fixture/chrome | New actual PWA Mara Vale profile, PlotDirector | +| continuity.jpg | Older light fixture/chrome | Reuse approved `continuity-story-state`, PlotDirector; alt identifies recorded state rather than a warning panel | +| knowledge.jpg | Older light fixture/chrome | Reuse approved `character-knowledge`, PlotDirector | +| import.jpg | Older fixture layout | New actual PWA manuscript setup wizard, PlotDirector; caption accurately identifies book selection, not a completed scan/review | +| insights.jpg | Legacy dark health view | Reuse approved `timeline-story-values`, PlotDirector; alt identifies scene metrics | + +All **14 approved Writing Problem assets** already satisfy the policy: `plot-lines-weave`, `timeline-chronology`, `timeline-scene-overview`, `character-records`, `relationship-map`, `character-knowledge`, `character-arc`, `location-reference`, `object-journey`, `timeline-story-values`, `scenario-alternatives`, `continuity-story-state`, `series-project`, `story-bible`. None was regenerated or modified. Five full captures are reused on Home/Tour; a knowledge detail crop derives from the approved master. + +## New captures and deliberate alternative + +Eight full captures came from the actual currently deployed Development application installed as a standalone Chromium PWA: five canonical views (Scene Inspector, Writer, Calendar, Character profile, manuscript setup) and three Modern Dark views (Timeline, Knowledge, Plot Lines). The latter appear only together in the later dark-green Home composition, explicitly labelled as Modern Dark. No principal Tour image uses an alternative theme. Legacy JPEGs are no longer referenced in either view; retained files are not initial-page requests. + +Three direct crops support existing compositions: people from the new Scene Inspector, knowledge from the approved PlotDirector capture, and knowledge from the new Modern Dark capture. These are extracts of real UI, not reconstructed UI. The existing rotations, annotation papers, fragments and full-image links remain. Full links open optimized 1280px WebP originals of the respective real views. + +Totals: **8 new full captures + 3 crops = 11 new asset groups**, each with three widths in AVIF and WebP (**66 derivatives**). Five approved full views are reused without duplicate files. + +## Provenance and safe fixture + +[Captures.json](Captures.json) records route templates, theme, crop geometry and PWA/privacy provenance. [Masters](Masters) retain lossless approved source captures and real crops in the repository. `Tools/PublicMarketingCapture/encode.cjs` regenerates public derivatives using the existing browser workspace’s Sharp dependency (AVIF quality 55, WebP 82). + +`PlotLine.Tests/Browser/capture-public-marketing.cjs` uses an actual installed PWA, verifies standalone display mode and selected theme, excludes the account/title strip, blurs focus and moves the mouse clear, waits for fonts and stable UI, and rejects fixture/account/debug labels. It never intercepts application data or fakes application views. The only theme preference changed belonged to the disposable fixture account. + +A dedicated `pwa-browser-…@example.invalid` identity and fictional The Glass Harbour project were created after the existing identity tool verified Development and made a unique COPY_ONLY/CHECKSUM backup. The operational fixture helper uses existing repositories/stored procedures and validates identity, database and ownership before writes. No real manuscript, author preference or application feature was modified. + +Cleanup removed the owned project via the normal account workflow. That exposed a pre-existing account-delete foreign-key omission for UserOnboardingState. A scoped operational cleanup removed only this disposable user’s onboarding row after verifying exact identity and absence of remaining project access; the normal account workflow then removed the user and private credential file. No application/schema change was made for this unrelated defect. + +The import screenshot intentionally shows current real setup at book selection. Capturing a completed Word scan would require an actual connected Word document; no completed import or generated analysis was simulated for a marketing image. + +## Rendering and verification + +`_MarketingScreenshot.cshtml` centralizes the current asset mappings, dimensions, responsive formats and explicit theme metadata. Existing Home/Tour composition wrappers remain; only the fragment crop positioning adapts to current PWA panels. Loading is lazy, decode is asynchronous, and intrinsic dimensions reserve image space. New screenshots do not replace the public-site photographic assets. + +Full Home and Tour reviewed at desktop and mobile, with automated 390/768/1440/1920px image decoding/theme/overflow checks. Main Writing Problem and representative diagnosis pages remain covered by unchanged Solver checks. All Tour rendered text colours are checked against their surfaces, including every section label, Plot Lines emphasis, annotation and capability text. + +See [Home report](../HomeSolverInvitation/Report.md) and its Development deployment/performance record for measured results and runtime commit. diff --git a/PlotLine.Tests/Browser/capture-public-marketing.cjs b/PlotLine.Tests/Browser/capture-public-marketing.cjs new file mode 100644 index 00000000..4af6f708 --- /dev/null +++ b/PlotLine.Tests/Browser/capture-public-marketing.cjs @@ -0,0 +1,25 @@ +// Official captures: actual installed Development application with isolated, fictional persisted data. +const{chromium}=require('playwright'),fs=require('node:fs'),os=require('node:os'),path=require('node:path'),assert=require('node:assert/strict'); +const base='https://dev.plotdirector.com',masters='/home/nick/.codex/artifacts/public-marketing-20261102';let stage='setup'; +(async()=>{const file=process.argv[2];assert(file?.startsWith('/tmp/pd-dev-browser-'));const id=JSON.parse(fs.readFileSync(file));assert.equal(id.Database,'PlotDirector_Development');assert(id.Email.startsWith('pwa-browser-'));fs.mkdirSync(masters,{recursive:true}); +const profile=fs.mkdtempSync(path.join(os.tmpdir(),'pd-capture-'));const ctx=await chromium.launchPersistentContext(profile,{headless:false,viewport:{width:1280,height:944}});const cdp=await ctx.browser().newBrowserCDPSession();let installed=false;const manifestId=base+'/Projects'; +try{const web=ctx.pages()[0];await web.goto(base+'/Account/Login');await web.locator('[name=Email]').fill(id.Email);await web.locator('[name=Password]').fill(id.Password);await web.locator('form button[type=submit]').click();await web.waitForURL('**/Projects');await web.waitForFunction(()=>!document.querySelector('[data-app-theme-choice]').disabled);if(await web.locator('html').getAttribute('data-app-theme')!=='plotdirector'){await web.locator('#accountMenuButton').click();await web.locator('[data-app-theme-choice=plotdirector]').click();await web.waitForFunction(()=>document.documentElement.dataset.appTheme==='plotdirector');await web.locator('#accountMenuButton').click();} +stage='PWA install';await web.goto(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 app.setViewportSize({width:1280,height:944}); +const q=`projectId=${id.ProjectID}&bookId=${id.BookID}`;const selection=process.env.CAPTURE_ASSETS?.split(',');const captures=selection?JSON.parse(fs.readFileSync(path.join(masters,'captures.json'))).filter(c=>!selection.includes(c.asset)):[];let theme='plotdirector'; +async function capture(asset,url,prepare){if(selection&&!selection.includes(asset))return;stage=asset;await app.setViewportSize(asset==='series-project'?{width:1440,height:1000}:{width:1280,height:944});assert.equal((await app.goto(base+url)).status(),200);assert.equal(await app.locator('html').getAttribute('data-app-theme'),theme);if(prepare)await prepare();await app.evaluate(()=>document.fonts.ready);await app.waitForTimeout(400); + const height=800;const width=1280;const y=Math.ceil(await app.locator('.pd-titlebar').evaluate(e=>e.getBoundingClientRect().bottom));const clip={x:0,y,width,height};const visible=await app.evaluate(clip=>{const out=[];const w=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT);while(w.nextNode()){const n=w.currentNode;if(!n.textContent.trim()||['SCRIPT','STYLE'].includes(n.parentElement.tagName))continue;const range=document.createRange();range.selectNode(n);const r=range.getBoundingClientRect();if(r.width&&r.height&&r.bottom>clip.y&&r.topdocument.activeElement?.blur());await app.mouse.move(1278,940);await app.screenshot({path:path.join(masters,asset+'.png'),clip,animations:'disabled'});captures.push({asset,route:url.replace(/\d+/g,'{id}'),width,height,cropY:y,theme,presentation:'actual-installed-pwa',privacyChecked:true});console.log('CAPTURE',asset);} +async function sceneArea(area){const command=app.locator(`[data-scene-area-command="${area}"]:visible`);if(await command.count())await command.click();else{const group=app.locator('.pd-context-group[aria-label="Edit Scene"]');const details=group.locator('details[data-compact="true"]');if(await details.count()&&await details.getAttribute('open')===null)await details.locator('summary').click();await group.locator('button.pd-context-command').filter({hasText:new RegExp('^'+area+'$','i')}).click();}} +await capture('scene','/Scenes/Edit/'+id.SceneID); +await capture('writing','/Scenes/Edit/'+id.SceneID,async()=>{await sceneArea('writer');await app.locator('[data-scene-editor="notes"]:visible').first().click();await app.locator('[data-scene-editor-body] textarea').first().waitFor();}); +await capture('calendar','/StoryCalendar?'+q+'&month=1926-05&date=1926-05-14',async()=>{await app.locator('.story-calendar-grid-wrap').evaluate(e=>e.scrollTop=260);}); +await capture('characters','/Characters/Details/'+id.CharacterID+'?projectId='+id.ProjectID); +await capture('import','/onboarding',async()=>{if((await app.locator('h1').innerText()).includes('Scan'))await app.getByRole('button',{name:'Back',exact:true}).click();}); +// One explicitly labelled alternative-theme cluster, selected only in this disposable account. +await app.locator('#accountMenuButton').click();await app.locator('[data-app-theme-choice="modern-dark"]').click();await app.locator('#accountMenuButton').click();await app.waitForFunction(()=>document.documentElement.dataset.appTheme==='modern-dark');theme='modern-dark'; +await capture('dark-overview','/Timeline?'+q,async()=>{const hint=app.locator('[data-timeline-navigation-dismiss]');if(await hint.isVisible())await hint.click();}); +await capture('dark-knowledge','/Dynamics/Knowledge/'+id.CharacterID+'?projectId='+id.ProjectID); +await capture('dark-plot-lines','/PlotLineWorkspace?'+q+'&plotLineId='+id.LineAID+'&plotLineId='+id.LineBID); +fs.writeFileSync(path.join(masters,'captures.json'),JSON.stringify(captures,null,2));console.log('PASS public marketing real Development PWA captures; account strip excluded; fictional data privacy checks passed.'); +}catch(e){console.error('FAILED',stage,e.message);process.exitCode=1;}finally{if(installed)await cdp.send('PWA.uninstall',{manifestId}).catch(()=>{});await ctx.close();fs.rmSync(profile,{recursive:true,force:true});}})(); diff --git a/PlotLine.Tests/Browser/home-solver-marketing.cjs b/PlotLine.Tests/Browser/home-solver-marketing.cjs new file mode 100644 index 00000000..6e829212 --- /dev/null +++ b/PlotLine.Tests/Browser/home-solver-marketing.cjs @@ -0,0 +1,5 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('fs'); +const base=process.env.PUBLIC_BASE_URL||'http://127.0.0.1:5238',live=base.includes('dev.plotdirector.com'),output=process.env.PUBLIC_CAPTURE_DIR||'/tmp/home-marketing-browser';fs.mkdirSync(output,{recursive:true}); +(async()=>{const b=await chromium.launch(),results=[];try{for(const width of [390,768,1440,1920]){const c=await b.newContext({viewport:{width,height:1000},reducedMotion:'reduce'}),p=await c.newPage();await c.addCookies([{name:'solver-anonymous',value:'true',url:base}]);for(const name of ['home','tour']){await p.goto(base+(live?(name==='home'?'/':'/features'):`/public-fixture/${name}?anonymous=true`));await p.waitForLoadState('networkidle');for(const picture of await p.locator('[data-marketing-screenshot]').all()){await picture.scrollIntoViewIfNeeded();const img=picture.locator('img');await img.evaluate(e=>e.decode());assert((await img.evaluate(e=>e.currentSrc)).endsWith('.avif'));assert.equal(await img.evaluate(e=>e.naturalWidth>0),true);if(name==='tour'||!(await picture.evaluate(e=>e.closest('.power-composition'))))assert.equal(await picture.getAttribute('data-screenshot-theme'),'plotdirector');}assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false,`${name}/${width}`);if(name==='home'){const section=p.locator('.writer-solver-invitation');assert.equal(await section.count(),1);assert.equal(await section.locator('li').count(),4);assert.equal(await section.locator('button,input,select,form').count(),0);assert.match(await section.innerText(),/No sign-up needed/);const link=section.getByRole('link',{name:'Help me find the problem'});assert.equal(await link.getAttribute('href'),'/writing-problems');await link.focus();assert.equal(await link.evaluate(e=>e===document.activeElement),true);await section.screenshot({path:`${output}/invitation-${width}.png`});assert(await p.locator('.writer-problems').evaluate(e=>!!e.nextElementSibling?.matches('.writer-solver-invitation')));assert(await section.evaluate(e=>!!e.nextElementSibling?.matches('.remembers-section')));}await p.evaluate(()=>scrollTo(0,0));await p.screenshot({path:`${output}/${name}-${width}-full.png`,fullPage:true});if(name==='tour'){const failures=await p.evaluate(()=>{const rgb=s=>(s.match(/[\d.]+/g)||[]).map(Number),lin=v=>(v/=255)<=.04045?v/12.92:((v+.055)/1.055)**2.4,lum=c=>.2126*lin(c[0])+.7152*lin(c[1])+.0722*lin(c[2]);const out=[];const walk=document.createTreeWalker(document.querySelector('.writer-tour'),NodeFilter.SHOW_TEXT);while(walk.nextNode()){const n=walk.currentNode,e=n.parentElement;if(!n.textContent.trim()||e.closest('[aria-hidden=true],script,style')||!e.getBoundingClientRect().width)continue;const st=getComputedStyle(e);if(st.visibility==='hidden'||st.display==='none')continue;let bg=null;for(let a=e;a;a=a.parentElement){const col=rgb(getComputedStyle(a).backgroundColor);if(col.length===3||col[3]===1){bg=col;break;}}bg??=[252,243,229];const fg=rgb(st.color),ratio=(Math.max(lum(fg),lum(bg))+.05)/(Math.min(lum(fg),lum(bg))+.05),large=parseFloat(st.fontSize)>=24||(parseFloat(st.fontSize)>=18.66&&parseInt(st.fontWeight)>=700);if(ratio<(large?3:4.5))out.push({text:n.textContent.trim().slice(0,90),ratio,fg:st.color,bg,tag:e.tagName,cls:e.className});}return out;});results.push({width,contrastFailures:failures});assert.deepEqual(failures,[],`Tour contrast ${width}: ${JSON.stringify(failures)}`);}} +// Ordinary server navigation remains usable without JavaScript and without an account. +await c.close();const nj=await b.newContext({javaScriptEnabled:false,viewport:{width,height:1000}});await nj.addCookies([{name:'solver-anonymous',value:'true',url:base}]);const np=await nj.newPage();await np.goto(base+(live?'/':'/public-fixture/home?anonymous=true'));await np.locator('.writer-solver-invitation a').click();assert.equal(new URL(np.url()).pathname,'/writing-problems');assert.equal(await np.locator('form').count()>0,true);assert(!np.url().includes('Login'));await nj.close();}fs.writeFileSync(output+'/checks.json',JSON.stringify(results,null,2));console.log('PASS Home invitation/anonymous no-JS CTA, canonical screenshot clusters, AVIF loading, all Tour text contrast, full-page captures and overflow at four widths.');}finally{await b.close();}})().catch(e=>{console.error(e);process.exit(1)}); diff --git a/PlotLine.Tests/Browser/public-marketing-performance.cjs b/PlotLine.Tests/Browser/public-marketing-performance.cjs new file mode 100644 index 00000000..37418736 --- /dev/null +++ b/PlotLine.Tests/Browser/public-marketing-performance.cjs @@ -0,0 +1 @@ +const{chromium}=require('playwright'),fs=require('fs'),assert=require('node:assert/strict');const base=process.env.PUBLIC_BASE_URL||'https://dev.plotdirector.com';(async()=>{const b=await chromium.launch(),out=[];try{for(const width of [390,1440])for(const path of ['/','/features']){const c=await b.newContext({viewport:{width,height:1000},reducedMotion:'reduce'}),p=await c.newPage();await c.addCookies([{name:'solver-anonymous',value:'true',url:base}]);await p.addInitScript(()=>{window.marketingCLS=0;new PerformanceObserver(list=>{for(const e of list.getEntries())if(!e.hadRecentInput)window.marketingCLS+=e.value;}).observe({type:'layout-shift',buffered:true});});await p.goto(base+path);await p.waitForLoadState('networkidle');const first=await p.evaluate(()=>({cls:window.marketingCLS,bytes:performance.getEntriesByType('resource').reduce((s,r)=>s+r.transferSize,0)}));for(const img of await p.locator('main img').all()){await img.scrollIntoViewIfNeeded();await img.evaluate(e=>e.decode());}await p.waitForLoadState('networkidle');await p.waitForTimeout(300);const full=await p.evaluate(()=>({cls:window.marketingCLS,bytes:performance.getEntriesByType('resource').reduce((s,r)=>s+r.transferSize,0),images:performance.getEntriesByType('resource').filter(r=>/\.(avif|webp|png|jpe?g)(\?|$)/.test(r.name)).map(r=>({url:r.name,encoded:r.encodedBodySize}))}));out.push({path,width,first,full});assert(full.cls<.02,`Layout shift ${path}/${width}: ${full.cls}`);await c.close();}fs.writeFileSync(process.argv[2],JSON.stringify(out,null,2));console.log('PASS full-page image decoding and CLS <0.02; recorded fresh-context initial/full-scroll transfers.');}finally{await b.close();}})().catch(e=>{console.error(e);process.exit(1)}); diff --git a/PlotLine/Views/Home/Index.cshtml b/PlotLine/Views/Home/Index.cshtml index 695109d4..4d824224 100644 --- a/PlotLine/Views/Home/Index.cshtml +++ b/PlotLine/Views/Home/Index.cshtml @@ -68,6 +68,27 @@ +
+
+
+

The Writing Problem Solver

+

Not sure what’s
getting in the way?

+

Characters, storylines, scene order, continuity. You can feel something getting tangled without knowing what to call it.

+

Tell us what’s becoming difficult. We’ll help you narrow down what’s happening, what to look at next and where PlotDirector may help.

+ Help me find the problem +

No sign-up needed.

+
+
+ +
    +
  • I’m losing track of things
  • +
  • Something doesn’t feel right
  • +
  • Changing things causes problems elsewhere
  • +
  • There’s simply too much to manage
  • +
+
+
+
@@ -80,11 +101,11 @@
@@ -113,7 +134,7 @@

You don't need to plan every detail before you begin. Work on your next scene. Keep the structure close when you need it, and get back to your story when you don't.

- The actual PlotDirector scene workspace, showing notes and drafting support for a fictional scene. + @await Html.PartialAsync("_MarketingScreenshot", ("writing", "The actual PlotDirector scene workspace, showing notes and drafting support for a fictional scene."))
One scene. Your words. Off you go.Scene notes and drafting support
@@ -130,7 +151,7 @@ @@ -144,7 +165,7 @@
- PlotDirector's genuine narrative map arranges example plot lines across scenes. + @await Html.PartialAsync("_MarketingScreenshot", ("plot-lines", "PlotDirector's genuine narrative map arranges example plot lines across scenes."))
02 / THE LOOSE ENDS @@ -152,9 +173,9 @@

See how plot lines weave through your scenes. Follow the promises, developments and payoffs, and find the threads that need another look.

Follow the thread →
- +

A different mood, still your workspace. Shown in Modern Dark.

diff --git a/PlotLine/Views/Public/Features.cshtml b/PlotLine/Views/Public/Features.cshtml index 009a6b97..ef8d989d 100644 --- a/PlotLine/Views/Public/Features.cshtml +++ b/PlotLine/Views/Public/Features.cshtml @@ -27,7 +27,7 @@

Keep the next scene in reach. PlotDirector gives the work around your writing a home, so getting organised doesn't become a second novel.

- Actual scene workspace with drafting support and notes for a fictional scene. + @await Html.PartialAsync("_MarketingScreenshot", ("writing", "Actual scene workspace with drafting support and notes for a fictional scene."))
Scene workspace · fictional demonstration
@@ -88,7 +88,7 @@
- Real story calendar showing fictional scenes arranged in story time. + @await Html.PartialAsync("_MarketingScreenshot", ("calendar", "Real story calendar showing fictional scenes arranged in story time."))
Story Calendar · make time make sense
@@ -115,7 +115,7 @@
- Genuine Plot Lines Workspace narrative map rendered with fictional regression data. + @await Html.PartialAsync("_MarketingScreenshot", ("plot-lines", "Genuine Plot Lines Workspace narrative map rendered with fictional regression data."))
Plot Lines Workspace · follow the weave
@@ -140,7 +140,7 @@
- Actual continuity review panel showing an example warning for a fictional scene. + @await Html.PartialAsync("_MarketingScreenshot", ("continuity", "Continuity Explorer showing recorded story state in a fictional project."))
A second look at the details
@@ -159,7 +159,7 @@
- Actual scene knowledge panel with fictional character knowledge records. + @await Html.PartialAsync("_MarketingScreenshot", ("knowledge", "Actual scene knowledge panel with fictional character knowledge records."))
Who knows what, and when
@@ -174,8 +174,8 @@

Bring your manuscript from Microsoft Word into the guided import. Scan, review the detected structure and approve what comes into your workspace. Then build from the work you've already done.

- Actual PlotDirector guided manuscript import interface, using a fictional demonstration project. -
Guided manuscript import · review before you continue
+ @await Html.PartialAsync("_MarketingScreenshot", ("import", "Current manuscript setup wizard with a fictional book selected.")) +
Manuscript setup · choose the book you’ll bring into your workspace