diff --git a/Docs/WritingSolver/ResultPolish/Evidence/clean-urls.txt b/Docs/WritingSolver/ResultPolish/Evidence/clean-urls.txt new file mode 100644 index 00000000..db0b9682 --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/clean-urls.txt @@ -0,0 +1 @@ +PASS clean URLs: 52 direct pages; private evidence/refresh/fresh sharing; Back/Forward; revised diagnosis; 390/1440; JS/no-JS; canonical/OG/structured data; robots; sitemap Development noindex diff --git a/Docs/WritingSolver/ResultPolish/Evidence/editorial.txt b/Docs/WritingSolver/ResultPolish/Evidence/editorial.txt new file mode 100644 index 00000000..84c0d084 --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/editorial.txt @@ -0,0 +1 @@ +PASS editorial: all 52 metadata/content/direct-entry pages; nine crawlable groups reach all 52; nine families × four widths; no overflow; no-JS; preserved previews. diff --git a/Docs/WritingSolver/ResultPolish/Evidence/images.txt b/Docs/WritingSolver/ResultPolish/Evidence/images.txt new file mode 100644 index 00000000..adee2d8a --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/images.txt @@ -0,0 +1 @@ +PASS all 52 real screenshot mappings; 11 view families at 390/768/1440/1920; one responsive variant per primary/secondary demonstration, AVIF/WebP fallback, alt, stable dimensions, clean URLs, full-width canvas, readable column and no overflow. diff --git a/Docs/WritingSolver/ResultPolish/Evidence/journeys.txt b/Docs/WritingSolver/ResultPolish/Evidence/journeys.txt new file mode 100644 index 00000000..8e6c46b9 --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/journeys.txt @@ -0,0 +1 @@ +PASS dead-end repair: reported four-answer route; changed hypothesis; knowledge search; six-answer rescue/POV/intended-main routes; Plot Lines, timeline/continuity, relationships, scene/chapter, series, knowledge and character arc; evidence variants; optional secondary/article; explicit missing visuals; no article dump; reassurance/insufficient evidence; no-JS; 390/1440px; Back/Forward/Restart; public theme and noindex; signed-out tour CTA; signed-in authorised project/character selector and real workspace redirects. diff --git a/Docs/WritingSolver/ResultPolish/Evidence/modal-layout-metrics.json b/Docs/WritingSolver/ResultPolish/Evidence/modal-layout-metrics.json new file mode 100644 index 00000000..83f96cec --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/modal-layout-metrics.json @@ -0,0 +1,366 @@ +[ + { + "width": 390, + "family": "overview", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 56158 + } + ] + }, + { + "width": 390, + "family": "plot-map", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 390, + "family": "workflow", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 390, + "family": "chronology", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-scene-overview.webp", + "bytes": 65928 + } + ] + }, + { + "width": 390, + "family": "people", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 31548 + } + ] + }, + { + "width": 390, + "family": "trace", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 0 + } + ] + }, + { + "width": 390, + "family": "progression", + "main": 350, + "prose": 350, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-story-values.webp", + "bytes": 58786 + } + ] + }, + { + "width": 768, + "family": "overview", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 56158 + } + ] + }, + { + "width": 768, + "family": "plot-map", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 768, + "family": "workflow", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 768, + "family": "chronology", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-scene-overview.webp", + "bytes": 65928 + } + ] + }, + { + "width": 768, + "family": "people", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 31548 + } + ] + }, + { + "width": 768, + "family": "trace", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 0 + } + ] + }, + { + "width": 768, + "family": "progression", + "main": 720, + "prose": 720, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-story-values.webp", + "bytes": 58786 + } + ] + }, + { + "width": 1440, + "family": "overview", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 56158 + } + ] + }, + { + "width": 1440, + "family": "plot-map", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 1440, + "family": "workflow", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 1440, + "family": "chronology", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-scene-overview.webp", + "bytes": 65928 + } + ] + }, + { + "width": 1440, + "family": "people", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 31548 + } + ] + }, + { + "width": 1440, + "family": "trace", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 0 + } + ] + }, + { + "width": 1440, + "family": "progression", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-story-values.webp", + "bytes": 58786 + } + ] + }, + { + "width": 1920, + "family": "overview", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 56158 + } + ] + }, + { + "width": 1920, + "family": "plot-map", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 1920, + "family": "workflow", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/plot-lines-weave.webp", + "bytes": 0 + } + ] + }, + { + "width": 1920, + "family": "chronology", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-scene-overview.webp", + "bytes": 65928 + } + ] + }, + { + "width": 1920, + "family": "people", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 31548 + } + ] + }, + { + "width": 1920, + "family": "trace", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/character-records.webp", + "bytes": 0 + } + ] + }, + { + "width": 1920, + "family": "progression", + "main": 1140, + "prose": 896, + "cls": 0, + "inspectionBytes": [ + { + "url": "http://127.0.0.1:5238/images/writing-solver/timeline-story-values.webp", + "bytes": 58786 + } + ] + } +] \ No newline at end of file diff --git a/Docs/WritingSolver/ResultPolish/Evidence/modal-layout.txt b/Docs/WritingSolver/ResultPolish/Evidence/modal-layout.txt new file mode 100644 index 00000000..359472d3 --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/modal-layout.txt @@ -0,0 +1 @@ +PASS seven result families × four widths: aligned main/action, shared wider prose/related area; modal fit/aspect, deferred image, keyboard focus/Tab/Escape, close/backdrop, scroll lock/restoration, no new tab or overflow; reassurance recap; no-JS image fallback. diff --git a/Docs/WritingSolver/ResultPolish/Evidence/performance-before.json b/Docs/WritingSolver/ResultPolish/Evidence/performance-before.json new file mode 100644 index 00000000..a521c805 --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/performance-before.json @@ -0,0 +1,386 @@ +[ + { + "slug": "too-many-storylines-to-manage", + "width": 390, + "run": 0, + "lcp": { + "ms": 236, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/plot-lines-weave-640.avif", + "transfer": 14501, + "encoded": 14201, + "initiator": "img" + } + ], + "totalBytes": 922228 + }, + { + "slug": "too-many-storylines-to-manage", + "width": 390, + "run": 1, + "lcp": { + "ms": 240, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/plot-lines-weave-640.avif", + "transfer": 14501, + "encoded": 14201, + "initiator": "img" + } + ], + "totalBytes": 922228 + }, + { + "slug": "too-many-storylines-to-manage", + "width": 1440, + "run": 0, + "lcp": { + "ms": 292, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/plot-lines-weave-960.avif", + "transfer": 24833, + "encoded": 24533, + "initiator": "img" + } + ], + "totalBytes": 932560 + }, + { + "slug": "too-many-storylines-to-manage", + "width": 1440, + "run": 1, + "lcp": { + "ms": 276, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/plot-lines-weave-960.avif", + "transfer": 24833, + "encoded": 24533, + "initiator": "img" + } + ], + "totalBytes": 932560 + }, + { + "slug": "relationship-stops-developing", + "width": 390, + "run": 0, + "lcp": { + "ms": 228, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/relationship-map-640.avif", + "transfer": 12036, + "encoded": 11736, + "initiator": "img" + } + ], + "totalBytes": 919763 + }, + { + "slug": "relationship-stops-developing", + "width": 390, + "run": 1, + "lcp": { + "ms": 212, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/relationship-map-640.avif", + "transfer": 12036, + "encoded": 11736, + "initiator": "img" + } + ], + "totalBytes": 919763 + }, + { + "slug": "relationship-stops-developing", + "width": 1440, + "run": 0, + "lcp": { + "ms": 228, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/relationship-map-960.avif", + "transfer": 20434, + "encoded": 20134, + "initiator": "img" + } + ], + "totalBytes": 928161 + }, + { + "slug": "relationship-stops-developing", + "width": 1440, + "run": 1, + "lcp": { + "ms": 372, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/relationship-map-960.avif", + "transfer": 20434, + "encoded": 20134, + "initiator": "img" + } + ], + "totalBytes": 928161 + }, + { + "slug": "story-order-differs-from-chronology", + "width": 390, + "run": 0, + "lcp": { + "ms": 264, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/timeline-chronology-640.avif", + "transfer": 18348, + "encoded": 18048, + "initiator": "img" + } + ], + "totalBytes": 926075 + }, + { + "slug": "story-order-differs-from-chronology", + "width": 390, + "run": 1, + "lcp": { + "ms": 208, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/timeline-chronology-640.avif", + "transfer": 18348, + "encoded": 18048, + "initiator": "img" + } + ], + "totalBytes": 926075 + }, + { + "slug": "story-order-differs-from-chronology", + "width": 1440, + "run": 0, + "lcp": { + "ms": 244, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/timeline-chronology.avif", + "transfer": 43174, + "encoded": 42874, + "initiator": "img" + } + ], + "totalBytes": 950901 + }, + { + "slug": "story-order-differs-from-chronology", + "width": 1440, + "run": 1, + "lcp": { + "ms": 228, + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "tag": "DIV" + }, + "cls": 0, + "resources": [ + { + "url": "https://dev.plotdirector.com/css/writing-solver.css?v=rugBH6BDVIaAYOvoikzmDKHG4HFxy2Mhg1dLZwRY8w4", + "transfer": 19979, + "encoded": 19679, + "initiator": "link" + }, + { + "url": "https://dev.plotdirector.com/images/public/writing-solver-desk.avif", + "transfer": 176969, + "encoded": 176669, + "initiator": "css" + }, + { + "url": "https://dev.plotdirector.com/images/writing-solver/timeline-chronology.avif", + "transfer": 43174, + "encoded": 42874, + "initiator": "img" + } + ], + "totalBytes": 950901 + } +] \ No newline at end of file diff --git a/Docs/WritingSolver/ResultPolish/Evidence/regressions.txt b/Docs/WritingSolver/ResultPolish/Evidence/regressions.txt new file mode 100644 index 00000000..5148d26b --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/regressions.txt @@ -0,0 +1,4 @@ +dotnet build PlotLine.slnx: success, zero errors. +dotnet run --no-build --project PlotLine.Tests/PlotLine.Tests.csproj: 395 PASS, including unchanged acceptance/prefix/dead-end/exhaustive checks. +Browser: all 52 editorial/metadata pages; real screenshot mappings/variants; normal journeys including neutral/insufficient, multi-select, Back/Forward/restart and no-JS; Review Mode feedback/export/replay/resume; new seven-family × four-width modal/alignment suite. +Secondary workflow screenshot also opens the same dialog with its correct alt text at 390/1440px. diff --git a/Docs/WritingSolver/ResultPolish/Evidence/review-mode.txt b/Docs/WritingSolver/ResultPolish/Evidence/review-mode.txt new file mode 100644 index 00000000..e978dd0a --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Evidence/review-mode.txt @@ -0,0 +1 @@ +PASS Development review: admin-only opt-in; collapsed observer; signal arithmetic; result snapshot/export/replay/resolve/resume; filters; direct-entry unchanged; revision and Back/Forward; multi-select; neutral and insufficient outcomes; no-JS at 390/1440; forged cookie denied. diff --git a/Docs/WritingSolver/ResultPolish/Report.md b/Docs/WritingSolver/ResultPolish/Report.md new file mode 100644 index 00000000..ef82626b --- /dev/null +++ b/Docs/WritingSolver/ResultPolish/Report.md @@ -0,0 +1,26 @@ +# Shared result presentation polish + +## Width hierarchy + +The main result container had expanded to 1140px, while the next-step callout retained a 950px cap, headings a 1050px cap, secondary images an 850px cap, and prose/related sections separate 780/800px caps. These independent leftovers caused accidental steps in the page edges. + +The shared solver stylesheet now defines two result widths: `--solver-result-width:71.25rem` (1140px at the normal root size) and `--solver-reading-width:56rem` (896px). The full-width warm visual canvas is unchanged. The result container remains constrained to the main width; the next-step callout fills it naturally without its own max-width. Headings no longer have an additional cap. Recognition, deeper prose, mental-model parent, related material, supporting prose and secondary explanation use the shared reading width. Secondary demonstrations intentionally share that reading measure rather than inventing another image width. The reassurance card uses the reading measure and its introduction fills the card. + +Question/entry/discovery layout widths remain separate, established layouts; this does not redesign the public site. Typography, content, hierarchy, primary and secondary recommendations and all image mappings are unchanged. The shared implementation covers all seven diagnostic families; reassurance retains its distinct approved treatment. + +## Screenshot inspection + +A single shared native `` serves all primary and secondary screenshot triggers. The existing anchor and optimised picture/srcset remain, with the new-tab target removed. With JavaScript enabled the link opens the in-page dialog; without JavaScript or native dialog support it remains a working same-tab image link. + +The native top layer supplies modal semantics and an inert background. The dialog has a generic accessible heading, one obvious Close control and the selected screenshot's meaningful alt text on the image, without repeating that alt in hidden chrome. Enter opens the keyboard-accessible trigger. Focus moves to Close; Tab/Shift+Tab stay on the sole modal control. Escape, Close and backdrop clicks dismiss it. Closing restores the original trigger focus and the page's prior scroll/overflow/padding state. Scrollbar compensation avoids shifting the underlying content. Normal browser zoom/pinch remains available; no custom zoom application or gallery dependency. + +Desktop maximum dimensions are 90vw/90dvh, with a proportional uncropped image. Mobile uses a 12px outer margin and responsive fitted image. The dialog lives inside the existing solver canvas so the public shell's direct-child content-width rule cannot override its viewport dimensions; an initial tablet test identified this additional wrapper interaction. + +Normal pages continue to load responsive AVIF/WebP variants. The dialog has no image src until opened, when it loads the existing optimised 1280px WebP (31,248–94,090 bytes across the library). No screenshot derivative, mapping or master changed. A previously inspected image can be reused from the browser cache on a later page with zero transferred bytes; cold initial-page checks do not fetch the inspection image. The lightweight script is scoped to diagnostic pages and adds no dependency. + +## Small presentation changes + +- “Also indicated by your answers” is now **“You may also want to look at”**. Existing supporting result selection, disclosures and evidence remain untouched. +- The conversation recap has its own `.solver-recap` styling rather than breadcrumb styling: modest gold accent, slightly larger/darker text, clear introductory label and light separators. Its answer text, accessible navigation label and Restart link remain unchanged. It remains secondary to the diagnosis and Start Here. + +No scoring, routes, diagnosis data, thresholds, permanent editorial copy, metadata, sitemap, Review Mode or feedback/replay changes. Development deployment and verification are recorded in Deployment.md. diff --git a/PlotLine.Tests/Browser/writing-problem-editorial.cjs b/PlotLine.Tests/Browser/writing-problem-editorial.cjs index 6fa92300..cfc95df2 100644 --- a/PlotLine.Tests/Browser/writing-problem-editorial.cjs +++ b/PlotLine.Tests/Browser/writing-problem-editorial.cjs @@ -8,5 +8,5 @@ const areas=await page.locator('.solver-browse-areas a').evaluateAll(es=>es.map( for(const area of areas){await page.goto(base+area);for(const link of await page.locator('.solver-problem-links a').evaluateAll(es=>es.map(e=>e.getAttribute('href'))))discovered.add(link);} assert.equal(discovered.size,52); for(const solution of graph.solutions){const article=catalog.pages.find(p=>p.solution===solution.id),path='/writing-problems/'+solution.slug;assert(discovered.has(path));assert.equal((await page.goto(base+path)).status(),200);assert.equal(await page.locator('h1').innerText(),solution.title);assert((await page.title()).includes(article.title));assert.equal(await page.locator('meta[name=description]').getAttribute('content'),article.description);assert((await page.locator('meta[property="og:title"]').getAttribute('content')).includes(article.title));assert.equal(await page.locator('meta[property="og:description"]').getAttribute('content'),article.description);const canonical=await page.locator('link[rel=canonical]').getAttribute('href');assert.equal(canonical,'https://plotdirector.com'+path);assert.equal(await page.locator('meta[property="og:url"]').getAttribute('content'),canonical);const schema=(await page.locator('script[type="application/ld+json"]').allTextContents()).join('');assert(schema.includes(canonical));assert(!schema.includes('FAQPage'));assert.equal(await page.locator('.solver-result-evidence').count(),0);assert.equal(await page.locator('.solver-permanent-copy').count(),1);assert.equal(await page.locator('.solver-permanent-copy li').count(),3);assert.equal(await page.locator('.solver-related li').count(),article.related.length);assert.equal(await page.locator('.solver-result-cta').count(),1);assert.equal(await page.locator('meta[name=robots]').getAttribute('content'),indexed?'index, follow':'noindex, follow');assert(!(await page.locator('body').innerText()).includes('DEVELOPMENT PREVIEW'));} -for(const width of [390,768,1440,1920]){await page.setViewportSize({width,height:1000});for(const id of ['d01','d16','d21','d28','d30','d34','d43','d49','d50']){const s=graph.solutions.find(s=>s.id===id);await page.goto(base+'/writing-problems/'+s.slug);assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);const canvas=await page.locator('.solver-space').boundingBox();assert(canvas.width>=width-2);const copy=await page.locator('.solver-permanent-copy').boundingBox();assert(copy.width<=782);await page.locator('.solver-start').scrollIntoViewIfNeeded();await page.waitForTimeout(100);const img=page.locator('.solver-result-visual img');if(await img.count())assert(await img.evaluate(e=>e.complete&&e.naturalWidth>0));if(id==='d01'&&process.env.EDITORIAL_CAPTURE_DIR){fs.mkdirSync(process.env.EDITORIAL_CAPTURE_DIR,{recursive:true});await page.screenshot({path:process.env.EDITORIAL_CAPTURE_DIR+'/after-'+width+'.png',fullPage:true});}}} +for(const width of [390,768,1440,1920]){await page.setViewportSize({width,height:1000});for(const id of ['d01','d16','d21','d28','d30','d34','d43','d49','d50']){const s=graph.solutions.find(s=>s.id===id);await page.goto(base+'/writing-problems/'+s.slug);assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);const canvas=await page.locator('.solver-space').boundingBox();assert(canvas.width>=width-2);const copy=await page.locator('.solver-permanent-copy').boundingBox();assert(copy.width<=898);await page.locator('.solver-start').scrollIntoViewIfNeeded();await page.waitForTimeout(100);const img=page.locator('.solver-result-visual img');if(await img.count())assert(await img.evaluate(e=>e.complete&&e.naturalWidth>0));if(id==='d01'&&process.env.EDITORIAL_CAPTURE_DIR){fs.mkdirSync(process.env.EDITORIAL_CAPTURE_DIR,{recursive:true});await page.screenshot({path:process.env.EDITORIAL_CAPTURE_DIR+'/after-'+width+'.png',fullPage:true});}}} await context.close();const nojs=await browser.newContext({javaScriptEnabled:false,viewport:{width:390,height:1000}});const np=await nojs.newPage();await np.goto(base+'/writing-problems/'+graph.solutions[0].slug);assert.equal(await np.locator('.solver-permanent-copy').count(),1);assert.equal(await np.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);await nojs.close();console.log('PASS editorial: all 52 metadata/content/direct-entry pages; nine crawlable groups reach all 52; nine families × four widths; no overflow; no-JS; preserved previews.');}finally{await browser.close();}})().catch(e=>{console.error(e);process.exit(1)}); diff --git a/PlotLine.Tests/Browser/writing-solver-polish.cjs b/PlotLine.Tests/Browser/writing-solver-polish.cjs new file mode 100644 index 00000000..32d143e6 --- /dev/null +++ b/PlotLine.Tests/Browser/writing-solver-polish.cjs @@ -0,0 +1,9 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +const base=process.env.SOLVER_BASE_URL||'http://127.0.0.1:5238'; +const graph=JSON.parse(fs.readFileSync('PlotLine/Content/WritingSolver/Candidates/curated-v2-stage1-repair/writing-solver-curated-v2-stage1-repair.json')); +const catalog=JSON.parse(fs.readFileSync('PlotLine/Content/WritingSolver/Presentation/payoff-v1.json')); +(async()=>{const b=await chromium.launch();try{const measurements=[];for(const width of [390,768,1440,1920]){const c=await b.newContext({viewport:{width,height:1000}});await c.addCookies([{name:'solver-anonymous',value:'true',url:base}]);const p=await c.newPage();await p.addInitScript(()=>{window.testCLS=0;new PerformanceObserver(l=>{for(const e of l.getEntries())if(!e.hadRecentInput)window.testCLS+=e.value;}).observe({type:'layout-shift',buffered:true});}); +for(const family of [...new Set(catalog.results.map(r=>r.family))]){const map=catalog.results.find(r=>r.family===family),s=graph.solutions.find(s=>s.id===map.solution);const images=[];p.on('request',r=>{if(r.url().includes('/images/writing-solver/'))images.push(r.url())});await p.goto(base+'/writing-problems/'+s.slug);await p.waitForLoadState('networkidle');const main=await p.locator('.solver-content').boundingBox(),action=await p.locator('.solver-author-action').boundingBox(),copy=await p.locator('.solver-permanent-copy').boundingBox(),related=await p.locator('.solver-related').boundingBox();assert(Math.abs(main.x-action.x)<1&&Math.abs(main.width-action.width)<1);assert(Math.abs(copy.x-main.x)<1);assert(Math.abs(related.width-copy.width)<1);assert(copy.width<=896.5);if(width>=1440)assert(copy.width>850);assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false); +const trigger=p.locator('.solver-start [data-solver-image]');await trigger.scrollIntoViewIfNeeded();await p.locator('.solver-start .solver-tool-visual img').evaluate(e=>e.decode());const full=await trigger.getAttribute('href');const initialResources=await p.evaluate(()=>performance.getEntriesByType('resource').map(r=>({url:r.name,bytes:r.transferSize})));assert(!initialResources.some(r=>r.url===base+full&&r.bytes>0),'Full inspection WebP transferred before opening '+JSON.stringify({width,family,initialResources}));await trigger.focus();const before=await trigger.boundingBox(),scrollBefore=await p.evaluate(()=>scrollY);await p.keyboard.press('Enter');const dialog=p.getByRole('dialog',{name:'Application screenshot'});await dialog.waitFor({state:'visible'});const large=dialog.locator('img');await large.evaluate(e=>e.decode());assert.equal(await large.getAttribute('alt'),await trigger.locator('img').getAttribute('alt'));assert.equal(await p.evaluate(()=>document.documentElement.style.overflow),'hidden');assert.equal(c.pages().length,1);const box=await dialog.boundingBox(),image=await large.boundingBox();assert(box.width<=(width<=700?width-23:width*.9+1),JSON.stringify({width,family,box}));assert(box.height<=(width<=700?976:901));assert(image.x>=box.x&&image.x+image.width<=box.x+box.width+1);const ratio=await large.evaluate(e=>e.naturalWidth/e.naturalHeight);assert(Math.abs(image.width/image.height-ratio)<.01,'Image was distorted/cropped');assert(await dialog.getByRole('button',{name:'Close screenshot'}).evaluate(e=>e===document.activeElement));await p.keyboard.press('Tab');await p.keyboard.press('Shift+Tab');assert(await p.evaluate(()=>document.activeElement.closest('dialog')!==null),'Tab escaped dialog');await p.keyboard.press('Escape');await dialog.waitFor({state:'hidden'});await p.waitForFunction(()=>document.documentElement.style.overflow!=='hidden');assert(await trigger.evaluate(e=>e===document.activeElement));assert.equal(await p.evaluate(()=>document.documentElement.style.overflow),'');assert.equal(await p.evaluate(()=>scrollY),scrollBefore);const after=await trigger.boundingBox();assert(Math.abs(before.x-after.x)<1&&Math.abs(before.width-after.width)<1,'Scrollbar lock shifted layout');await trigger.click();await dialog.getByRole('button',{name:'Close screenshot'}).click();await dialog.waitFor({state:'hidden'});await trigger.click();await p.mouse.click(2,2);await dialog.waitFor({state:'hidden'});assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);assert((await p.evaluate(()=>window.testCLS))<.01);measurements.push({width,family,main:main.width,prose:copy.width,cls:await p.evaluate(()=>window.testCLS),inspectionBytes:(await p.evaluate(()=>performance.getEntriesByType('resource').filter(r=>r.name.endsWith('.webp')).map(r=>({url:r.name,bytes:r.transferSize})))).filter(r=>r.url===base+full)});p.removeAllListeners('request');} +await p.goto(base+'/writing-problems');for(const choice of ['story-not-working','too-many','lost','deliberate']){await p.locator(`input[name=choices][value="${choice}"]`).check();await p.locator('.solver-form button[type=submit]').click();}assert.equal(await p.locator('.solver-reassurance').count(),1);assert.equal(await p.locator('.solver-recap').count(),1);assert.equal(await p.locator('.solver-recap a').innerText(),'Restart');assert.equal(await p.locator('.solver-recap').getAttribute('aria-label'),'Areas discussed');assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);await c.close();} +const nojs=await b.newContext({javaScriptEnabled:false});const p=await nojs.newPage();await p.goto(base+'/writing-problems/'+graph.solutions[0].slug);assert.equal(await p.locator('[data-solver-image]').first().getAttribute('target'),null);assert((await p.locator('[data-solver-image]').first().getAttribute('href')).endsWith('.webp'));await nojs.close();fs.writeFileSync(process.env.POLISH_METRICS||'/tmp/polish-metrics.json',JSON.stringify(measurements,null,2));console.log('PASS seven result families × four widths: aligned main/action, shared wider prose/related area; modal fit/aspect, deferred image, keyboard focus/Tab/Escape, close/backdrop, scroll lock/restoration, no new tab or overflow; reassurance recap; no-JS image fallback.');}finally{await b.close();}})().catch(e=>{console.error(e);process.exit(1)}); diff --git a/PlotLine.Tests/Browser/writing-solver-screenshots.cjs b/PlotLine.Tests/Browser/writing-solver-screenshots.cjs index 70f21bc2..a06694c3 100644 --- a/PlotLine.Tests/Browser/writing-solver-screenshots.cjs +++ b/PlotLine.Tests/Browser/writing-solver-screenshots.cjs @@ -3,7 +3,7 @@ const base=process.env.SOLVER_BASE_URL||'http://127.0.0.1:5238';assert(['127.0.0 const graph=JSON.parse(fs.readFileSync('PlotLine/Content/WritingSolver/Candidates/curated-v2-stage1-repair/writing-solver-curated-v2-stage1-repair.json')); const catalog=JSON.parse(fs.readFileSync('PlotLine/Content/WritingSolver/Presentation/results-v1.json')); (async()=>{const b=await chromium.launch();try{const representatives=[];for(const cap of catalog.capabilities){if(representatives.some(c=>c.captureView===cap.captureView))continue;representatives.push(cap);}assert.equal(representatives.length,11); -for(const width of [390,768,1440,1920]){const c=await b.newContext({viewport:{width,height:1100}});const p=await c.newPage();for(const cap of representatives){const result=catalog.results.find(r=>r.capability===cap.id);const solution=graph.solutions.find(s=>s.id===result.solution);const images=[];p.on('requestfinished',r=>{if(r.url().includes('/images/writing-solver/'))images.push(r.url());});await p.goto(base+'/writing-problems/'+solution.slug);const img=p.locator('.solver-start .solver-tool-visual img');await img.scrollIntoViewIfNeeded();await img.evaluate(e=>e.decode());assert(await img.evaluate(e=>e.complete&&e.naturalWidth>0));assert.equal(await img.getAttribute('alt'),cap.imageAlt);assert.equal(await p.locator('.solver-visual-placeholder').count(),0);assert.equal(await p.locator('.solver-start .solver-tool-visual picture').count(),1);assert.equal(await p.locator('.solver-start .solver-tool-visual img').count(),1);assert(!(await p.locator('main').innerText()).includes('Development preview'));assert.equal(await p.locator('.solver-space').evaluate(e=>e.getBoundingClientRect().width),width);assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);assert.equal(new URL(p.url()).search,'');assert(images.length>=1&&images.length<=2&&new Set(images).size===images.length,'Only one variant per primary/secondary demonstration should download');assert.equal(await p.locator('.solver-start .solver-image-link').getAttribute('target'),'_blank');assert((await p.locator('.solver-content').boundingBox()).width<=1140);p.removeAllListeners('requestfinished');}await c.close();} +for(const width of [390,768,1440,1920]){const c=await b.newContext({viewport:{width,height:1100}});const p=await c.newPage();for(const cap of representatives){const result=catalog.results.find(r=>r.capability===cap.id);const solution=graph.solutions.find(s=>s.id===result.solution);const images=[];p.on('requestfinished',r=>{if(r.url().includes('/images/writing-solver/'))images.push(r.url());});await p.goto(base+'/writing-problems/'+solution.slug);const img=p.locator('.solver-start .solver-tool-visual img');await img.scrollIntoViewIfNeeded();await img.evaluate(e=>e.decode());assert(await img.evaluate(e=>e.complete&&e.naturalWidth>0));assert.equal(await img.getAttribute('alt'),cap.imageAlt);assert.equal(await p.locator('.solver-visual-placeholder').count(),0);assert.equal(await p.locator('.solver-start .solver-tool-visual picture').count(),1);assert.equal(await p.locator('.solver-start .solver-tool-visual img').count(),1);assert(!(await p.locator('main').innerText()).includes('Development preview'));assert.equal(await p.locator('.solver-space').evaluate(e=>e.getBoundingClientRect().width),width);assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);assert.equal(new URL(p.url()).search,'');assert(images.length>=1&&images.length<=2&&new Set(images).size===images.length,'Only one variant per primary/secondary demonstration should download');assert.equal(await p.locator('.solver-start .solver-image-link').getAttribute('target'),null);assert.equal(await p.locator('.solver-start .solver-image-link').getAttribute('aria-haspopup'),'dialog');assert((await p.locator('.solver-content').boundingBox()).width<=1140);p.removeAllListeners('requestfinished');}await c.close();} const c=await b.newContext();const p=await c.newPage();for(const solution of graph.solutions){await p.goto(base+'/writing-problems/'+solution.slug);const img=p.locator('.solver-start .solver-tool-visual img');await img.scrollIntoViewIfNeeded();await img.evaluate(e=>e.decode());assert.equal(await img.count(),1);assert(await img.evaluate(e=>e.naturalWidth>0));assert.equal(await p.locator('.solver-visual-placeholder').count(),0);} // Test the normal browser fallback when AVIF is unsupported, without changing the application. await p.route('**/writing-problems/*',async route=>{const response=await route.fetch();await route.fulfill({response,body:(await response.text()).replace('type="image/avif"','type="image/unsupported"')});});await p.goto(base+'/writing-problems/'+graph.solutions[0].slug);await p.locator('.solver-start .solver-tool-visual img').scrollIntoViewIfNeeded();await p.locator('.solver-start .solver-tool-visual img').evaluate(e=>e.decode());assert((await p.locator('.solver-start .solver-tool-visual img').evaluate(e=>e.currentSrc)).endsWith('.webp')); diff --git a/PlotLine/Views/WritingProblems/ImageDialog.cshtml b/PlotLine/Views/WritingProblems/ImageDialog.cshtml new file mode 100644 index 00000000..dc7ae772 --- /dev/null +++ b/PlotLine/Views/WritingProblems/ImageDialog.cshtml @@ -0,0 +1,5 @@ + +

Application screenshot

+ +

Use your browser’s zoom controls for a closer look.

+
diff --git a/PlotLine/Views/WritingProblems/Index.cshtml b/PlotLine/Views/WritingProblems/Index.cshtml index 74cdfc73..e21f89e2 100644 --- a/PlotLine/Views/WritingProblems/Index.cshtml +++ b/PlotLine/Views/WritingProblems/Index.cshtml @@ -68,7 +68,7 @@ } @if(Model.Outcome.Answers.Count > 0) { -