diff --git a/Docs/Writer/Audit/Evidence/Context-Metrics.png b/Docs/Writer/Audit/Evidence/Context-Metrics.png new file mode 100644 index 00000000..d7b152c8 Binary files /dev/null and b/Docs/Writer/Audit/Evidence/Context-Metrics.png differ diff --git a/Docs/Writer/Audit/Evidence/Development-Queue-Discrepancy.md b/Docs/Writer/Audit/Evidence/Development-Queue-Discrepancy.md new file mode 100644 index 00000000..adbdef3f --- /dev/null +++ b/Docs/Writer/Audit/Evidence/Development-Queue-Discrepancy.md @@ -0,0 +1,35 @@ +# D01 — Development queue predicate mismatch + +Date: 16 November 2026. Target independently verified as `PlotDirector_Development`. Verification: **Both verified**, with live read-only database definition inspection. + +Application `WriterWorkspaceService.GetDashboardAsync` calls the repository with: + +```text +WriteNext +ContinueWriting +RevisionQueue +PolishingQueue +``` + +`PlotLine/Sql/052_RevisionStatusWriterWorkflow.sql` maps these to canonical scene statuses: + +```text +WriteNext -> Outlined +ContinueWriting -> Drafted +RevisionQueue -> Needs Work +PolishingQueue -> Revised +``` + +The actual live `dbo.WriterDashboard_Scenes` definition read from `sys.sql_modules` instead ended with these recognised queue predicates: + +```sql +WHERE (@Queue = N'Blocked' AND sb.IsBlocked = 1) + OR (@Queue = N'ReadyForDraft' AND sb.ReadyForDraft = 1) + OR (@Queue = N'ReadyForRevision' AND sb.ReadyForRevision = 1) + OR (@Queue = N'ReadyForPolish' AND sb.ReadyForPolish = 1) + OR (@Queue = N'Warnings' AND ISNULL(warnings.WarningCount, 0) > 0) +``` + +A direct read-only execution with the fixture project and `@Queue=N'WriteNext'` returned no rows. A separate joined SELECT confirmed four active fixture scene records with statuses Outlined, Drafted, Needs Work and Revised, all in the fixture's chapter/book/project. Authenticated browser navigation to all four queue tabs showed zero counts and the generic Revision Status instructions. Story Health still showed its missing-goal reminder. The mismatch explains this fixture outcome without changing the database. + +This is evidence of live/source contract drift, not proof of which historical deployment caused it. The audit does not prescribe replaying migration052: existing migrations remain immutable and repair/deployment requires a separate implementation task. No SQL/schema repair was applied. diff --git a/Docs/Writer/Audit/Evidence/Intent-Evidence.png b/Docs/Writer/Audit/Evidence/Intent-Evidence.png new file mode 100644 index 00000000..03ed1419 Binary files /dev/null and b/Docs/Writer/Audit/Evidence/Intent-Evidence.png differ diff --git a/Docs/Writer/Audit/Evidence/Overview.png b/Docs/Writer/Audit/Evidence/Overview.png new file mode 100644 index 00000000..49e87942 Binary files /dev/null and b/Docs/Writer/Audit/Evidence/Overview.png differ diff --git a/Docs/Writer/Audit/Evidence/SchedulePreview.png b/Docs/Writer/Audit/Evidence/SchedulePreview.png new file mode 100644 index 00000000..edb48b19 Binary files /dev/null and b/Docs/Writer/Audit/Evidence/SchedulePreview.png differ diff --git a/Docs/Writer/Audit/Evidence/browser-observations.json b/Docs/Writer/Audit/Evidence/browser-observations.json new file mode 100644 index 00000000..36d47e4c --- /dev/null +++ b/Docs/Writer/Audit/Evidence/browser-observations.json @@ -0,0 +1,239 @@ +{ + "date": "2026-11-16", + "environment": "Development, disposable owner fixture", + "source_baseline": "fad26c3", + "records": [ + { + "name": "Overview", + "status": 200 + }, + { + "name": "Journey", + "status": 200 + }, + { + "name": "Workspaces", + "status": 200 + }, + { + "name": "Plans", + "status": 200 + }, + { + "name": "Setup", + "status": 200 + }, + { + "name": "Reports", + "status": 200 + }, + { + "name": "Chapter", + "status": 200 + }, + { + "name": "Context", + "status": 200 + }, + { + "name": "Intent", + "status": 200 + }, + { + "name": "Reader", + "status": 200 + }, + { + "name": "Help opens", + "visible": true, + "text_excerpt": "What could I do next?\nDismiss suggestions\n\nObservation: Goal summary is empty.\n\nSet this chapter's Intent\n\nObservation: Uncertain ending is available in this book.\n\nPossible interpretation: Listening is an alternative review activity; media controls require updated Windows Companion.\n\nRead or start Audio Review\n\nObservation: This book contains 1 chapters.\n\nExplore or add chapters\nReturn to Writing\n\nFor a break, end your session below and leave a return note. No time away is counted as engaged work." + }, + { + "name": "Dismiss hides", + "hidden": true + }, + { + "name": "Reopens unchanged", + "visible": true + }, + { + "name": "Objective save", + "text_excerpt": "REVISING\n\nContinue Writing\nUncertain ending\nContinue Writing\nChange objective" + }, + { + "name": "Session end", + "message": "Session ended. Your note was saved." + }, + { + "name": "Audio unavailable", + "disabled": 4, + "text_excerpt": "Audio Review Uncertain ending\n\nMedia controls unavailable. Updated Windows Companion with Audio Review support is required.\n\nPlay\nPause\nBack 15 seconds\nForward 15 seconds\n\nPosition unavailable \u00b7 0 observed playback minutes \u00b7 0 unique coverage minutes\n\nPause on Edit\n\nEnd review stops tracking; Pause first to stop external playback. Actual text changes pause playback when supported by Companion. Scrolling and cursor movement do not. Resume is always explicit. Start again after Companion registers a session for this book if the review began without one." + }, + { + "name": "Plan candidates", + "text_excerpt": "['\\n Review writing activitiesDisposable audit review \u00b7 Audit: Third Volume \u00b7 16 Nov\u201316 Dec 2026window.PlotDirectorPageContext?.register(document.currentScript.previousElementSibling);\\nThese candidates come from your actual chapters and scenes, without requiring manual tasks or status changes. Minutes are adjustable working budgets, not predicted completion times or a promise to fill every available hour. Known estimated scene length supplies a starting budget; otherwise 30 minutes is only a starting allocation.\\n\\nIncludeChapter / sceneActivityWorking budget (minutes)\\nAudit: Third Volume \u00b7 Uncertain ending PlannedDraftEditPlanRead / reviewAudio Review I have reviewed these activities and budgets. Allocate them within my saved availability.Commit reviewed scheduleEdit availability / deadlineReturn to Writing\\n ']" + }, + { + "name": "Reviewed schedule saved", + "text_excerpt": "['\\n \\n\\n Writer\\n Writing Plans\\n Schedule Preview\\nwindow.PlotDirectorPageContext?.register(document.currentScript.previousElementSibling);\\n\\n\\n \\n Schedule\\n Schedule Preview\\n Generated writing schedule items.\\n \\n \\n Back to Writing Plans\\n Edit Plan\\n \\nwindow.PlotDirectorPageContext?.register(document.currentScript.previousElementSibling);\\n\\n Reviewed activities were allocated within your saved availability.\\n\\n\\n \\n \\n \\n Plan\\n Writing Plan Selection\\n \\n \\n\\n \\n \\n \\n Disposable audit review - Disposable Writer Audit 20261116 / Audit: Third Volume - 16 Dec 2026 - Active\\n \\n \\n Select\\n window.PlotDirectorPageContext?.register(document.currentScript.previousElementSibling);\\n\\n \\n \\n \\n \\n Plan Name\\n Project\\n Book\\n Deadline Date\\n Active\\n \\n \\n \\n \\n \\n Disposable audit review\\n Disposable Writer Audit 20261116\\n Audit: Third Volume\\n 16 Dec 2026\\n Yes\\n \\n " + }, + { + "name": "Queue WriteNext", + "text_excerpt": "Chapter and scene workspaces\nWrite Next 0\nIn Progress 0\nRevision 0\nFinal Pass 0\nStory Health 1\n\nScenes appear here based on Revision Status. Use Outlined for Write Next, Drafted for Continue Writing, Needs Work for Revision, and Revised for Polishing." + }, + { + "name": "Queue InProgress", + "text_excerpt": "Chapter and scene workspaces\nWrite Next 0\nIn Progress 0\nRevision 0\nFinal Pass 0\nStory Health 1\n\nScenes appear here based on Revision Status. Use Outlined for Write Next, Drafted for Continue Writing, Needs Work for Revision, and Revised for Polishing." + }, + { + "name": "Queue Revision", + "text_excerpt": "Chapter and scene workspaces\nWrite Next 0\nIn Progress 0\nRevision 0\nFinal Pass 0\nStory Health 1\n\nScenes appear here based on Revision Status. Use Outlined for Write Next, Drafted for Continue Writing, Needs Work for Revision, and Revised for Polishing." + }, + { + "name": "Queue FinalPass", + "text_excerpt": "Chapter and scene workspaces\nWrite Next 0\nIn Progress 0\nRevision 0\nFinal Pass 0\nStory Health 1\n\nScenes appear here based on Revision Status. Use Outlined for Write Next, Drafted for Continue Writing, Needs Work for Revision, and Revised for Polishing." + }, + { + "name": "Queue StoryHealth", + "text_excerpt": "Chapter and scene workspaces\nWrite Next 0\nIn Progress 0\nRevision 0\nFinal Pass 0\nStory Health 1\nChapter GoalChapter 1.00 needs intent\n\nGoal summary is empty.\n\nProject story health" + }, + { + "name": "Context overview", + "text_excerpt": "CURRENT SCENE\n\nAudit Outlined\n\nNo scene summary has been written yet.\n\nWHERE AND WHEN\n\nPOV\nNo POV set\nDate\nUnknown\nTime\nExact DateTime\nLocation\nNo primary location\nStatus\nOutlined\n\nPURPOSE\n\nNo scene purpose selected.\n\nDevelop the final decision\n\nOUTCOME\n\nA consequence remains unresolved\n\nCONTINUITY\n\nNo continuity warnings.\n\nEARLIER ESTABLISHED SCENES NEAR THIS STORY DATE\n\nNo absolute story date saved. Relative timing is shown above; no nearby dates are inferred.\n\nPEOPLE AT THIS POINT\n\nNo participants saved for this scene.\n\nACTIVE STORY THREADS\n\nNo saved thread developments for this scene.\n\nPLACE AND FLOOR\n\nNo primary location\n\nNo floor plan linked\n\nUse Place for saved room occupancy. Story Maps opens your saved maps; a location is never guessed from manuscript text.\n\nExplore this scene\nCalendar \u00b7 no saved date\nStory Maps \u00b7 choose a saved map\nNo floor plan mapped\nPlot Lines\nCharacters and relationships\n\nVIEWPOINT KNOWLEDGE\n\nVerified records through this scene in manuscript order. States may include uncertainty or lack of knowledge. Reader knowledge is not independently recorded here.\n\nNo viewpoint character recorded. No viewpoint knowledge is inferred.\n\nRELEVANT UNRESOLVED THREADS\n\nEstablished through this scene; prioritised by current events, knowledge records and this chapter. Author reference, not proof of viewpoint awareness.\n\nNo established unresolved threads linked to this scene, its participants or this chapter." + }, + { + "name": "Context people", + "text_excerpt": "No characters recorded for this scene\n\nWhen scene participants are added, their current state will appear here." + }, + { + "name": "Context relationships", + "text_excerpt": "CHANGES IN THIS SCENE\n\nNo relationship changes recorded.\n\nRELATIONSHIPS AT THIS POINT\n\nAuthor reference from established earlier records; not proof of viewpoint knowledge.\n\nNo visible relationships at this point." + }, + { + "name": "Context maps", + "text_excerpt": "Refresh saved data\n\nNo story maps are saved for this project. The Maps workspace can hold your locations and their relationships." + }, + { + "name": "Context place", + "text_excerpt": "LOCATION\n\nNo primary location\nFloor plan\nNo floor plan linked to this scene\nFloor\nNo floor selected\n\nOCCUPANCY\n\nNo floor plan linked to this scene.\n\nCHARACTERS\n\nNo character locations recorded.\n\nASSETS\n\nNo asset locations or custody changes recorded." + }, + { + "name": "Context story", + "text_excerpt": "THREADS\n\nNo story thread events recorded.\n\nVERIFIED VIEWPOINT KNOWLEDGE THROUGH THIS SCENE\n\nNo verified viewpoint knowledge recorded.\n\nAUTHOR CONTINUITY DEPENDENCIES\n\nSaved planning references may describe later scenes; they are not character knowledge.\n\nNo dependencies recorded.\n\nASSETS\n\nNo important asset events recorded.\n\nCONTINUITY\n\nNo continuity warnings." + }, + { + "name": "Context plots", + "text_excerpt": "Author plot overview, including planned and future developments. This is not viewpoint knowledge.\n\nShow:\nActive here (0)\nNearby (0)\nElsewhere (0)\nShow all\nExplore scenes\nShow current scene\n\u2039\nCh 1 \u00b7 Sc 1\nAudit Outlined\nCh 1 \u00b7 Sc 2\nCh 1 \u00b7 Sc 3\nCh 1 \u00b7 Sc 4\n\u203a\n\nCurrent scene: Ch 1 \u00b7 Sc 1 \u2014 Audit Outlined\n\nGo to scene in Word\n\nNo saved plot lines are available for this book.\n\nRefresh saved data" + }, + { + "name": "Context metrics", + "text_excerpt": "Refresh saved data\n\nRecorded scene metrics \u00b7 Missing values are gaps, not zero. These are saved values, not a new AI assessment.\n\nMetric\nOverall Intensity\nTension\nEmotional Weight\nAction\nDarkness\nRomance\nSexual Charge\nViolence\nHope / Lightness\nComedy\nMystery\nShow current scene\nManuscript\n1\n2\n3\n4\n\nOverall Intensity \u00b7 scale 1\u201310\n\nExplore scenes\nAudit Outlined\n\nChapter 1 \u00b7 Uncertain ending \u00b7 Scene 1\n\nOverall Intensity\n5 (1\u201310)\nTension\n5 (1\u201310)\nEmotional Weight\n5 (1\u201310)\nAction\n3 (1\u201310)\nDarkness\n3 (1\u201310)\nRomance\n1 (1\u201310)\nSexual Charge\n1 (1\u201310)\nViolence\n1 (1\u201310)\nHope / Lightness\n4 (1\u201310)\nComedy\n1 (1\u201310)\nMystery\n5 (1\u201310)\nGo to scene" + }, + { + "name": "Intent plan", + "text_excerpt": "Saved author plan and scene reference. Opening this view does not rewrite intent or accept suggestions.\n\nCHAPTER PLAN\n\nChapter 1: Uncertain ending\n\nNo chapter summary has been written yet.\n\nPurpose\nNo chapter purpose selected.\nGoal\nNo chapter goal summary yet.\n\nSAVED SCENE REFERENCE\n\nScene 1: Audit Outlined\n\nNo scene summary has been written yet.\n\nSCENE PURPOSE\n\nDevelop the final decision\n\nEXPECTED OUTCOME\n\nA consequence remains unresolved\n\nEMOTIONAL GOAL\n\nNo emotional goal recorded for this chapter.\n\nREADER TAKEAWAY\n\nNo reader takeaway recorded for this chapter." + }, + { + "name": "Intent must-include", + "text_excerpt": "CHAPTER MUST INCLUDE\n\nNo chapter-level must-include notes yet.\n\nSCENE CHECKLIST\n\nPLANNED\nPurpose clear\nPLANNED\nEmotional payoff clear\nPLANNED\nContinuity checked\nPLANNED\nPOV consistent\nPLANNED\nDialogue pass complete\nPLANNED\nSensory detail pass complete\nPLANNED\nCharacter motivation clear\nPLANNED\nEnding hook strong\n\nRELEVANT GOALS\n\nGoal No chapter goal summary yet.\nReader No reader takeaway yet." + }, + { + "name": "Intent notes", + "text_excerpt": "CHAPTER RISKS\n\nNo chapter risks or concerns recorded.\n\nSCENE NOTES\n\nNo writing notes for this scene." + }, + { + "name": "Intent threads", + "text_excerpt": "STORY THREADS\n\nNo story thread events recorded for this scene." + }, + { + "name": "Intent evidence", + "text_excerpt": "Is the writing achieving the plan?\n\nCompare saved manuscript prose with saved intentions. Nothing changes in your plan or Word document. Unchanged results are reused.\n\nShow saved evidence\nAssess saved prose with AI\nCancel\n\nEdit intentions and objective completion" + }, + { + "name": "Intent checklist", + "text_excerpt": "WORKFLOW\n\nStatus\nPlanned\nPriority\nNone\nEstimate\nNot set\nActual\nNot set\nBlocked\nNo\n\nCHECKLIST\n\n0 / 8 saved objectives complete\nPLANNED\nPurpose clear\nPLANNED\nEmotional payoff clear\nPLANNED\nContinuity checked\nPLANNED\nPOV consistent\nPLANNED\nDialogue pass complete\nPLANNED\nSensory detail pass complete\nPLANNED\nCharacter motivation clear\nPLANNED\nEnding hook strong\n\nPLAN AND PROSE EVIDENCE\n\nThese are your saved decisions, not AI verdicts. Use the Evidence tab to compare saved prose with this plan. AI suggestions never tick objectives automatically.\n\nReview objectives and completion in the scene editor" + }, + { + "name": "Saved Intent evidence", + "text_excerpt": "Is the writing achieving the plan?\n\nCompare saved manuscript prose with saved intentions. Nothing changes in your plan or Word document. Unchanged results are reused.\n\nShow saved evidence\nAssess saved prose with AI\nCancel\n\nSaved evidence loaded. Author decisions remain separate from AI suggestions.\n\nSAVED PROSE COMPARED WITH YOUR PLAN\n\nNo saved manuscript prose is available. Import this scene first. Word edits are not automatically synchronised.\n\nNo assessment saved yet. Analyse explicitly when you are ready; this may incur AI costs.\n\nEdit intentions and objective completion" + }, + { + "name": "EditPlan", + "status": 200 + }, + { + "name": "Display", + "status": 200 + }, + { + "name": "Scenes", + "status": 200 + }, + { + "name": "Timeline", + "status": 200 + }, + { + "name": "Warnings", + "status": 200 + }, + { + "name": "Health", + "status": 200 + }, + { + "name": "Plots", + "status": 200 + }, + { + "name": "Solver", + "status": 200 + }, + { + "name": "Previous month", + "heading": "October 2026" + }, + { + "test": "Chapter goal persisted", + "value": "Make the final choice follow from earlier consequences." + }, + { + "test": "Reviewed completion", + "text": "Writer\nWriting Plans\nSchedule Preview\n\nSCHEDULE\n\nSchedule Preview\n\nGenerated writing schedule items.\n\nBack to Writing Plans\nEdit Plan\n\nPLAN\n\nWriting Plan Selection\nDisposable audit review - Disposable Writer Audit 20261116 / Audit: Third Volume - 16 Dec 2026 - Active\nSelect\nPLAN NAME\tPROJECT\tBOOK\tDEADLINE DATE\tACTIVE\t\nDisposable audit review\tDisposable Writer Audit 20261116\tAudit: Third Volume\t16 Dec 2026\tYes\tSelected\nReviewed writing activities\n\n1 allocations \u00b7 30 planned minutes \u00b7 these budgets are not measured work.\n\nDATE\tWORK\tACTIVITY\tMINUTES\tSTATUS\n16 Nov 2026\tUncertain ending\tEdit\t30\tDone\nReview activities from chapters and scenes" + }, + { + "test": "Capture paused", + "checked": false, + "baselineDisabled": true + }, + { + "test": "Missing accepted baseline", + "status": 400, + "text": "No accepted manuscript is available. Link and synchronise the existing Word manuscript first." + } + ], + "browser_errors_first_run": [ + "jQuery is not defined", + "jQuery is not defined", + "jQuery is not defined", + "jQuery is not defined" + ], + "browser_errors_followup": [ + { + "message": "jQuery is not defined", + "stack": [ + "ReferenceError: jQuery is not defined", + " at https://dev.plotdirector.com/lib/jquery-validation/dist/jquery.validate.min.js:4:151", + " at https://dev.plotdirector.com/lib/jquery-validation/dist/jquery.validate.min.js:4:159" + ] + }, + { + "message": "jQuery is not defined", + "stack": [ + "ReferenceError: jQuery is not defined", + " at https://dev.plotdirector.com/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js:8:201", + " at https://dev.plotdirector.com/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js:8:240" + ] + } + ] +} diff --git a/Docs/Writer/Audit/Evidence/inventory-counts.json b/Docs/Writer/Audit/Evidence/inventory-counts.json new file mode 100644 index 00000000..c92d2473 --- /dev/null +++ b/Docs/Writer/Audit/Evidence/inventory-counts.json @@ -0,0 +1,9 @@ +{ + "page_families": 16, + "panel_feature_units": 62, + "source_baseline": "fad26c3", + "counting": "Templates/families, not repeated entity or calendar instances; conditional execution coverage is separate.", + "interaction_families": 96, + "individual_razor_control_templates": 318, + "razor_files_scanned": 40 +} diff --git a/Docs/Writer/Audit/Writer-Audit-Coverage.md b/Docs/Writer/Audit/Writer-Audit-Coverage.md new file mode 100644 index 00000000..636fa5ae --- /dev/null +++ b/Docs/Writer/Audit/Writer-Audit-Coverage.md @@ -0,0 +1,77 @@ +# Writer audit coverage and evidence register + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Audit boundary and reproducibility + +- Shared branch: `codex/word-companion-native-phase1-20261104`. `git fetch origin` and `git pull --ff-only` advanced baseline `2c89a8d` to `fad26c3` before inspection. The incoming change was Windows Audio Review qualification documentation. +- Existing untracked `Docs/Investigations/CanonicalManuscriptArchitectureAssessment.md` was left untouched. No Companion working files were edited. No production endpoint/database was used. No deployment/service restart was performed. +- Read effective Development connection configuration privately, parsed with SqlConnectionStringBuilder; explicitly verified both configured InitialCatalog and `SELECT DB_NAME()` as `PlotDirector_Development`. No connection values/passwords entered documentation or command output. +- Metadata SELECTs inspected relevant objects, parameters and procedure bodies. No migrations applied. Fixture writes used existing stored procedures, then normal authenticated Development controls. No real manuscript records were browsed in authenticated tests; all entity URLs used the newly created fixture. +- No existing `@example.invalid` test author was found by the scoped discovery query. A dedicated synthetic verified author, synthetic projects/book/chapter and four scenes were created through existing stored procedures. Partial fixture provisioning retries created extra synthetic project/book records; all were within the same dedicated owner and removed together. This was fixture setup, not a product defect. +- Browser: Playwright1.58.2 / installed Chromium,1440×1000 initial desktop viewport. Logged in through Account/Login with the synthetic credentials; no authentication bypass. No installed PWA/Office/Windows session was represented as browser proof. +- Temporary operational helpers/results were stored outside the repository at `/home/nick/writer-audit-20261116/`; credentials were not committed. Fixture credential file was removed after successful cleanup. +- Cleanup: project prepare-dependencies and account-deletion stored procedures under an exact fixture identity/name/ownership guard, then `UserHardDelete_ForAccountDeletion`. Final query: `RemainingSyntheticAccounts = 0`. Account deletion returned true. No rollback/reset of Development was performed. + +## Counting method + +| Measure | Identified / examined scope | Interpretation | +|---|---|---| +| Primary page families | 16 | P01–P16 inventory. Fifteen reached in authenticated/browser navigation; P16 chooser source inspected only. Solver browse/results grouped into P15 and not all graph pages executed. | +| Significant panel/feature units | 62 | F01–F62; a card/tab/editor/modal template is one unit. This is the feature count used here, not a separate arbitrary count of every field. | +| Interaction families | 96 | I001–I096; shared controls grouped where handler behavior matches. Grouped labels are not96 individual buttons. | +| Individual Razor control templates | 318 | T001–T318 over40 relevant Razor files; lexical source locations. Repeated entity rows/dates/options and dynamically generated JS controls are not additional template instances. | +| Help Me rules | 10 | All append rules, dedup/order/cap/fallback/dismissal traced. | +| Browser initial page inspections | 10 | Overview, Journey, Workspaces, Plans, Setup, Reports, Chapter, Context, Intent, Reader. | +| Browser scripted checks beyond initial pages | 41 | First run8 result records; follow-up29; mutation run4. These are recorded observations, not a formal assertion-test pass count or exhaustive interaction count. | +| External destinations reached | 4 principal related workspaces | Timeline, Warnings, Analytics, PlotLineWorkspace each200; plus Scene editor/Problem Solver included among15 page families. DisplaySetup redirect also observed. | + +Do not add these measures together: features contain many controls and pages reuse panels. This is a broad source-led audit with explicitly incomplete runtime/state coverage, not a claim that every possible Writer control/state has been exercised. + +## Page, panel and control coverage register + +| Area / inventory IDs | Source examination | Development browser examination | Remaining gap / status | +|---|---|---|---| +| P01 Overview / F01–F07 | Controller, service, objective/reminder/activity data, Razor and JS | Book title, sparse data, Help open/dismiss/reopen; objective save/Continue Writing; no accepted baseline | Both verified for observed states; existing manuscript progress display source only | +| P02 Journey / F08–F11 | Calendar/history/evidence repositories, month/year/day links | Empty month, session evidence context, previous month to October2026 | Month navigation Browser verified; year/day filtering, all source-evidence variants and exports not clicked this run | +| P01 sessions / F12–F13 | Work/native controllers, repository, audio metrics, JS, SQL262 | Planning start/end/note; Audio Review start and four disabled controls without native support; end | Both verified supported start/end and unsupported-audio state; live media/source/reconnect/state races not executed | +| P03 Workspaces / F14–F16 | Queue handler/membership, summary/card links, reminders, live procedure body | All five tabs; missing chapter goal;4 status scenes absent; D01 verified | Each queue tab examined beyond load, but populated cards unavailable live; external queue card links source only | +| Today tasks / F17 | Completion/skip service and form/SQL traces | No legacy tasks created; reviewed planner used instead | Source verified; complete/skip/regenerate/rebalance not executed | +| Display / F18 | Launcher/workspace code, button visibility, named windows and preference logic | DisplaySetup redirect and target page inspected | No physical multi-monitor/popup/window focus/detect-permission matrix; Source verified | +| P04 plans / F19–F20 | Management, mutation handlers and per-plan deletion modal | Empty personal list initially; selected plan shown later in Preview | Activation/deactivation, filtered-list mutations and deletion modal behavior Source verified only | +| P05 setup / F21–F22 | Form fields/options/validation and CreateScheduleFromSetup | Saved availability and goal, Review activities navigation to candidate review | Both verified valid submit; invalid cross-project book/date/no-day and dynamic project changes not exercised | +| P06 review / F23–F24 | Candidate eligibility, starting budgets, allocation/confirmation/replace logic | One chapter-only candidate, confirmation, commit to Preview | Both verified minimal path; >1000 rows, budget overflow, blocked/manual-task exclusions, completed reallocation refusal source only | +| P07 preview / F25–F27 | Plan selection; derived and legacy tables; completion; rebalance rendering gap | Reviewed allocation persisted,30 planned minutes, Mark complete changed status Done | Both verified reviewed path; legacy table and rebalance source only; no multi-plan context switch exercise | +| P08 edit / F28 | Immutable scope fields, availability/save validation and reallocation link | Page and fields inspected; jQuery errors captured | Source verified save outcome; no edit POST performed | +| P09 chapter / F29–F31 | Chapter goals, summary, source procedures and export/link destinations | Workflow loaded; GoalSummary saved and value reloaded | Both verified goal persistence; other goal fields/export/empty-scene transition source only | +| P10 reports / F32–F35 | Pagination/export/baseline/settings/erase/retention handlers and SQL | Empty evidence; pause setting persisted and disabled baseline; resume; baseline POST400 sync-first message | Both verified pause and absent-baseline behavior; JSON cursors, reducing retention, destructive erase source only | +| P11 Context / F36–F44 | All partials, follow/navigation JS and lazy endpoints; canonical data provenance | All eight tabs clicked on manual pinned synthetic scene; purpose/outcome, empty people/relationships/maps/floor/story, plot scene strip, metrics definitions/gaps | Both verified sparse/manual reference; populated maps/relationships/events/values, native following, Word jumps and races not exercised | +| P12 Intent / F45–F51 | Six tabs, fallbacks, assessment inputs/validation/cache/decisions/client, SQL | All six tabs, default8 checklist items, DraftStatus Planned versus scene Outlined; Show saved evidence loaded empty-source guidance | Both verified saved reference and no-evidence state; AI request/cancellation/result decisions/stale conflicts source only | +| P13 Reader / F52–F54 | Controller/model/view/refresh client and embedded toolbar | Empty accepted-text message; Help Reader destination; return route source traced | Both verified no-prose state; populated text, live accepted refresh, focus keyboard and cross-chapter running-session behavior source only | +| P14 scene support / F55–F60 | Inspector card,5 editor partials, handlers/service/repository writes | Scene Edit200, purpose/reference/default checklist observed through Context/Intent | Drawer open/save/delete/upload controls source only; no attachment/file or user prose writes | +| P15–P16 solver / F61–F62 | Journey controller, answer validation, editorial/catalogue route context, workspace chooser | /problem-solver200, initial question rendered | Browse, all branch/result pages and chooser/capability destination selections not executed; not a complete graph regression | +| Native Word/Office.js controls | Ribbon.xml, NativeRibbon, Word integration boundary and README/taskpane shell | No Windows/Word host available | Source verified only; physical end-to-end acceptance remains separate, not inherited from prior docs | +| External narrative destinations | Route/argument sources and implementation boundary reviewed | Timeline/Warnings/Analytics/PlotLineWorkspace all200 with fixture context; headings inspected | Destination route/identity Browser verified only; entire unrelated sections intentionally not fully audited | +| Subscription/collaboration/state gates | Owner checks, report gate, StoryIntelligence entitlement, storage quota, native capability conditions | Synthetic owner; unavailable native source | Collaborator, subscribed AI, denied entitlement, archived/deleted entity, ambiguous/multiple native source and large manuscript state matrix not exercised | + +Inventory IDs are functional units, not claims that every input was clicked. Individual template source locations and family-level outcomes are in the interaction register. Some family rows combine tested and untested members; this table governs the precise execution claim. + +## Retained concrete evidence + +- [Overview screenshot](Evidence/Overview.png): sparse synthetic book and collapsed/conditional desk; no actual author content. +- [Intent Evidence screenshot](Evidence/Intent-Evidence.png): saved-scene tab and evidence controls, not an AI result. +- [Context Metrics screenshot](Evidence/Context-Metrics.png): recorded metric definitions/gaps and synthetic scenes. +- [Reviewed schedule screenshot](Evidence/SchedulePreview.png): one chapter allocation,30 planned minutes, before completion. +- [Sanitised browser observation records](Evidence/browser-observations.json): test labels, statuses, controlled text fragments and browser errors; no cookies/credentials. +- [D01 live/source predicate comparison](Evidence/Development-Queue-Discrepancy.md). +- [Machine-readable counts](Evidence/inventory-counts.json). + +jQuery errors were observed on ScheduleSetup and EditWritingPlan: `/lib/jquery-validation/dist/jquery.validate.min.js` and `/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js` throw ReferenceError. Valid setup submission still succeeded; this observation does not prove every form is broken or bypasses server validation. + +## Explicit unverified areas + +Physical Windows Word, ElevenReader/player integration, installed PWA, actual playback/pause-on-edit latency, source ambiguity/loss/recovery, multi-monitor permission/focus behavior; paid Intent AI calls and saved evidence decisions; high-volume/collaborator/archived/deleted states; full published solver graph/editorial pages and chooser; populated relationship/map/floor/plot/metric navigation; cross-pipeline prose freshness; populated Reader automatic updates; uploads/storage limits; destructive history/plan deletion controls (fixture cleanup used account procedures); legacy schedule generation/rebalance/completion/skip; broad responsive/theme/accessibility/keyboard testing; all external narrative-section controls. Reasons are lack of corresponding physical host, entitlement/persisted fixture states, explicit avoidance of paid execution, or scope boundary. Source rules were traced where stated; runtime outcomes remain Not verified. + +## Documentation verification + +Documentation-only changes do not require a rebuild or full regression harness. No application test suite is claimed as passed by this audit. Final checks validate local Markdown targets, expected deliverables, count consistency, accidental credentials, and Git diff scope. Browser observations are investigation evidence, not a replacement for product regression tests. Existing qualification documents were used only for context, not reclassified as this audit's observations. diff --git a/Docs/Writer/Audit/Writer-Audit-Summary.md b/Docs/Writer/Audit/Writer-Audit-Summary.md new file mode 100644 index 00000000..ce440f17 --- /dev/null +++ b/Docs/Writer/Audit/Writer-Audit-Summary.md @@ -0,0 +1,54 @@ +# Writer audit executive summary + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## What Writer currently does + +Writer combines a book desk and saved return focus; authored chapter/scene plans and reference windows; time/availability planning with reviewed allocations and older workflow tasks; explicit work/Audio Review sessions; and retained accepted-change evidence, history and privacy controls. It links to existing narrative workspaces rather than providing a single manuscript-analysis workspace. Word remains a separate authoring/integration context; Reader shows accepted server prose read-only. + +Help Me is a fixed rule list, not story analysis. It appends ten possible rule categories in a fixed order, deduplicates destinations and shows at most four. Its dismissal is temporary DOM state. A separate Intent Evidence feature explicitly compares saved scene prose and authored objectives using AI when the account permits it; results and decisions are persisted without automatic objective completion. + +## Coverage and totals + +Documented: **16 page families,62 significant panel/feature units,96 interaction families,318 individual Razor control templates across40 files,10 Help Me rules**. Fifteen page families were reached in browser navigation, with four additional related workspaces checked at their boundary. Counts are templates/families, not all runtime entity instances. See [coverage register](Writer-Audit-Coverage.md) for per-area execution claims and explicit gaps. This is not an exhaustive runtime certification: populated native/media, paid AI, high-volume/collaborator and several destructive/legacy paths remain source-only or unverified. + +## Most material findings + +1. **Development's four Writer queues cannot be activated by the current service calls.** The deployed procedure accepts older readiness queue names, while application code requests revision-status queue names. Four synthetic scenes with Outlined/Drafted/Needs Work/Revised all remained absent. Repository SQL contains the later behavior. This is a verified live/source discrepancy, left unchanged. +2. **Context is plural.** The request-scoped shell book, user/book saved focus, work-session chapter, Reader chapter, selected plan and exact Word document position are independent. Some defaults seed from others, but there is no universal current chapter/scene. Scope-free Preview and plan mutation redirects can lose the prior book filter. Queue TOP40 applies before book filtering in the source contract. +3. **Readiness vocabulary is inconsistent.** In Progress/Final Pass tabs are explained as Continue Writing/Polishing in empty copy. Intent Checklist displays legacy DraftStatus and can say Planned for an Outlined scene. Continue Writing is also the saved objective action. +4. **Creative intent, working focus and time goals are different data.** Chapter summary/purpose, chapter goals, scene purpose/outcome/checklist and a saved work activity are entered in different places. Saving one does not activate all others. +5. **Several action labels require learning the destination.** Help listening opens Reader, even without accepted prose. Session brief/Prepare Writing Session exports reference rather than starts a measured session. Native Audio Review opens Companion rather than creates a review. Review activities already saves a plan before final allocation confirmation. +6. **Work records have distinct meanings.** Planned capacity, reviewed allocation completion, scene Revision Status, browser engagement, wall elapsed time, playback duration/coverage and accepted additions/removals are not interchangeable. Ending Audio Review does not stop external audio. +7. **Discovery is spread across disclosures, drawers and separate windows.** Workspaces, setup, Reader review controls, year overview, evidence cards and Writer scene editors are nested or off-ribbon. Checklist/goals/notes/task information repeats with different filters and editability. +8. **Missing data can look like missing functionality.** Reference panels need canonical participants/events/relationships/locations/metrics. Imported prose alone is insufficient. A chapter-only book can be scheduled but cannot yet provide accepted reading text. Baseline action can return400 when no accepted manuscript exists. Sparse Context copy can incorrectly imply the book context was not supplied. +9. **Client validation enhancement currently throws jQuery errors** on setup/edit pages in Development. Valid server submissions worked; no functional repair was attempted. + +## Workflow and activation difficulties + +The supported pieces can take an author from a saved goal to a scene note/checklist, a revision focus, a reviewed time allocation and a recorded session. The author must bridge creative diagnosis, context choice, metadata editing, prose writing/synchronisation and final judgement. A completed task does not complete a scene; an evidence decision does not tick a checklist; a session does not prove work or playback happened. Default checklist items may be seeded by opening scene workflow support, so their presence is not proof of authored intention. + +Returning after a break can use saved focus and session notes, but there is no demonstrated automatically assembled creative briefing. Scheduling is optional and works without Word; useful accepted-prose/AI/audio/reference features have separate activation requirements. Privacy pause/erasure also affects work/review sessions and notes while leaving manuscript synchronisation separate. + +## Losing-direction scenario + +Existing tools can expose saved scene/chapter structure, character/relationship knowledge, thread/event distribution, recorded metrics and pacing review, explicit chapter/scene purpose and planned resolutions. Intent Evidence can compare a scene against authored intentions. These capabilities should not be described as absent simply because they are outside Help Me. + +What is not demonstrated is a trilogy-aware diagnosis that understands earlier-volume promises, judges rushed developments or a tie-up-heavy ending, proposes and compares alternative developments, ranks scenes for expansion/removal, then turns that diagnosis into a verified revision programme. Help Me does none of that. The existing path requires the author to populate/reference the narrative tools, decide the creative problem and turn it into plans/tasks. Source/reference completeness and separate contexts constrain the result. + +## Product questions, without a redesign proposal + +What should Help Me promise and use as evidence? Which context should each surface visibly follow? How should creative intention, work focus, task completion and manuscript readiness relate? What freshness/source should Intent assessments guarantee relative to Reader and Word? What should a writing “session” mean across planning, measured engagement and audio? How much trilogy/ending problem support is intended? Which features/counts should be complete versus deliberately bounded? Which authored data is essential onboarding versus optional reference? + +## Deliverables and verification limits + +- [Complete inventory](Writer-Complete-Inventory.md) +- [Interaction register](Writer-Interaction-Register.md) +- [Context matrix](Writer-Context-Matrix.md) +- [Feature activation](Writer-Feature-Activation.md) +- [Help Me rules](Writer-HelpMe-Rules.md) +- [Workflow/scenario analysis](Writer-Workflow-Analysis.md) +- [Information architecture](Writer-Information-Architecture.md) +- [Coverage, screenshots, gaps and methodology](Writer-Audit-Coverage.md) + +No production/application/schema/styling/configuration change or deployment was made. Authenticated writes were restricted to a disposable fixture, which was deleted. Native Windows physical behavior, paid AI execution, populated manuscript refresh and other unexecuted states are explicitly not claimed as verified. Stop at audit; no redesign implementation follows from this report. diff --git a/Docs/Writer/Audit/Writer-Complete-Inventory.md b/Docs/Writer/Audit/Writer-Complete-Inventory.md new file mode 100644 index 00000000..c01992f1 --- /dev/null +++ b/Docs/Writer/Audit/Writer-Complete-Inventory.md @@ -0,0 +1,144 @@ +# Writer complete inventory — examined scope + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Page and route inventory + +| ID | Page | Route | Implemented responsibility | Source | +|---|---|---|---|---| +| P01 | Overview | `/Writer; /Writer/Index` | Book desk, saved focus, next plan, progress, Help Me and collapsible workspaces. | [Index.cshtml:1](../../../PlotLine/Views/Writer/Index.cshtml#L1) | +| P02 | Writing Journey | `/Writer/Journey` | Same dashboard with month/year/day evidence and recent sessions; not a separate goal tracker. | [Index.cshtml:1](../../../PlotLine/Views/Writer/Index.cshtml#L1) | +| P03 | Workspaces | `/Writer/Workspaces?workspace=…` | Same desk with scene queue disclosure open; five workspace tabs. | [Index.cshtml:1](../../../PlotLine/Views/Writer/Index.cshtml#L1) | +| P04 | Writing Plans | `/Writer/WritingPlans` | Personal plan management; book filter also includes All Books plans. | [WritingPlans.cshtml:1](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L1) | +| P05 | Schedule Setup | `/Writer/ScheduleSetup` | Save plan availability before reviewing activities. | [ScheduleSetup.cshtml:1](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L1) | +| P06 | Review writing activities | `/Writer/PlanActivities?writingPlanId=…` | Select derived chapter/scene candidates and commit budgets. | [Index.cshtml:1](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L1) | +| P07 | Schedule Preview | `/Writer/SchedulePreview?writingPlanId=…` | Global personal plan selector; reviewed allocations and separate legacy task table. | [SchedulePreview.cshtml:1](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L1) | +| P08 | Edit Writing Plan | `/Writer/EditWritingPlan?writingPlanId=…` | Change future availability/settings, not original scope, goal or start. | [EditWritingPlan.cshtml:1](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L1) | +| P09 | Chapter workflow | `/Writer/Chapter/{id}` | Chapter goals and scene readiness summaries. | [Chapter.cshtml:1](../../../PlotLine/Views/Writer/Chapter.cshtml#L1) | +| P10 | Reports / Writing activity | `/Writer/Activity?bookId=…` | Accepted evidence, baseline, export, privacy and destructive history erasure. | [Index.cshtml:1](../../../PlotLine/Views/WritingActivity/Index.cshtml#L1) | +| P11 | Writing Context | `/Writing/Context` | Scene reference with eight tabs and lazy map/plot/metric panels. | [Context.cshtml:1](../../../PlotLine/Views/Writing/Context.cshtml#L1) | +| P12 | Writing Intent | `/Writing/Intent` | Saved chapter/scene plans, notes, threads, checklist and explicit evidence assessment. | [Intent.cshtml:1](../../../PlotLine/Views/Writing/Intent.cshtml#L1) | +| P13 | Manuscript Reader | `/manuscript/reader?bookId=…&chapterId=…` | Read accepted server text; embedded review toolbar and automatic refresh. | [Index.cshtml:1](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L1) | +| P14 | Scene editor / inspector | `/Scenes/Edit/{id}` | Writer notes, checklist, workflow, purpose and attachment drawers embedded in the scene workspace. | [Edit.cshtml:1](../../../PlotLine/Views/Scenes/Edit.cshtml#L1) | +| P15 | Problem Solver journey | `/problem-solver; /problem-solver/browse; /problem-solver/{slug}` | Separate questionnaire/editorial guidance, not Help Me or manuscript diagnosis. | [Index.cshtml:1](../../../PlotLine/Views/WritingProblems/Index.cshtml#L1) | +| P16 | Problem Solver workspace chooser | `/problem-solver/workspace/{capability}` | Choose project, and character where required, before following a configured capability route. | [Workspace.cshtml:1](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L1) | + +Display Setup (`/Writer/DisplaySetup`) redirects to `/Writer/Index?...#display-setup`; it is a panel, not another page. `/Write` and `/Write/Index` are legacy redirects. `PreviewRebalance` renders the Preview view; Generate/DeleteGeneratedSchedule/ApplyRebalance are controller operations, not additional pages. Context/Intent scene, map, plot and metrics endpoints return fragments. Reports also has exports and native observation endpoints, not additional navigation pages. + +## Page/panel/feature inventory + +Each row is one significant panel/functional unit, not every repeated chapter/card/chart point. Editability applies to the panel itself. Actions are expanded in the interaction register. Scope is expanded in the context matrix; activation is expanded in the activation guide. Source provenance names resolve through the architecture section below. **Source verified** applies to every row; browser verification is recorded separately rather than implying all conditional content was observed. + +| ID / page | Panel | Purpose and displayed information | Information source | Editable? | Actions / result | Visibility / empty / disabled | Duplication | Purpose clarity / issue | +|---|---|---|---|---|---|---|---|---| +| F01 / P01 | Desk identity and Companion status | Book title, connection indicator and setup link | Dashboard Book and native/window presence | Read only | Connection & Display Setup | Always; no linked document gives disconnected status | Display Setup also shown below | Title is book-scoped, connection is a separate runtime state | +| F02 / P01 | Help Me | Fixed suggestions for the next action | WriterSuggestionProvider.Suggest | Read only navigation | Help Me; Dismiss suggestions; recommendation; Return to Writing | Overview/Workspaces; hidden until opened; empty without suggestions | Links overlap queue, plans, chapter and Reader | Prominent wording may imply diagnosis beyond actual rules | +| F03 / P01 | Start Here / objective setup | Choose activity and whole book/chapter/scene | WriterObjective.Read and Save | Editable | Continue an existing manuscript; save; save and plan | No saved objective, or setup=true; choices require saved entities | Session activity/chapter is separate | Working objective is a return target, not a story intention | +| F04 / P01 | Continue Writing | Saved activity and scene/chapter/book target | WriterWorkingObjectives per user/book | Read only with change link | Continue Writing; Change objective | Valid saved objective; invalid archived target drops out | Queue uses Continue Writing for Drafted scenes too | Label does not promise a manuscript editor | +| F05 / P01 | Next Planned Session | First reviewed allocation, else today/future workflow task | WriterPlanningUpcoming and schedule dashboard | Read only | Open chapter/scene; Create a writing plan; Manage writing plans | No task shows scheduling prompt; visibility controlled by dashboard branch | Journey planned work and Preview repeat it | Budgets are clearly labelled planned, but next may be overdue | +| F06 / P01 | Your Manuscript / Writing Progress | Snapshot/catalogue words, chapter/scene counts, 30-day additions/removals | WritingActivity_Summary, latest accepted event, Book | Read only | Open Chapters; queue links; Reports & activity settings | Hidden for activity-private viewer; baseline/no-change empty states | Reports and Journey evidence | Catalogue and accepted counts are different measurement sources | +| F07 / P01 | Recent Activity | 28 UTC receipt dates, relative observed work | Activity days and WriterWorkCalendar | Read only | Day cell; Writing Journey | No retained activity gives neutral/empty state; private explanation | Journey calendar | No evidence does not establish no writing | +| F08 / P02 | Month calendar | Daily changes, session kinds, browser/audio durations | WriterWorkCalendar for chosen year | Read only | Previous month; Next month; date cell | Journey only; no observations remain neutral | Recent Activity | UTC chronology differs from local writing-day expectations | +| F09 / P02 | Year overview | Relative yearly observation intensity | Same calendar results, year-wide maximum | Read only | Expand year; select date | Collapsed; selected year 2000–2100 | Month grid repeats dates | Relative intensity is not time spent writing | +| F10 / P02 | Selected day and session history | Up to 20 displayed session rows, notes, checkpoints, intervals | WriterWork.History plus WriterWorkEvidence | Read only | Accepted-change evidence; Export recent session evidence | Optional day filter; missing chapter gets unavailable label | Reports exports same session evidence | Elapsed, browser engagement and audio overlap must stay distinct | +| F11 / P02 | Planned work ahead | Legacy tasks plus reviewed allocations | WritingSchedule.UpcomingTasks and PlannedActivities | Read only | Open scene/chapter | Shown when either list nonempty | Next Planned Session and Preview | Two task systems coexist | +| F12 / P01 | Writing Rhythm session toolbar | Kind, chapter, active session, elapsed/engaged duration and return note | WriterWork State/Start/Heartbeat/End | Editable | Activity; Chapter; Start session; End session & save note | Book required; owner evidence available; active session replaces start form | Reader embeds same toolbar | Session chapter may differ from saved objective and Word | +| F13 / P01 | Audio Review controls | Playback state/position/coverage and explicit external commands | WriterWork plus exact native lease and media observations | Editable | Play; Pause; Back/Forward 15 seconds; Pause on Edit | AudioReview kind requires chapter; stale/unavailable/capability gating disables controls | Native Word media commands | Ending tracking does not stop external playback | +| F14 / P03 | Workspace navigation | Write Next, In Progress, Revision, Final Pass, Story Health counts | Four scene queues plus book reminders | Read only | Tabs; disclosure | Overview collapsed; Workspaces open; selected queue only visible | Workflow strip and chapter counters | UI labels differ from internal workspace names | +| F15 / P03 | Scene queue cards | Status, summary, priority, blockers, warnings, notes, checklist and important threads | WriterDashboard_Scenes then selected-book filtering | Read only | Open scene; Session brief; Timeline; Warnings | Revision Status membership in repository; empty explanation | Chapter workflow and scene inspector | Live Development procedure mismatch makes all four empty | +| F16 / P03 | Story Health reminders | Missing chapter goals and unresolved selected writer-note types | WriterBook_Reminders | Read only | Chapter/scene link; Project story health | No reminders shows invitation to project health | Help Me consumes first goal/note | Not a complete story-health diagnosis | +| F17 / P01 | Today's planned writing | Legacy scene tasks and estimates | WritingSchedule.TodayTasks | Editable status only | Expand; scene; Mark complete; Skip | Only if tasks today; only Planned status can change | Preview legacy table | Not the same as explicit work sessions or reviewed allocations | +| F18 / P01 | Word Companion & Display Setup | Context/Intent/Word/window/layout status and display choices | writing-workspace.js and launcher | Editable browser preferences | Detect displays; Start / Reapply Workspace; open/focus windows | Collapsed; fragment opens it; some buttons hidden until connected/window exists | Ribbon Display Setup is redirect here | “Selected book” status can be a numeric runtime scope | +| F19 / P04 | Plan management table | Plan scope, goal, dates, availability, active status, tasks and finish | WritingPlan_ListForManagement | Editable via separate operations | View Schedule; Edit Plan; activate/deactivate; review; regenerate; delete | Empty if personal scope has no plan; All Books plans included in book view | Schedule Preview plan table | Mutation redirects omit previous filter | +| F20 / P04 | Delete Writing Plan modal | Named plan and deletion explanation | Current plan row | Confirmation | Delete Plan; Close; Cancel; Delete | Per-row Bootstrap modal | General deletion confirmation infrastructure | Deletion removes plan-owned allocations, not manuscript entities | +| F21 / P05 | Plan scope and goal form | Name, goal type, project, book, start/deadline | WritingScheduleService options and setup model | Editable | Field edits; Review activities; Skip scheduling; Schedule Preview | Requires accessible project and valid book/dates | Edit plan repeats some fields | “Review” already saves a plan; not a pure preview | +| F22 / P05 | Writing Availability | Seven day flags and minute choices, blocked inclusion, rebalance mode | AvailableDaysJson and plan settings | Editable | Day checkbox; session length; Include Blocked Scenes; Rebalance Mode | At least one day; allowed capacity 30–720 from option list | Edit repeats availability | Session Length here is planned daily capacity | +| F23 / P06 | Candidate review and budgets | Up to 1000 eligible chapter/scene rows, kind and starting minutes | WriterPlanning candidates plus StartingBudget | Editable | Include; Activity; Working budget; confirmation; Commit reviewed schedule | Chapters required; blocked/manual-task exclusion; 5–1440 budget | Legacy scheduling also creates scene work | Chapter-only candidate appears when chapter has no scenes | +| F24 / P06 | No candidates / replacement warning | Reason, navigation to chapters/project, availability and existing schedule | WriterPlanning.Context and stored allocations | Read only | Review chapters/scenes; Edit availability; View existing schedule | No candidate rows; existing allocation warning conditional | Empty Preview instructions | Completed allocations require another plan for another pass | +| F25 / P07 | Writing Plan Selection | All user plans, scope and active state | GetSchedulePreviewAsync personal summaries | Read only selection | Plan select; Select button; row Select | No plans gives create action; default first plan | Plan management table | Selection is independent of shell book | +| F26 / P07 | Reviewed writing activities | Date, work, activity, minutes, status; allocation count/sum | WriterPlannedActivities for selected plan | Editable completion | Work link; Mark complete; Review activities from chapters/scenes | Only if allocations exist; completion for Planned | Desk and Journey | Allocation count is not number of sessions actually worked | +| F27 / P07 | Legacy schedule summary/table | Task counts, estimated minutes, projected finish and rows | WritingSchedulePreview_ListByPlan | Read only | Review activities; Edit Plan; navigation | Summary only with legacy items; empty table suppressed for reviewed-only plan | Reviewed allocations use separate table | Legacy rebalance preview model is not rendered as a review UI | +| F28 / P08 | Availability/deadline editor | Editable name, deadline, days, minutes, blocked flag, active, rebalance | WritingPlan settings; original scope/goal/start read only | Editable | Save Plan; Cancel; Review and reallocate them | Valid plan owner; dates/day validation | Schedule Setup | Saving availability does not move reviewed allocations | +| F29 / P09 | Chapter workflow counters | Write/continue/revision/polish/blocked totals | ChapterWorkflow_Summary | Read only | None | Chapter and scenes required for nonzero totals | Dashboard queues | Counters describe status labels, not prose quality | +| F30 / P09 | Chapter Goals | Goal summary, emotional goal, reader takeaway, must include, risks | ChapterGoal_Get/Save and ChapterGoals | Editable | Save chapter goals | Chapter exists; blank fields permitted by this form | Intent tabs and Help Me missing-goal reminder | “Intent” is several fields, not one score | +| F31 / P09 | Workflow Summary | Scene status, priorities, warning/checklist/note/blocker counts | ChapterWorkflow_Summary | Read only | Open scene; Timeline; Warnings | Each chapter scene | Queue cards | Warnings link at page header is book-wide | +| F32 / P10 | Retained evidence table | Up to 500 accepted/native records, provenance, receipt/observed times, revisions and word differences | WritingActivity_List | Read only | Chapter link; JSON export; Earlier evidence | No events shows baseline; day with no events gets separate explanation | Journey evidence | Export starts at recent page, not necessarily displayed cursor/day | +| F33 / P10 | Baseline prompt | Current accepted manuscript as zero-growth starting point | WritingActivity.Baseline lock and append | Creates evidence | Record current baseline; Record current accepted baseline | Recording enabled; accepted snapshot must exist | Automatic retention worker baseline discovery | Button can be enabled before accepted prose exists | +| F34 / P10 | Privacy and retention | Enabled capture and 30–3650 day retention, default 365 | WritingActivitySettings | Editable | Record activity; Keep activity; Save privacy settings | Owner-only report; reduced retention prunes now | Sessions inherit same pause/retention | Pausing capture does not pause synchronisation | +| F35 / P10 | Delete retained activity | Confirmation and pause-capture warning | Activity erase then work erase | Destructive evidence edit | Expand; confirm; Delete activity | Explicit confirmation; only synthetic path tested if exercised | Work Erase API | Also deletes return/review notes, not just counts | +| F36 / P11 | Scene navigation and follow status | Book/chapter/scene identity, previous/next and jump | WritingController, writing-follow.js, native verified position | Selection only | Previous; Next; Jump to scene; Open Scene | No scene gives empty shell without loaded navigation | Intent has own selectors | Manual browsing can differ from active Word and saved focus | +| F37 / P11 | Overview tab | Scene facts, chronology, neighboring scenes, place, POV knowledge and relevant threads | StoryContext with at-point relevance and canonical records | Read only | Source scenes; Calendar; Story Maps; floor plan; Plot Lines; relationships; thread editor | Saved scene; individual cards have missing metadata messages | Other Context tabs and full workspaces | At-point saved knowledge is not unsaved Word understanding | +| F38 / P11 | People tab | Scene characters, descriptions, knowledge at point and changes | Canonical scene participants and character knowledge | Read only | Source scene links | No linked participants gives explicit empty state | Relationship map/character records | Requires saved associations, not mere names in prose | +| F39 / P11 | Relationships tab | Saved scene-relevant relationship map | RelationshipMapService and Context relationship projection | Read only reference | Map exploration where provided | Needs canonical relationship data | Full relationship workspace | Review candidates not yet materialised do not automatically appear | +| F40 / P11 | Maps tab | Saved map, location/people/plot/all lens and inspection | ContextMap endpoint, MapRepository and story map projection | Read only exploration | Map; Lens; refresh; fit; focus; zoom; pan; inspect place | Lazy load; no map/placement gives empty state; focus disabled without location | Full Maps workspace | Exploring map does not move author’s story scene automatically | +| F41 / P11 | Floor Plans tab | Primary location, linked floor and rendered saved image | Saved scene floor association and floor plan service | Read only exploration | Zoom; scroll/pan | No linked floor plan explains absence | Full floor plan editor | Requires explicit floor/scene association | +| F42 / P11 | Story tab | Saved thread/event/story references at scene | StoryContext scene data | Read only | Reference inspection | No recorded thread events/data yields empty | Intent Threads and Context Plot Lines | Scene event list is not a complete unresolved-thread audit | +| F43 / P11 | Plot Lines tab | Active-here/nearby/elsewhere plot developments and explored scene | WritingContextPlotLines projection and plot JS | Read only exploration / explicit navigation | Category toggles; Show all; scrubber; previous/next; current scene; Go to scene in Word; refresh | Lazy; saved plot/thread events required | Full Plot Lines workspace | Explored scene and actual followed scene remain distinct | +| F44 / P11 | Metrics tab | Recorded metric series in manuscript order, scale and scene detail | ContextMetrics and SceneMetric_ListRecordedForBook | Read only exploration | Metric; current scene; scene index; scrubber; Go to scene; refresh | Lazy; recorded values required; absent values not zero | Timeline/metrics workspace | Values are stored measurements, not automatically fresh diagnoses | +| F45 / P12 | Intent navigation and identity | Chapter-only or scene plan identity and selectors | WritingController plus writing-follow.js | Selection only | Jump to chapter/scene; Edit Scene; Edit Chapter Plan | Chapter or scene required; empty state otherwise | Context navigation | No scene-specific plan falls back to chapter intent | +| F46 / P12 | Plan tab | Chapter summary/purpose/goal, scene summary/purpose/outcome, emotional goal and takeaway | Chapter/scene metadata plus ChapterGoals | Read only | Edit via header destinations | Missing values shown individually | Chapter workflow and scene purpose editor | Explicitly says saved plan, no automatic rewrite | +| F47 / P12 | Must Include tab | Chapter must-include, scene checklist and relevant goals | ChapterGoals and SceneChecklistItems | Read only | Tab navigation | No saved values gives per-card empty text | Plan and Checklist duplicate goals/items | Checklist display is not a completion editor | +| F48 / P12 | Notes tab | Chapter risks and pinned/resolved scene notes | ChapterGoals.RisksOrConcerns and SceneNotes | Read only | Tab navigation | No notes/risks gives explicit empty text | Scene notes drawer | Resolved notes still visible here, unlike reminder rules | +| F49 / P12 | Threads tab | Plot line/thread name and event type/title/description | Scene ThreadEvents | Read only | Tab navigation | No recorded events gives empty state | Context Story and Plot Lines | Events reflect saved records, not inferred endings | +| F50 / P12 | Evidence tab and result cards | Per-objective achieved/partial/not-evidenced/contradicted/cannot-assess, quotes and author decisions | IntentAssessmentService and WritingIntentAssessments | Explicit assessment and decisions | Show saved evidence; Assess saved prose with AI; Cancel; Keep evidence; Dismiss; Defer; Revisit | Scene selected; source/objectives/entitlement and size bounds for AI; old evidence can be stale | Scene objective evidence | Separate from Help Me; AI never auto-completes objectives | +| F51 / P12 | Checklist tab | Legacy workflow DraftStatus, word estimates/actual, blocker and saved objective completion | SceneWorkflow and SceneChecklistItems | Read only | Review objectives and completion in scene editor | No workflow/checklist gets empty text | Scene Workflow and Must Include | Displays DraftStatus although queue source of truth is Revision Status | +| F52 / P13 | Reader chapter navigation | Previous/next, chapter choice, focus and refresh | ManuscriptReaderService accepted chapter model | Read only | Read; previous/next; Focus reading; Escape; return links | Boundary navigation disabled; no accepted prose gives sync instructions | Book chapter list | Changing Reader chapter does not retarget existing session automatically | +| F53 / P13 | Reader update controls | Last sync/snapshot stamps, pause automatic updates, updated text action | Reader changes/chapter polls and manuscript-reader.js | Browser preference only | Pause automatic updates while listening; Show updated chapter | Controls progressively enhanced; hidden until JS | Audio pause wording is separate | Pausing refresh does not pause playback or capture | +| F54 / P13 | Reading & Audio Review disclosure | Same explicit session controls bound to Reader chapter | Shared _WriterWorkToolbar | Session editing | Expand; session/media controls | Collapsed; Reader book/chapter supplies start scope | Writer toolbar | Toolbar state is book’s active session, even if Reader navigates elsewhere | +| F55 / P14 | Drafting support card and menu | Notes/checklist/workflow/attachments summary | SceneEditViewModel and _SceneWriterCard | Opens editors | Edit Writer; menu Notes/Checklist/Workflow/Attachments | Saved scene; editor URLs load drawers | Intent read-only copies | Edit Writer opens Notes, not all drafting support | +| F56 / P14 | Purpose editor | Purpose-type flags, purpose notes, expected outcome | Scene purposes/scene metadata and SaveScenePurpose | Editable | Purpose checkboxes; text; Save purpose; Cancel | Scene edit permission; drawer load | Intent Plan | Purpose tags are not included in Intent evidence objective text builder | +| F57 / P14 | Notes editor | Type/title/body, pin/resolve/remove and new note | SceneNotes and SaveSceneNotes | Editable | Fields; Remove; Save notes; Cancel | Existing or new saved scene notes | Intent Notes and Story Health | Only selected unresolved types trigger reminders | +| F58 / P14 | Checklist editor | Existing objective text/completed/remove and new item | SceneChecklistItems and SaveSceneChecklist | Editable | Complete; text; Remove; new item; Save checklist; Cancel | Scene edit access; blank new item skipped | Intent Checklist/Must Include | Author sets completion; AI evidence decisions remain separate | +| F59 / P14 | Workflow editor | Priority 1–10, estimated/actual words, drafted/last worked dates, blocker and reason | SceneWorkflow and SaveSceneWorkflow | Editable | Fields; Blocked; Save workflow; Cancel | Saved scene; typed values | Chapter summary and queue cards | Does not replace main Revision Status editor | +| F60 / P14 | Attachments editor | Stored file/link/title/type/notes and preview | SceneAttachments, upload storage and quota service | Editable | Upload; Open; Download; Open link; Add/Save/Remove attachment; Close | Title, file/link; 25 MB limit; quota; existing attachment actions conditional | Drafting support preview | Requires data/storage; not a manuscript editing surface | +| F61 / P15 | Problem Solver questions, browse and results | Question choices, reassurance, editorial explanation and capability links | Published WritingSolver graph/catalog and protected answer state | Questionnaire choices | Choose answers; continue/back/start; browse; open recommended workspace | Question constraints and graph version; protected state expires after two hours | Help Me has separate fixed rules | Answers describe author’s concern; no manuscript ingestion in this controller | +| F62 / P16 | Workspace context chooser | Accessible project and optional character selector | WritingSolverWorkspaceContext and capability route templates | Selection only | Select project/character; Open capability | Login, active accessible project, valid character if needed | Application project selection | Independent scope; no automatic current-book carry through | + +## Technical architecture and storage trace + +| Surface | Request / processor | Persistence and processing | +|---|---|---| +| Dashboard and chapter | WriterController → WriterWorkspaceService → WriterWorkspaceRepository | `WriterDashboard_Scenes`, `WriterDashboard_Reminders`, `ChapterWorkflow_Summary`, `ChapterGoal_Get/Save`; source SQL 015 and 052. Book-specific controller replaces project reminders with `WriterBook_Reminders` (260). | +| Personal focus | WriterController.SaveObjective → WriterObjectiveRepository | `WriterObjective`, `WriterWorkingObjectives` (261); one row per user/book; read omits invalid archived target. | +| Legacy scheduling | WriterController → WritingScheduleService → IWritingScheduleRepository | `WritingPlans`, `WritingScheduleItems`; plan summaries, task generation, active dashboard, status updates and rebalance procedures. Estimates are budgets, not telemetry. | +| Reviewed planning | WriterPlanningController → WriterPlanning.Allocate → WriterPlanningRepository | `WriterPlanning`, `WriterPlanningUpcoming`, `WriterPlannedActivities` (263); confirmed replace of uncompleted allocations, manual tasks retained. | +| Activity | WritingActivityController / ParagraphManuscriptRepository → WritingChangeCalculator | `WritingActivitySettings/Events/Receipts`; acceptance and evidence append in transaction. Baseline / Change / Structure differ from native Observation. SQL 259–260. | +| Work / Audio Review | WriterWorkController / NativeAudioReviewController → WriterWorkRepository → AudioReviewMetrics | `WriterWorkSessions`, `WriterWorkDays`, `WriterWork`, `WriterWorkEvidence`, `WriterWorkCalendar` (262). Native media source and exact lease bind observations; counters do not prove attention. | +| Retention background service | WritingActivityRetention.ExecuteAsync | Startup/daily baseline discovery; `WritingActivity_Prune`, `WriterWork_Prune`; failures logged by type without manuscript text. | +| Context | WritingController → StoryContext / relevance / relationship/map/plot/metric services | Canonical scene, participant, relationship, knowledge, location, plot/thread/event and recorded metric records; raw Scene Intelligence review candidates are not a fallback. | +| Intent Evidence | IntentAssessmentController → IntentAssessmentService | `SceneManuscriptSources` plus saved objectives; `WritingIntentAssessment`, `WritingIntentAssessments`; input hash, results and user decisions. SubscriptionFeature.StoryIntelligence gates Analyse. | +| Reader | ManuscriptReaderController → ManuscriptReaderService | Accepted server chapter/paragraph projections; text/headings rather than Word formatting. Separate change polling and chapter fetch. | +| Embedded Writer | ScenesController and SceneInspectorV2 drawers | Scene purposes, workflow, notes, checklist and attachments; repositories use stored procedures; attachment file storage/quota distinct from SQL. | +| Native Word | Vsto NativeRibbon → WordAdapter → Agent / NativePresenceStore | Book/document identity, revision/cursor verification, accepted chapter position mapping; media observations through desktop pairing, not browser cookies. Office.js shell separately hosts `/word-companion`. | +| Problem Solver | WritingProblemsController / WritingSolverEngine / WritingSolverResults | Published graph, editorial capability catalogue, protected two-hour answer state; workspace chooser uses accessible projects/characters. | + +Key implementation anchors: + +- [WriterController.cs:17](../../../PlotLine/Controllers/WriterController.cs#L17) +- [CoreServices.cs:6140](../../../PlotLine/Services/CoreServices.cs#L6140) +- [CoreServices.cs:6283](../../../PlotLine/Services/CoreServices.cs#L6283) +- [Repositories.cs:1210](../../../PlotLine/Data/Repositories.cs#L1210) +- [WritingController.cs:43](../../../PlotLine/Controllers/WritingController.cs#L43) +- [ApplicationNavigation.cs:13](../../../PlotLine/Services/ApplicationNavigation.cs#L13) +- [ApplicationRibbon.cs:35](../../../PlotLine/Services/ApplicationRibbon.cs#L35) +- [IntentAssessmentService.cs:29](../../../PlotLine/Services/IntentAssessmentService.cs#L29) +- [ParagraphManuscriptRepository.cs:23](../../../PlotLine/Data/ParagraphManuscriptRepository.cs#L23) +- [WritingActivityRetention.cs:7](../../../PlotLine/Services/WritingActivity/WritingActivityRetention.cs#L7) +- [Ribbon.xml:1](../../../PlotDirector.NativeCompanion/Vsto/Ribbon.xml#L1) +- [NativeRibbon.cs:76](../../../PlotDirector.NativeCompanion/Vsto/NativeRibbon.cs#L76) + +## External destinations and Writer relationship + +These are boundary traces, not audits of the entire destination sections. Scene editor is included above because its Writer features are integral. Book Details → chapter catalogue/create/import/Reader; Chapter Details → chapter metadata and chapter workflow; Projects → create/select project/book; Timeline → dated/order/metric story exploration; Warnings → continuity warning list with optional scene; Exports.WritingSession/ChapterBrief → generated scene/chapter brief (Markdown option for chapter); Analytics → project/book health; PlotLineWorkspace/PlotThreads → saved narrative lines/thread plans/events; StoryCalendar → scene date; Maps/FloorPlans → saved spatial reference/editing; RelationshipMap/Characters → saved character relationships/history; Story Intelligence Review Centre → explicit analysis/review and canonical materialisation. Solver capability destinations use their own project/character chooser. Follow-through results, including route failures, appear in the coverage register. + +## Restriction and state boundaries + +Cookie authentication protects Writer routes; Reports and work/session evidence require owner authority in SQL. Ribbon Reports additionally has `OwnerOnly`. Shared-project collaborators retain scene queues but may not see private progress or the session toolbar. The dashboard itself has no direct Writer subscription gate in the inspected controller. This does not waive downstream feature/storage restrictions: Intent AI checks StoryIntelligence entitlement; attachments check storage. Native playback requires a compatible connected Windows agent/player and supported operations. No entitlement was upgraded for this audit. + +**Development discrepancy D01:** deployed `WriterDashboard_Scenes` accepts only `Blocked`, `ReadyForDraft`, `ReadyForRevision`, `ReadyForPolish`, `Warnings`; source service calls `WriteNext`, `ContinueWriting`, `RevisionQueue`, `PolishingQueue`. Read-only definition inspection and four synthetic scene records confirm the mismatch. Repository migration 052 contains the requested status-based queues. Do not describe current Development queue emptiness as proof that the book has no eligible scenes. No repair was applied. diff --git a/Docs/Writer/Audit/Writer-Context-Matrix.md b/Docs/Writer/Audit/Writer-Context-Matrix.md new file mode 100644 index 00000000..586d7e4b --- /dev/null +++ b/Docs/Writer/Audit/Writer-Context-Matrix.md @@ -0,0 +1,77 @@ +# Writer context matrix + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Source of truth + +There is no single current-book/current-chapter/current-scene record that controls the whole experience. + +1. `ApplicationNavigation.BuildAsync` builds request-scoped shell context from the rendered model, selected plan, and query IDs, then reauthorises the project/book. It explicitly avoids remembered/unverified project context. The shell Book menu navigates to a new Writer Index request for Writer pages. It is not a universal mutation of every open window/session. +2. `WriterController.Index` resolves a supplied book to its project when project is absent. Without a project it selects the first accessible project; within a project and without a book it selects the first nonarchived book. An explicit unavailable/archived book returns NotFound. The selected book filters dashboard queues after project retrieval. No chapter/scene dashboard selection is inferred from the current Word cursor. +3. `WriterWorkingObjectives` is a saved `(BookID,UserID)` return target and Activity. Its chapter/scene may be null. SQL read suppresses a target whose chapter or scene is archived/unavailable. The UI then shows Start Here. It is not ChapterGoals or the active work session. +4. `WriterWorkSessions` binds an explicitly started kind and optional chapter to a user/book. Audio Review requires a chapter. Start chooses an exact native lease only if unambiguous (one lease, or one active lease). That binding is fixed for the review; starting before a suitable native lease may require ending/restarting later. It does not follow arbitrary new Word context. +5. Word’s native document context is an instance/document-session/grant/manuscript/revision/cursor tuple. `WritingController.NativeTarget` requires a live Word-available, saved document, valid accepted paragraph/chapter revision and matching persisted chapter-position mapping. It checks the target again after display construction to avoid racing cursor changes. An incomplete instance/session pair is BadRequest; pending mapping becomes waiting/manual fallback, not guessed scene data. +6. Saved Context/Intent snapshots (`pinned=true`) use saved entity IDs and manual browsing. Live views consume follow events within their allowed scope. Tab selection is browser-local; lazy component exploration and map viewports can be preserved independently. Plot/metric exploration is a separate cursor until an explicit Go to scene action. +7. Reader has a chapter in its own URL/rendered model and accepted text/version. Changing it does not rewrite the saved objective or retarget an existing book session. + +## Context matrix + +“Book follows” below means the explicit request/selection controls that feature, not all windows. “Word follows” means the active native document can update that view through verified follow, not that all saved author state changes. All rows **Source verified**; observed exceptions are marked in the coverage register. + +| Feature | Actual scope / selector | Book follows? | Chapter/scene and Word follows? | Saved / independent state | Visible context and change method | Propagation / unavailable behavior | +|---|---|---|---|---|---|---| +| Writer shell | Request project/book from model/query | Yes per navigation | No automatic Word chapter/scene | Request-scoped, not remembered global selection | Project/book application bar | Navigates Writer Index; open windows/session not uniformly retargeted | +| Overview/Workspaces | Controller-selected project/book | Yes | No native cursor targeting | Default first accessible project/book if omitted | Book title; workspace tab | Explicit invalid book404; no book Start Here | +| Four scene queues | Project query, then book filtering | Yes after query | Saved scene IDs in each row; no Word following | Queue parameter; upstream TOP40 | Counts/cards and queue links | D01 live query names incompatible; TOP40 before book filter can truncate a selected book's eligible scenes | +| Story Health reminders | `WriterBook_Reminders(user,book)` | Yes | Chapter missing goal / scene note target | Canonical authored fields | Category/title and links | Missing records produce no reminder; absence not proof of good story | +| Working objective | User+book+optional chapter/scene | Yes, one objective/book | Manually saved; no Word following | SQL persisted independently | Activity and target card; Change objective | Used by focus suggestion, toolbar defaults and scheduling default; invalid target omitted | +| Help Me | Rendered dashboard model | Yes inherited | Target choices from objective/first rows | No dismissal history | Observation text and action label | Recomputed GET; same suggestions after dismissal; no ongoing learning | +| Next Planned Session | First reviewed allocation, else today/future legacy task | Book filtered | Target is allocation/task, not objective | Independent plan IDs and dates | Date, work kind/title | May be overdue reviewed allocation; opening does not start work | +| Manuscript word/progress card | Book accepted event or catalogue count | Yes | Whole-book evidence, not selected chapter | Retained accepted observations | Source-labelled words and 30-day changes | No reconstruction of earlier writing; hidden for private evidence | +| Recent Activity | Book+last28 receipt dates UTC | Yes | Not current Word scene | Retained calendar/activity | Date cells/aria descriptions | Navigation to day does not select manuscript scene | +| Journey month/year | Book+requested year/month | Yes | No Word following | URL calendar state | Month/year title; previous/next/year cells | Selected year limited; no evidence neutral; not “no work” | +| Journey day/history/export | User/book+optional UTC day | Yes | Each session keeps its chapter; interval edits can be whole-book | Retention-limited history/notes | Explicit day and chapter labels | Deleted chapter labelled unavailable; display20/export50; no session-caused-edit assertion | +| Explicit work session | User/book/kind/optional chapter | Book captured at start | Dropdown independently seeded from objective | Current session per book, not dashboard form state | Activity/chapter form, session label; active nonaudio label does not prominently show chapter | Start/end heartbeat persist; older than12h suppressed by State; browsing away does not end | +| Audio Review | Session+chapter+exact native lease/media key | Start-bound book | Does not follow arbitrary new Word chapter/source | Fixed native instance/document/grant; source change rejected | Audio chapter/status/capability controls | Stale telemetry>45s disables; new lease may need restart; expiry10s command | +| Today's planned tasks | Personal active legacy plans, filtered selected book | Yes tasks | Individual scene | WritingScheduleItems status | Date/title/estimated minutes | Completion/skip updates task, not session or scene revision | +| Writing Plans list | User with optional project/book filter | Supplied filter only | No Word following | All Books plans intentionally included | Project/book columns; all-projects link | Activation/deletion redirects unfiltered, losing list scope | +| Schedule Setup | Independently chosen project and optional book | Initially seeded, user can change | No Word following | New plan persists on Review activities | Explicit Project, Book/All Books, dates | Plan scope validated on POST; changing shell alone is not a saved plan edit | +| Reviewed candidate allocation | Explicit personal writingPlanId | Uses plan scope | Candidate chapter/scene; no Word following | Minutes/kind and dates on saved allocations | Scope heading, candidate titles, confirmation | Blocked/manual-task exclusions; completed allocation requires new plan | +| Schedule Preview | Any user's selected plan ID; default first personal plan | Does not inherently follow shell book | No Word following | URL selectedPlan independent | Full plan dropdown/project/book | Scope-free preview links may open another book/project's plan | +| Edit Plan | Explicit personal plan ID | Fixed original book or All Books | No Word following | Scope/goal/start immutable in view | Read-only Project/Book/Goal/Start | Availability edit does not move reviewed allocations; separate review required | +| Chapter workflow/goals | ChapterID → owning book/project | Entity-derived | Explicit chapter; not Word cursor | ChapterGoals saved author plan | Chapter number/title and breadcrumb | Used by Intent/assessment/reminders/briefs, not automatic prose edit | +| Scene Writer drawers | Explicit SceneID → chapter/book/project | Entity-derived | Manual editor target | Notes/checklist/workflow/attachments | Scene title/drawer; edit inputs | Refresh summaries; no automatic session/context movement | +| Scene Revision Status | Canonical scene RevisionStatusID | Entity-derived | Manual main scene metadata | Queue membership source | Status label/main scene editor | Separate legacy Workflow.DraftStatus can disagree in Intent Checklist | +| Context scene | IDs or verified native follow | Scoped book | Verified Word follows in live mode; saved first-scene fallback outside native launch | Manual navigation / pinned snapshot independent | Project/book/chapter/scene header and follow status | No scene empty shell; stale native target conflict/waiting; explicit navigation may fail while saved scene remains | +| Context People/relationships/Story | Current saved scene + canonical at-point references | Current view scope | Follows loaded scene, not raw manuscript inference | Canonical accepted records | Scene header, source links, author-reference qualifiers | Unmaterialised review candidates absent; no data explanatory empty states | +| Context Maps | Project maps + book/scene projection | Scoped book story projection | Scene marker follows; user map/lens/viewport separate | Browser component state | Map/lens, saved-location text | No map/no reliable placement; pan/zoom does not select scene | +| Context Floor Plans | Scene's linked floorplan/floor | Scene-derived | Follows saved scene associations | Browser zoom/pan | Location/floor labels | No link/floor/occupancy messages; no automatic inference from prose | +| Context Plot Lines | Book sequence + author plot overview | Yes view scope | Explored scene separate from current; explicit Word jump | Category filters, scrubber and explored position | Current/explored marker; author-not-POV qualifier | Includes future planned developments; not viewpoint knowledge | +| Context Metrics | Book scene sequence and saved metric values | Yes view scope | Current marker versus explored scene | Selected metric/scroll/scrubber | Metric scale/current marker/not-recorded gaps | Missing values not0; refresh reads storage without analysis | +| Intent Plan/Must Include/Notes/Threads/Checklist | Scene and/or chapter saved data | Scoped | Follows current Intent fragment; manual/snapshot independent | Saved author decisions separate from evidence | Chapter/scene title; per-card empty messages | Chapter fallback when scene lacks plan; no propagation to working objective | +| Intent Evidence | Actor+SceneID+prose/objectives fingerprint | Scene-derived | Saved prose, not unsaved active Word text | Result/decisions per input hash | Objective text, quote/status/model/date/stale indication | Changed inputs stale; decisions reject409; no automatic checklist completion | +| Reader | URL book/chapter + accepted content version | Explicit URL | User navigates chapters; not current Word cursor | Focus/refresh pause presentation state | Book/chapter, sync/snapshot times, Read only | No accepted text instructs sync; does not read local unsynchronised Word | +| Display Setup | Launcher book/project+window/native presence | Bound fallback book; cross-book presence guarded | Does not select saved objective | Browser screen placement/local preferences and named windows | Runtime book/status/layout | Permission/popup failure gives fallback; Word window movement owned by Windows | +| Reports privacy/evidence | Book owner | Explicit book | Whole book / record chapter provenance | SQL capture enabled/retention | Book title and settings | Nonowner404; erase also removes session notes; sync remains separate | +| Native Word ribbon | Active Word instance/document session | Linked active Word book | Verified current chapter/scene | Native document/grant/revision mapping | Read-only Book/Chapter/Scene editBoxes | Typing restored; unverified chapter/scene labels; book gating | +| Office.js Companion | Office document plus authenticated hosted taskpane | Linked/import-selected book | Anchor/document mapping | Separate legacy/add-in surface | Taskpane connection/import state | Not tested in Office host here; cannot assume identical native behavior | +| Problem Solver | Protected questionnaire answers | No manuscript book input in journey | No chapter/scene/Word following | Protected versioned history2h | Questions/results and workspace chooser | Expired graph/state restarts; guidance not current-book analysis | +| Solver workspace destination | Chosen project and sometimes character | No universal book carry | Character selector only for configured routes | Independent chooser | Explicit choice | Invalid entity404; tool route determines downstream scope | + +## Specific inconsistencies and consequences + +- **C01 — queue limit before scope filter:** `WriterDashboard_Scenes` returns TOP40 per project/queue before `WriterController` filters selected book. Even with D01 repaired, a book can show an incomplete/empty queue when other books occupy the cap. This is source verified, not load-tested with >40 fixtures. +- **C02 — independent plan selector:** WritingPlans and ScheduleSetup expose scope-free Schedule Preview links. Preview selects from all personal plans and defaults to the first. Activation/deletion also discard prior list filters. +- **C03 — independent objective/session/native chapter:** a saved revision objective for chapter A can coexist with a manually started session for chapter B and a Word-following Context window on C. The toolbar defaults help, but do not establish propagation. +- **C04 — two status sources:** repository RevisionStatuses controls queues; Intent Checklist renders Workflow.DraftStatus. Browser fixture: scene header Outlined, Intent Workflow Status Planned. +- **C05 — two time bases:** calendar/activity uses UTC receipt dates; scheduling uses DateTime.Today; elapsed time, engaged seconds, playback seconds, unique coverage, planned minutes and accepted changes are different quantities. +- **C06 — projected versus verified context:** author plot overview may include future developments, while POV knowledge is bounded through the scene; the UI does include qualifiers. Treat them as distinct scopes, not interchangeable truth. +- **C07 — waiting copy:** Context opened with a valid book but no scenes reported that it did not receive project/book from Word Companion. The route did have bookId. Empty navigation offers no loaded scene selector in that state. Both verified on the synthetic empty book. + +Implementation references: [ApplicationNavigation](../../../PlotLine/Services/ApplicationNavigation.cs), [WriterController](../../../PlotLine/Controllers/WriterController.cs), [WriterObjective SQL](../../../PlotLine/Sql/261_WriterWorkingObjective.sql), [WritingController](../../../PlotLine/Controllers/WritingController.cs), [follow state](../../../PlotLine/wwwroot/js/writing-follow.js), [launcher](../../../PlotLine/wwwroot/js/writing-workspace-launcher.js), [WriterWorkController](../../../PlotLine/Controllers/WriterWorkController.cs). diff --git a/Docs/Writer/Audit/Writer-Feature-Activation.md b/Docs/Writer/Audit/Writer-Feature-Activation.md new file mode 100644 index 00000000..f6746410 --- /dev/null +++ b/Docs/Writer/Audit/Writer-Feature-Activation.md @@ -0,0 +1,63 @@ +# Writer feature activation guide + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Starting conditions + +A new book can use manually authored chapter/scene plans, notes, checklists, work sessions and reviewed time allocations without Word or historical activity. It cannot show accepted prose, past changes, listening coverage, canonical character knowledge or plot development merely because a book row exists. An imported manuscript can supply chapters/scenes and source prose, but semantic reference panels require the corresponding canonical records to be populated/materialised. Word synchronisation, core manuscript import and Story Intelligence review are separate prerequisites. + +The table covers all 62 functional units by capability; purely presentational variants (month/year view, disclosure, duplicate cards) share their input pipeline rather than pretending each needs a separate setup workflow. **Source verified** throughout; executed activation examples are labelled in coverage. + +| Capability / inventory units | What the author must do / where | Input → storage / processing → display | New / imported book; without Word | Missing prerequisites / limitations | +|---|---|---|---|---| +| Book desk, shell identity | Create/select accessible project and nonarchived book in project/book navigation | Projects/Books → authorised request model → title/ribbon | New yes; imported yes; Word unnecessary | No book gives Start Here; absent IDs can silently choose first accessible project/book | +| Saved working focus / Help focus | Start Here → Continue an existing manuscript → Activity and optional chapter/scene → save | POST SaveObjective → WriterObjective → WriterWorkingObjectives(user/book) → focus card, suggestion, toolbar default | New book whole manuscript yes; chapter/scene choice only after creation; no Word | Archived/deleted target omitted; must choose again. Does not create manuscript text | +| Chapter Intent/Goals | Chapter workflow → Goal summary, Emotional goal, Reader takeaway, Must include, Risks or concerns → Save chapter goals | ChapterGoal_Save → ChapterGoals → workflow, Intent Plan/Must Include/Notes, briefs, missing-goal reminder and assessment inputs | New/imported yes; no Word | Blank GoalSummary triggers Help Me/Story Health regardless of other goals. No “used by Help Me analysis” claim | +| Chapter summary/purpose | Chapter metadata editor, separate from workflow goal form | Chapter_Save and lookup association → canonical chapter summary/purpose → Intent Plan | New/imported yes; no Word | Purpose category and GoalSummary are distinct; no automatic goal inference | +| Scene summary/purpose/outcome | Scene metadata / Purpose drawer → purpose flags, purpose notes, expected outcome → save | Scene/purpose procedures → canonical scene fields → Context/Intent/brief/assessment | New/imported yes; no Word | Summary alone is not saved manuscript prose; purpose-type tags alone are not assessment objective text | +| Scene queues / progress stages | Main scene Revision Status: Outlined, Drafted, Needs Work, Revised; priority/blocker optional | Scenes.RevisionStatusID → WriterDashboard_Scenes status filter/order → selected-book queue cards | Manual setup works in repository contract; imported statuses may remain Planned; no Word | Planned/Polished/Locked/Cut Candidate not in four active queues; D01 currently defeats live queue activation | +| Priority, estimates, actual counts and blockers | Scene Writer Workflow drawer → numeric/date/blocked fields | SceneWorkflow_Save → SceneWorkflow → queue summaries/scheduling inputs/Intent checklist | New/imported yes; no Word | DraftStatus is legacy and can differ from Revision Status; actual words/date fields are authored metadata, not automatic telemetry | +| Notes / note reminders | Scene Writer Notes → type/title/text, pin/resolve → Save notes | SceneNote_Save → SceneNotes → card/Intent; unresolved TODO/Continuity Note/Revision Note → WriterBook_Reminders → Help Me note | New/imported yes; no Word | Other types or resolved notes still display in Intent but do not trigger those reminders | +| Checklist / objective completion | Scene Checklist drawer → item text and completed flags | SceneChecklistItem_Save/Delete → SceneChecklistItems → Writer counts, Intent copies/progress and evidence objective list | New/imported yes; no Word | SceneWorkflow_Get creates default workflow and eight checklist items when absent. Opening scene support is not a pure read; tested only on synthetic scenes | +| Attachments | Scene Attachments → title/type + file or external link + notes | Uploaded file/quota check → storage + SceneAttachment_Save → preview/open/download | New/imported yes; no Word | 25MB limit and storage allowance; metadata not accepted prose; Remove deletes reference/storage path rather than revising manuscript | +| Session brief / chapter brief | Populate saved scene/chapter references; choose brief/Markdown export | Exports service reads canonical context and Writer inputs → generated brief | New/imported yes with sparse output; no Word | Export is not a started/tracked session or Word editing action | +| Story Health reminders | Add chapter GoalSummary to clear missing-goal item; resolve/edit relevant notes | WriterBook_Reminders from ChapterGoals/SceneNotes → tab and first matching Help Me rules | New/imported yes; no Word | Missing semantic analysis is not represented as a warning; no reminder does not mean no plot problem | +| Time plan availability | ScheduleSetup → name/goal/project/book or All Books, start/deadline, days/minutes/blocked/rebalance → Review activities | WritingPlan create → WritingPlans JSON availability/settings → review page | New book can save plan before chapters exist; imported yes; no Word | “Review activities” persists active plan before user confirms allocation; all fields/dates/day availability validated | +| Reviewed chapter/scene allocations | Add at least a chapter; review candidates → select/kind/minutes → confirm → commit | WriterPlanning candidates → StartingBudget → Allocate splits sequentially by daily capacity → WriterPlannedActivities → Preview/desk/Journey | Empty chapter supported; scenes supported; imported no status changes required; no Word | Max1000 candidates; blocked unless included; existing manual task scene excluded; capacity overflow aborts. Completed reviewed work blocks replacement; new plan needed | +| Reviewed completion | Preview → allocation Mark complete | WriterPlanning complete → Status Done → Preview and upcoming refresh | Any saved allocation; no Word | Completion does not tick scene checklist/change Revision Status or prove work occurred | +| Legacy generated scene tasks | Mark schedulable scene status, availability and estimates; choose Regenerate workflow scene tasks | WritingScheduleScene_ListForPlanning → service estimates/splits → WritingScheduleItems → today/upcoming and Preview | Requires scenes/status setup; no Word | Current create path uses reviewed activities; if reviewed allocations exist regeneration redirects to review instead. Legacy and reviewed task systems stay distinct | +| Legacy task completion / skip / rebalance | Today task → Mark complete or Skip; legacy rebalance operations exist in controller | Planned status update or planned-date changes → schedule/dashboard | Saved personal plan/tasks; no Word | No end-to-end rebalance review control in inspected Preview; Automatic enum alone is not proof of a running auto-rebalance job | +| Progress additions/removals | Save/synchronise manuscript to accepted canonical paragraph state; record baseline if necessary | ParagraphManuscriptRepository acceptance transaction → WritingChangeCalculator(previous,accepted) → WritingActivity append Baseline/Change/Structure → 30-day summary | New book needs accepted prose first; imported historical text becomes baseline, not retrospective writing; requires accepted ingest path | No reconstruction before baseline; catalogue word count fallback differs from accepted count; Word native Observation alone is not accepted baseline | +| Reports baseline | Reports → Record current baseline, with capture enabled and accepted manuscript available | WritingActivity lock reads accepted manuscript JSON → calculator baseline → Baseline event | Imported/accepted yes; empty new book no; no active Word needed if accepted state already exists | Button is enabled based on recording flag, not snapshot availability; absent accepted manuscript returns400 with sync-first instruction | +| Work sessions / return notes | Toolbar choose kind and optional chapter → Start → work with tab visible → End and save note | WriterWork Start/Heartbeat/End → session/day evidence → Journey/report export | New/imported yes without prose/history/Word; owner and capture enabled | JS refresh10s, heartbeat every3 refresh ticks, recent trusted input<60s + focus/visible for engaged signal. Hidden/idle intervals not inferred as engagement; wall elapsed is separate | +| Journey month/year/day | Produce accepted changes and/or explicit sessions; open Journey and choose dates | WriterWorkCalendar + activity evidence → relative intensity/month/year; History+Evidence → sessions | Planning-only activity works without accepted baseline or Word | UTC receipt dates; neutral means no retained evidence; display20/export50 recent sessions; missing chapter label retained | +| Audio Review session | Select chapter, choose Audio Review, Start after compatible native registration and player discovery | Browser Start binds native lease → native audio endpoint observations → AudioReviewMetrics → WriterWork counters → toolbar/Journey | Can start without accepted prose/Word connection but playback unavailable; useful media requires Windows agent/player | Updated Windows Companion, one controllable selected source, exact lease, live telemetry and advertised operations. Starting too early requires restart; tracking can exist with0 audio | +| Audio playback / Pause on Edit | External supported player and native bridge active; Play/Pause/±15s; opt Pause on Edit | Four-operation command+UUID → native ack → transactional monotonic observation; text modification may issue pause | Native Windows physical requirement; browser alone insufficient | Freshness45s, expiry10s; source-key changes rejected. No auto resume; end review does not pause player. Consecutive same-source playing observations≤30s establish bounded playback; seeks/gaps/rate changes not counted as ordinary coverage | +| Session/activity privacy | Reports owner → Record activity / retention / Save; optional confirmed erase | WritingActivity settings/prune; WriterWork shares pause/retention; erase removes history and notes | All book states; no Word | Default365d, range30–3650; pause keeps manuscript sync available; exported files/backups independent; no evidence means no inference about actual productivity | +| Context scene reference / navigation | Save scenes; open Context with IDs/manual scene or connected verified Word session | WritingController + StoryContext + native accepted-position check → fragment → eight tabs | New manual scene yes; imported canonical scene yes; no Word in pinned/manual mode | Book-only no-scene waiting state has misleading copy; native mapping pending refuses guessed position; manual target not objective | +| Context People / Relationships / Story | Link scene characters, knowledge, relationships, thread events/assets; or complete relevant analysis/review materialisation | Canonical associations + at-point/relevance projection → saved references | New manual data yes; imported prose alone insufficient; no Word required for saved display | Raw pending Scene Intelligence is not canonical. Future author planning and POV knowledge are distinct | +| Context Maps / Floor Plans | Save project map and placed locations; associate scene location/floor/floorplan, characters/assets as needed | Map/floor repositories + story projection → lazy map / saved floor preview | Manual or imported canonical data; no Word | Map existence does not imply reliable scene placement; scene focus disabled without feature; no automatic map editing | +| Context Plot Lines / Threads | Create plot line/thread and link meaningful events to saved scenes, intended resolutions where applicable | Canonical plot/thread/event tables → book sequence/author development cards and Intent Threads | New manual yes; imported requires synthesis/review/materialisation or manual entry; no Word | Names in prose alone do not create reviewed line/event records. Exploration not semantic diagnosis or rewriting | +| Context Metrics / pacing reference | Configure active metric types and save scene values manually or via accepted intelligence | SceneMetricValues → SceneMetric_ListRecordedForBook → ContextMetrics graphs; related Analytics | New manual yes; imported values must exist; no Word | No saved value is a gap, not0; Refresh saved data never runs AI; old values can remain after prose changes | +| Intent Evidence | Save actual SceneManuscriptSources prose AND textual purpose/outcome/chapter goals/checklist; open Evidence → Assess saved prose with AI | Read saved source and ordered objective list → SHA256 fingerprint → bounded AI prompt → exact-key/status/quote validation → recheck fingerprint → WritingIntentAssessment Save | Imported scene source yes; new metadata-only scene no; Word not needed if source exists; unsaved/merely accepted Reader text is not assumed same source pipeline | StoryIntelligence entitlement; source≤120000 chars, ≤32 objectives, objective text sum≤16000; timeout3min; unchanged results reused; quote mismatch becomes cannot-assess. No paid call made in audit | +| Evidence author decisions | Load current matching evidence; Keep evidence/Dismiss/Defer/Revisit | Scene/hash/key decision → persisted decision JSON → objective card label | Existing valid result needed | Stale inputs409; AI evidence never ticks checklist; dismiss here is unrelated to Help Me dismissal | +| Reader / automatic accepted-text refresh | Successfully accept chapter synchronisation; choose Reader chapter | Accepted paragraph/chapter projection → Reader model; visible checks → change notification/replacement | New empty gives sync message; imported accepted server text yes; reading offline Word not provided | Read only; headings/text captured, not formatting/images/page layout. Pause refresh is not pause playback or synchronisation | +| Display placement | Open setup → select Context/Intent displays → Detect displays → allow permission → open/reapply windows | Browser screen API + saved preferences + named-window/presence registry → placement/status | No Word needed for saved reference windows; linked controls conditional | Popup and permission dependent; fallback current monitor; cannot move Word itself | +| Native/Office Companion | Install/sign in/link book; save Word manuscript; successful accepted mapping/sync; use ribbon | WordAdapter/Agent/host → authenticated presence/import/sync/canonical records → reference windows/Reader/activity | Native useful only with Windows Word; Office.js taskpane is separate shell | Linked book differs from current dashboard selection; ambiguous source/session requires explicit choice or no binding. Physical host not available for audit | +| Problem Solver / resolving concerns | Open questionnaire/browse; answer supplied questions; inspect editorial result; choose workspace project/character | Published graph and answer traversal → guidance/capability route → independent workspace chooser | New/imported both; no Word or prose ingestion required | Generic structured advice; does not inspect trilogy manuscript, guarantee diagnosis, or carry current Writer book into every destination | + +## Intent: exact consumption chain + +Chapter GoalSummary is saved on Chapter workflow, read into Intent, tested for absence by reminders and included as `chapter-goal` in IntentAssessmentService. EmotionalGoal, MustInclude and ReaderTakeaway also enter the assessment. RisksOrConcerns is displayed in Notes but is not added by the inspected evidence objective builder. Chapter summary/purpose and scene summary are display reference, not objective entries there. ScenePurposeNotes and SceneOutcomeNotes become purpose/outcome objectives; purpose-type names are not included by that builder. Each checklist item becomes a keyed objective, regardless of whether it is marked complete. This distinction matters when authors ask whether entering a field affected guidance. + +Help Me only checks missing GoalSummary, not its meaning. Evidence explicitly shows per-objective explanations/quotes and stored decision labels, so it is the visible consumption feedback. Plans show the saved fields but do not claim an analysis used them. Neither surface writes the author’s intentions automatically. + +## Schema and acceptance boundaries + +Live metadata confirmed `ChapterGoals`, `SceneWorkflow`, `WriterWorkingObjectives`, `WritingPlans`, `WritingScheduleItems`, `WriterPlannedActivities`, `WritingActivitySettings/Events/Receipts`, `WriterWorkSessions/Days`, `WritingIntentAssessments` and relevant procedures in `PlotDirector_Development`. Mere object presence does not prove every migration body is current: D01 demonstrates the opposite. Refer to the inventory architecture map and the coverage register for methods and live/source differences. diff --git a/Docs/Writer/Audit/Writer-HelpMe-Rules.md b/Docs/Writer/Audit/Writer-HelpMe-Rules.md new file mode 100644 index 00000000..b1107a87 --- /dev/null +++ b/Docs/Writer/Audit/Writer-HelpMe-Rules.md @@ -0,0 +1,57 @@ +# Writer Help Me rule catalogue + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Complete provider rule catalogue + +Source: [WriterSuggestions.cs](../../../PlotLine/Services/Writer/WriterSuggestions.cs), [Help Me partial](../../../PlotLine/Views/Writer/_HelpMe.cshtml), [client toggle](../../../PlotLine/wwwroot/js/writer-work.js), [book reminder SQL](../../../PlotLine/Sql/260_WriterActivitySummary.sql). All rules **Source verified**. Opening/dismissal/reopening, missing chapter-goal suggestion, Reader empty destination and chapter fallback were **Both verified** on a disposable book. Queue-dependent suggestions were not produced live because of D01. + +The provider is `WriterSuggestionProvider.Suggest(WriterDashboardViewModel)`. It is deterministic data logic. No AI call, classifier, semantic story analysis, user preference model or learned recommendation ranking occurs here. The provider interface allows a different implementation, but that is not evidence that an advanced provider is active. Controller fallback explicitly constructs this provider; `Program.cs` registers this exact provider as a singleton (line 205). + +| Append order / key | Exact trigger / input | Observation and exact action | Actual target and scope | What it can and cannot conclude | +|---|---|---|---|---| +| 1 `focus` | model.Objective exists | Saved activity lowercased; “Return to your current focus” | Scene → Scenes.Edit; else chapter → Writer.Chapter; else Writer.Index. IDs from objective; book/project from model | Returns to authored focus; does not establish the most urgent story problem | +| 2 `reviewed` | PlannedActivities.FirstOrDefault exists | Title/date; “Open your next planned activity” | Scene editor or chapter workflow using allocation target | Recorded budget; not evidence the task is the right creative priority or is future-dated | +| 3 `planned` | First TodayTasks.Concat(UpcomingTasks) exists | Scene/date; “Open this planned scene” | Scenes.Edit(task.SceneID) | Scheduled workflow scene, not a measured session or AI need | +| 4 `intent` | First reminder with EntityType Chapter and Category Chapter Goal | reminder.Detail or “This chapter has no saved goal summary.”; “Set this chapter's Intent” | Writer.Chapter(reminder.EntityID) | Missing GoalSummary only; does not read or assess the goal's meaning | +| 5 `revision` | RevisionQueue.FirstOrDefault exists | Scene marked Needs Work; “Review this scene”; qualifier workflow label, not new diagnosis | Scenes.Edit(scene.SceneID) | Repeats the author's workflow status; no prose diagnosis | +| 6 `draft` | WriteNext.FirstOrDefault exists | Scene marked Outlined; “Work on the next outlined scene” | Scenes.Edit(scene.SceneID) | Queue order, not generated scene-writing advice | +| 7 `changes` | Activity.Totals.Removed >0 | Added/removed totals over30days; “Review the change evidence”; qualifier revision may be substantial despite small net | WritingActivity.Index(bookId) | Helpful interpretation of counts, not judgement of improvement | +| 8 `listen` | ObjectiveChoices matching objective.ChapterID, else first choice, exists | Chapter available; “Read or start Audio Review”; Windows support qualifier | ManuscriptReader.Index(bookId,chapterId) | Alternative review route; neither accepted prose nor working media controls checked | +| 9 `note` | First reminder with SceneID and Category Writer Note | reminder.Detail or note fallback; “Review this captured note” | Scenes.Edit(note.SceneID) | Surfaces a saved unresolved note; not a new continuity finding | +| 10 `explore` | BookID exists AND current pre-dedup result.Count<3 | Book.ChapterCount or0; “Explore or add chapters” | Books.Details(bookId) | Generic navigation fallback; can produce fewer than3 final results after dedup | + +After appending, the provider uses `DistinctBy((Controller,RouteAction,EntityID,ChapterID))`, then `Take(4)`. This is **fixed append priority**, not severity weighting. A focus and a scheduled activity going to the same scene collapse. Key/observation text does not determine uniqueness. Fallback runs before dedup, so it is not backfilled when duplicate destinations reduce the list. Rich accounts can consistently hide lower-priority note/listen/change suggestions behind the first four. + +## Input provenance and ordering + +- Objective: SQL `WriterObjective(read)` for current user/book. Valid saved chapter/scene required; no valid target means absent objective. +- Reviewed activity: `WriterPlanningUpcoming` selects TOP10 Planned allocations from active user plans filtered to book, ordered by ScheduledDate, ActivityID. There is no “today or later” predicate; overdue tasks can be called next. +- Legacy tasks: schedule dashboard orders today's items by priority then date/order; future list by date then ID, max5. +- Missing Intent: `WriterBook_Reminders` selects TOP60 nonarchived chapters with null/blank GoalSummary. There is no final stable ORDER BY for the UNION result, so first missing chapter/note is not a guaranteed editorial priority. +- Notes: same reminder procedure includes unresolved TODO, Continuity Note and Revision Note types, with scene/chapter active. Other note types, resolved notes and general Story Intelligence results do not enter this branch. +- Revision/draft: first queue record; source SQL sorts priority descending then book/chapter/scene manuscript order/ID. Development currently returns none for requested queue names. +- Change counts: retained accepted activity summary, not text semantics. Private activity may be absent for nonowner. +- Listen: saved chapter/scene choices. Presence in choices does not imply accepted manuscript text exists; browser click reached Reader’s “No accepted manuscript text” message. + +## What the engine does not use + +It does not inspect chapter GoalSummary contents, EmotionalGoal, ReaderTakeaway, MustInclude, RisksOrConcerns, scene purpose/outcome, checklist completion meaning, plot line/thread distribution, story chronology, character development, relationships, pacing, trilogy continuity, intended ending, AI Intent evidence, solver questionnaire history, or the semantic content of manuscript prose. Some queue rows carry warning/checklist/note counts, but this provider only uses existence/first scene and its status/title. It does not rank warnings or feed their details into a recommendation model. + +Book context is inherited from WriterController. Scene/chapter destinations can refer to different targets within the book. There is no project-global learning or recommendation session memory. + +## Dismissal, persistence and feedback + +Help Me is initially collapsed. Its button unhides a pre-rendered list; it does not request fresh recommendations. “Dismiss suggestions” hides the whole panel and returns focus; it does not dismiss an individual rule, write a record, remember a decision or suppress the same suggestion later. Reopening shows the same rendered list; reload recomputes from saved inputs. “Return to Writing” navigates to the valid `#working-focus` anchor on Writer Index; it does not end a session. No button marks work complete, edits prose or starts playback. For a break, the text instructs the author to end a session below, rather than doing it. + +Intent Evidence’s Keep evidence/Dismiss/Defer/Revisit buttons **do** persist per-input decisions, but they belong to the separate Intent assessment system; they must not be attributed to Help Me. + +## Guidance value and limits + +Concrete and grounded: return to a saved focus, recover a scheduled task, locate an explicitly missing chapter goal, revisit a captured note, understand revision despite low net word growth. Generic or potentially misleading: explore chapters, listen solely because a chapter exists, read an author-assigned Needs Work label as if it were newly detected. The interface’s observation/interpretation separation helps qualify advice. It does not resolve the losing-direction scenario through story diagnosis. diff --git a/Docs/Writer/Audit/Writer-Information-Architecture.md b/Docs/Writer/Audit/Writer-Information-Architecture.md new file mode 100644 index 00000000..fbaf63fc --- /dev/null +++ b/Docs/Writer/Audit/Writer-Information-Architecture.md @@ -0,0 +1,65 @@ +# Writer information architecture audit + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Existing navigation structure + +The Writer ribbon has six commands: Overview, Writing Journey, Writing Plan, Workspaces, Reports and Display Setup. Overview, Journey and Workspaces render one Razor view with conditional sections; Display Setup redirects to a disclosure on that view. Reports is WritingActivity rather than a separate reporting dashboard. Writing Plan leads to a management list before setup/review/preview. Context and Intent are separately opened reference windows and may also be launched through native Word. Reader and scene Writer drawers are reached through book/scene navigation or Help Me rather than all being ribbon peers. + +The underlying structure mixes four responsibilities: author plans and reference, a manually selected next focus, scheduled capacity/workflow tasks, and retained work evidence. Narrative diagnostics remain distributed among Context, Intent Evidence, Timeline, Analytics, plot/thread and character/relationship workspaces, plus the separate Problem Solver. The audit does not propose new grouping/layout. + +## Evidence-led findings + +| Finding | Concrete implementation / observation | Consequence | Evidence status | +|---|---|---|---| +| D01 live queue implementation mismatch | Live WriterDashboard_Scenes recognises readiness queue names; current service passes status queue names; all4 fixture queues0 | Revision-status setup appears ineffective; empty instructions cannot activate live queues | Both verified + live database definition | +| IA01 overlapping page responsibility | Same Writer/Index view on Overview/Journey/Workspaces; Help Me/current-focus/progress suppressed differently by Journey branch, queues and setup retained | Navigating to a named page can appear to revisit same desk rather than a distinct tool | Source verified; routes/tabs browser inspected | +| IA02 naming drift | Tabs Write Next/In Progress/Revision/Final Pass; empty copy Continue Writing/Polishing; DTO ContinueWriting/PolishingQueue | Author must translate stage vocabulary; Continue Writing also names saved objective CTA | Both verified | +| IA03 legacy versus canonical status | Intent Checklist displays Workflow.DraftStatus, while scene header and queues use RevisionStatuses | A scene can appear Planned and Outlined at once | Both verified | +| IA04 Help Me emphasis versus function | Large danger-styled Help Me button, fixed first-four rules, client-only dismissal | May imply story assistance beyond a small authored-state/navigation checklist; lower-priority note/listen rules suppressed | Source verified; toggle/dismiss/reopen browser tested | +| IA05 Intent split among multiple editors | Chapter summary/purpose on metadata screen;5 goals on Chapter workflow; scene purpose/outcome and checklist on scene drawers; Intent is reference | Author needs prior knowledge of where to author each input and how it is consumed | Source verified; empty and populated-field views browser inspected | +| IA06 saved objective versus story intention | Working activity/target is WriterWorkingObjectives; ChapterGoals/scene purposes are different; both used near “Intent”/“objective” language | A user can save a working objective without supplying any narrative intent | Both verified | +| IA07 two schedulers, several session meanings | WritingScheduleItems legacy tasks; WriterPlannedActivities allocations; WriterWorkSessions measured observations | Planned “session” capacity, task completion and actual session history cannot be compared as interchangeable counts | Both verified for reviewed plan and explicit sessions; legacy mutation source only | +| IA08 plan review already writes | ScheduleSetup POST creates active plan before PlanActivities confirmation | Abandoning candidate review leaves a plan; label Review activities does not make persistence obvious | Both verified | +| IA09 scope loss in plan navigation | Scope-free Schedule Preview links; preview defaults first personal plan; activate/deactivate/delete redirect unfiltered WritingPlans | Current book can change apparent plan context without explicit book choice | Source verified; preview personal selector observed, multi-book transition not exercised | +| IA10 chapter-only versus scene route outcomes | Continue Writing for chapter opens workflow; scene opens metadata; listen opens Reader | Similar “continue” actions lead to different work surfaces rather than a common prose editor | Both verified for chapter and Reader; scene target source traced | +| IA11 discovery by disclosure | Chapter and scene workspaces collapsed on Overview; Display Setup collapsed; Reader audio toolbar, yearly calendar, today tasks, evidence objective details, privacy deletion and plan delete modal | Useful secondary actions require expansion; tabs inside separately launched windows further increase discovery cost | Both verified for main disclosures/tabs; destructive dialog controls source traced | +| IA12 repeated data | Same checklist in scene card/editor, Intent Must Include and Checklist; chapter goals repeat Plan/Must Include; notes repeat queues/scene/Intent/reminders | Several copies have different filtering/editability, creating uncertainty about source of truth | Source verified; default checklist repeated in browser | +| IA13 navigation versus actual action ambiguity | Session brief / Prepare Writing Session exports a brief, not a work session; native Audio Review button opens Companion; Help listen opens Reader without starting audio | Wording requires author to discover actual outcome and additional steps | Source verified; Help Reader destination browser verified | +| IA14 missing accepted-prose gating | Help listen only needs a chapter; Reports baseline enabled when recording enabled even if no accepted snapshot | Navigation promises review/baseline but reaches sync-first empty/error state | Both verified; baseline returns400 | +| IA15 Context waiting message mismatch | Valid bookId/no saved scenes still says project/book not received from Word Companion | Empty-state explanation attributes missing data to wrong context and exposes no rendered scene chooser | Both verified | +| IA16 partial totals not clearly completeness guarantees | Source queue TOP40 before selected-book filter; candidate cap1000; history20 display/50 export; activity500 | Visible counts and history are bounded windows/templates, not complete work/manuscript totals | Source verified; capped-scale conditions not exercised | +| IA17 refresh versus analysis | Context Refresh saved data rereads canonical projections; Intent Assess saved prose with AI explicitly analyses bounded saved source | Authors must distinguish stale recorded metrics/reference from fresh prose assessment | Source verified; saved-evidence load tested, AI call not made | +| IA18 missing correspondence among source pipelines | Reader uses accepted chapter/paragraph projections; assessment uses SceneManuscriptSources; reference uses canonical entities | Accepted Reader prose alone is not proof every analysis/reference source has been refreshed | Source verified; populated cross-pipeline freshness not exercised | +| IA19 ending not tracking equals stopping playback | Audio helper says Pause first; End review only ends tracking | External audio may continue after review is ended; stale/source-lost controls cannot guarantee pause | Source verified; unavailable media state browser tested | +| IA20 durations and dates differ | UTC receipt dates vs scheduling Today; elapsed/engaged/playback/unique/planned and word changes separate | Progress comparisons require understanding evidence semantics; UI qualifies several but not unified | Source verified; labels browser inspected | +| IA21 read-looking support accessor can seed records | SceneWorkflow_Get inserts default workflow/eight checklist objectives when absent | Generic objectives can look authored; opening support can change sparse scene state | Source verified and defaults observed in disposable scene | +| IA22 client validation scripts error | jQuery validation and unobtrusive scripts throw “jQuery is not defined” on Setup/Edit Plan | Client validation enhancement unreliable; server POST validation still exists and valid submissions succeeded | Browser verified stack paths, source partial inclusion verified | +| IA23 “Reports” expectation | Route is accepted-change evidence, privacy/retention and recent exports; activity grows only after accepted observations | Does not provide whole-story narrative report merely by being labelled Reports | Both verified | +| IA24 broad health label for narrow reminder feed | Book Story Health contains only missing GoalSummary and selected unresolved note types | Empty feed cannot establish satisfactory pacing, character development, plot resolution or ending | Source verified; one missing-goal fixture reminder browser verified | + +## Cross-surface duplication map + +| Information / operation | Copies / entry points | Difference that matters | +|---|---|---| +| Current scene | Dashboard objective, session chapter, Context/Intent follow, Reader chapter, native ribbon | Different selectors and lifetimes; no universal current scene | +| Scene workflow | Queue cards, chapter summary, scene inspector, Intent Checklist | Canonical Revision Status versus legacy DraftStatus; editable only at relevant editors | +| Chapter plan | Metadata editor, Chapter workflow, Intent Plan/Must Include/Notes | Summary/purpose and chapter goal fields stored separately | +| Scene checklist | Scene inspector/editor, Intent Must Include, Intent Checklist | Editable versus reference; default items may be seeded automatically | +| Notes | Scene drawer/card, queue pinned/open notes, Intent Notes, Story Health, Help Me | Pinned/resolved/type filtering differs; return-session notes are a separate store | +| Work ahead | Next Planned Session, today disclosure, Journey planned work, Preview, Plans | Legacy tasks and reviewed allocations have distinct completion/history paths | +| Sessions / Audio Review | Writer toolbar, Reader disclosure, Word controls, Reports export, Journey | Same active book session but presentation chapter can differ; native required only for actual playback bridge | +| Story relationships / plots / metrics | Context tabs and full relationship/plot/Timeline/Analytics tools | Saved scoped reference versus richer external workspaces; author overview may include future facts | +| Privacy/export | Reports evidence/session export, Journey export | Different record caps, cursor/day behavior, retention scope | + +## Product questions exposed by the audit + +These require decisions rather than inferred implementation: What should Help Me promise? What is the relationship between a working objective, narrative intention and measured session? Which context should authors expect each surface to follow? Is a “Writing Plan” a creative plan, an availability plan, or both? Should task completion represent effort, manuscript readiness, or a declared workflow event? Which evidence source should define fresh prose for Intent versus Reader? What level of trilogy context and narrative problem diagnosis is intended? Which historical totals should be complete versus bounded? These questions do not prescribe a new layout or authorise implementation. + +Sources: [Inventory architecture](Writer-Complete-Inventory.md#technical-architecture-and-storage-trace), [Context matrix](Writer-Context-Matrix.md), [Help rules](Writer-HelpMe-Rules.md), [interaction source locations](Writer-Interaction-Register.md), [browser evidence](Writer-Audit-Coverage.md). diff --git a/Docs/Writer/Audit/Writer-Interaction-Register.md b/Docs/Writer/Audit/Writer-Interaction-Register.md new file mode 100644 index 00000000..dd4a7dbf --- /dev/null +++ b/Docs/Writer/Audit/Writer-Interaction-Register.md @@ -0,0 +1,445 @@ +# Writer interaction register + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## How to read this register + +A row is an interaction family: semicolon-separated exact visible labels are controls that share the stated behavior; it is not a claim of one control per row. Repeated scene rows, days, plans and evidence objectives are templates. Input editing is separated from submission. Source-only outcomes are not described as exercised. The lexical appendix enumerates individual source control locations to make conditional and duplicate controls reviewable. + +| ID | Location | Exact label(s) / control | Action and destination / handler | Context | Prerequisites | Persistence, feedback and problem | Verification | +|---|---|---|---|---|---|---|---| +| I001 | Shell | Overview; Writing Journey; Writing Plan; Workspaces; Reports; Display Setup | Follow named ribbon route with projectId/bookId; Reports owner-only; Display Setup redirects to fragment | Request navigation only | Book must be selected for writerBook command | No saved data; rendered destination | Source verified | +| I002 | Shell | Book choice | Navigates Writer Index with selected project/book when active Writer; elsewhere Book Details | Selected book request, not global persistent scene | Accessible nonarchived project book | New page; prior objective/session stays per book | Source verified | +| I003 | Help Me | Help Me | Unhides #writer-help-options and sets aria-expanded=true | Current rendered dashboard | Suggestion model produced on GET | No persistence; visible recommendations | Both verified | +| I004 | Help Me | Dismiss suggestions | Hides panel and restores focus to Help Me | Current DOM | Panel exists | No saved dismissal; reopen yields same list | Both verified | +| I005 | Help Me | Return to Writing | Writer.Index with project/book and #working-focus | Current dashboard book | None beyond access | Navigation, no session termination; note instructions separate | Source verified | +| I006 | Help Me | Return to your current focus | Scenes.Edit(scene), Writer.Chapter(chapter) or Writer.Index(book) | Saved user/book objective | Valid objective | No recommendation decision saved | Source verified | +| I007 | Help Me | Open your next planned activity; Open this planned scene | Reviewed activity target or workflow scene editor | Allocation book/scene/chapter | First eligible list row | Navigation only, no start/completion | Source verified | +| I008 | Help Me | Set this chapter's Intent | Writer.Chapter(id) goal form | First missing-goal chapter reminder | Missing/blank GoalSummary | No AI; author must enter/save goal | Source verified; missing-goal suggestion rendered and chapter destination inspected in browser | +| I009 | Help Me | Review this scene; Work on the next outlined scene | Scenes.Edit(id) | First RevisionQueue or WriteNext row | Queue populated | No status change; D01 blocks live generation | Source verified | +| I010 | Help Me | Review the change evidence | WritingActivity.Index with bookId | Current book | 30-day removals >0 | Read-only evidence destination | Source verified | +| I011 | Help Me | Read or start Audio Review | ManuscriptReader.Index with chapterId/bookId | Objective chapter or first choice | Chapter choice exists, not necessarily accepted text | Opens Reader, does not start playback/session; no prose empty state | Source verified; Reader no-prose destination Browser verified; link click not exercised | +| I012 | Help Me | Review this captured note; Explore or add chapters | Scenes.Edit(note scene) or Books.Details(book) | Current book reminder/fallback | Selected unresolved note, or result count<3 | Navigation only | Source verified | +| I013 | Objective | Continue an existing manuscript | Opens objective-setup disclosure via writer-objective.js | Current book | No objective/setup=true | DOM only | Source verified; objective disclosure opened programmatically for fixture setup | +| I014 | Objective | Working activity; Begin with; Scene (optional) | Choose Activity, ChapterID, SceneID; chapter change filters scene options | Independent saved objective | Book choices; scene must belong to chapter | Unsaved form until submit; Whole manuscript/Chapter workspace mean null IDs | Both verified | +| I015 | Objective | Save objective · start without a schedule | POST Writer.SaveObjective scheduleNow=false → Writer.Index(bookId) | User/book working objective | Access; valid activity and entity membership | WriterWorkingObjectives upsert; Continue Writing card on next GET | Both verified | +| I016 | Objective | Save & plan writing time | Same save with scheduleNow=true → ScheduleSetup(bookId) | Saved objective book | Same validation | Objective persists before scheduling; selected revising/editing/proofreading maps default GoalType Revision | Source verified | +| I017 | Objective | Continue Writing; Change objective | Scene editor/chapter workflow/book chapters, or Writer?setup=true#working-objective | Saved target, not active Word | Valid saved objective | Navigate; Change opens editor; does not update work session | Source verified; saved focus card Browser verified; links not clicked | +| I018 | Next plan / progress | Create a writing plan; Manage writing plans; Open Chapters; Browse chapters | ScheduleSetup/WritingPlans/Books.Details#chapters | Current project/book | Book selected | Navigation only | Source verified; named destinations inspected directly in browser | +| I019 | Progress / queue strip | Write Next; In Progress; Revision; Final Pass | Writer.Workspaces(workspace=WriteNext/InProgress/Revision/FinalPass) | Selected book; project queue filtered afterward | Scenes with respective status | Navigation only; D01 means empty in live fixture | Source verified; all four queue GET states Browser verified; strip click not exercised | +| I020 | Progress | Reports & activity settings; Writing Journey; activity date cell | Activity(book) or Journey(book,year,month,day) | Book and UTC date | Retained history for observed cells | No save; date filter | Source verified; Reports/Journey pages inspected; date-cell click not exercised | +| I021 | Workspaces | Chapter and scene workspaces | Toggle native details open state | Current DOM | None | No server persistence | Source verified; initial open state observed on Workspaces, toggle not exercised | +| I022 | Workspaces | Story Health | Writer.Workspaces(workspace=StoryHealth) | Book reminders | Book selected | Navigation with reminder list; generic no-reminders text | Source verified; StoryHealth GET and reminder Browser verified | +| I023 | Queue cards | Scene title; Open scene; Session brief; Timeline; Warnings | Scenes.Edit; Exports.WritingSession(sceneId); Timeline(projectId,bookId,selectedSceneId); Warnings(projectId,bookId,sceneId) | Card entity; not current session | Queue row | Navigation/export; no saved session start; D01 prevents live card click | Source verified | +| I024 | Story Health | Reminder title; Project story health | Writer.Chapter(id), Scenes.Edit(sceneId), or Analytics.Index(projectId,bookId) | Reminder entity or project/book | Reminder entity exists | Navigation; neither repair nor AI analysis starts | Source verified; chapter/Analytics destinations inspected directly | +| I025 | Today's tasks | Mark complete; Skip | POST Writer.MarkScheduleItemComplete / SkipScheduleItem → Index(projectId,bookId) | Legacy writingScheduleItemId | Actor owns task; status Planned | Done/Skipped saved and TempData feedback; not scene Revision Status | Source verified | +| I026 | Journey | Previous month; Next month; date; year cell; year overview | Journey GET with book/year/month/day; native details toggle for year | UTC receipt year/day | Year bounded 2000–2100 in controller | No save; evidence and sessions reselected | Source verified; Previous month click Both verified; other date/year controls not exercised | +| I027 | Journey | Accepted-change evidence; Export recent session evidence (up to 50) | WritingActivity.Index(bookId,day); WriterWork.Export(bookId,day) | Selected book/day | Owner access; retained records | Read-only JSON; display max20/export max50 | Source verified | +| I028 | Work session | Activity; Chapter; Start session / Start Audio Review | POST /Writer/Work/Start with kind, chapterId, request UUID, pauseOnEdit | Book + optional independently selected chapter | Owner, capture enabled; AudioReview requires chapter | Session persisted; start form hidden, active status and note appear | Both verified | +| I029 | Work session | Return / review note (optional); End session & save note | POST /Writer/Work/End with sessionId and note ≤2000 chars | Current book session | Current unexpired session and access | End time/note saved; status says Session ended. Your note was saved. | Both verified | +| I030 | Work session | Writing Rhythm & Journey | Writer.Journey(bookId) | Book | Access | Navigation only; does not end session | Source verified | +| I031 | Audio | Play; Pause; Back 15 seconds; Forward 15 seconds | POST /Writer/Work/Command play/pause/back15/forward15 | Active review and exact native instance/document/grant | Fresh ≤45s native media, live lease, capability; only four operations | Command UUID with 10s expiry; requested feedback, asynchronous ack; external playback | Source verified; unavailable/disabled state Both verified | +| I032 | Audio | Pause on Edit | POST /Writer/Work/Preference | Current review and user/book preference | Active session; text-modified signal needed for actual pause | Preference saved; explicit resume; cursor/scroll not text modification | Source verified | +| I033 | Display | Word Companion & Display Setup; Connection & Display Setup | Details toggle / #display-setup auto-opens details | Dashboard scope | None | DOM disclosure only | Source verified; DisplaySetup destination Browser verified; toggle/placement not exercised | +| I034 | Display | Context display; Intent display | Select left/primary/right or detected physical screen; savePreferences | Browser window-placement preference | JS/storage; display enumeration optional | Browser-local preferences; reapply needed | Source verified | +| I035 | Display | Detect displays | getScreenLayout(true), browser window-management permission/enumeration | Browser/device | Supported API/permission; fallback if denied | Layout/status message; no Windows Word movement | Source verified | +| I036 | Display | Open Context; Open Intent | Open/reuse named reference window with project/book scope | Launcher activeScope, not saved objective | Book chosen; popup support | Separate Context/Intent route, placement/status feedback | Source verified | +| I037 | Display | Start / Reapply Workspace; Focus Context; Focus Intent | Register launcher/open reference windows or focus existing window | Presence and selected book | Connection/window presence controls visibility; browser popup rules | Window layout, no manuscript data mutation | Source verified | +| I038 | Plans | View plans across all projects and books; Create Writing Schedule; Schedule Preview | Unfiltered WritingPlans; scoped ScheduleSetup; unscoped Preview | Plan owner rather than shell book for Preview | Authenticated account | Navigation; Preview may pick first plan from another scope | Source verified; list/setup/preview destinations Browser verified; links not all clicked | +| I039 | Plans | View Schedule; Edit Plan; Review chapter activities | Preview/Edit/PlanActivities(writingPlanId) | Explicit plan ID | Plan belongs to current user/access | Navigation; no mutation by these GETs | Source verified; target pages Browser verified via direct scoped navigation | +| I040 | Plans | Activate Plan; Deactivate Plan | POST Writer.ActivateWritingPlan/DeactivateWritingPlan → unfiltered WritingPlans | Plan owner | Valid personal plan | IsActive saved, feedback; filter omitted on redirect | Source verified | +| I041 | Plans | Regenerate workflow scene tasks | POST Writer.RegenerateWritingPlanSchedule; existing reviewed allocations redirect to PlanActivities | Explicit plan | Status-eligible scenes; plan availability; no reviewed allocations for legacy generation | Legacy schedule replaced on successful generation; TempData or review page | Source verified | +| I042 | Plans | Delete Plan; Close; Cancel; Delete | Open/close per-plan modal; Delete POST Writer.DeleteWritingPlan | Explicit plan | Plan ownership; confirmation modal | Plan and owned schedules removed; manuscript entities retained; list filter lost | Source verified | +| I043 | Setup | Plan Name; Goal Type; Project; Book; Start Date; Deadline Date | Edit setup model; Book blank means All Books | Independent project/optional book plan | Accessible project/book; dates ordered | No write until Review activities; server revalidates | Both verified for saved default setup and Plan Name edit; scope/date edits not exercised | +| I044 | Setup | Rebalance Mode; Available; Session Length; Include Blocked Scenes | Edit seven-day capacity and planning options | Plan availability | At least one day; minute options | Saved as AvailableDaysJson/settings when submitted; no observed auto-rebalance claim | Source verified; default availability persisted by valid setup POST, individual edits not exercised | +| I045 | Setup | Review activities | POST ScheduleSetup → creates active WritingPlan → /Writer/PlanActivities | Selected plan scope | Valid name/scope/dates/availability | Plan saved even before allocation confirmation; generated count always0 on current path | Both verified | +| I046 | Setup | Skip scheduling · return to Writer; Schedule Preview | Scoped Writer or unscoped Preview | Book versus independent personal plan | None beyond access | Leaves form; no allocation commit | Source verified | +| I047 | Review activities | Include; Activity; Working budget (minutes) | Per-candidate Selected, Kind, Minutes | Candidate chapter/scene | Candidate exists; selected budgets 5–1440; supported kind | Unsaved budget; starting unknown estimate30min, known rounded/clamped5–120 | Source verified; default candidate/budget Browser verified; individual row edits not exercised | +| I048 | Review activities | I have reviewed these activities and budgets…; Commit reviewed schedule | POST WriterPlanning.Index → Allocate → repository.Save → Preview | Plan and selected candidates | Confirm; ≥1 item; dates≤10years; capacity sufficient; no completed reviewed items | Transactional replacement of uncompleted reviewed allocations; manual tasks retained; errors redisplay | Both verified | +| I049 | Review activities | Edit availability / deadline; Return to Writing; View existing schedule; Review chapters and scenes | Edit plan, Writer, Preview or Book chapter catalogue | Plan-derived scope | Plan/access; links conditional on empty candidates | Navigation; completed activities require a new plan | Source verified | +| I050 | Preview | Writing plan; Select; row Select | GET SchedulePreview(writingPlanId) | Any current user's plan | Plan list nonempty | New selected scope; no global context update | Source verified; selected-plan render Browser verified; plan selection control not exercised | +| I051 | Preview | Mark complete | POST /Writer/PlanActivities/Complete(writingPlanId,activityId) | Reviewed allocation, not legacy task/session | Allocation belongs to authorised plan | Status Done, redirect Preview; no automatic scene status change | Both verified for reviewed allocation Mark complete → Done | +| I052 | Edit Plan | Plan Name; Deadline Date; Rebalance Mode; day availability/minutes; Include Blocked Scenes; Active | Edit mutable settings | Explicit plan; project/book/goal/start read only | Valid personal plan and dates/day flags | Unsaved form until Save Plan | Source verified | +| I053 | Edit Plan | Save Plan; Cancel; Review and reallocate them | POST EditWritingPlan; scoped WritingPlans; PlanActivities | Explicit plan | Server validation | Saved settings; reviewed allocation dates stay until deliberate reallocation | Source verified | +| I054 | Chapter | Goal summary; Emotional goal; Reader takeaway; Must include; Risks or concerns; Save chapter goals | POST SaveChapterGoal → Chapter(id), AJAX branch returns ok | ChapterGoals for explicit ChapterID | Accessible chapter; five authored values | Saved plan reused by Intent/Evidence/reminders/briefs; no automatic prose change | Both verified for GoalSummary save; other goal fields source verified | +| I055 | Chapter | Open timeline; Export brief; Markdown; Warnings; Open scene | Timeline(project/book), Exports.ChapterBrief(id[,format=markdown]), Warnings(book), Scenes.Edit | Chapter versus book-wide header Warnings | Saved chapter/scenes | Navigation/export only | Source verified | +| I056 | Reports | Record current baseline / Record current accepted baseline | POST Activity.Baseline | Owner/book accepted manuscript | Recording enabled and accepted manuscript available | Baseline event with no new growth; absent snapshot returns400 sync instruction | Both verified for missing accepted manuscript baseline → HTTP400; successful baseline source only | +| I057 | Reports | Export recent evidence (JSON); Earlier evidence; All retained activity; chapter link | Activity.Export(book), Index(book,before,day), Index(book), Writer.Chapter | Book / optional display day/cursor | Owner; Earlier only exactly500 results | Export up to500 recent rows; export link omits current cursor/day | Source verified | +| I058 | Reports | Record activity for this book; Keep activity for; Save privacy settings | POST Activity.Settings(enabled,retentionDays) | Book-owner activity settings | Retention30–3650; owner authority | Capture pause and retention saved; reducing retention removes older evidence | Both verified for capture pause/resume; retention reduction source only | +| I059 | Reports | Delete retained activity; confirmation; Delete activity | Expand, then POST Activity.Erase(confirm=true) | Book owner history, work sessions and notes | Explicit confirmation | Evidence erased/capture paused; manuscript remains; exports/backups separate | Source verified | +| I060 | Reports | Export recent work and Audio Review sessions (up to 50); Back to Writer | WriterWork.Export(book); Writer.Index(project/book) | Book owner | Access; retained work records | JSON evidence or navigation; no mutation | Source verified; export/back links not exercised | +| I061 | Context | Overview; People; Relationships; Maps; Floor Plans; Story; Plot Lines; Metrics | Activate data-writing-context-tab; lazy fetch map/plot/metrics on demand | Current saved/followed scene; lazy components book/project | Saved scene needed to render tabs | Tab choice browser storage; read-only component data | Source verified | +| I062 | Context navigation | ← Previous; Next →; Jump to scene; Open Scene | Load saved scene fragment; explicit trusted action may request Word navigation; editor in new tab | Manuscript order, cross-chapter; verified native target if live | Adjacent scene exists; valid scope and mapping; snapshots do not navigate Word | Manual saved scene can remain selected if Word navigation unavailable; status explains | Source verified | +| I063 | Context Maps | Map; Lens; Refresh saved data; Fit map; Show scene location; +; −; Inspect place | Fetch selected saved map; adjust lens/viewport/focus/inspection | Project saved map, current scene marker | Map exists; focus requires mapped feature | Browser view state only, no map edit or AI | Source verified | +| I064 | Context Maps | Map pointer drag; wheel; arrow keys; Enter / Space on feature | Pan/zoom canvas or select saved place | Map viewport/explored feature | Loaded map | Browser viewport/inspection; view-state preserved during follow updates | Source verified | +| I065 | Context Floor Plans | Zoom; scroll/pan | Range70–200 scales floor-plan preview; native scrolling | Saved floor image | Linked floorplan and floor | Browser view only; no geometry edits | Source verified | +| I066 | Context Plot Lines | Active here; Nearby; Elsewhere; Show all; Explore scenes; ‹; ›; Show current scene; Go to scene in Word; Refresh saved data | Filter saved plot cards, explore different scene, explicit navigate/fetch | Exploration cursor distinct from current scene | Saved plot/events and scenes; Word mapping for navigation | No event edits; fresh fetch not paid AI | Source verified | +| I067 | Context Metrics | Metric; Show current scene; manuscript scene buttons; Explore scenes; Go to scene; Refresh saved data | Select stored metric graph, inspect indexed scene, explicit navigate/fetch | Book sequence and selected metric/explored scene | Recorded metric values/scenes | No metric writes; missing values labelled Not recorded | Source verified | +| I068 | Context reference links | Source scene; Calendar; Story Maps · choose a saved map; Linked floor plan; Plot Lines; Characters and relationships; thread title | Scenes.Edit, StoryCalendar, Maps story, FloorPlans.Edit, PlotLineWorkspace, RelationshipMap, PlotThreads.Edit | Linked entity/project/book/date | Relevant canonical record; floor link conditional | External section navigation, scope varies by route; no analysis starts | Source verified | +| I069 | Intent | Plan; Must Include; Notes; Threads; Evidence; Checklist | Activate Intent tab via writing-follow.js | Saved scene/chapter | Valid chapter/scene | Browser tab preference only | Source verified | +| I070 | Intent navigation | Jump to chapter; Jump to scene; Edit Scene; Edit Chapter Plan | Load intent fragment or navigate to Scenes.Edit/Writer.Chapter | Explicit/manual versus verified Word context | Accessible saved entity; chapter options loaded by follow implementation | No auto-plan save; chapter-only fallback | Source verified | +| I071 | Intent evidence | Show saved evidence | GET IntentAssessment.Read(sceneId), partial result | Actor/scene/current fingerprint | Read access; existing saved evidence optional | Read only, can show no evidence or stale result | Source verified | +| I072 | Intent evidence | Assess saved prose with AI; Cancel | POST Analyse; AbortController cancellation | Saved scene prose and objectives | StoryIntelligence entitlement; bounded input, source and plan | Validated evidence persists by hash; cancellation preserves earlier evidence, HTTP408 path | Source verified; paid call Not verified | +| I073 | Intent evidence cards | Expand objective; Keep evidence; Dismiss; Defer; Revisit | Disclosure or POST decision(sceneId,hash,key,acknowledged/dismissed/deferred/pending) | User/scene/input hash/objective | Current saved hash and known key; stale evidence disables decisions | Decision persisted; checklist completion unchanged; stale409 | Source verified | +| I074 | Intent checklist | Review objectives and completion in the scene editor; Edit intentions and objective completion | Scenes.Edit(scene) | Saved scene | Scene selected | Navigation; author must mark checklist completion there | Source verified | +| I075 | Reference tabs keyboard | ArrowLeft; ArrowRight; Home; End | Focus/activate adjacent/first/last tab through writing-follow.js | Current Context or Intent tablist | Tabs rendered | Tab state only; no server writes | Source verified | +| I076 | Reader | ← Previous chapter; Next chapter →; Chapter; Read; Refresh manuscript | Reader.Index with book/chapter/focus or enhanced chapter fetch | Reader selected chapter | Adjacent chapter boundary disables control; accepted prose optional | Read-only display; no manuscript write; empty sync guidance | Source verified; empty Reader state Browser verified; populated navigation/refresh not exercised | +| I077 | Reader | Focus reading; Escape | Toggle reader focus class/query state; Escape exits focus | Browser presentation | Enhanced JS | Presentation only | Source verified | +| I078 | Reader | Pause automatic updates while listening; Show updated chapter | Pause accepted-text replacement, then explicitly fetch queued new chapter | Reader chapter/version, not audio player | Live update check reports change | Browser refresh preference only; does not pause external playback | Source verified | +| I079 | Reader | Reading & Audio Review; Return to Writing; Return to Chapters | Toggle embedded session toolbar; Writer.Index(book); Books.Details(book) | Book/Reader chapter | Saved book; toolbar chapter may be null | Shared session behavior above; navigation does not end session | Source verified; Reader empty state Browser verified; disclosure/return links not exercised | +| I080 | Scene card | Edit Writer; Show writer editor actions; Notes; Checklist; Workflow; Attachments | Load corresponding Scenes.Scene…Editor partial into inspector drawer | Explicit scene | Scene access | No save on open; error area if load/save fails | Source verified | +| I081 | Scene Purpose | Purpose types; purpose notes; expected outcome; Save purpose; Cancel | POST Scenes.SaveScenePurpose or close drawer | Scene metadata | Current saved scene and valid values | Purpose associations/notes/outcome persist; refreshed summary | Source verified | +| I082 | Scene Notes | Type; Title; Text; Pinned; Resolved; Remove; new note; Save notes; Cancel | POST SaveSceneNotes, iterate validated scene-owned records | Scene notes | Existing note IDs must belong to scene; blank new text ignored | Create/update/delete notes; refreshed Writer card; reminder eligibility changes | Source verified | +| I083 | Scene Checklist | Item text; completed; Remove; new item; Save checklist; Cancel | POST SaveSceneChecklist, validated existing items and optional new | Scene checklist | Correct scene ownership | Author completion saved; refreshed purpose/Writer summaries | Source verified | +| I084 | Scene Workflow | Priority; Estimated words; Actual words; Drafted date; Last worked on; Blocked; Blocked reason; Save workflow; Cancel | POST SaveSceneWorkflow → writer service | SceneWorkflow, not RevisionStatuses | Saved scene; priority clamped1–10 in service | Saved drafting metadata; refreshed summary; no automatic queue progression | Source verified | +| I085 | Scene Attachments | Type; Title; file; External link; Notes; Add attachment; Save attachment | POST Scenes.SaveAttachment multipart | Scene, storage and account quota | Title plus file/link; upload≤25MB; quota | File/SQL metadata saved; preview/card refresh; failures inline or TempData | Source verified | +| I086 | Scene Attachments | Open; Download; Open link; Remove attachment; Close | Stored href/download/new tab; POST DeleteAttachment; close drawer | Attachment scene | Valid attachment/file URL | Deletion removes attachment association/storage handling; not manuscript text | Source verified | +| I087 | Scene header | Prepare Writing Session | Exports.WritingSession(sceneId) | Scene brief | Saved scene | Export/reference, not WriterWork.Start | Source verified | +| I088 | Word ribbon | Book; Chapter; Scene | Read-only display editBoxes restored via RestoreTitle | Current native document mapping | Linked book/current verified position | Typing does not select book or modify context | Source verified | +| I089 | Word ribbon | Writing Context; Writing Intent; PlotDirector | WordAdapter.OpenWritingWorkspace tray-context/tray-intent/tray-workspace | Active native document/book, exact instance/session | HasRibbonBook / connected mapping | Open web reference/workspace; not dashboard saved objective selection | Source verified; physical Windows Not verified | +| I090 | Word ribbon | Open Companion; Audio Review | Both NativeRibbon.OpenCompanion | Native agent/panel | Installed Companion | Opens Companion; Audio Review label does not itself start Writer session | Source verified | +| I091 | Word ribbon | Play; Pause; Back 15 seconds; Forward 15 seconds | WordAdapter.RequestAudio same four command names | Current bound Audio Review/media source | HasAudioControls and per-operation support; Play/Pause conditional state | External media request; hidden/unavailable if unsupported | Source verified; physical Windows Not verified | +| I092 | Word ribbon | Synchronise; Repair Synchronisation | RequestChapterSynchronisation(false/true) | Linked document/book and accepted chapter revision | Linked book; author saved document/verified snapshot workflow | May accept/change canonical chapter content in normal use; not exercised | Source verified | +| I093 | Word ribbon Tools | Remove Legacy Markers; Troubleshooting | WordAdapter.RemoveLegacyMarkers / ShowTroubleshooting | Active Word document/connection | Installed agent; action-specific checks | Marker removal modifies Word and diagnostics reveal status; not exercised | Source verified | +| I094 | Office.js shell | Open PlotDirector Companion | Manifest task pane loads /word-companion | Office document and web login | Installed manifest, Office API and authorisation | Host workflow provides connection/import/sync; no installed Office browser here | Source verified | +| I095 | Problem Solver | Question choices; continue/back/start; browse area; result capability link | Protected answer history POST /problem-solver/answer → graph evaluation/editorial result | Questionnaire state, no selected manuscript ingestion | Valid graph version, question and choice cardinality; state≤16000/2h | Protected journey and result context; no manuscript changes | Source verified | +| I096 | Problem Solver workspace | Project / character; Open capability → | GET /problem-solver/workspace/{capability}; validate IDs then LocalRedirect | Independent project/character | Accessible active entities | Destination depends on configured capability route; current book not guaranteed | Source verified | + +## Handler evidence and additional routes + +Core Writer forms are anti-forgery protected; AJAX calls include the form token. `WriterController` owns objective/chapter/schedule actions; `WriterPlanningController` owns confirmed allocation and completion; `WriterWorkController` owns State/Start/Heartbeat/End/Preference/Command/Export/Erase; `WritingActivityController` owns reports/baseline/settings/erase/export. Scene drawer saves refresh partials rather than navigate when AJAX is requested. `writing-workspace-launcher.js`, `writing-follow.js`, `writing-context-components.js`, `writing-context-plots.js`, `writing-context-map.js`, `writer-work.js`, `intent-assessment.js`, `manuscript-reader.js` supply the corresponding client behavior. Follow exact source locations below and the architecture map in the inventory. + +Callable operations with no corresponding rendered primary control in the inspected Preview view: `Writer.GenerateSchedule`, `DeleteGeneratedSchedule`, `PreviewRebalance`, `ApplyRebalance`; `WriterWork.Erase` is an API while Reports exposes the combined erasure path. Do not infer a working rebalance review journey merely from controller methods. `PreviewRebalance` does not populate reviewed activities as the ordinary SchedulePreview action does, and the view does not render a RebalancePreview changes section. This is source-verified reachability/feedback fragmentation, not a browser-executed rebalance. + +No Writer core queue/calendar drag-and-drop implementation was found in the inspected templates/scripts. Map pointer dragging pans a read-only map. Broader Timeline/plot/scene editors have their own interactions beyond the Writer boundary; their entire control sets have not been claimed as audited. No general Writer keyboard shortcut was found; reference tab keys, map keys and Reader Escape are recorded above. + +## Individual source control coverage appendix + +This appendix lists lexical control templates (`a`, `button`, `select`, visible `input`, `textarea`, `summary`) in the inspected Razor files, with source line and destination/form binding. It is a **source-location register**, not independent proof of every runtime label, permission state or handler outcome. Razor loops expand one template into many runtime controls; hidden fields, anti-forgery inputs, option items and inert disabled boundary spans are excluded. Dynamic labels retain the Razor expression rather than inventing visible text. Handler behavior is in the interaction families above. Any source location without a sufficiently specific family is a coverage gap, not silently complete. + +| Template | File:line | Tag | Label / binding / selector | Route or enclosing form | +|---|---|---|---|---| +| T001 | [PlotLine/Views/ManuscriptReader/Index.cshtml:14](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L14) | a | @Model.Book.BookTitle · Chapters | asp-controller="Books", asp-action="Details" | +| T002 | [PlotLine/Views/ManuscriptReader/Index.cshtml:22](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L22) | a | ← Previous chapter | asp-action="Index" | +| T003 | [PlotLine/Views/ManuscriptReader/Index.cshtml:28](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L28) | select | name="chapterId" | form: method="get", asp-action="Index" | +| T004 | [PlotLine/Views/ManuscriptReader/Index.cshtml:32](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L32) | button | Read | form: method="get", asp-action="Index" | +| T005 | [PlotLine/Views/ManuscriptReader/Index.cshtml:35](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L35) | a | Next chapter → | asp-action="Index" | +| T006 | [PlotLine/Views/ManuscriptReader/Index.cshtml:37](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L37) | button | Focus reading | Client/disclosure/input; see interaction family | +| T007 | [PlotLine/Views/ManuscriptReader/Index.cshtml:41](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L41) | input | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T008 | [PlotLine/Views/ManuscriptReader/Index.cshtml:43](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L43) | button | Show updated chapter | Client/disclosure/input; see interaction family | +| T009 | [PlotLine/Views/ManuscriptReader/Index.cshtml:53](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L53) | summary | Reading & Audio Review | Client/disclosure/input; see interaction family | +| T010 | [PlotLine/Views/ManuscriptReader/Index.cshtml:54](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L54) | a | Return to Writing | asp-controller="Writer", asp-action="Index" | +| T011 | [PlotLine/Views/ManuscriptReader/Index.cshtml:60](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L60) | a | Refresh manuscript | asp-action="Index" | +| T012 | [PlotLine/Views/ManuscriptReader/Index.cshtml:75](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L75) | a | Return to Chapters | asp-controller="Books", asp-action="Details" | +| T013 | [PlotLine/Views/ManuscriptReader/Index.cshtml:76](../../../PlotLine/Views/ManuscriptReader/Index.cshtml#L76) | a | Refresh manuscript | asp-action="Index" | +| T014 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:69](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L69) | a | aria-label="Open @attachment.Title image" | href="@href" | +| T015 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:91](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L91) | a | Open | href="@href" | +| T016 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:92](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L92) | a | Download | href="@href" | +| T017 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:96](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L96) | a | Open link | href="@attachment.ExternalUrl" | +| T018 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:114](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L114) | select | name="SceneAttachmentTypeID" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T019 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:124](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L124) | input | name="Title" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T020 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:130](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L130) | input | name="UploadedFile" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T021 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:134](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L134) | input | name="ExternalUrl" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T022 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:140](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L140) | textarea | name="Notes" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T023 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:144](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L144) | button | Save attachment | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T024 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:156](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L156) | button | Remove attachment | form: asp-controller="Scenes", asp-action="DeleteAttachment", method="post" | +| T025 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:179](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L179) | select | name="SceneAttachmentTypeID" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T026 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:183](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L183) | input | name="Title" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T027 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:188](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L188) | input | name="UploadedFile" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T028 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:192](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L192) | input | name="ExternalUrl" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T029 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:197](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L197) | textarea | name="Notes" | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T030 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:201](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L201) | button | Add attachment | form: asp-controller="Scenes", asp-action="SaveAttachment", method="post" | +| T031 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml:208](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneAttachmentsEditor.cshtml#L208) | button | Close | Client/disclosure/input; see interaction family | +| T032 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:34](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L34) | input | name="ChecklistItems[@index].IsCompleted" | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T033 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:40](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L40) | input | name="ChecklistItems[@index].ItemText" | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T034 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:43](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L43) | input | name="ChecklistItems[@index].Remove" | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T035 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:59](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L59) | input | name="NewChecklistItem.ItemText" | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T036 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:65](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L65) | button | Cancel | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T037 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml:66](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneChecklistEditor.cshtml#L66) | button | Save checklist | form: asp-controller="Scenes", asp-action="SaveSceneChecklist", method="post" | +| T038 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:36](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L36) | input | name="Notes[@index].Remove" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T039 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:44](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L44) | select | name="Notes[@index].SceneNoteTypeID" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T040 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:54](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L54) | input | name="Notes[@index].NoteTitle" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T041 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:59](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L59) | textarea | name="Notes[@index].NoteText" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T042 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:64](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L64) | input | name="Notes[@index].IsPinned" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T043 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:69](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L69) | input | name="Notes[@index].IsResolved" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T044 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:87](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L87) | select | name="NewNote.SceneNoteTypeID" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T045 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:91](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L91) | input | name="NewNote.NoteTitle" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T046 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:95](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L95) | textarea | name="NewNote.NoteText" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T047 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:98](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L98) | input | name="NewNote.IsPinned" | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T048 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:106](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L106) | button | Cancel | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T049 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml:107](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneNotesEditor.cshtml#L107) | button | Save notes | form: asp-controller="Scenes", asp-action="SaveSceneNotes", method="post" | +| T050 | [PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml:17](../../../PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml#L17) | input | name="SelectedPurposeTypeIds" | form: asp-controller="Scenes", asp-action="SaveScenePurpose", method="post" | +| T051 | [PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml:26](../../../PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml#L26) | textarea | asp-for="ScenePurposeNotes" | form: asp-controller="Scenes", asp-action="SaveScenePurpose", method="post" | +| T052 | [PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml:31](../../../PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml#L31) | textarea | asp-for="SceneOutcomeNotes" | form: asp-controller="Scenes", asp-action="SaveScenePurpose", method="post" | +| T053 | [PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml:36](../../../PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml#L36) | button | Cancel | form: asp-controller="Scenes", asp-action="SaveScenePurpose", method="post" | +| T054 | [PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml:37](../../../PlotLine/Views/Shared/SceneInspectorV2/_ScenePurposeEditor.cshtml#L37) | button | Save purpose | form: asp-controller="Scenes", asp-action="SaveScenePurpose", method="post" | +| T055 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:18](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L18) | input | name="Priority" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T056 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:24](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L24) | input | name="EstimatedWordCount" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T057 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:28](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L28) | input | name="ActualWordCount" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T058 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:35](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L35) | input | name="DraftedDate" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T059 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:39](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L39) | input | name="LastWorkedOn" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T060 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:44](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L44) | input | name="IsBlocked" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T061 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:51](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L51) | input | name="BlockedReason" | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T062 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:58](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L58) | button | Cancel | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T063 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml:59](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWorkflowEditor.cshtml#L59) | button | Save workflow | form: asp-controller="Scenes", asp-action="SaveSceneWorkflow", method="post" | +| T064 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:36](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L36) | button | Edit Writer | data-scene-editor-url="@Url.Action(" | +| T065 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:37](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L37) | button | Show writer editor actions | Client/disclosure/input; see interaction family | +| T066 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:41](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L41) | button | Notes | data-scene-editor-url="@Url.Action(" | +| T067 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:42](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L42) | button | Checklist | data-scene-editor-url="@Url.Action(" | +| T068 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:43](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L43) | button | Workflow | data-scene-editor-url="@Url.Action(" | +| T069 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:44](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L44) | button | Attachments | data-scene-editor-url="@Url.Action(" | +| T070 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:115](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L115) | a | @attachment.Title | href="@href" | +| T071 | [PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml:119](../../../PlotLine/Views/Shared/SceneInspectorV2/_SceneWriterCard.cshtml#L119) | a | @attachment.Title | href="@attachment.ExternalUrl" | +| T072 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:6](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L6) | select | name="kind" | form: | +| T073 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:7](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L7) | select | name="chapterId" | form: | +| T074 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:9](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L9) | button | Start session | form: | +| T075 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:13](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L13) | textarea | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T076 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:14](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L14) | button | End session & save note | Client/disclosure/input; see interaction family | +| T077 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:19](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L19) | button | Play | data-media-command="play" | +| T078 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:19](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L19) | button | Pause | data-media-command="pause" | +| T079 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:19](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L19) | button | Back 15 seconds | data-media-command="back15" | +| T080 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:19](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L19) | button | Forward 15 seconds | data-media-command="forward15" | +| T081 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:20](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L20) | input | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T082 | [PlotLine/Views/Shared/_WriterWorkToolbar.cshtml:24](../../../PlotLine/Views/Shared/_WriterWorkToolbar.cshtml#L24) | a | Writing Rhythm & Journey | asp-controller="Writer", asp-action="Journey" | +| T083 | [PlotLine/Views/Writer/Chapter.cshtml:12](../../../PlotLine/Views/Writer/Chapter.cshtml#L12) | a | Projects | asp-controller="Projects", asp-action="Index" | +| T084 | [PlotLine/Views/Writer/Chapter.cshtml:13](../../../PlotLine/Views/Writer/Chapter.cshtml#L13) | a | @Model.Project.ProjectName | asp-controller="Projects", asp-action="Details" | +| T085 | [PlotLine/Views/Writer/Chapter.cshtml:14](../../../PlotLine/Views/Writer/Chapter.cshtml#L14) | a | @Model.Book.BookTitle | asp-controller="Books", asp-action="Details" | +| T086 | [PlotLine/Views/Writer/Chapter.cshtml:15](../../../PlotLine/Views/Writer/Chapter.cshtml#L15) | a | Chapter @Model.Chapter.ChapterNumber | asp-controller="Chapters", asp-action="Details" | +| T087 | [PlotLine/Views/Writer/Chapter.cshtml:26](../../../PlotLine/Views/Writer/Chapter.cshtml#L26) | a | Open timeline | asp-controller="Timeline", asp-action="Index" | +| T088 | [PlotLine/Views/Writer/Chapter.cshtml:27](../../../PlotLine/Views/Writer/Chapter.cshtml#L27) | a | Export brief | asp-controller="Exports", asp-action="ChapterBrief" | +| T089 | [PlotLine/Views/Writer/Chapter.cshtml:28](../../../PlotLine/Views/Writer/Chapter.cshtml#L28) | a | Markdown | asp-controller="Exports", asp-action="ChapterBrief" | +| T090 | [PlotLine/Views/Writer/Chapter.cshtml:29](../../../PlotLine/Views/Writer/Chapter.cshtml#L29) | a | Warnings | asp-controller="Warnings", asp-action="Index" | +| T091 | [PlotLine/Views/Writer/Chapter.cshtml:54](../../../PlotLine/Views/Writer/Chapter.cshtml#L54) | textarea | name="GoalSummary" | form: asp-action="SaveChapterGoal", method="post" | +| T092 | [PlotLine/Views/Writer/Chapter.cshtml:56](../../../PlotLine/Views/Writer/Chapter.cshtml#L56) | input | name="EmotionalGoal" | form: asp-action="SaveChapterGoal", method="post" | +| T093 | [PlotLine/Views/Writer/Chapter.cshtml:58](../../../PlotLine/Views/Writer/Chapter.cshtml#L58) | textarea | name="ReaderTakeaway" | form: asp-action="SaveChapterGoal", method="post" | +| T094 | [PlotLine/Views/Writer/Chapter.cshtml:60](../../../PlotLine/Views/Writer/Chapter.cshtml#L60) | textarea | name="MustInclude" | form: asp-action="SaveChapterGoal", method="post" | +| T095 | [PlotLine/Views/Writer/Chapter.cshtml:62](../../../PlotLine/Views/Writer/Chapter.cshtml#L62) | textarea | name="RisksOrConcerns" | form: asp-action="SaveChapterGoal", method="post" | +| T096 | [PlotLine/Views/Writer/Chapter.cshtml:63](../../../PlotLine/Views/Writer/Chapter.cshtml#L63) | button | Save chapter goals | form: asp-action="SaveChapterGoal", method="post" | +| T097 | [PlotLine/Views/Writer/Chapter.cshtml:94](../../../PlotLine/Views/Writer/Chapter.cshtml#L94) | a | Open scene | asp-controller="Scenes", asp-action="Edit" | +| T098 | [PlotLine/Views/Writer/Chapter.cshtml:95](../../../PlotLine/Views/Writer/Chapter.cshtml#L95) | a | Timeline | asp-controller="Timeline", asp-action="Index" | +| T099 | [PlotLine/Views/Writer/Chapter.cshtml:96](../../../PlotLine/Views/Writer/Chapter.cshtml#L96) | a | Warnings | asp-controller="Warnings", asp-action="Index" | +| T100 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:8](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L8) | a | Writer | asp-controller="Writer", asp-action="Index" | +| T101 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:9](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L9) | a | Writing Plans | asp-controller="Writer", asp-action="WritingPlans" | +| T102 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:21](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L21) | a | Review and reallocate them | asp-controller="WriterPlanning", asp-action="Index" | +| T103 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:31](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L31) | input | asp-for="PlanName" | form: asp-action="EditWritingPlan", method="post" | +| T104 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:37](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L37) | input | Unlabelled control; inspect source | form: asp-action="EditWritingPlan", method="post" | +| T105 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:42](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L42) | input | Unlabelled control; inspect source | form: asp-action="EditWritingPlan", method="post" | +| T106 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:47](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L47) | input | Unlabelled control; inspect source | form: asp-action="EditWritingPlan", method="post" | +| T107 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:52](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L52) | input | Unlabelled control; inspect source | form: asp-action="EditWritingPlan", method="post" | +| T108 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:57](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L57) | input | asp-for="DeadlineDate" | form: asp-action="EditWritingPlan", method="post" | +| T109 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:65](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L65) | select | asp-for="RebalanceMode" | form: asp-action="EditWritingPlan", method="post" | +| T110 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:89](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L89) | input | asp-for="WritingDayAvailability[i].IsAvailable" | form: asp-action="EditWritingPlan", method="post" | +| T111 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:92](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L92) | select | asp-for="WritingDayAvailability[i].Minutes" | form: asp-action="EditWritingPlan", method="post" | +| T112 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:104](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L104) | input | asp-for="IncludeBlockedScenes" | form: asp-action="EditWritingPlan", method="post" | +| T113 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:108](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L108) | input | asp-for="IsActive" | form: asp-action="EditWritingPlan", method="post" | +| T114 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:115](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L115) | button | Save Plan | form: asp-action="EditWritingPlan", method="post" | +| T115 | [PlotLine/Views/Writer/EditWritingPlan.cshtml:116](../../../PlotLine/Views/Writer/EditWritingPlan.cshtml#L116) | a | Cancel | asp-action="WritingPlans" | +| T116 | [PlotLine/Views/Writer/Index.cshtml:27](../../../PlotLine/Views/Writer/Index.cshtml#L27) | a | Connection & Display Setup | href="#display-setup" | +| T117 | [PlotLine/Views/Writer/Index.cshtml:39](../../../PlotLine/Views/Writer/Index.cshtml#L39) | a | @reviewed.Title | asp-controller="Scenes", asp-action="Edit" | +| T118 | [PlotLine/Views/Writer/Index.cshtml:39](../../../PlotLine/Views/Writer/Index.cshtml#L39) | a | @reviewed.Title | asp-action="Chapter" | +| T119 | [PlotLine/Views/Writer/Index.cshtml:40](../../../PlotLine/Views/Writer/Index.cshtml#L40) | a | @opportunity.SceneTitle | asp-controller="Scenes", asp-action="Edit" | +| T120 | [PlotLine/Views/Writer/Index.cshtml:41](../../../PlotLine/Views/Writer/Index.cshtml#L41) | a | Create a writing plan | asp-action="ScheduleSetup" | +| T121 | [PlotLine/Views/Writer/Index.cshtml:42](../../../PlotLine/Views/Writer/Index.cshtml#L42) | a | Manage writing plans | asp-action="WritingPlans" | +| T122 | [PlotLine/Views/Writer/Index.cshtml:50](../../../PlotLine/Views/Writer/Index.cshtml#L50) | a | Open Chapters | asp-controller="Books", asp-action="Details" | +| T123 | [PlotLine/Views/Writer/Index.cshtml:58](../../../PlotLine/Views/Writer/Index.cshtml#L58) | a | @q.Item3.Count @q.Item2 | asp-action="Workspaces" | +| T124 | [PlotLine/Views/Writer/Index.cshtml:60](../../../PlotLine/Views/Writer/Index.cshtml#L60) | a | Reports & activity settings | asp-controller="WritingActivity", asp-action="Index" | +| T125 | [PlotLine/Views/Writer/Index.cshtml:67](../../../PlotLine/Views/Writer/Index.cshtml#L67) | a | Writing Journey | asp-action="Journey" | +| T126 | [PlotLine/Views/Writer/Index.cshtml:71](../../../PlotLine/Views/Writer/Index.cshtml#L71) | a | Activity & baseline settings | asp-controller="WritingActivity", asp-action="Index" | +| T127 | [PlotLine/Views/Writer/Index.cshtml:76](../../../PlotLine/Views/Writer/Index.cshtml#L76) | a | @if(Model.Journey){ @date.ToString("ddd") @date.Day @(day==null?"—":$"+{day.Added} / −{day.Removed}") } | asp-controller="Writer", asp-action="Journey" | +| T128 | [PlotLine/Views/Writer/Index.cshtml:82](../../../PlotLine/Views/Writer/Index.cshtml#L82) | summary | Recent activity · source evidence | Client/disclosure/input; see interaction family | +| T129 | [PlotLine/Views/Writer/Index.cshtml:82](../../../PlotLine/Views/Writer/Index.cshtml#L82) | a | @e.ReceivedUtc.ToString("d MMM HH:mm") UTC · @e.Kind | asp-controller="WritingActivity", asp-action="Index" | +| T130 | [PlotLine/Views/Writer/Index.cshtml:84](../../../PlotLine/Views/Writer/Index.cshtml#L84) | a | @item.SceneTitle | asp-controller="Scenes", asp-action="Edit" | +| T131 | [PlotLine/Views/Writer/Index.cshtml:89](../../../PlotLine/Views/Writer/Index.cshtml#L89) | a | Browse chapters | asp-controller="Books", asp-action="Details" | +| T132 | [PlotLine/Views/Writer/Index.cshtml:90](../../../PlotLine/Views/Writer/Index.cshtml#L90) | summary | Chapter and scene workspaces | Client/disclosure/input; see interaction family | +| T133 | [PlotLine/Views/Writer/Index.cshtml:91](../../../PlotLine/Views/Writer/Index.cshtml#L91) | a | @q.Item2 @q.Item3.Count | asp-action="Workspaces" | +| T134 | [PlotLine/Views/Writer/Index.cshtml:91](../../../PlotLine/Views/Writer/Index.cshtml#L91) | a | Story Health @Model.StoryHealthReminders.Count | asp-action="Workspaces" | +| T135 | [PlotLine/Views/Writer/Index.cshtml:93](../../../PlotLine/Views/Writer/Index.cshtml#L93) | a | @reminder.Title | asp-controller="Scenes", asp-action="Edit" | +| T136 | [PlotLine/Views/Writer/Index.cshtml:93](../../../PlotLine/Views/Writer/Index.cshtml#L93) | a | @reminder.Title | asp-action="Chapter" | +| T137 | [PlotLine/Views/Writer/Index.cshtml:93](../../../PlotLine/Views/Writer/Index.cshtml#L93) | a | Project story health | asp-controller="Analytics", asp-action="Index" | +| T138 | [PlotLine/Views/Writer/Index.cshtml:96](../../../PlotLine/Views/Writer/Index.cshtml#L96) | summary | Today's planned writing · @Model.WritingSchedule.TodayTasks.Count tasks | Client/disclosure/input; see interaction family | +| T139 | [PlotLine/Views/Writer/Index.cshtml:96](../../../PlotLine/Views/Writer/Index.cshtml#L96) | a | @task.SceneTitle | asp-controller="Scenes", asp-action="Edit" | +| T140 | [PlotLine/Views/Writer/Index.cshtml:96](../../../PlotLine/Views/Writer/Index.cshtml#L96) | button | Mark complete | form: asp-action="MarkScheduleItemComplete", method="post" | +| T141 | [PlotLine/Views/Writer/Index.cshtml:96](../../../PlotLine/Views/Writer/Index.cshtml#L96) | button | Skip | form: asp-action="SkipScheduleItem", method="post" | +| T142 | [PlotLine/Views/Writer/Index.cshtml:97](../../../PlotLine/Views/Writer/Index.cshtml#L97) | summary | Word Companion & Display Setup | Client/disclosure/input; see interaction family | +| T143 | [PlotLine/Views/Writer/Index.cshtml:101](../../../PlotLine/Views/Writer/Index.cshtml#L101) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T144 | [PlotLine/Views/Writer/Index.cshtml:101](../../../PlotLine/Views/Writer/Index.cshtml#L101) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T145 | [PlotLine/Views/Writer/Index.cshtml:101](../../../PlotLine/Views/Writer/Index.cshtml#L101) | button | Detect displays | Client/disclosure/input; see interaction family | +| T146 | [PlotLine/Views/Writer/Index.cshtml:102](../../../PlotLine/Views/Writer/Index.cshtml#L102) | button | Start / Reapply Workspace | Client/disclosure/input; see interaction family | +| T147 | [PlotLine/Views/Writer/Index.cshtml:102](../../../PlotLine/Views/Writer/Index.cshtml#L102) | button | Open Context | Client/disclosure/input; see interaction family | +| T148 | [PlotLine/Views/Writer/Index.cshtml:102](../../../PlotLine/Views/Writer/Index.cshtml#L102) | button | Open Intent | Client/disclosure/input; see interaction family | +| T149 | [PlotLine/Views/Writer/Index.cshtml:102](../../../PlotLine/Views/Writer/Index.cshtml#L102) | button | Focus Context | Client/disclosure/input; see interaction family | +| T150 | [PlotLine/Views/Writer/Index.cshtml:102](../../../PlotLine/Views/Writer/Index.cshtml#L102) | button | Focus Intent | Client/disclosure/input; see interaction family | +| T151 | [PlotLine/Views/Writer/SchedulePreview.cshtml:10](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L10) | a | Writer | asp-controller="Writer", asp-action="Index" | +| T152 | [PlotLine/Views/Writer/SchedulePreview.cshtml:11](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L11) | a | Writing Plans | asp-controller="Writer", asp-action="WritingPlans" | +| T153 | [PlotLine/Views/Writer/SchedulePreview.cshtml:22](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L22) | a | Back to Writing Plans | asp-action="WritingPlans" | +| T154 | [PlotLine/Views/Writer/SchedulePreview.cshtml:25](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L25) | a | Edit Plan | asp-action="EditWritingPlan" | +| T155 | [PlotLine/Views/Writer/SchedulePreview.cshtml:44](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L44) | a | Create Writing Schedule | asp-action="ScheduleSetup" | +| T156 | [PlotLine/Views/Writer/SchedulePreview.cshtml:58](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L58) | select | data-pwa-label="Writing plan", name="writingPlanId" | form: asp-action="SchedulePreview", method="get" | +| T157 | [PlotLine/Views/Writer/SchedulePreview.cshtml:66](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L66) | button | Select | form: asp-action="SchedulePreview", method="get" | +| T158 | [PlotLine/Views/Writer/SchedulePreview.cshtml:97](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L97) | a | Select | asp-action="SchedulePreview" | +| T159 | [PlotLine/Views/Writer/SchedulePreview.cshtml:115](../../../PlotLine/Views/Writer/SchedulePreview.cshtml#L115) | a | Review activities from chapters and scenes | asp-controller="WriterPlanning", asp-action="Index" | +| T160 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:8](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L8) | a | Writer | asp-controller="Writer", asp-action="Index" | +| T161 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:16](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L16) | a | Skip scheduling · return to Writer | asp-action="Index" | +| T162 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:27](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L27) | input | asp-for="PlanName" | form: asp-action="ScheduleSetup", method="post" | +| T163 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:33](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L33) | select | asp-for="GoalType" | form: asp-action="ScheduleSetup", method="post" | +| T164 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:39](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L39) | select | asp-for="ProjectID" | form: asp-action="ScheduleSetup", method="post" | +| T165 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:47](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L47) | select | asp-for="BookID" | form: asp-action="ScheduleSetup", method="post" | +| T166 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:55](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L55) | input | asp-for="StartDate" | form: asp-action="ScheduleSetup", method="post" | +| T167 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:61](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L61) | input | asp-for="DeadlineDate" | form: asp-action="ScheduleSetup", method="post" | +| T168 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:69](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L69) | select | asp-for="RebalanceMode" | form: asp-action="ScheduleSetup", method="post" | +| T169 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:93](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L93) | input | asp-for="WritingDayAvailability[i].IsAvailable" | form: asp-action="ScheduleSetup", method="post" | +| T170 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:96](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L96) | select | asp-for="WritingDayAvailability[i].Minutes" | form: asp-action="ScheduleSetup", method="post" | +| T171 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:108](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L108) | input | asp-for="IncludeBlockedScenes" | form: asp-action="ScheduleSetup", method="post" | +| T172 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:115](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L115) | button | Review activities | form: asp-action="ScheduleSetup", method="post" | +| T173 | [PlotLine/Views/Writer/ScheduleSetup.cshtml:116](../../../PlotLine/Views/Writer/ScheduleSetup.cshtml#L116) | a | Schedule Preview | asp-action="SchedulePreview" | +| T174 | [PlotLine/Views/Writer/WritingPlans.cshtml:10](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L10) | a | Writer | asp-controller="Writer", asp-action="Index" | +| T175 | [PlotLine/Views/Writer/WritingPlans.cshtml:18](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L18) | a | View plans across all projects and books | asp-action="WritingPlans" | +| T176 | [PlotLine/Views/Writer/WritingPlans.cshtml:21](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L21) | a | Create Writing Schedule | asp-action="ScheduleSetup" | +| T177 | [PlotLine/Views/Writer/WritingPlans.cshtml:22](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L22) | a | Schedule Preview | asp-action="SchedulePreview" | +| T178 | [PlotLine/Views/Writer/WritingPlans.cshtml:84](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L84) | a | View Schedule | asp-action="SchedulePreview" | +| T179 | [PlotLine/Views/Writer/WritingPlans.cshtml:85](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L85) | a | Edit Plan | asp-action="EditWritingPlan" | +| T180 | [PlotLine/Views/Writer/WritingPlans.cshtml:90](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L90) | button | Deactivate Plan | form: asp-action="DeactivateWritingPlan", method="post" | +| T181 | [PlotLine/Views/Writer/WritingPlans.cshtml:97](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L97) | button | Activate Plan | form: asp-action="ActivateWritingPlan", method="post" | +| T182 | [PlotLine/Views/Writer/WritingPlans.cshtml:100](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L100) | a | Review chapter activities | asp-controller="WriterPlanning", asp-action="Index" | +| T183 | [PlotLine/Views/Writer/WritingPlans.cshtml:103](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L103) | button | Regenerate workflow scene tasks | form: asp-action="RegenerateWritingPlanSchedule", method="post" | +| T184 | [PlotLine/Views/Writer/WritingPlans.cshtml:105](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L105) | button | Delete Plan | Client/disclosure/input; see interaction family | +| T185 | [PlotLine/Views/Writer/WritingPlans.cshtml:121](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L121) | button | data-bs-dismiss="modal", aria-label="Close" | Client/disclosure/input; see interaction family | +| T186 | [PlotLine/Views/Writer/WritingPlans.cshtml:128](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L128) | button | Cancel | Client/disclosure/input; see interaction family | +| T187 | [PlotLine/Views/Writer/WritingPlans.cshtml:131](../../../PlotLine/Views/Writer/WritingPlans.cshtml#L131) | button | Delete | form: asp-action="DeleteWritingPlan", method="post" | +| T188 | [PlotLine/Views/Writer/_HelpMe.cshtml:3](../../../PlotLine/Views/Writer/_HelpMe.cshtml#L3) | button | Help Me | Client/disclosure/input; see interaction family | +| T189 | [PlotLine/Views/Writer/_HelpMe.cshtml:6](../../../PlotLine/Views/Writer/_HelpMe.cshtml#L6) | button | Dismiss suggestions | Client/disclosure/input; see interaction family | +| T190 | [PlotLine/Views/Writer/_HelpMe.cshtml:10](../../../PlotLine/Views/Writer/_HelpMe.cshtml#L10) | a | @suggestion.Action | asp-controller="@suggestion.Controller", asp-action="@suggestion.RouteAction" | +| T191 | [PlotLine/Views/Writer/_HelpMe.cshtml:13](../../../PlotLine/Views/Writer/_HelpMe.cshtml#L13) | a | Return to Writing | asp-action="Index" | +| T192 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:4](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L4) | a | Previous month | asp-action="Journey" | +| T193 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:4](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L4) | a | Next month | asp-action="Journey" | +| T194 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:6](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L6) | a | @date.Day @if(day!=null){ +@day.Added / −@day.Removed words @if(day.Writing>0 / / day.Editing>0){ Writing / editing }@if(day.EngagedSeconds>=60){ @Math.Floor(day.EngagedSeconds/60d) b | asp-action="Journey" | +| T195 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:7](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L7) | summary | @work.Year year overview | Client/disclosure/input; see interaction family | +| T196 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:7](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L7) | a | aria-label="@date.ToString(" | asp-action="Journey" | +| T197 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:8](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L8) | a | Accepted-change evidence | asp-controller="WritingActivity", asp-action="Index" | +| T198 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:11](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L11) | a | Export recent session evidence (up to 50) | asp-controller="WriterWork", asp-action="Export" | +| T199 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:13](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L13) | a | @task.SceneTitle | asp-controller="Scenes", asp-action="Edit" | +| T200 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:13](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L13) | a | @task.Title | asp-controller="Scenes", asp-action="Edit" | +| T201 | [PlotLine/Views/Writer/_JourneyCalendar.cshtml:13](../../../PlotLine/Views/Writer/_JourneyCalendar.cshtml#L13) | a | @task.Title | asp-action="Chapter" | +| T202 | [PlotLine/Views/Writer/_PlannedActivities.cshtml:2](../../../PlotLine/Views/Writer/_PlannedActivities.cshtml#L2) | a | @item.Title | asp-controller="Scenes", asp-action="Edit" | +| T203 | [PlotLine/Views/Writer/_PlannedActivities.cshtml:2](../../../PlotLine/Views/Writer/_PlannedActivities.cshtml#L2) | a | @item.Title | asp-controller="Writer", asp-action="Chapter" | +| T204 | [PlotLine/Views/Writer/_PlannedActivities.cshtml:2](../../../PlotLine/Views/Writer/_PlannedActivities.cshtml#L2) | button | Mark complete | form: asp-controller="WriterPlanning", asp-action="Complete", method="post" | +| T205 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:8](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L8) | a | Continue Writing | asp-controller="Scenes", asp-action="Edit" | +| T206 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:9](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L9) | a | Continue Writing | asp-action="Chapter" | +| T207 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:10](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L10) | a | Continue Writing | asp-controller="Books", asp-action="Details" | +| T208 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:11](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L11) | a | Change objective | asp-action="Index" | +| T209 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:20](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L20) | a | Continue an existing manuscript Choose a chapter or scene and your working activity. | href="#objective-setup" | +| T210 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:21](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L21) | a | Plan your writing time Set availability, goals and a deadline. | asp-action="ScheduleSetup" | +| T211 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:22](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L22) | a | Explore your manuscript @Model.Book?.ChapterCount @(Model.Book?.ChapterCount == 1 ? "chapter" : "chapters") · @Model.Book?.SceneCount @(Model.Book?.SceneCount == 1 ? "scene" : "sce | asp-controller="Books", asp-action="Details" | +| T212 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:25](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L25) | summary | Choose your working objective | Client/disclosure/input; see interaction family | +| T213 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:28](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L28) | select | name="Activity" | form: asp-action="SaveObjective", method="post" | +| T214 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:29](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L29) | select | name="ChapterID" | form: asp-action="SaveObjective", method="post" | +| T215 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:30](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L30) | select | name="SceneID" | form: asp-action="SaveObjective", method="post" | +| T216 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:31](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L31) | button | Save objective · start without a schedule | form: asp-action="SaveObjective", method="post" | +| T217 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:31](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L31) | button | Save & plan writing time | form: asp-action="SaveObjective", method="post" | +| T218 | [PlotLine/Views/Writer/_WorkingObjective.cshtml:38](../../../PlotLine/Views/Writer/_WorkingObjective.cshtml#L38) | a | Your projects | asp-controller="Projects", asp-action="Index" | +| T219 | [PlotLine/Views/Writer/_WriterSceneQueue.cshtml:17](../../../PlotLine/Views/Writer/_WriterSceneQueue.cshtml#L17) | a | Scene @scene.SceneNumber: @scene.SceneTitle | asp-controller="Scenes", asp-action="Edit" | +| T220 | [PlotLine/Views/Writer/_WriterSceneQueue.cshtml:48](../../../PlotLine/Views/Writer/_WriterSceneQueue.cshtml#L48) | a | Open scene | asp-controller="Scenes", asp-action="Edit" | +| T221 | [PlotLine/Views/Writer/_WriterSceneQueue.cshtml:49](../../../PlotLine/Views/Writer/_WriterSceneQueue.cshtml#L49) | a | Session brief | asp-controller="Exports", asp-action="WritingSession" | +| T222 | [PlotLine/Views/Writer/_WriterSceneQueue.cshtml:50](../../../PlotLine/Views/Writer/_WriterSceneQueue.cshtml#L50) | a | Timeline | asp-controller="Timeline", asp-action="Index" | +| T223 | [PlotLine/Views/Writer/_WriterSceneQueue.cshtml:51](../../../PlotLine/Views/Writer/_WriterSceneQueue.cshtml#L51) | a | Warnings | asp-controller="Warnings", asp-action="Index" | +| T224 | [PlotLine/Views/WriterPlanning/Index.cshtml:8](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L8) | a | Review chapters and scenes | asp-controller="Books", asp-action="Details" | +| T225 | [PlotLine/Views/WriterPlanning/Index.cshtml:8](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L8) | a | Review the project’s books | asp-controller="Projects", asp-action="Details" | +| T226 | [PlotLine/Views/WriterPlanning/Index.cshtml:8](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L8) | a | Edit availability / deadline / blocked scenes | asp-controller="Writer", asp-action="EditWritingPlan" | +| T227 | [PlotLine/Views/WriterPlanning/Index.cshtml:8](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L8) | a | View existing schedule | asp-controller="Writer", asp-action="SchedulePreview" | +| T228 | [PlotLine/Views/WriterPlanning/Index.cshtml:12](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L12) | input | asp-for="Candidates[i].Selected" | form: method="post", asp-action="Index" | +| T229 | [PlotLine/Views/WriterPlanning/Index.cshtml:12](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L12) | select | asp-for="Candidates[i].Kind" | form: method="post", asp-action="Index" | +| T230 | [PlotLine/Views/WriterPlanning/Index.cshtml:12](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L12) | input | asp-for="Candidates[i].Minutes" | form: method="post", asp-action="Index" | +| T231 | [PlotLine/Views/WriterPlanning/Index.cshtml:13](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L13) | input | asp-for="Confirm" | form: method="post", asp-action="Index" | +| T232 | [PlotLine/Views/WriterPlanning/Index.cshtml:13](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L13) | button | Commit reviewed schedule | form: method="post", asp-action="Index" | +| T233 | [PlotLine/Views/WriterPlanning/Index.cshtml:13](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L13) | a | Edit availability / deadline | asp-controller="Writer", asp-action="EditWritingPlan" | +| T234 | [PlotLine/Views/WriterPlanning/Index.cshtml:13](../../../PlotLine/Views/WriterPlanning/Index.cshtml#L13) | a | Return to Writing | asp-controller="Writer", asp-action="Index" | +| T235 | [PlotLine/Views/Writing/_IntentAssessment.cshtml:12](../../../PlotLine/Views/Writing/_IntentAssessment.cshtml#L12) | summary | @(string.IsNullOrWhiteSpace(item.ObjectiveText)?objective?.Text??"Previous objective":item.ObjectiveText) · @item.Status.Replace('-',' ') @decisions.GetValueOrDefault(item.Key,"pen | Client/disclosure/input; see interaction family | +| T236 | [PlotLine/Views/Writing/_IntentAssessment.cshtml:12](../../../PlotLine/Views/Writing/_IntentAssessment.cshtml#L12) | button | @(choice=="pending"?"Revisit":choice=="acknowledged"?"Keep evidence":choice=="dismissed"?"Dismiss":"Defer") | Client/disclosure/input; see interaction family | +| T237 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:41](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L41) | button | 0?sequence[current-1].Value:"")" disabled="@(current ← Previous | Client/disclosure/input; see interaction family | +| T238 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:42](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L42) | button | =0&¤t+1 =sequence.Count)" title="Next scene, including next chapter">Next → | Client/disclosure/input; see interaction family | +| T239 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:45](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L45) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T240 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:51](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L51) | a | Open Scene | asp-controller="Scenes", asp-action="Edit" | +| T241 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:56](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L56) | button | Overview | Client/disclosure/input; see interaction family | +| T242 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:57](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L57) | button | People | Client/disclosure/input; see interaction family | +| T243 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:58](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L58) | button | Relationships | Client/disclosure/input; see interaction family | +| T244 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:59](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L59) | button | Maps | Client/disclosure/input; see interaction family | +| T245 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:60](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L60) | button | Floor Plans | Client/disclosure/input; see interaction family | +| T246 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:61](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L61) | button | Story | Client/disclosure/input; see interaction family | +| T247 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:62](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L62) | button | Plot Lines | Client/disclosure/input; see interaction family | +| T248 | [PlotLine/Views/Writing/_WritingContextContent.cshtml:63](../../../PlotLine/Views/Writing/_WritingContextContent.cshtml#L63) | button | Metrics | Client/disclosure/input; see interaction family | +| T249 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:4](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L4) | button | Refresh saved data | Client/disclosure/input; see interaction family | +| T250 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:7](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L7) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T251 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:7](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L7) | select | data-writing-view-state="context-map-lens" | Client/disclosure/input; see interaction family | +| T252 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:9](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L9) | button | Fit map | Client/disclosure/input; see interaction family | +| T253 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:9](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L9) | button | Show scene location | Client/disclosure/input; see interaction family | +| T254 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:9](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L9) | button | + | Client/disclosure/input; see interaction family | +| T255 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:9](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L9) | button | − | Client/disclosure/input; see interaction family | +| T256 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:12](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L12) | select | data-writing-view-state="map-feature-@Model.Document.Map.MapID" | Client/disclosure/input; see interaction family | +| T257 | [PlotLine/Views/Writing/_WritingContextMap.cshtml:14](../../../PlotLine/Views/Writing/_WritingContextMap.cshtml#L14) | a | Open full Maps workspace | href="/Maps?projectId=@Model.ProjectID&id=@Model.Document.Map.MapID" | +| T258 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:8](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L8) | button | Refresh saved data | Client/disclosure/input; see interaction family | +| T259 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:12](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L12) | select | data-writing-view-state="context-metric" | Client/disclosure/input; see interaction family | +| T260 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:12](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L12) | button | Show current scene | Client/disclosure/input; see interaction family | +| T261 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:16](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L16) | button | @(scenes[i].SceneNumber.ToString("0.##")) | Client/disclosure/input; see interaction family | +| T262 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:19](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L19) | input | data-writing-view-state="metric-scrub" | Client/disclosure/input; see interaction family | +| T263 | [PlotLine/Views/Writing/_WritingContextMetrics.cshtml:20](../../../PlotLine/Views/Writing/_WritingContextMetrics.cshtml#L20) | button | Go to scene | Client/disclosure/input; see interaction family | +| T264 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:81](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L81) | a | @item.Title | asp-controller="Writing", asp-action="Context" | +| T265 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:96](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L96) | a | Calendar @(scene.StartDateTime.HasValue?"· scene date":"· no saved date") | asp-controller="StoryCalendar", asp-action="Index" | +| T266 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:97](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L97) | a | Story Maps · choose a saved map | asp-controller="Maps", asp-action="Index" | +| T267 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:98](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L98) | a | Linked floor plan | asp-controller="FloorPlans", asp-action="Edit" | +| T268 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:99](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L99) | a | Plot Lines | asp-controller="PlotLineWorkspace", asp-action="Index" | +| T269 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:100](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L100) | a | Characters and relationships | asp-controller="RelationshipMap", asp-action="Index" | +| T270 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:109](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L109) | a | Source scene | asp-controller="Scenes", asp-action="Edit" | +| T271 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:115](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L115) | a | @thread.PlotLineName / @thread.Title | asp-controller="PlotThreads", asp-action="Edit" | +| T272 | [PlotLine/Views/Writing/_WritingContextOverview.cshtml:115](../../../PlotLine/Views/Writing/_WritingContextOverview.cshtml#L115) | a | Source scene | asp-controller="Scenes", asp-action="Edit" | +| T273 | [PlotLine/Views/Writing/_WritingContextPeople.cshtml:45](../../../PlotLine/Views/Writing/_WritingContextPeople.cshtml#L45) | a | Source scene | asp-controller="Scenes", asp-action="Edit" | +| T274 | [PlotLine/Views/Writing/_WritingContextPlace.cshtml:37](../../../PlotLine/Views/Writing/_WritingContextPlace.cshtml#L37) | input | data-writing-view-state="floor-zoom-@floor.FloorPlanFloorID" | Client/disclosure/input; see interaction family | +| T275 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:19](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L19) | button | Active here 0 | Client/disclosure/input; see interaction family | +| T276 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:20](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L20) | button | Nearby 0 | Client/disclosure/input; see interaction family | +| T277 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:21](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L21) | button | Elsewhere 0 | Client/disclosure/input; see interaction family | +| T278 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:22](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L22) | button | Show all | Client/disclosure/input; see interaction family | +| T279 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:28](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L28) | input | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T280 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:29](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L29) | button | Show current scene | Client/disclosure/input; see interaction family | +| T281 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:32](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L32) | button | ‹ | Client/disclosure/input; see interaction family | +| T282 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:34](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L34) | button | › | Client/disclosure/input; see interaction family | +| T283 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:36](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L36) | button | Go to scene in Word | Client/disclosure/input; see interaction family | +| T284 | [PlotLine/Views/Writing/_WritingContextPlotLines.cshtml:39](../../../PlotLine/Views/Writing/_WritingContextPlotLines.cshtml#L39) | button | Refresh saved data | Client/disclosure/input; see interaction family | +| T285 | [PlotLine/Views/Writing/_WritingIntentChecklist.cshtml:52](../../../PlotLine/Views/Writing/_WritingIntentChecklist.cshtml#L52) | a | Review objectives and completion in the scene editor | asp-controller="Scenes", asp-action="Edit" | +| T286 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:62](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L62) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T287 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:67](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L67) | select | Unlabelled control; inspect source | Client/disclosure/input; see interaction family | +| T288 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:76](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L76) | a | Edit Scene | asp-controller="Scenes", asp-action="Edit" | +| T289 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:80](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L80) | a | Edit Chapter Plan | asp-controller="Writer", asp-action="Chapter" | +| T290 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:86](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L86) | button | Plan | Client/disclosure/input; see interaction family | +| T291 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:87](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L87) | button | Must Include | Client/disclosure/input; see interaction family | +| T292 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:88](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L88) | button | Notes | Client/disclosure/input; see interaction family | +| T293 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:89](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L89) | button | Threads | Client/disclosure/input; see interaction family | +| T294 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:90](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L90) | button | Evidence | Client/disclosure/input; see interaction family | +| T295 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:91](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L91) | button | Checklist | Client/disclosure/input; see interaction family | +| T296 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:111](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L111) | button | Show saved evidence | Client/disclosure/input; see interaction family | +| T297 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:111](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L111) | button | Assess saved prose with AI | Client/disclosure/input; see interaction family | +| T298 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:111](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L111) | button | Cancel | Client/disclosure/input; see interaction family | +| T299 | [PlotLine/Views/Writing/_WritingIntentContent.cshtml:113](../../../PlotLine/Views/Writing/_WritingIntentContent.cshtml#L113) | a | Edit intentions and objective completion | asp-controller="Scenes", asp-action="Edit" | +| T300 | [PlotLine/Views/WritingActivity/Index.cshtml:8](../../../PlotLine/Views/WritingActivity/Index.cshtml#L8) | a | Back to Writer | asp-controller="Writer", asp-action="Index" | +| T301 | [PlotLine/Views/WritingActivity/Index.cshtml:10](../../../PlotLine/Views/WritingActivity/Index.cshtml#L10) | a | Export recent work and Audio Review sessions (up to 50) | asp-controller="WriterWork", asp-action="Export" | +| T302 | [PlotLine/Views/WritingActivity/Index.cshtml:14](../../../PlotLine/Views/WritingActivity/Index.cshtml#L14) | a | All retained activity | asp-action="Index" | +| T303 | [PlotLine/Views/WritingActivity/Index.cshtml:19](../../../PlotLine/Views/WritingActivity/Index.cshtml#L19) | button | Record current baseline | form: asp-action="Baseline", method="post" | +| T304 | [PlotLine/Views/WritingActivity/Index.cshtml:27](../../../PlotLine/Views/WritingActivity/Index.cshtml#L27) | a | @(e.ChapterTitle ?? "Chapter") | asp-controller="Writer", asp-action="Chapter" | +| T305 | [PlotLine/Views/WritingActivity/Index.cshtml:30](../../../PlotLine/Views/WritingActivity/Index.cshtml#L30) | a | Export recent evidence (JSON) | asp-action="Export" | +| T306 | [PlotLine/Views/WritingActivity/Index.cshtml:31](../../../PlotLine/Views/WritingActivity/Index.cshtml#L31) | a | Earlier evidence | asp-action="Index" | +| T307 | [PlotLine/Views/WritingActivity/Index.cshtml:36](../../../PlotLine/Views/WritingActivity/Index.cshtml#L36) | button | Record current accepted baseline | form: asp-action="Baseline", method="post" | +| T308 | [PlotLine/Views/WritingActivity/Index.cshtml:40](../../../PlotLine/Views/WritingActivity/Index.cshtml#L40) | input | name="enabled" | form: asp-action="Settings", method="post" | +| T309 | [PlotLine/Views/WritingActivity/Index.cshtml:41](../../../PlotLine/Views/WritingActivity/Index.cshtml#L41) | input | name="retentionDays" | form: asp-action="Settings", method="post" | +| T310 | [PlotLine/Views/WritingActivity/Index.cshtml:42](../../../PlotLine/Views/WritingActivity/Index.cshtml#L42) | button | Save privacy settings | form: asp-action="Settings", method="post" | +| T311 | [PlotLine/Views/WritingActivity/Index.cshtml:43](../../../PlotLine/Views/WritingActivity/Index.cshtml#L43) | summary | Delete retained activity | Client/disclosure/input; see interaction family | +| T312 | [PlotLine/Views/WritingActivity/Index.cshtml:43](../../../PlotLine/Views/WritingActivity/Index.cshtml#L43) | input | name="confirm" | form: asp-action="Erase", method="post" | +| T313 | [PlotLine/Views/WritingActivity/Index.cshtml:43](../../../PlotLine/Views/WritingActivity/Index.cshtml#L43) | button | Delete activity | form: asp-action="Erase", method="post" | +| T314 | [PlotLine/Views/WritingProblems/Workspace.cshtml:11](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L11) | a | See how @Model.Capability.Name works → | href="@Model.Capability.Tour" | +| T315 | [PlotLine/Views/WritingProblems/Workspace.cshtml:12](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L12) | a | Go to @(characterChoice?"characters":"projects") → | href="@(characterChoice ? " | +| T316 | [PlotLine/Views/WritingProblems/Workspace.cshtml:19](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L19) | select | name="@(characterChoice?" | form: method="get" | +| T317 | [PlotLine/Views/WritingProblems/Workspace.cshtml:24](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L24) | button | Open @Model.Capability.Name → | form: method="get" | +| T318 | [PlotLine/Views/WritingProblems/Workspace.cshtml:27](../../../PlotLine/Views/WritingProblems/Workspace.cshtml#L27) | a | Back to the Problem Solver → | href="/problem-solver" | diff --git a/Docs/Writer/Audit/Writer-Workflow-Analysis.md b/Docs/Writer/Audit/Writer-Workflow-Analysis.md new file mode 100644 index 00000000..a5d10e28 --- /dev/null +++ b/Docs/Writer/Audit/Writer-Workflow-Analysis.md @@ -0,0 +1,62 @@ +# Writer workflow analysis + +Audit date: 16 November 2026. Source baseline: `fad26c3`. Development: `https://dev.plotdirector.com/`. + +## Evidence and limits + +**Browser verified** means an observed Development result in this audit. **Source verified** means a traced implementation, not an executed action. **Both verified** means the particular behavior was observed and traced. **Not verified** means the stated condition or outcome was not exercised. Live database metadata is identified explicitly alongside source evidence; repository SQL is not assumed to be deployed. + +This is an investigation, not a certification that every state works. Counts describe the documented scope, not all possible runtime instances. See [coverage and gaps](Writer-Audit-Coverage.md). No application code, schema, configuration or deployment was changed. Only a synthetic author’s disposable records were used for writes. + +## Implemented end-to-end paths + +The sequences below reflect current routes and handlers. They are not proposed redesigned journeys. **Source verified** unless explicitly marked **Both verified**. Navigation to other sections is included only as the Writer-related boundary. + +| Workflow | Existing sequence and context changes | Requirements / persistence | Break or limitation | +|---|---|---|---| +| Start a new book | Projects → select/create project → create/select book → Writer → Start Here → whole manuscript objective or chapter catalogue | Project/book rows; objective optional; schedule optional | Writer does not create narrative structure from the objective. Empty book offers little beyond scheduling/explore. No scenes means no Context tabs | +| Plan a book | Book chapters/scenes and narrative tools → authored structure → Writer ScheduleSetup → review derived activities → confirm allocation → Preview | Saved chapters, planned capacity, budgets; scene metadata optional depending path | “Writing Plan” mainly means time allocation, not book plot design. Story planning remains in other sections | +| Plan a chapter | Chapter Details summary/purpose → Chapter workflow Goals → save → Intent Plan/Must Include/Notes | Chapter + authored five goal fields | Summary/purpose and goals live on different screens; no single automatic chapter contribution analysis. **Both verified** goal-save path | +| Plan a scene | Scene editor → purpose/outcome/types → Writer Checklist/Notes/Workflow → Revision Status → Context/Intent reference | Canonical scene and metadata; optional plot events/characters/location | Writer Workflow does not itself set canonical Revision Status; multiple drawers needed; Intent read-only copies require back navigation | +| Continue existing manuscript | Writer → choose chapter/scene and activity → save objective without schedule → Continue Writing | Objective per user/book | Destination is scene metadata editor or chapter workflow, not a web manuscript editor. Actual prose writing normally remains in Word. **Both verified** saved chapter revision focus | +| Review completed writing | Open Reader from book or Help Me → select chapter → optionally expand Reading & Audio Review → start/end Reading session | Accepted server text required for prose; session independent | A saved chapter is enough for Help Me listening suggestion even without accepted text. **Both verified** no-prose Reader state | +| Revise chapter | Set Revising objective → chapter goals/scene notes → edit text in Word → save/synchronise → review accepted prose/evidence → update scene workflow/checklist manually | Revision objective, saved plan/source; Word for manuscript edits in this workflow | No single task links diagnosis, proposed revision, prose edit and verified completion. Saved goal/scene status/evidence decision are distinct | +| Track progress | Accepted baseline → future accepted snapshots → Writer30day change totals → Journey dates → Reports source evidence | Accepted ingest; capture enabled; retained evidence | No retrospective productivity; word growth not quality. Catalogue fallback and accepted counts can disagree. D01 hides status progression queues | +| Set/manage goals and schedule | ScheduleSetup → name/goal/scope/dates/availability → Review activities → select budgets/confirm → Preview → Edit/activate/deactivate/delete | Personal plan and eligible candidates | First submit already saves active plan; all-book and book plans coexist; scope-free Preview may open another plan. **Both verified** create/commit path | +| Manage reviewed work | Preview allocations → Mark complete; later review/reallocate uncompleted work | Planned allocation; explicit completion | Completion is author-declared; completed allocation blocks replacement for new pass; new plan needed. Does not start/end a session | +| Manage sessions | Choose work kind/chapter → Start → browser engagement heartbeats → optional return note → End → Journey/export | Owner book with capture enabled; historical manuscript not needed | Unsaved note only persists on End; navigation away does not end; chapter can differ from objective. **Both verified** Planning note persisted | +| Audio Review | Reader or Writer toolbar → chapter+Audio Review → Start → native lease/player observations → playback commands → Pause if stopping player → End review/save note → Journey/export | Compatible registered Windows agent, correct document, fresh supported source; observation evidence | Starting without bridge still tracks session with disabled controls and0 playback. End does not pause external audio; no auto resume. **Both verified** unsupported state only; physical playback **Not verified** | +| Review writing history | Journey month/year/day → session rows/notes/checkpoints → accepted-change evidence or session JSON | Retained activity/sessions | Display20/export50; not a lifetime archive; UTC and retention gaps. Interval overlap does not prove audio caused edits | +| Return after break | Writer saved focus → Help focus/next plan → Journey return note → Continue Writing; optionally start new session | Previously saved objective/note/session/plan | No reconstructed contextual briefing; note is in session history rather than a guaranteed surfaced next-step summary. Help dismissal not remembered | +| Work with Word Companion | Install/sign in/link correct book → saved verified manuscript mapping → native Writing Context/Intent/PlotDirector → write/save/synchronise → Reader/evidence/activity | Correct instance/document/grant/revision; accepted canonical mappings | Browser book selection, saved objective and Word book are separate. Native and Office.js shell must not be conflated. Physical Windows steps **Not verified** | +| Resolve a story problem | Help Me exposes limited authored-data actions; separate Problem Solver asks questions → result → choose project/character → narrative workspace → author edits records/prose | Correct questionnaire input and populated narrative records | No Help Me semantic diagnosis; tool destinations may need independent context. No measured closed loop proving problem resolution | + +## Central test: third trilogy volume losing direction + +This scenario was evaluated against implementation and synthetic browser data. No trilogy/manuscript belonging to an author was opened or changed. The browser fixture is intentionally sparse, so successful empty-state rendering is not evidence of a populated novel’s diagnostic quality. + +| Author's need | Existing capability / location | How it becomes useful | What the application actually establishes / gap | +|---|---|---|---| +| Understand present story structure | Book chapter catalogue, Timeline, Context Overview/Plot Lines, full Plot Lines workspace | Saved chapter/scene order, summaries, plot/thread/event associations | Navigable saved structure. Help Me does not synthesise “story losing direction.” Existing structure may be incomplete if imported intelligence not materialised | +| Review character development | Context People/Relationships; full Character and Relationship workspace | Canonical participants, character knowledge, relationship events and scene evidence | Saved character state/change references; not a trilogy-wide judgement of arc satisfaction. Story Intelligence canonical materialisation is prerequisite for generated observations | +| Find unresolved plot threads | Context relevant threads/Story/Plot Lines; Intent Threads; full thread editor | Created/materialised threads with status, introduced/planned resolution scenes and events | Author can inspect unresolved/planned development. Writer reminder tab is only missing goals/selected notes; no assurance it finds every unresolved thread or ending loose end | +| Identify pacing problems | Context Metrics, Timeline metrics, Analytics “Pacing review” | Recorded metric values and scene/chapter ordering; meaningful input coverage | Existing pacing-related tools do exist; do not call pacing wholly absent. They show recorded/derived evidence, not Help Me reading the current manuscript or deciding where rushing occurs | +| Examine significant-event distribution | Plot Lines scene strip/cards, thread events, Timeline | Events explicitly attached to saved scenes, correct order/importance | Can compare saved distribution; absent event ≠ nothing important happens; no proof ending is only tie-ups | +| Understand chapter contribution | Chapter summary/purpose/Goals; Intent Plan; scene purpose/outcome; explicit Evidence | Author supplies intentions and imported saved scene prose for assessment | Explicit per-objective evidence exists, but no automatic whole-book chapter necessity ranking. Individual fields and multiple screens must be reconciled | +| Review intended ending | Last chapter Goals/Must include, ending scenes’ purpose/outcome/checklist, planned thread resolutions | Author records ending intention/expected resolutions; navigate to correct targets | No dedicated inferred ending roadmap from Help Me; current input must describe intended ending. Generic default “Ending hook strong” checklist is not a trilogy ending design | +| Explore alternative developments | Authored notes/plans and Problem Solver editorial guidance; narrative editors | Author proposes alternatives manually | No verified automatic branch generation, comparison of alternative trilogy endings, or safe scenario version workspace within Writer. Do not claim the solver simulates alternatives | +| Choose scenes to expand/revise/remove | Scene purpose/outcome/evidence, Needs Work/Cut Candidate status, warnings/notes/metrics | Saved prose + explicit intentions and meaningful story records; author judgement | AI Evidence may show partial/not-evidenced/contradicted objectives. It does not prescribe deletion/expansion or automatically change status. Queue bug currently hides authored work signals | +| Establish practical way forward | Capture chapter/scene goal + note/checklist → saved revision objective → reviewed budget → explicit session/return note → subsequent review | Author translates concern into concrete saved tasks and budgets | Pieces support a manual plan; no integrated diagnosis→prioritised revision backlog→prose revision→verified resolution loop. Author does the synthesis and context switching | + +## Concrete observed scenario fragments + +- A chapter with empty GoalSummary yielded Help Me “Set this chapter's Intent.” It was a missing-field rule, not a diagnosis of an unfocused ending. +- The chapter-only fixture could be assigned a reviewed30minute budget with no scene status changes and without accepted manuscript prose. +- Four synthetic scenes with Outlined/Drafted/Needs Work/Revised were absent from all four live queues because of D01; no code/database repair was made. +- Context tabs could display authored scene purpose/outcome and empty character/thread/map states. Metrics displayed available metric definitions and gaps rather than inferred values. +- Intent Checklist rendered eight default objectives despite no manually authored checklist; legacy workflow status remained Planned for an Outlined scene. +- Help Me's “Read or start Audio Review” opened Reader’s no-accepted-prose instructions. Starting Audio Review independently produced disabled controls and an updated-Windows-Companion requirement. + +## Missing connections, not replacement design + +Writer has authored planning/reference, time allocation, work evidence and adjacent diagnostic tools. What is not demonstrated is a single current-story model that combines all those inputs into a reasoned and prioritised revision programme. The gap is especially visible for a substantial third volume: book context is insufficient to infer trilogy promises, preceding-volume events, intended payoffs and a satisfactory ending. Existing linked tools must be populated and evaluated by the author; this audit does not claim a replacement workflow exists. diff --git a/Docs/Writer/Writer3/Context-Contract.md b/Docs/Writer/Writer3/Context-Contract.md new file mode 100644 index 00000000..51fa9a22 --- /dev/null +++ b/Docs/Writer/Writer3/Context-Contract.md @@ -0,0 +1,22 @@ +# Writer working context — Phase 1 contract + +`Services/Writer/WriterContext.cs` is an immutable projection of already-authorised entity selections, not an authorisation service, persistent global selector or Word-navigation operation. Constructors validate positive scope, scene/chapter completeness and cross-book selection; existing services still validate entity membership and permissions. + +| Slot | Source / authority | Update and propagation | +|---|---|---| +| Scope | Authorised request/model project and book | New book means a new context, never reuse selections from the previous book. | +| SavedObjective | WriterObjective read for actor/book | Explicit SaveObjective only; unavailable target is omitted by existing SQL. | +| Working | Initially saved objective on dashboard | Separate slot for future explicit Write focus; no inferred change from a reference. | +| Exploration | Resolved saved Context/Intent scene, or temporary chart/map inspection | Independent and transient. Contract construction never navigates Word; existing explicitly trusted navigation controls remain unchanged in Phase1. Phase4 distinguishes exploration commands from Go to scene. | +| PinnedReference | Resolved saved snapshot selection | Does not subscribe to live Word following or change working objective. Invalid route IDs cannot become a valid selection. | +| Reader | Reader service’s authorised selected chapter | Reader model adapter; chapter changes do not retarget an active session or working objective. | +| Session | Explicit session book/chapter | Existing WriterWork state/start binding remains authoritative, including UUID/activity/native lease. Slot supports composition by future shell; dashboard does not invent a session from objective or URL. | +| VerifiedWord | Exact instance/document/manuscript, observed and accepted revision with resolved selection | Set only after existing saved-document, live-lease, accepted-position and race checks in WritingController. Invalidated target is cleared; no raw query ID is proof. | + +Dashboard populates Scope, SavedObjective and Working. Resolved Context/Intent pages populate pinned/exploration and, after native verification, VerifiedWord; unresolved pages have no projected reference. Reader exposes its independent Reader slot. Active session remains fetched through existing WriterWork API/client polling; its identity/kind/native binding are not replaced by a route selection. The projection adds no persisted schema, localStorage global focus, new native protocol or automatic state fan-out. + +Existing standalone windows, SignalR follow, exact native/session/grant checks, accepted manuscript revision boundaries, explicit Word navigation and named-window placement remain intact. Phase1 records these contracts and consumes them in view models/selection-role metadata; interactive cross-destination focus persistence/selection indicators belong to Phases2–4, not a hidden Phase1 shell redesign. + +Status authority: scene RevisionStatusID plus the existing lookup describes canonical readiness. Legacy SceneWorkflow.DraftStatus/readiness fields are retained for compatibility; Intent no longer displays legacy DraftStatus as a conflicting workflow stage. No data backfill or silent overwrite occurs. + +Scheduling remains two stores: legacy WritingScheduleItems with Planned/Done/Skipped/Moved and reviewed WriterPlannedActivities with Planned/Done. Completion is author-declared per record; it does not change scene status, checklist completion or work-session evidence. Preview filters by request scope before default plan choice, includes project-wide plans, and rejects an explicit out-of-scope plan. Unscoped direct Preview retains the existing personal all-plan behavior. Availability edits do not relocate reviewed allocations; explicit review/confirmation is required. diff --git a/Docs/Writer/Writer3/Evidence/Development-Browser-Acceptance.json b/Docs/Writer/Writer3/Evidence/Development-Browser-Acceptance.json new file mode 100644 index 00000000..e53a320a --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Development-Browser-Acceptance.json @@ -0,0 +1,14 @@ +{ + "checks": [ + "All four selected-book queues render the correct canonical fixture scene", + "Pinned Intent displays canonical Outlined without overwriting legacy draft data", + "Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass", + "Browser: empty Reader, native incomplete-session refusal, out-of-scope plan404 and Help full article pass", + "All four selected-book queues render the correct canonical fixture scene", + "Pinned Intent displays canonical Outlined without overwriting legacy draft data", + "Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass", + "Simulated PWA: empty Reader, native incomplete-session refusal, out-of-scope plan404 and Help full article pass" + ], + "physicalWindows": false, + "installedPWA": false +} diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Dashboard-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Dashboard-Development.png new file mode 100644 index 00000000..f35db9cf Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Dashboard-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Explore-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Explore-Development.png new file mode 100644 index 00000000..f86e218d Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Explore-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Home-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Home-Development.png new file mode 100644 index 00000000..5bad6a66 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Home-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Plan-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Plan-Development.png new file mode 100644 index 00000000..76fa82cb Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Plan-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Reflect-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Reflect-Development.png new file mode 100644 index 00000000..32a69b46 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Reflect-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Review-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Review-Development.png new file mode 100644 index 00000000..aa948e4e Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Review-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/Write-Development.png b/Docs/Writer/Writer3/Evidence/Phase2A/Write-Development.png new file mode 100644 index 00000000..d575acd4 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2A/Write-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/activity-prestop.jsonl b/Docs/Writer/Writer3/Evidence/Phase2A/activity-prestop.jsonl new file mode 100644 index 00000000..678aa2c5 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/activity-prestop.jsonl @@ -0,0 +1,4 @@ +{"Area":"PlotSynthesis","Status":"Completed","Records":1} +{"Area":"Pipelines","Status":"Complete","Records":1} +{"Area":"CoreImports","Status":"Complete","MarkerStatus":"NotRequested","Records":1} +{"Area":"CharacterEnrichment","Status":"Completed","Records":1} diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/build.log b/Docs/Writer/Writer3/Evidence/Phase2A/build.log new file mode 100644 index 00000000..8a7e9ed1 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/build.log @@ -0,0 +1,14 @@ + PlotDirector.Companion.Protocol -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Protocol/bin/Debug/netstandard2.0/PlotDirector.Companion.Protocol.dll + PlotDirector.Companion.Client -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Client/bin/Debug/netstandard2.0/PlotDirector.Companion.Client.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0-windows10.0.19041.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Tests -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Tests/bin/Debug/net10.0/PlotDirector.Companion.Tests.dll + PlotLine -> /srv/repos/PlotDirector/PlotLine/bin/Debug/net10.0/PlotLine.dll + WritingSolver -> /srv/repos/PlotDirector/Tools/WritingSolver/bin/Debug/net10.0/WritingSolver.dll + PlotLine.Tests -> /srv/repos/PlotDirector/PlotLine.Tests/bin/Debug/net10.0/PlotLine.Tests.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:32.86 diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/cleanup.log b/Docs/Writer/Writer3/Evidence/Phase2A/cleanup.log new file mode 100644 index 00000000..f4b0a841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/cleanup.log @@ -0,0 +1,2 @@ +{"":true} +{"RemainingSyntheticAccounts":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/deployment-verification.log b/Docs/Writer/Writer3/Evidence/Phase2A/deployment-verification.log new file mode 100644 index 00000000..0053dafa --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/deployment-verification.log @@ -0,0 +1,7 @@ +active +Local GET 200 +TLS Development GET 200 +cf57c3e221d94641938b0a6956ec45f5f47a09784692899f7966403de81a2314 /home/nick/writer3-publish-f96259a-cfLFTM/PlotLine.dll +cf57c3e221d94641938b0a6956ec45f5f47a09784692899f7966403de81a2314 /srv/apps/plotdirector-dev/current/PlotLine.dll +.1.0.0+f96259a378f22dd80075676be34ea5e269ae091f +Recent warning/error journal: no entries after deployment and live acceptance. diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/legacy-dashboard-browser.log b/Docs/Writer/Writer3/Evidence/Phase2A/legacy-dashboard-browser.log new file mode 100644 index 00000000..ee5351c4 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/legacy-dashboard-browser.log @@ -0,0 +1 @@ +PASS Writer 2 overview: real Razor, 48 theme/viewport/history/PWA combinations, single navigation, book scope, honest empty states, chart links and contextual controls. diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/legacy-intelligent-browser.log b/Docs/Writer/Writer3/Evidence/Phase2A/legacy-intelligent-browser.log new file mode 100644 index 00000000..9cd7a918 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/legacy-intelligent-browser.log @@ -0,0 +1,3 @@ +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: browser +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: simulated PWA +PASS Writer intelligence UI: four themes, two widths, browser/PWA; grounded Help Me, explicit audio start/end/note, disabled unsupported controls, month/year calendar and zero-net revision intensity diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/live-navigation.log b/Docs/Writer/Writer3/Evidence/Phase2A/live-navigation.log new file mode 100644 index 00000000..ff7ae6ea --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/live-navigation.log @@ -0,0 +1,8 @@ +{ + "checks": [ + "Browser: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted.", + "Simulated PWA: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted." + ], + "physicalWindows": false, + "installedPWA": false +} diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/navigation-browser.log b/Docs/Writer/Writer3/Evidence/Phase2A/navigation-browser.log new file mode 100644 index 00000000..d8157841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/navigation-browser.log @@ -0,0 +1 @@ +PASS Writer3: 168 destination/theme/width/browser/PWA combinations; Home actions, contextual ribbon, authorisation, book switching, reload/back/forward, keyboard focus, Help, legacy fragments and viewport fit. diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/preserved-browser.log b/Docs/Writer/Writer3/Evidence/Phase2A/preserved-browser.log new file mode 100644 index 00000000..b6457504 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/preserved-browser.log @@ -0,0 +1,7 @@ +PASS Writer reference windows: initial failure/retry, window identity/reuse, pinned book, denied/unavailable display permissions, plan navigation, browser/PWA. +PASS pending native response cancellation, unverified mapping refusal, exact-session query parameters and no recomputation for repeated unchanged scenes +PASS native/legacy race, cross-chapter cursor following, repeated presence without commands/focus, status failure recovery, in-flight invalidation, unchanged-scene fragment retry, trusted explicit navigation and acknowledgement without feedback; simulated Chromium protocol, not Word +PASS native source invariant: selection observation contains no ribbon invalidation or range selection (not runtime Word proof) +PASS Manuscript Reader: real Razor/controller, escaped selectable text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus, 3 widths × 4 themes × browser/PWA +PASS explicit Intent assessment, persisted-result load, cancellation, scene isolation and permission feedback +PASS Writer chapter-goal unsaved guard, cancelled/discarded navigation, real antiforgery/controller saves, Unicode persistence, save-and-leave failure/retry and concurrent edits in browser/PWA diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/regressions.log b/Docs/Writer/Writer3/Evidence/Phase2A/regressions.log new file mode 100644 index 00000000..a57afc63 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/regressions.log @@ -0,0 +1,587 @@ +PASS settlement Marker compatibility, nested geometry/style validation, stable route references and existing map/backup/import JSON contracts. +PASS Settlement boundaries preserve anchors, routes and backup/import contracts +PASS shared boundary server integrity, versions/refs/appearance, duplicate/orphan rejection and project import/export/restore contracts. +PASS Shared boundary topology preserves map and project contracts +PASS geography roots, hierarchy, provider-independent fake, cache identities, ambiguity, failures/backoff and rate reservation. +PASS Geographical roots, providers, queue outcomes and access +PASS Intent evidence preserves provenance and author control +PASS Release triage and browser-only onboarding preserve author decisions +PASS Approved native import source and confirmation remain safe +PASS Native installation renewal and revocation remain account/security scoped +PASS Writer navigation destination Home preserves authorised book and saved working focus +PASS Writer navigation destination Home never carries a focus into another book +PASS Writer navigation destination Home refuses unavailable book +PASS Writer navigation destination Write preserves authorised book and saved working focus +PASS Writer navigation destination Write never carries a focus into another book +PASS Writer navigation destination Write refuses unavailable book +PASS Writer navigation destination Explore preserves authorised book and saved working focus +PASS Writer navigation destination Explore never carries a focus into another book +PASS Writer navigation destination Explore refuses unavailable book +PASS Writer navigation destination Plan preserves authorised book and saved working focus +PASS Writer navigation destination Plan never carries a focus into another book +PASS Writer navigation destination Plan refuses unavailable book +PASS Writer navigation destination Review preserves authorised book and saved working focus +PASS Writer navigation destination Review never carries a focus into another book +PASS Writer navigation destination Review refuses unavailable book +PASS Writer navigation destination Reflect preserves authorised book and saved working focus +PASS Writer navigation destination Reflect never carries a focus into another book +PASS Writer navigation destination Reflect refuses unavailable book +PASS Writer navigation destination Dashboard preserves authorised book and saved working focus +PASS Writer navigation destination Dashboard never carries a focus into another book +PASS Writer navigation destination Dashboard refuses unavailable book +PASS Writer navigation legacy query routes still reach their actual workspaces/calendar +PASS Writer navigation old objective setup URL reaches Write +PASS Writer navigation full legacy desk, Journey and Workspaces remain rendered, not retired +PASS Writer navigation book-only new route checks access before metadata +PASS Writer navigation book switching retains Write without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Write +PASS Writer navigation book switching retains Explore without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Explore +PASS Writer navigation book switching retains Plan without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Plan +PASS Writer navigation book switching retains Review without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Review +PASS Writer navigation book switching retains Reflect without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Reflect +PASS Writer navigation case-insensitive bookmarked routes retain destination context +PASS Writer navigation book menu never navigates to a mutation action +PASS Writer navigation new author Home has no fabricated book selection +PASS Writer navigation exploration does not require scenes, plans, project or Word +PASS Writer navigation real read paths exercised without calling author-data writes +PASS Writer 3 destination navigation and scope +PASS Writer foundation reference, Reader, session and verified Word selections never overwrite working focus +PASS Writer foundation cross-book selections require a separate authorised context +PASS Writer foundation a scene cannot be projected without its chapter +PASS Writer foundation incomplete native identity cannot be projected as verified +PASS Writer foundation selected book reaches every queue repository before any result limit +PASS Writer foundation inaccessible project never reaches a queue repository +PASS Writer foundation unresolved route scene never becomes a pinned authorised selection +PASS Writer foundation Preview chooses within the selected book and preserves All Books plans +PASS Writer foundation explicit out-of-scope plan cannot silently select another book +PASS Writer foundation new book may still use its project-wide plan +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation context, queue scope and planning +PASS Writer dashboard book selection filters queues and tasks consistently +PASS Writer dashboard book scope reaches schedule service before selection and active workspace persists +PASS Writer dashboard unknown book cannot fall back to another book +PASS Writer dashboard plan setup retains selected book instead of All Books +PASS Writer dashboard plan setup refuses conflicting project and book +PASS Writer dashboard book-only deep link checks access before metadata +PASS Writer dashboard legacy Write redirect preserves book scope +PASS Writer dashboard Writer contextual commands target implemented workspaces and evidence +PASS Writer dashboard book scope +PASS writing activity baseline excludes pre-existing words +PASS writing activity zero-net replacement retains both sides +PASS writing activity moving stable paragraphs has no word growth +PASS writing activity whitespace-only change has no word growth +PASS writing activity deletion preserves old paragraph scope +PASS writing activity paragraph split does not invent growth +PASS writing activity gross and net reconcile +PASS writing activity large replacement explicitly qualifies token balance +PASS Writing activity measurement +PASS Writer intelligence consecutive playing observations produce actual bounded playback coverage +PASS Writer intelligence replaying ten seconds adds playback but does not duplicate unique coverage +PASS Writer intelligence duplicate sequence never creates more playback time +PASS Writer intelligence seek jump is not listening coverage +PASS Writer intelligence interrupted telemetry does not invent activity across a gap +PASS Writer intelligence an explicit seek never bridges playback coverage even when positions look continuous +PASS Writer intelligence paused state does not manufacture playback intervals +PASS Writer intelligence different media source does not contribute to current coverage +PASS Writer intelligence command expiry is explicitly UTC across browser and Windows time zones +PASS Writer intelligence nonfinite media position is refused +PASS Writer intelligence activities share daily capacity and split across dates without exceeding availability +PASS Writer intelligence insufficient capacity explains failure before persistence +PASS Writer intelligence known lengths produce distinct adjustable budgets rather than equal chapter effort +PASS Writer intelligence empty context produces no invented manuscript observations +PASS Writer intelligence zero-net revision and actual chapter evidence supply bounded actionable suggestions +PASS Writer intelligence recommendations do not diagnose writer block from observations +PASS Writer intelligence and measured review +PASS Manuscript Reader: scoped read-only retrieval, ordering, navigation, empty snapshot, accepted updates, pending isolation and accurate timestamps +PASS Manuscript Reader +PASS Opted-in import capture retains raw paragraph text and opaque occurrence identity +PASS Opaque occurrence IDs, including separate identical dialogue +PASS Saved snapshot and process reconstruction retain occurrence identities +PASS Reliable paragraph move updates derived event scene without copying event +PASS Copied paragraph has a distinct identity and no duplicated story event +PASS Rewritten evidence retains original passage and withholds unconfirmed derived facts +PASS Author confirmation verifies changed evidence +PASS Deleting evidence preserves the event and before text +PASS Scene split preserves every raw Word character +PASS Undo restores grouping and opaque scene identity +PASS Boundary moves between adjacent paragraphs +PASS Adjacent merge retains text and retires, rather than destroys, scene identity +PASS Merge undo restores original scene and prior boundary +PASS Author can explicitly confirm a proposed scene grouping without editing Word prose +PASS Grouping confirmation can be undone without discarding the Word snapshot +PASS Previously excluded import sections remain captured without silently importing their prose on sync +PASS An unresolvable excluded-section boundary refuses mutation instead of guessing where that book's prose starts +PASS Identical short dialogue remains associated with its individual native occurrence +PASS Delta sends only changed prose and retains occurrence order +PASS Lost native hints can reconcile a single rewrite between recognised neighbours without matching a moved/copy candidate +PASS Paragraph split retains only the surviving occurrence identity +PASS Word XML hint is restricted to main document part and forbids external entities +PASS Provider schema is bounded by the actual 97 submitted paragraphs, never the raw source count 99 +PASS Legacy request serialization omits new contract field, preserving checkpoint hashes +PASS Versioned integer confidence validation preserves legacy decimals and rejects new fractional scores +PASS 250,000+ word value snapshot reconciliation (374ms; no Word COM performance claim) +PASS Derived evidence display state cannot change legacy backup hashes or accepted event payloads +PASS Missing primary evidence is excluded from verified story facts while unanchored scene events remain compatible +28 paragraph manuscript assertions passed. +PASS Adoption uses only the completed capture's canonical scene map and retains excluded prose outside the imported book +PASS Reconnection cannot silently restore an excluded chapter into canonical scenes +PASS An unfinished import pauses snapshots without changing its accepted source or checkpoints +PASS Explicitly opted-in save/reconnect uses existing exact-session capture channel +PASS Authorised snapshot persists exact new prose and reconciles opaque paragraph identity +PASS Lost acknowledgement retry cannot apply the snapshot twice +PASS Acknowledgement returns canonical occurrence ID for delta recovery +PASS Cancellation retires only pending snapshot and retains already accepted revision +PASS Another account cannot request manuscript synchronisation +PASS Turning off automatic synchronisation changes only preferences even while imports or scene conflicts pause snapshots +PASS A new chapter repair is not hidden behind an older completed full snapshot receipt +PASS Paragraph manuscript identity, evidence and exact-session synchronisation +PASS Native wizard capture is scoped, durable and independent of Word +PASS Native tray presence and PWA review remain scoped, expiring and non-destructive +PASS Native saved workspace and established import eligibility remain scoped and read-only +PASS Native companion authentication, canonical AI mapping and isolated chapter retry +PASS Solver never discards a corroborated concern or exhausts navigation before verification +PASS Solver result evidence covers all reachable diagnoses without changing Stage 1 semantics +PASS Solver result copy follows actual answers, intention, variants and revision +PASS Solver workspace CTAs resolve authorised project/character context and real routes +PASS Stage 1 preserves all 60 strict conversations, corroboration, intent, reachability and adoption +PASS Stage 1 evidence gates, required follow-ups, bounded multi-select and neutral choices are enforced +PASS Neutral endpoints require explicit valid terminal declarations +PASS Neutral reassurance follows selected concerns without evidence and survives revision +PASS Scene navigation does not invent purpose evidence; genuine D05 witnesses survive +PASS D50 requires actual series evidence and preserves D50/D51 witnesses +PASS Curated V2 preserves 60 literal paths and enforces eight explicit Development review exceptions +PASS Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour +PASS Curated V2 passes normal validation and invalid publication stays guarded +PASS Payoff covers all 52 diagnoses with seven archetypes and semantic uncertainty ordering without graph changes +PASS Development review observes every acceptance prefix without changing signals, results or graph; access and durable capture stay isolated +PASS All permanent writing problems have distinct editorial content, intent, metadata, links and real images +PASS Clean solver completion preserves private evidence and permanent indexable URLs +PASS Writing Solver anonymous state is protected, expires and rejects stale versions +PASS Writing Solver scoring, multi-select, revision, fallback and graph routes +PASS Writing Solver import rejects invalid graphs and editorial identities +PASS Book recovery read-only exports and receipt retries remain accessible +PASS Book recovery validates integrity, selection and author-bound upload generations +PASS Project export and restore access gates enforce author and ownership boundaries +PASS Retired checklist bookmarks redirect without report access +PASS Ribbon operation identity and semantic icons stay consistent +PASS Maps Story projects canonical hierarchy, sequence, journeys and evidence without changing geography +Maps Story scale: 500 scenes, 30 characters, 5,000 appearances in 19ms. +PASS Maps Story scales to 500 scenes and 5,000 appearances +PASS Maps Story enforces access and uses bounded repository batches +PASS Maps appearance validates colours, normalized raster images and portable backups +PASS Maps reference assets enforce access +PASS Maps validate rough geometry, relationships, Location intent and access boundaries +PASS Subscription entitlement evaluates trials, paid access, overrides and real plan limits +PASS Subscription overrides control access and dashboard presentation without trial contradictions +PASS Subscription enforcement is concurrent, audited and admin-authorised +PASS Plot Health stays scene-based with 12,000 contributions +PASS Plot Health preserves Discovery planning and boundary contradictions +PASS Plot Health separates stored status and meaningful-progress clocks +PASS Plot Health explains question, payoff, closure and boundary evidence +PASS Plot Health evaluates explicit targets and scoped line rollups +PASS Plot Health respects scenario coverage and ordered chapter identities +PASS Plot Lines Focus and Weave preserve gaps and shared-scene identity +PASS Plot Lines thread, enrichment and Timeline inspector contracts hold +PASS Plot Lines composition remains bounded with a large generated weave +PASS Exception review uses evidence, identity, consequence and directional conflicts +PASS Exception assessment preserves author decisions and scene history +PASS Character card widths reflect displayed text without changing character data +PASS Relationships workspace large cast, temporal states and canonical edits +PASS Scene relationship proposals preserve direction and validate acceptance +PASS Location and asset merges require confirmation and distinct records +PASS Location persisted analysis preserves contextual bedrooms and setting provenance +PASS Location consequence outranks capped recurrence +PASS Location scene significance is attributed only to actual settings +PASS Location significance preserves hierarchy and independent uncertainty +PASS Character profile age uses canonical reference chronology +PASS Character detail and date-only save retain canonical DOB +PASS Story Point presence, previous appearances and age cross book boundaries +PASS Story Point knowledge stops at selected narrative position +PASS Story Point relationships and independent asset state are historical +PASS Story Point threads and continuity warnings respect future evidence +PASS Story Point ownership, AJAX and bounded batch loading require no AI +PASS Story Point narrative tie breakers match canonical order +PASS Malformed confidence 0. is repaired to 0.0 +PASS Markdown fences are stripped +PASS Unescaped backslash in evidence is repaired +PASS Truncated JSON is rejected +PASS Repaired JSON deserialises into SceneIntelligenceScene +PASS Chapter Structure confidence 0. repairs and deserialises +PASS Chapter Structure confidence 0. 8 repairs and deserialises +PASS Chapter Structure confidence 7 .5 repairs when unambiguous +PASS JSON repair leaves decimal-looking prose unchanged +PASS Chapter Structure semantic validation still rejects out-of-range repaired confidence +PASS Structural scene detection parser failure uses friendly diagnostics and retry +PASS Chapter Structure boundary normaliser repairs gaps and overlaps +PASS Chapter Structure boundary normaliser preserves valid coverage +PASS Chapter Structure boundary normaliser handles terminal ghost paragraph +PASS Chapter Structure boundary normaliser discards multiple terminal ghost paragraphs +PASS Chapter Structure boundary normaliser replays full book terminal empty failure +PASS Chapter Structure boundary normaliser keeps meaningful end overflow repair +PASS Chapter Structure boundary normaliser preserves genuine inverted ranges for validation +PASS Structural Word mapping uses paragraph map as authoritative text +PASS Structural Word mapping includes filtered Word paragraphs in source coverage +PASS Structural Word mapping fails precisely when map metadata is incomplete +PASS Structural Word mapping keeps trailing empty normalisation mapped +PASS Shared parser reports raw chapter output on unrecoverable JSON +PASS Character filtering rejects generic groups +PASS Character filtering preserves titled names +PASS Location filtering rejects merged phrases +PASS Location filtering preserves story locations +PASS Location canonical keys merge trivial variants +PASS Location contextual names use POV and structural setting +PASS Location canonical keys merge punctuation and safe plurals +PASS Location candidate consolidation handles generic review variants +PASS Location candidate identity is parent-aware for generic sub-locations +PASS Locations page uses hierarchical sort order +PASS Location review UX supports large candidate sets +PASS Story Intelligence auto resolves exact known locations before review +PASS Story Intelligence location review uses single identity decision +PASS Asset filtering rejects generic objects +PASS Asset filtering preserves story assets +PASS Asset canonical keys merge trivial variants +PASS Asset canonical keys merge contextual vehicle variants +PASS Asset canonical keys keep unrelated owned cars distinct +PASS Asset candidate keys attach unique unowned variants +PASS Asset filtering rejects relationship facts +PASS Asset contextual names resolve POV ownership +PASS Asset structural phrases trim neighbouring nouns +PASS Asset significance is generic and not fixture-specific +PASS Story Intelligence asset review applies current identity rules +PASS Relationship review requires pair evidence and distinguishes social types +PASS Relationship signals map to broad lookup types +PASS Relationship signals infer friendship without romance +PASS Relationship events preserve chronological story order +PASS Relationship progression keeps chronological state +PASS Relationship observations do not create event spam +PASS Relationship review orders by first story appearance +PASS Relationship evidence priority preserves explicit semantics +PASS Relationship evidence handles retained hostile and incidental examples +PASS Knowledge signals map to existing knowledge states +PASS Knowledge recipient resolves narrator through POV +PASS Knowledge identity reveal preserves subjective timing +PASS Knowledge duplicate statements share canonical keys +PASS Knowledge suspicion and certainty remain distinct +PASS Illustration prompt builder separates spec and prompt +PASS Illustration prompt builder uses realistic image direction +PASS Illustration specification validation catches missing typed fields +PASS Illustration category validation rejects unknown values +PASS Illustration status transitions protect approval flow +PASS Illustration status transitions support archive flow +PASS Illustration metadata flags fallback location labels +PASS Illustration location matching rejects vehicle living room reuse +PASS Illustration automatic generation policy blocks vague fallbacks +PASS Story Memory import image generation defaults are safe +PASS Illustration storage codes are normalised safely +PASS Illustration starter batch has required category counts +PASS Illustration starter generation plan skips successful items +PASS Story Intelligence visualisation archive is preserved +PASS Story Intelligence visualisation runtime is removed +PASS Story Intelligence does not retry exhausted billing quota +PASS Illustration bulk retry result reports counts +PASS Illustration bulk retry skips blocking duplicate stable codes +PASS Illustration provider reports missing image model +PASS Illustration provider omits GPT image response format +PASS Illustration matching rejects adult masculine unknown art for Beth +PASS Illustration matching treats Mrs title as hard feminine evidence +PASS Illustration matching infers mother and aunt as mature feminine +PASS Illustration matching rejects duplicate named portrait allocation +PASS Illustration semantic types prevent bathroom office and ambulance car mismatches +PASS Illustration demand archetypes stay broad and use active template +PASS Story Intelligence evidence extraction prevents observed attribute leakage +PASS Story Intelligence scene call uses strict structured output +PASS Story Intelligence scene schema constrains confidence numbers +PASS Story Intelligence scene schema constrains evidence strings +PASS Story Intelligence temporal resolves chapter anchor and afternoon +PASS Story Intelligence temporal rolls over after midnight +PASS Story Intelligence temporal resolves following morning +PASS Story Intelligence temporal resolves exact day offsets +PASS Story Intelligence temporal resolves following weekday +PASS Story Intelligence temporal resolves evening clock time +PASS Story Intelligence temporal rejects unanchored clock time +PASS Story Intelligence temporal preserves yearless calendar date clues +PASS Story Intelligence temporal resolves yearless calendar dates from context +PASS Story Intelligence temporal inherits previous morning when extraction is empty +PASS Story Intelligence temporal inherits previous evening when extraction is empty +PASS Story Intelligence temporal inherits previous night when extraction is empty +PASS Story Intelligence temporal inherits after midnight advancement +PASS Story Intelligence temporal inherits chapter anchor when extraction is empty +PASS Story Intelligence temporal stays unknown without context or extraction +PASS Story Intelligence temporal explicit date overrides previous context +PASS Story Intelligence temporal preserves vague few days +PASS Core import applies structural chronology to canonical scenes +PASS Story Intelligence temporal importer preserves manual chronology +PASS Story Intelligence temporal materialisation saves canonical chronology +PASS Story Intelligence temporal malformed values are discarded +PASS Story Calendar useful months and sparse navigation +PASS Story Calendar places dated scenes on Monday-first month grid +PASS Story Calendar separates unplaced scenes without guessing +PASS Story Calendar book filter and all books scope work +PASS Story Calendar month navigation uses story dates across years +PASS Story Calendar month dropdown follows displayed month +PASS Story Calendar handles no dated scenes +PASS Story Calendar day details endpoint returns partial +PASS Story Calendar day details endpoint respects book filter +PASS Story Calendar day details endpoint handles empty story date +PASS Story Calendar day details endpoint rejects invalid project +PASS Story Calendar index returns surface partial for AJAX +PASS Story Calendar day selection uses progressive AJAX hooks +PASS Story Intelligence structured metric values validate and import +PASS Story Intelligence structured schema covers complete response model +PASS Story Intelligence structured schema remains fixture agnostic +PASS Illustration assignment repair enforces explicit evidence groups and strict subtypes +PASS Lean import removes replay links while retaining progress +PASS Story Intelligence progress does not prematurely report safe close +PASS Structural import creates scenes before Word sync +PASS Structural import creates first scene without placeholder +PASS Structural import persists paragraph mapping and source text +PASS Structural import persists canonical scene source text +PASS Structural import adds summaries without extra scene AI calls +PASS Core import scan stage defers scenes and characters +PASS Core import basic location detector is conservative +PASS Core import basic location detector consolidates and skips existing matches +PASS Core import basic location detector supports pending parent candidates +PASS Core import character discovery protects accepted locations +PASS Core import gates characters behind basic location review +PASS Core import hides exact existing character names from review +PASS Core import hides exact existing character aliases from review +PASS Core import keeps suspected unknown aliases in review +PASS Core import keeps ambiguous existing character matches in review +PASS Core import keeps new characters in review +PASS Core import auto resolved character evidence is preserved +PASS Core import character evidence is candidate specific +PASS Core import deterministically maps known characters +PASS Core import wizard orders scenes before characters +PASS Core import remaps characters after review +PASS Scan review separates known matches from unresolved names +PASS Story Intelligence uses persisted scene source after restart +PASS Story Intelligence canonical mode bypasses duplicate boundary analysis +PASS Story Intelligence progress uses canonical scene summaries +PASS Story Intelligence downstream imports prefer canonical SceneIDs +PASS Story Intelligence scene prompt no longer asks for duplicate factual summary +PASS Story Intelligence review uses canonical structural summaries and counts +PASS Story Intelligence review centre completion is category scoped +PASS Word sync requires save acknowledgement +PASS Word sync retry resumes existing structure +PASS Story Intelligence enriches existing structural scenes +PASS Core import scene titles ride existing structural AI call +PASS Core import scene title preference is review scoped +PASS Core import scene title preference moved to Detect Scenes +PASS Core import Review Chapters is compact and chapter only +PASS Core import Detect Scenes is compact and owns title option +PASS Book context is canonical import metadata +PASS Names defaults from selected book context +PASS Story Intelligence starts from core import complete +PASS Generated scene titles persist with provenance +PASS Scene title display keeps scene numbers visible +PASS Manuscript text statistics handles pure prose +PASS Manuscript text statistics handles pure dialogue +PASS Manuscript text statistics splits narrative before dialogue +PASS Manuscript text statistics splits dialogue before narrative +PASS Manuscript text statistics handles multiple dialogue passages +PASS Manuscript text statistics supports smart quotes +PASS Manuscript text statistics supports straight quotes +PASS Manuscript text statistics carries multi-paragraph dialogue +PASS Manuscript text statistics returns to prose after continued dialogue +PASS Manuscript text statistics ignores empty paragraphs +PASS Manuscript text statistics reconciles scene totals +PASS Manuscript text statistics aggregates chapter scenes +PASS Manuscript text statistics recalculates existing scene sources +PASS Manuscript text statistics does not invoke AI +PASS Phase 21T repairs durable character understanding +PASS Phase 21U extracts mandatory character appearance fixtures +PASS Character sex hints are conservative and reviewable +PASS Character discovery does not truncate scan review candidates +PASS Character discovery rejects sentence-start words +PASS Character discovery rejects fragments and location names +PASS Manuscript scan preview keeps only auto-selected character candidates +PASS Word Companion scan completion uses chunked transport +PASS Word Companion scan chunks assemble full novel payloads +PASS Word Companion scan chunks reject partial and conflicting payloads +PASS Onboarding wizard keeps character pages inside one main step +PASS Scan review aliases feed Story Intelligence known character context +PASS Name Intelligence package contract is present +PASS Name Intelligence reference data is copied on publish +PASS Name Intelligence repository uses stored procedures +PASS Name Intelligence review warning is wired +PASS Name Intelligence library defaults to all locales +PASS Story Intelligence new-format context uses canonical characters +PASS Story Intelligence character defaults link proposed existing matches +PASS Story Intelligence character defaults ignore generic references +PASS Story Intelligence character defaults keep descriptive identities +PASS Story Intelligence character review uses single identity decision +PASS Story Intelligence auto resolves exact known identities before review +PASS Story Intelligence character matching keeps ambiguous known names visible +PASS Story Intelligence descriptive references consolidate articles +PASS Story Intelligence review omits character metrics dashboard +PASS Story Intelligence resumed chapters use canonical labels +PASS Story Intelligence character review posts selected existing match +PASS Story Intelligence character default changes preserve persisted results +PASS Structural POV rides existing chapter analysis +PASS Structural POV persists through import resolution +PASS Chapter POV derives from canonical scenes +PASS Permanent Analyse My Book starts from saved book +PASS Story Intelligence canonical context carries provenance +PASS Scene prompt protects canonical scene context +PASS Structural setting rides existing chapter analysis +PASS Explicit narrator labels detect deterministic POV +PASS AI POV JSON parses into structural models +PASS Post character review resolves persisted structural POV +PASS Normal scene and chapter saves persist POV +PASS Character merge is a reusable stored procedure workflow +PASS Story Intelligence character review suppresses resolved narrator POV +PASS Story Intelligence character review reuses structured appearance aliases +PASS Entity preferred names are peer aliases +PASS Story Intelligence review evidence includes chapter scene labels +PASS Story Intelligence import enables project metric defaults before save +PASS Project metrics add defaults backfills scene values +PASS Story Intelligence scene prompt uses configured metrics +PASS Story Intelligence scene prompt uses scene characters terminology +PASS Story Intelligence downstream imports support canonical scene results +PASS Story Intelligence runner supplies metrics and Plot Lines +PASS Story Intelligence metric persistence uses configured keys +PASS Story Intelligence stabilisation gate materialises strict and legacy metrics +PASS Story Intelligence modern materialisation owns finalisation boundary +PASS Story Intelligence narrative materialisation reads strict scene results +PASS Story Intelligence stabilisation routes normal users to book +PASS Story Intelligence narrative candidates require review +PASS Story Intelligence discovers Plot Lines without preconfiguration +PASS Story Intelligence matches existing Plot Lines without duplicates +PASS Narrative research prototype fixture builds hierarchy +PASS Narrative sibling hotel fixture generalises hierarchy +PASS Narrative trivial one-scene question is suppressed +PASS Narrative short significant thread survives +PASS Narrative semantic evolution consolidates by continuity +PASS Narrative existing thread matching is supported +PASS Narrative candidate merge and parent fields are persisted +PASS Narrative prompt uses one scene call with compact schema +PASS Narrative production code remains fixture agnostic +PASS Whole-book Plot Intelligence prompt carries full manuscript context +PASS Whole-book Plot Intelligence schema requires timeline event types +PASS Whole-book Plot Intelligence author seed inputs persist safely +PASS Whole-book Plot Intelligence structured author seed match survives +PASS Whole-book Plot Intelligence unmatched seeds become review candidates +PASS Whole-book Plot Intelligence uses dedicated output token headroom +PASS Story Intelligence narrative review displays author seed provenance +PASS Story Intelligence narrative review avoids raw author-facing IDs +PASS Story Intelligence author seed decisions are preserved +PASS Whole-book Plot Intelligence production code remains fixture agnostic +PASS Story Intelligence narrative review creates canonical records via existing procs +PASS Story Intelligence narrative stage follows knowledge +PASS Word Companion replays live current scene to writing panes +PASS Scan review post supports full-book form submissions +PASS StoryPosition rejects incomplete or invalid runtime scene positions +PASS StoryPosition builds canonical runtime scene navigation +PASS StoryPosition derives canonical scene context identity +PASS Writing Context route uses canonical story context service +PASS Writing Context client follows canonical story position events +PASS Writing Context preserves selected tab and avoids event loops +PASS Writing Intent route uses canonical story context and planning data +PASS Writing Intent client uses shared writing follow helper +PASS Obsolete global Word navigation is removed while writing windows remain live +PASS Appearance preferences and ribbon destinations +PASS Toolbar preferences, authorisation and contextual routes +PASS Application navigation resolves authorised project and book context +PASS Writing pair shares canonical follow infrastructure +PASS Read-only scene hydration preserves author intent without editing, analysis or manuscript recomputation +PASS Read-only scene hydration rejects another user's project before loading workspace data +PASS Verified native projection leaves working focus independent +PASS Native launch opens its exact verified scene rather than the book's first scene +PASS Native Intent retrieves the selected scene's existing purpose and chapter objectives +PASS Opening Context and Intent preserves all author-entered decisions verbatim +PASS Unsaved native mapping waits without loading an unrelated saved scene +PASS A stale database checkpoint cannot launch a scene merely claimed by the last heartbeat +PASS Chapter-capable sessions without accepted position evidence cannot launch claimed scene IDs +PASS A verified chapter with no mapped scene can show its own saved chapter intent +PASS A Word cursor/revision change during server loading cannot render the earlier cursor as current +PASS Native partial requests reject mappings that change during data loading +PASS Native Context launch authorises the book before resolving or displaying its scene +PASS Exact document selection cannot fall back to another connected Word instance +PASS Incomplete native session identity is rejected +PASS Repeated writing reads share request-scoped scene and chronological projection tasks +PASS Context retains earlier verified viewpoint knowledge and excludes future transitions +PASS Another character's future secret is not exposed as current knowledge +PASS Relationship reference stops at the current narrative position +PASS Context rejects mismatched project and book scopes +PASS Existing Timeline and inspector callers retain their full editing model path +PASS Intent retrieves saved decisions without computing narrative histories +PASS A future narrative scene cannot leak into timeline context even when its story date is earlier +PASS Initial thread context ranks current relevant unresolved threads rather than dumping every novel thread +PASS Missing viewpoint does not invent a knowledge perspective +PASS Scene navigation follows manuscript order rather than numeric IDs or other books +PASS Large-manuscript navigation is one bounded in-memory projection with no per-scene database queries +MEASURE writing navigation projection: 48 chapters/4800 scenes, 2.6ms, no SQL or Word. +PASS Writing Context and Intent resolve native sessions, preserve decisions and reuse bounded chronological data +PASS Writing Context Plot Lines preserves canonical associations, developments and book access +PASS Writing workspace presence scopes browser windows +PASS Writing workspace client uses session window identity and stable names +PASS Writing workspace launcher uses progressive screen placement +PASS Writing workspace pages register roles without changing follow behavior +PASS Word marker client acknowledgements require authenticated ownership +PASS Word Companion exposes writing workspace launch actions +PASS Word Companion writing screens receive resolved context identifiers +PASS Word Companion canonical markers drive runtime follow +PASS Word Companion runtime follows multiple imported scene anchors +PASS Word Companion existing project book linking remains available +PASS Word Companion document identity survives reconnect +PASS Word Companion multiscreen launch and follow remain reachable +PASS Word Companion modes remain distinct +PASS Writing pages do not require Story Intelligence +PASS Word Companion host script has valid tab mapping +PASS Writing screens show diagnostic empty states +PASS Word Companion three-screen flow logs connection identifiers +PASS Admin Story Intelligence reset returns to diagnostics with messages +PASS Project hard delete clears Story Intelligence dependencies in transaction +PASS Permanent project delete keeps archive and name safety gates +PASS Word manuscript cleanup classifies PlotDirector markers by tag only +PASS Word manuscript cleanup preserves content controls content +PASS Word manuscript cleanup UI separates unlink from clean unlink +PASS Word manuscript unlink keeps Story Intelligence data untouched +PASS Word manuscript cleanup remains relinkable and idempotent +PASS Story Intelligence Review Centre route replaces linear review resume +PASS Story Intelligence obsolete create scene workflow is removed +PASS Story Intelligence Review Centre counts only needs-attention categories +PASS Story Intelligence Review Centre uses independent tile grid +PASS Story Intelligence Review Centre opens with character gate +PASS Story Intelligence review modules are independent after character gate +PASS Story Intelligence review module completion is durable and independent +PASS Story Intelligence review module pages omit wizard chrome +PASS Story Intelligence downstream review uses completed scene analysis +PASS Story Intelligence review posts do not use success interstitials +PASS Story Intelligence legacy review completion routes are deleted +PASS Story Intelligence review forms share busy submit guard +PASS Story Intelligence heavy review modules offer bounded rendering +PASS Story Intelligence Review Centre adds no AI calls +PASS Story Intelligence Review Centre uses bounded summary query +PASS Story Intelligence character review queues enrichment beside plot synthesis +PASS Story Intelligence character enrichment uses persisted SignalR progress +PASS Story Intelligence character enrichment preserves author fields +PASS Story Intelligence character enrichment batches by prompt size +PASS Story Intelligence character enrichment promotes structured facts +PASS Character detail can queue single-character enrichment +PASS Single-character enrichment is persisted and duplicate safe +PASS Character detail enrichment status uses scoped SignalR +PASS Story Intelligence detailed review GETs use selected module paths +PASS Story Intelligence completed Character review remains inspectable +PASS Story Intelligence Review Centre completed modules use canonical destinations +PASS Story Intelligence detailed reviews read persisted candidate pages +PASS Story Intelligence module completion lifecycle uses persisted candidates +PASS Story Intelligence Job 6 uses bounded concurrent chapter execution +PASS Story Intelligence global progress uses whole run scene totals +PASS Story Intelligence recovered provider failures stay operational +PASS Story Intelligence recovered JSON repair stays operational +PASS Story Intelligence terminal failures remain user visible +PASS Story Intelligence global banner remains visible through finalising gaps +PASS Story Intelligence global banner rejects stale live snapshots +PASS Story Intelligence live global progress publishes authoritative scene aggregates +PASS Story Intelligence global progress survives initial SignalR start races +PASS Story Intelligence scene analysis completion barrier releases review +PASS Story Intelligence active progress only appears in global strip +PASS Story Intelligence book actions do not open review centre while running diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-after.jsonl b/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-after.jsonl new file mode 100644 index 00000000..87c7bb1a --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-after.jsonl @@ -0,0 +1 @@ +{"Books":"AF0CE3776A74E795407A84E182431791BD4225C3DED5B46FC17E2AD307DDE623","Chapters":"9BE42AFAA44419C7491B61A4DF4C48D64CA10308D15DF39CEC097571E4ABB775","Scenes":"0AB738E0405382ECA9A36B39B2289EB1089B342FCE945F0882073B918B277F7F","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"92612B1243FB9B8B310B47C8FC844F0DEE3264600D81D22A91200211C2F50F7F","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-before.jsonl new file mode 100644 index 00000000..87c7bb1a --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2A/snapshot-before.jsonl @@ -0,0 +1 @@ +{"Books":"AF0CE3776A74E795407A84E182431791BD4225C3DED5B46FC17E2AD307DDE623","Chapters":"9BE42AFAA44419C7491B61A4DF4C48D64CA10308D15DF39CEC097571E4ABB775","Scenes":"0AB738E0405382ECA9A36B39B2289EB1089B342FCE945F0882073B918B277F7F","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"92612B1243FB9B8B310B47C8FC844F0DEE3264600D81D22A91200211C2F50F7F","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Explore-narrow.png b/Docs/Writer/Writer3/Evidence/Phase2B/Explore-narrow.png new file mode 100644 index 00000000..e3a02e86 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Explore-narrow.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Explore.png b/Docs/Writer/Writer3/Evidence/Phase2B/Explore.png new file mode 100644 index 00000000..1aeceead Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Explore.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Home-Development.png b/Docs/Writer/Writer3/Evidence/Phase2B/Home-Development.png new file mode 100644 index 00000000..839e8662 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Home-Development.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Plan.png b/Docs/Writer/Writer3/Evidence/Phase2B/Plan.png new file mode 100644 index 00000000..924bd282 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Plan.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Reflect.png b/Docs/Writer/Writer3/Evidence/Phase2B/Reflect.png new file mode 100644 index 00000000..de3d8c27 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Reflect.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Review.png b/Docs/Writer/Writer3/Evidence/Phase2B/Review.png new file mode 100644 index 00000000..e5941594 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Review.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/Write.png b/Docs/Writer/Writer3/Evidence/Phase2B/Write.png new file mode 100644 index 00000000..dec2c604 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2B/Write.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/activity-prestop.jsonl b/Docs/Writer/Writer3/Evidence/Phase2B/activity-prestop.jsonl new file mode 100644 index 00000000..678aa2c5 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/activity-prestop.jsonl @@ -0,0 +1,4 @@ +{"Area":"PlotSynthesis","Status":"Completed","Records":1} +{"Area":"Pipelines","Status":"Complete","Records":1} +{"Area":"CoreImports","Status":"Complete","MarkerStatus":"NotRequested","Records":1} +{"Area":"CharacterEnrichment","Status":"Completed","Records":1} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/build.log b/Docs/Writer/Writer3/Evidence/Phase2B/build.log new file mode 100644 index 00000000..b4338f9e --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/build.log @@ -0,0 +1,16 @@ + Determining projects to restore... + All projects are up-to-date for restore. + PlotDirector.Companion.Protocol -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Protocol/bin/Debug/netstandard2.0/PlotDirector.Companion.Protocol.dll + PlotDirector.Companion.Client -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Client/bin/Debug/netstandard2.0/PlotDirector.Companion.Client.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0-windows10.0.19041.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Tests -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Tests/bin/Debug/net10.0/PlotDirector.Companion.Tests.dll + PlotLine -> /srv/repos/PlotDirector/PlotLine/bin/Debug/net10.0/PlotLine.dll + WritingSolver -> /srv/repos/PlotDirector/Tools/WritingSolver/bin/Debug/net10.0/WritingSolver.dll + PlotLine.Tests -> /srv/repos/PlotDirector/PlotLine.Tests/bin/Debug/net10.0/PlotLine.Tests.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:40.80 diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/cleanup.log b/Docs/Writer/Writer3/Evidence/Phase2B/cleanup.log new file mode 100644 index 00000000..f4b0a841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/cleanup.log @@ -0,0 +1,2 @@ +{"":true} +{"RemainingSyntheticAccounts":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/deployment-verification.log b/Docs/Writer/Writer3/Evidence/Phase2B/deployment-verification.log new file mode 100644 index 00000000..968495aa --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/deployment-verification.log @@ -0,0 +1,7 @@ +active +Local GET 200 +TLS Development GET 200 +53cd9b9c1e15f273bc9978fca535c0a355bc7e5fca528c8515d9cb08a2565e59 /home/nick/writer3-publish-10bf9db-ji019g/PlotLine.dll +53cd9b9c1e15f273bc9978fca535c0a355bc7e5fca528c8515d9cb08a2565e59 /srv/apps/plotdirector-dev/current/PlotLine.dll +.1.0.0+10bf9db9061fdec340acf7ff0df96f3dfd299814 +-- No entries -- diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/flow-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/flow-browser.log new file mode 100644 index 00000000..fb6950dd --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/flow-browser.log @@ -0,0 +1 @@ +PASS viewport recovery from scrolled, short-window/high-text-scale document flow. diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/follow-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/follow-browser.log new file mode 100644 index 00000000..cdd47f37 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/follow-browser.log @@ -0,0 +1,3 @@ +PASS pending native response cancellation, unverified mapping refusal, exact-session query parameters and no recomputation for repeated unchanged scenes +PASS native/legacy race, cross-chapter cursor following, repeated presence without commands/focus, status failure recovery, in-flight invalidation, unchanged-scene fragment retry, trusted explicit navigation and acknowledgement without feedback; simulated Chromium protocol, not Word +PASS native source invariant: selection observation contains no ribbon invalidation or range selection (not runtime Word proof) diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/live-navigation.log b/Docs/Writer/Writer3/Evidence/Phase2B/live-navigation.log new file mode 100644 index 00000000..ff7ae6ea --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/live-navigation.log @@ -0,0 +1,8 @@ +{ + "checks": [ + "Browser: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted.", + "Simulated PWA: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted." + ], + "physicalWindows": false, + "installedPWA": false +} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/live-workspace.log b/Docs/Writer/Writer3/Evidence/Phase2B/live-workspace.log new file mode 100644 index 00000000..30957849 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/live-workspace.log @@ -0,0 +1 @@ +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Authenticated Development fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/navigation-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/navigation-browser.log new file mode 100644 index 00000000..d8157841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/navigation-browser.log @@ -0,0 +1 @@ +PASS Writer3: 168 destination/theme/width/browser/PWA combinations; Home actions, contextual ribbon, authorisation, book switching, reload/back/forward, keyboard focus, Help, legacy fragments and viewport fit. diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/preserved-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/preserved-browser.log new file mode 100644 index 00000000..036c9e47 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/preserved-browser.log @@ -0,0 +1,8 @@ +PASS Writer reference windows: initial failure/retry, window identity/reuse, pinned book, denied/unavailable display permissions, plan navigation, browser/PWA. +PASS native management diagnostics reuse real document leases and open direct workspaces without embedded documents +PASS native presence badge never infers connection from associations and clears stale links safely +PASS explicit Intent assessment, persisted-result load, cancellation, scene isolation and permission feedback +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: browser +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: simulated PWA +PASS Writer intelligence UI: four themes, two widths, browser/PWA; grounded Help Me, explicit audio start/end/note, disabled unsupported controls, month/year calendar and zero-net revision intensity +PASS Writer 2 overview: real Razor, 48 theme/viewport/history/PWA combinations, single navigation, book scope, honest empty states, chart links and contextual controls. diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/reader-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/reader-browser.log new file mode 100644 index 00000000..b66216c7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/reader-browser.log @@ -0,0 +1 @@ +PASS Manuscript Reader: real Razor/controller, escaped selectable text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus, 3 widths × 4 themes × browser/PWA diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/regressions.log b/Docs/Writer/Writer3/Evidence/Phase2B/regressions.log new file mode 100644 index 00000000..d05ffe28 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/regressions.log @@ -0,0 +1,587 @@ +PASS settlement Marker compatibility, nested geometry/style validation, stable route references and existing map/backup/import JSON contracts. +PASS Settlement boundaries preserve anchors, routes and backup/import contracts +PASS shared boundary server integrity, versions/refs/appearance, duplicate/orphan rejection and project import/export/restore contracts. +PASS Shared boundary topology preserves map and project contracts +PASS geography roots, hierarchy, provider-independent fake, cache identities, ambiguity, failures/backoff and rate reservation. +PASS Geographical roots, providers, queue outcomes and access +PASS Intent evidence preserves provenance and author control +PASS Release triage and browser-only onboarding preserve author decisions +PASS Approved native import source and confirmation remain safe +PASS Native installation renewal and revocation remain account/security scoped +PASS Writer navigation destination Home preserves authorised book and saved working focus +PASS Writer navigation destination Home never carries a focus into another book +PASS Writer navigation destination Home refuses unavailable book +PASS Writer navigation destination Write preserves authorised book and saved working focus +PASS Writer navigation destination Write never carries a focus into another book +PASS Writer navigation destination Write refuses unavailable book +PASS Writer navigation destination Explore preserves authorised book and saved working focus +PASS Writer navigation destination Explore never carries a focus into another book +PASS Writer navigation destination Explore refuses unavailable book +PASS Writer navigation destination Plan preserves authorised book and saved working focus +PASS Writer navigation destination Plan never carries a focus into another book +PASS Writer navigation destination Plan refuses unavailable book +PASS Writer navigation destination Review preserves authorised book and saved working focus +PASS Writer navigation destination Review never carries a focus into another book +PASS Writer navigation destination Review refuses unavailable book +PASS Writer navigation destination Reflect preserves authorised book and saved working focus +PASS Writer navigation destination Reflect never carries a focus into another book +PASS Writer navigation destination Reflect refuses unavailable book +PASS Writer navigation destination Dashboard preserves authorised book and saved working focus +PASS Writer navigation destination Dashboard never carries a focus into another book +PASS Writer navigation destination Dashboard refuses unavailable book +PASS Writer navigation legacy query routes still reach their actual workspaces/calendar +PASS Writer navigation old objective setup URL reaches Write +PASS Writer navigation full legacy desk, Journey and Workspaces remain rendered, not retired +PASS Writer navigation book-only new route checks access before metadata +PASS Writer navigation book switching retains Write without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Write +PASS Writer navigation book switching retains Explore without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Explore +PASS Writer navigation book switching retains Plan without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Plan +PASS Writer navigation book switching retains Review without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Review +PASS Writer navigation book switching retains Reflect without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Reflect +PASS Writer navigation case-insensitive bookmarked routes retain destination context +PASS Writer navigation book menu never navigates to a mutation action +PASS Writer navigation new author Home has no fabricated book selection +PASS Writer navigation exploration does not require scenes, plans, project or Word +PASS Writer navigation real read paths exercised without calling author-data writes +PASS Writer 3 destination navigation and scope +PASS Writer foundation reference, Reader, session and verified Word selections never overwrite working focus +PASS Writer foundation cross-book selections require a separate authorised context +PASS Writer foundation a scene cannot be projected without its chapter +PASS Writer foundation incomplete native identity cannot be projected as verified +PASS Writer foundation selected book reaches every queue repository before any result limit +PASS Writer foundation inaccessible project never reaches a queue repository +PASS Writer foundation unresolved route scene never becomes a pinned authorised selection +PASS Writer foundation Preview chooses within the selected book and preserves All Books plans +PASS Writer foundation explicit out-of-scope plan cannot silently select another book +PASS Writer foundation new book may still use its project-wide plan +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation context, queue scope and planning +PASS Writer dashboard book selection filters queues and tasks consistently +PASS Writer dashboard book scope reaches schedule service before selection and active workspace persists +PASS Writer dashboard unknown book cannot fall back to another book +PASS Writer dashboard plan setup retains selected book instead of All Books +PASS Writer dashboard plan setup refuses conflicting project and book +PASS Writer dashboard book-only deep link checks access before metadata +PASS Writer dashboard legacy Write redirect preserves book scope +PASS Writer dashboard Writer contextual commands target implemented workspaces and evidence +PASS Writer dashboard book scope +PASS writing activity baseline excludes pre-existing words +PASS writing activity zero-net replacement retains both sides +PASS writing activity moving stable paragraphs has no word growth +PASS writing activity whitespace-only change has no word growth +PASS writing activity deletion preserves old paragraph scope +PASS writing activity paragraph split does not invent growth +PASS writing activity gross and net reconcile +PASS writing activity large replacement explicitly qualifies token balance +PASS Writing activity measurement +PASS Writer intelligence consecutive playing observations produce actual bounded playback coverage +PASS Writer intelligence replaying ten seconds adds playback but does not duplicate unique coverage +PASS Writer intelligence duplicate sequence never creates more playback time +PASS Writer intelligence seek jump is not listening coverage +PASS Writer intelligence interrupted telemetry does not invent activity across a gap +PASS Writer intelligence an explicit seek never bridges playback coverage even when positions look continuous +PASS Writer intelligence paused state does not manufacture playback intervals +PASS Writer intelligence different media source does not contribute to current coverage +PASS Writer intelligence command expiry is explicitly UTC across browser and Windows time zones +PASS Writer intelligence nonfinite media position is refused +PASS Writer intelligence activities share daily capacity and split across dates without exceeding availability +PASS Writer intelligence insufficient capacity explains failure before persistence +PASS Writer intelligence known lengths produce distinct adjustable budgets rather than equal chapter effort +PASS Writer intelligence empty context produces no invented manuscript observations +PASS Writer intelligence zero-net revision and actual chapter evidence supply bounded actionable suggestions +PASS Writer intelligence recommendations do not diagnose writer block from observations +PASS Writer intelligence and measured review +PASS Manuscript Reader: scoped read-only retrieval, ordering, navigation, empty snapshot, accepted updates, pending isolation and accurate timestamps +PASS Manuscript Reader +PASS Opted-in import capture retains raw paragraph text and opaque occurrence identity +PASS Opaque occurrence IDs, including separate identical dialogue +PASS Saved snapshot and process reconstruction retain occurrence identities +PASS Reliable paragraph move updates derived event scene without copying event +PASS Copied paragraph has a distinct identity and no duplicated story event +PASS Rewritten evidence retains original passage and withholds unconfirmed derived facts +PASS Author confirmation verifies changed evidence +PASS Deleting evidence preserves the event and before text +PASS Scene split preserves every raw Word character +PASS Undo restores grouping and opaque scene identity +PASS Boundary moves between adjacent paragraphs +PASS Adjacent merge retains text and retires, rather than destroys, scene identity +PASS Merge undo restores original scene and prior boundary +PASS Author can explicitly confirm a proposed scene grouping without editing Word prose +PASS Grouping confirmation can be undone without discarding the Word snapshot +PASS Previously excluded import sections remain captured without silently importing their prose on sync +PASS An unresolvable excluded-section boundary refuses mutation instead of guessing where that book's prose starts +PASS Identical short dialogue remains associated with its individual native occurrence +PASS Delta sends only changed prose and retains occurrence order +PASS Lost native hints can reconcile a single rewrite between recognised neighbours without matching a moved/copy candidate +PASS Paragraph split retains only the surviving occurrence identity +PASS Word XML hint is restricted to main document part and forbids external entities +PASS Provider schema is bounded by the actual 97 submitted paragraphs, never the raw source count 99 +PASS Legacy request serialization omits new contract field, preserving checkpoint hashes +PASS Versioned integer confidence validation preserves legacy decimals and rejects new fractional scores +PASS 250,000+ word value snapshot reconciliation (411ms; no Word COM performance claim) +PASS Derived evidence display state cannot change legacy backup hashes or accepted event payloads +PASS Missing primary evidence is excluded from verified story facts while unanchored scene events remain compatible +28 paragraph manuscript assertions passed. +PASS Adoption uses only the completed capture's canonical scene map and retains excluded prose outside the imported book +PASS Reconnection cannot silently restore an excluded chapter into canonical scenes +PASS An unfinished import pauses snapshots without changing its accepted source or checkpoints +PASS Explicitly opted-in save/reconnect uses existing exact-session capture channel +PASS Authorised snapshot persists exact new prose and reconciles opaque paragraph identity +PASS Lost acknowledgement retry cannot apply the snapshot twice +PASS Acknowledgement returns canonical occurrence ID for delta recovery +PASS Cancellation retires only pending snapshot and retains already accepted revision +PASS Another account cannot request manuscript synchronisation +PASS Turning off automatic synchronisation changes only preferences even while imports or scene conflicts pause snapshots +PASS A new chapter repair is not hidden behind an older completed full snapshot receipt +PASS Paragraph manuscript identity, evidence and exact-session synchronisation +PASS Native wizard capture is scoped, durable and independent of Word +PASS Native tray presence and PWA review remain scoped, expiring and non-destructive +PASS Native saved workspace and established import eligibility remain scoped and read-only +PASS Native companion authentication, canonical AI mapping and isolated chapter retry +PASS Solver never discards a corroborated concern or exhausts navigation before verification +PASS Solver result evidence covers all reachable diagnoses without changing Stage 1 semantics +PASS Solver result copy follows actual answers, intention, variants and revision +PASS Solver workspace CTAs resolve authorised project/character context and real routes +PASS Stage 1 preserves all 60 strict conversations, corroboration, intent, reachability and adoption +PASS Stage 1 evidence gates, required follow-ups, bounded multi-select and neutral choices are enforced +PASS Neutral endpoints require explicit valid terminal declarations +PASS Neutral reassurance follows selected concerns without evidence and survives revision +PASS Scene navigation does not invent purpose evidence; genuine D05 witnesses survive +PASS D50 requires actual series evidence and preserves D50/D51 witnesses +PASS Curated V2 preserves 60 literal paths and enforces eight explicit Development review exceptions +PASS Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour +PASS Curated V2 passes normal validation and invalid publication stays guarded +PASS Payoff covers all 52 diagnoses with seven archetypes and semantic uncertainty ordering without graph changes +PASS Development review observes every acceptance prefix without changing signals, results or graph; access and durable capture stay isolated +PASS All permanent writing problems have distinct editorial content, intent, metadata, links and real images +PASS Clean solver completion preserves private evidence and permanent indexable URLs +PASS Writing Solver anonymous state is protected, expires and rejects stale versions +PASS Writing Solver scoring, multi-select, revision, fallback and graph routes +PASS Writing Solver import rejects invalid graphs and editorial identities +PASS Book recovery read-only exports and receipt retries remain accessible +PASS Book recovery validates integrity, selection and author-bound upload generations +PASS Project export and restore access gates enforce author and ownership boundaries +PASS Retired checklist bookmarks redirect without report access +PASS Ribbon operation identity and semantic icons stay consistent +PASS Maps Story projects canonical hierarchy, sequence, journeys and evidence without changing geography +Maps Story scale: 500 scenes, 30 characters, 5,000 appearances in 15ms. +PASS Maps Story scales to 500 scenes and 5,000 appearances +PASS Maps Story enforces access and uses bounded repository batches +PASS Maps appearance validates colours, normalized raster images and portable backups +PASS Maps reference assets enforce access +PASS Maps validate rough geometry, relationships, Location intent and access boundaries +PASS Subscription entitlement evaluates trials, paid access, overrides and real plan limits +PASS Subscription overrides control access and dashboard presentation without trial contradictions +PASS Subscription enforcement is concurrent, audited and admin-authorised +PASS Plot Health stays scene-based with 12,000 contributions +PASS Plot Health preserves Discovery planning and boundary contradictions +PASS Plot Health separates stored status and meaningful-progress clocks +PASS Plot Health explains question, payoff, closure and boundary evidence +PASS Plot Health evaluates explicit targets and scoped line rollups +PASS Plot Health respects scenario coverage and ordered chapter identities +PASS Plot Lines Focus and Weave preserve gaps and shared-scene identity +PASS Plot Lines thread, enrichment and Timeline inspector contracts hold +PASS Plot Lines composition remains bounded with a large generated weave +PASS Exception review uses evidence, identity, consequence and directional conflicts +PASS Exception assessment preserves author decisions and scene history +PASS Character card widths reflect displayed text without changing character data +PASS Relationships workspace large cast, temporal states and canonical edits +PASS Scene relationship proposals preserve direction and validate acceptance +PASS Location and asset merges require confirmation and distinct records +PASS Location persisted analysis preserves contextual bedrooms and setting provenance +PASS Location consequence outranks capped recurrence +PASS Location scene significance is attributed only to actual settings +PASS Location significance preserves hierarchy and independent uncertainty +PASS Character profile age uses canonical reference chronology +PASS Character detail and date-only save retain canonical DOB +PASS Story Point presence, previous appearances and age cross book boundaries +PASS Story Point knowledge stops at selected narrative position +PASS Story Point relationships and independent asset state are historical +PASS Story Point threads and continuity warnings respect future evidence +PASS Story Point ownership, AJAX and bounded batch loading require no AI +PASS Story Point narrative tie breakers match canonical order +PASS Malformed confidence 0. is repaired to 0.0 +PASS Markdown fences are stripped +PASS Unescaped backslash in evidence is repaired +PASS Truncated JSON is rejected +PASS Repaired JSON deserialises into SceneIntelligenceScene +PASS Chapter Structure confidence 0. repairs and deserialises +PASS Chapter Structure confidence 0. 8 repairs and deserialises +PASS Chapter Structure confidence 7 .5 repairs when unambiguous +PASS JSON repair leaves decimal-looking prose unchanged +PASS Chapter Structure semantic validation still rejects out-of-range repaired confidence +PASS Structural scene detection parser failure uses friendly diagnostics and retry +PASS Chapter Structure boundary normaliser repairs gaps and overlaps +PASS Chapter Structure boundary normaliser preserves valid coverage +PASS Chapter Structure boundary normaliser handles terminal ghost paragraph +PASS Chapter Structure boundary normaliser discards multiple terminal ghost paragraphs +PASS Chapter Structure boundary normaliser replays full book terminal empty failure +PASS Chapter Structure boundary normaliser keeps meaningful end overflow repair +PASS Chapter Structure boundary normaliser preserves genuine inverted ranges for validation +PASS Structural Word mapping uses paragraph map as authoritative text +PASS Structural Word mapping includes filtered Word paragraphs in source coverage +PASS Structural Word mapping fails precisely when map metadata is incomplete +PASS Structural Word mapping keeps trailing empty normalisation mapped +PASS Shared parser reports raw chapter output on unrecoverable JSON +PASS Character filtering rejects generic groups +PASS Character filtering preserves titled names +PASS Location filtering rejects merged phrases +PASS Location filtering preserves story locations +PASS Location canonical keys merge trivial variants +PASS Location contextual names use POV and structural setting +PASS Location canonical keys merge punctuation and safe plurals +PASS Location candidate consolidation handles generic review variants +PASS Location candidate identity is parent-aware for generic sub-locations +PASS Locations page uses hierarchical sort order +PASS Location review UX supports large candidate sets +PASS Story Intelligence auto resolves exact known locations before review +PASS Story Intelligence location review uses single identity decision +PASS Asset filtering rejects generic objects +PASS Asset filtering preserves story assets +PASS Asset canonical keys merge trivial variants +PASS Asset canonical keys merge contextual vehicle variants +PASS Asset canonical keys keep unrelated owned cars distinct +PASS Asset candidate keys attach unique unowned variants +PASS Asset filtering rejects relationship facts +PASS Asset contextual names resolve POV ownership +PASS Asset structural phrases trim neighbouring nouns +PASS Asset significance is generic and not fixture-specific +PASS Story Intelligence asset review applies current identity rules +PASS Relationship review requires pair evidence and distinguishes social types +PASS Relationship signals map to broad lookup types +PASS Relationship signals infer friendship without romance +PASS Relationship events preserve chronological story order +PASS Relationship progression keeps chronological state +PASS Relationship observations do not create event spam +PASS Relationship review orders by first story appearance +PASS Relationship evidence priority preserves explicit semantics +PASS Relationship evidence handles retained hostile and incidental examples +PASS Knowledge signals map to existing knowledge states +PASS Knowledge recipient resolves narrator through POV +PASS Knowledge identity reveal preserves subjective timing +PASS Knowledge duplicate statements share canonical keys +PASS Knowledge suspicion and certainty remain distinct +PASS Illustration prompt builder separates spec and prompt +PASS Illustration prompt builder uses realistic image direction +PASS Illustration specification validation catches missing typed fields +PASS Illustration category validation rejects unknown values +PASS Illustration status transitions protect approval flow +PASS Illustration status transitions support archive flow +PASS Illustration metadata flags fallback location labels +PASS Illustration location matching rejects vehicle living room reuse +PASS Illustration automatic generation policy blocks vague fallbacks +PASS Story Memory import image generation defaults are safe +PASS Illustration storage codes are normalised safely +PASS Illustration starter batch has required category counts +PASS Illustration starter generation plan skips successful items +PASS Story Intelligence visualisation archive is preserved +PASS Story Intelligence visualisation runtime is removed +PASS Story Intelligence does not retry exhausted billing quota +PASS Illustration bulk retry result reports counts +PASS Illustration bulk retry skips blocking duplicate stable codes +PASS Illustration provider reports missing image model +PASS Illustration provider omits GPT image response format +PASS Illustration matching rejects adult masculine unknown art for Beth +PASS Illustration matching treats Mrs title as hard feminine evidence +PASS Illustration matching infers mother and aunt as mature feminine +PASS Illustration matching rejects duplicate named portrait allocation +PASS Illustration semantic types prevent bathroom office and ambulance car mismatches +PASS Illustration demand archetypes stay broad and use active template +PASS Story Intelligence evidence extraction prevents observed attribute leakage +PASS Story Intelligence scene call uses strict structured output +PASS Story Intelligence scene schema constrains confidence numbers +PASS Story Intelligence scene schema constrains evidence strings +PASS Story Intelligence temporal resolves chapter anchor and afternoon +PASS Story Intelligence temporal rolls over after midnight +PASS Story Intelligence temporal resolves following morning +PASS Story Intelligence temporal resolves exact day offsets +PASS Story Intelligence temporal resolves following weekday +PASS Story Intelligence temporal resolves evening clock time +PASS Story Intelligence temporal rejects unanchored clock time +PASS Story Intelligence temporal preserves yearless calendar date clues +PASS Story Intelligence temporal resolves yearless calendar dates from context +PASS Story Intelligence temporal inherits previous morning when extraction is empty +PASS Story Intelligence temporal inherits previous evening when extraction is empty +PASS Story Intelligence temporal inherits previous night when extraction is empty +PASS Story Intelligence temporal inherits after midnight advancement +PASS Story Intelligence temporal inherits chapter anchor when extraction is empty +PASS Story Intelligence temporal stays unknown without context or extraction +PASS Story Intelligence temporal explicit date overrides previous context +PASS Story Intelligence temporal preserves vague few days +PASS Core import applies structural chronology to canonical scenes +PASS Story Intelligence temporal importer preserves manual chronology +PASS Story Intelligence temporal materialisation saves canonical chronology +PASS Story Intelligence temporal malformed values are discarded +PASS Story Calendar useful months and sparse navigation +PASS Story Calendar places dated scenes on Monday-first month grid +PASS Story Calendar separates unplaced scenes without guessing +PASS Story Calendar book filter and all books scope work +PASS Story Calendar month navigation uses story dates across years +PASS Story Calendar month dropdown follows displayed month +PASS Story Calendar handles no dated scenes +PASS Story Calendar day details endpoint returns partial +PASS Story Calendar day details endpoint respects book filter +PASS Story Calendar day details endpoint handles empty story date +PASS Story Calendar day details endpoint rejects invalid project +PASS Story Calendar index returns surface partial for AJAX +PASS Story Calendar day selection uses progressive AJAX hooks +PASS Story Intelligence structured metric values validate and import +PASS Story Intelligence structured schema covers complete response model +PASS Story Intelligence structured schema remains fixture agnostic +PASS Illustration assignment repair enforces explicit evidence groups and strict subtypes +PASS Lean import removes replay links while retaining progress +PASS Story Intelligence progress does not prematurely report safe close +PASS Structural import creates scenes before Word sync +PASS Structural import creates first scene without placeholder +PASS Structural import persists paragraph mapping and source text +PASS Structural import persists canonical scene source text +PASS Structural import adds summaries without extra scene AI calls +PASS Core import scan stage defers scenes and characters +PASS Core import basic location detector is conservative +PASS Core import basic location detector consolidates and skips existing matches +PASS Core import basic location detector supports pending parent candidates +PASS Core import character discovery protects accepted locations +PASS Core import gates characters behind basic location review +PASS Core import hides exact existing character names from review +PASS Core import hides exact existing character aliases from review +PASS Core import keeps suspected unknown aliases in review +PASS Core import keeps ambiguous existing character matches in review +PASS Core import keeps new characters in review +PASS Core import auto resolved character evidence is preserved +PASS Core import character evidence is candidate specific +PASS Core import deterministically maps known characters +PASS Core import wizard orders scenes before characters +PASS Core import remaps characters after review +PASS Scan review separates known matches from unresolved names +PASS Story Intelligence uses persisted scene source after restart +PASS Story Intelligence canonical mode bypasses duplicate boundary analysis +PASS Story Intelligence progress uses canonical scene summaries +PASS Story Intelligence downstream imports prefer canonical SceneIDs +PASS Story Intelligence scene prompt no longer asks for duplicate factual summary +PASS Story Intelligence review uses canonical structural summaries and counts +PASS Story Intelligence review centre completion is category scoped +PASS Word sync requires save acknowledgement +PASS Word sync retry resumes existing structure +PASS Story Intelligence enriches existing structural scenes +PASS Core import scene titles ride existing structural AI call +PASS Core import scene title preference is review scoped +PASS Core import scene title preference moved to Detect Scenes +PASS Core import Review Chapters is compact and chapter only +PASS Core import Detect Scenes is compact and owns title option +PASS Book context is canonical import metadata +PASS Names defaults from selected book context +PASS Story Intelligence starts from core import complete +PASS Generated scene titles persist with provenance +PASS Scene title display keeps scene numbers visible +PASS Manuscript text statistics handles pure prose +PASS Manuscript text statistics handles pure dialogue +PASS Manuscript text statistics splits narrative before dialogue +PASS Manuscript text statistics splits dialogue before narrative +PASS Manuscript text statistics handles multiple dialogue passages +PASS Manuscript text statistics supports smart quotes +PASS Manuscript text statistics supports straight quotes +PASS Manuscript text statistics carries multi-paragraph dialogue +PASS Manuscript text statistics returns to prose after continued dialogue +PASS Manuscript text statistics ignores empty paragraphs +PASS Manuscript text statistics reconciles scene totals +PASS Manuscript text statistics aggregates chapter scenes +PASS Manuscript text statistics recalculates existing scene sources +PASS Manuscript text statistics does not invoke AI +PASS Phase 21T repairs durable character understanding +PASS Phase 21U extracts mandatory character appearance fixtures +PASS Character sex hints are conservative and reviewable +PASS Character discovery does not truncate scan review candidates +PASS Character discovery rejects sentence-start words +PASS Character discovery rejects fragments and location names +PASS Manuscript scan preview keeps only auto-selected character candidates +PASS Word Companion scan completion uses chunked transport +PASS Word Companion scan chunks assemble full novel payloads +PASS Word Companion scan chunks reject partial and conflicting payloads +PASS Onboarding wizard keeps character pages inside one main step +PASS Scan review aliases feed Story Intelligence known character context +PASS Name Intelligence package contract is present +PASS Name Intelligence reference data is copied on publish +PASS Name Intelligence repository uses stored procedures +PASS Name Intelligence review warning is wired +PASS Name Intelligence library defaults to all locales +PASS Story Intelligence new-format context uses canonical characters +PASS Story Intelligence character defaults link proposed existing matches +PASS Story Intelligence character defaults ignore generic references +PASS Story Intelligence character defaults keep descriptive identities +PASS Story Intelligence character review uses single identity decision +PASS Story Intelligence auto resolves exact known identities before review +PASS Story Intelligence character matching keeps ambiguous known names visible +PASS Story Intelligence descriptive references consolidate articles +PASS Story Intelligence review omits character metrics dashboard +PASS Story Intelligence resumed chapters use canonical labels +PASS Story Intelligence character review posts selected existing match +PASS Story Intelligence character default changes preserve persisted results +PASS Structural POV rides existing chapter analysis +PASS Structural POV persists through import resolution +PASS Chapter POV derives from canonical scenes +PASS Permanent Analyse My Book starts from saved book +PASS Story Intelligence canonical context carries provenance +PASS Scene prompt protects canonical scene context +PASS Structural setting rides existing chapter analysis +PASS Explicit narrator labels detect deterministic POV +PASS AI POV JSON parses into structural models +PASS Post character review resolves persisted structural POV +PASS Normal scene and chapter saves persist POV +PASS Character merge is a reusable stored procedure workflow +PASS Story Intelligence character review suppresses resolved narrator POV +PASS Story Intelligence character review reuses structured appearance aliases +PASS Entity preferred names are peer aliases +PASS Story Intelligence review evidence includes chapter scene labels +PASS Story Intelligence import enables project metric defaults before save +PASS Project metrics add defaults backfills scene values +PASS Story Intelligence scene prompt uses configured metrics +PASS Story Intelligence scene prompt uses scene characters terminology +PASS Story Intelligence downstream imports support canonical scene results +PASS Story Intelligence runner supplies metrics and Plot Lines +PASS Story Intelligence metric persistence uses configured keys +PASS Story Intelligence stabilisation gate materialises strict and legacy metrics +PASS Story Intelligence modern materialisation owns finalisation boundary +PASS Story Intelligence narrative materialisation reads strict scene results +PASS Story Intelligence stabilisation routes normal users to book +PASS Story Intelligence narrative candidates require review +PASS Story Intelligence discovers Plot Lines without preconfiguration +PASS Story Intelligence matches existing Plot Lines without duplicates +PASS Narrative research prototype fixture builds hierarchy +PASS Narrative sibling hotel fixture generalises hierarchy +PASS Narrative trivial one-scene question is suppressed +PASS Narrative short significant thread survives +PASS Narrative semantic evolution consolidates by continuity +PASS Narrative existing thread matching is supported +PASS Narrative candidate merge and parent fields are persisted +PASS Narrative prompt uses one scene call with compact schema +PASS Narrative production code remains fixture agnostic +PASS Whole-book Plot Intelligence prompt carries full manuscript context +PASS Whole-book Plot Intelligence schema requires timeline event types +PASS Whole-book Plot Intelligence author seed inputs persist safely +PASS Whole-book Plot Intelligence structured author seed match survives +PASS Whole-book Plot Intelligence unmatched seeds become review candidates +PASS Whole-book Plot Intelligence uses dedicated output token headroom +PASS Story Intelligence narrative review displays author seed provenance +PASS Story Intelligence narrative review avoids raw author-facing IDs +PASS Story Intelligence author seed decisions are preserved +PASS Whole-book Plot Intelligence production code remains fixture agnostic +PASS Story Intelligence narrative review creates canonical records via existing procs +PASS Story Intelligence narrative stage follows knowledge +PASS Word Companion replays live current scene to writing panes +PASS Scan review post supports full-book form submissions +PASS StoryPosition rejects incomplete or invalid runtime scene positions +PASS StoryPosition builds canonical runtime scene navigation +PASS StoryPosition derives canonical scene context identity +PASS Writing Context route uses canonical story context service +PASS Writing Context client follows canonical story position events +PASS Writing Context preserves selected tab and avoids event loops +PASS Writing Intent route uses canonical story context and planning data +PASS Writing Intent client uses shared writing follow helper +PASS Obsolete global Word navigation is removed while writing windows remain live +PASS Appearance preferences and ribbon destinations +PASS Toolbar preferences, authorisation and contextual routes +PASS Application navigation resolves authorised project and book context +PASS Writing pair shares canonical follow infrastructure +PASS Read-only scene hydration preserves author intent without editing, analysis or manuscript recomputation +PASS Read-only scene hydration rejects another user's project before loading workspace data +PASS Verified native projection leaves working focus independent +PASS Native launch opens its exact verified scene rather than the book's first scene +PASS Native Intent retrieves the selected scene's existing purpose and chapter objectives +PASS Opening Context and Intent preserves all author-entered decisions verbatim +PASS Unsaved native mapping waits without loading an unrelated saved scene +PASS A stale database checkpoint cannot launch a scene merely claimed by the last heartbeat +PASS Chapter-capable sessions without accepted position evidence cannot launch claimed scene IDs +PASS A verified chapter with no mapped scene can show its own saved chapter intent +PASS A Word cursor/revision change during server loading cannot render the earlier cursor as current +PASS Native partial requests reject mappings that change during data loading +PASS Native Context launch authorises the book before resolving or displaying its scene +PASS Exact document selection cannot fall back to another connected Word instance +PASS Incomplete native session identity is rejected +PASS Repeated writing reads share request-scoped scene and chronological projection tasks +PASS Context retains earlier verified viewpoint knowledge and excludes future transitions +PASS Another character's future secret is not exposed as current knowledge +PASS Relationship reference stops at the current narrative position +PASS Context rejects mismatched project and book scopes +PASS Existing Timeline and inspector callers retain their full editing model path +PASS Intent retrieves saved decisions without computing narrative histories +PASS A future narrative scene cannot leak into timeline context even when its story date is earlier +PASS Initial thread context ranks current relevant unresolved threads rather than dumping every novel thread +PASS Missing viewpoint does not invent a knowledge perspective +PASS Scene navigation follows manuscript order rather than numeric IDs or other books +PASS Large-manuscript navigation is one bounded in-memory projection with no per-scene database queries +MEASURE writing navigation projection: 48 chapters/4800 scenes, 5.3ms, no SQL or Word. +PASS Writing Context and Intent resolve native sessions, preserve decisions and reuse bounded chronological data +PASS Writing Context Plot Lines preserves canonical associations, developments and book access +PASS Writing workspace presence scopes browser windows +PASS Writing workspace client uses session window identity and stable names +PASS Writing workspace launcher uses progressive screen placement +PASS Writing workspace pages register roles without changing follow behavior +PASS Word marker client acknowledgements require authenticated ownership +PASS Word Companion exposes writing workspace launch actions +PASS Word Companion writing screens receive resolved context identifiers +PASS Word Companion canonical markers drive runtime follow +PASS Word Companion runtime follows multiple imported scene anchors +PASS Word Companion existing project book linking remains available +PASS Word Companion document identity survives reconnect +PASS Word Companion multiscreen launch and follow remain reachable +PASS Word Companion modes remain distinct +PASS Writing pages do not require Story Intelligence +PASS Word Companion host script has valid tab mapping +PASS Writing screens show diagnostic empty states +PASS Word Companion three-screen flow logs connection identifiers +PASS Admin Story Intelligence reset returns to diagnostics with messages +PASS Project hard delete clears Story Intelligence dependencies in transaction +PASS Permanent project delete keeps archive and name safety gates +PASS Word manuscript cleanup classifies PlotDirector markers by tag only +PASS Word manuscript cleanup preserves content controls content +PASS Word manuscript cleanup UI separates unlink from clean unlink +PASS Word manuscript unlink keeps Story Intelligence data untouched +PASS Word manuscript cleanup remains relinkable and idempotent +PASS Story Intelligence Review Centre route replaces linear review resume +PASS Story Intelligence obsolete create scene workflow is removed +PASS Story Intelligence Review Centre counts only needs-attention categories +PASS Story Intelligence Review Centre uses independent tile grid +PASS Story Intelligence Review Centre opens with character gate +PASS Story Intelligence review modules are independent after character gate +PASS Story Intelligence review module completion is durable and independent +PASS Story Intelligence review module pages omit wizard chrome +PASS Story Intelligence downstream review uses completed scene analysis +PASS Story Intelligence review posts do not use success interstitials +PASS Story Intelligence legacy review completion routes are deleted +PASS Story Intelligence review forms share busy submit guard +PASS Story Intelligence heavy review modules offer bounded rendering +PASS Story Intelligence Review Centre adds no AI calls +PASS Story Intelligence Review Centre uses bounded summary query +PASS Story Intelligence character review queues enrichment beside plot synthesis +PASS Story Intelligence character enrichment uses persisted SignalR progress +PASS Story Intelligence character enrichment preserves author fields +PASS Story Intelligence character enrichment batches by prompt size +PASS Story Intelligence character enrichment promotes structured facts +PASS Character detail can queue single-character enrichment +PASS Single-character enrichment is persisted and duplicate safe +PASS Character detail enrichment status uses scoped SignalR +PASS Story Intelligence detailed review GETs use selected module paths +PASS Story Intelligence completed Character review remains inspectable +PASS Story Intelligence Review Centre completed modules use canonical destinations +PASS Story Intelligence detailed reviews read persisted candidate pages +PASS Story Intelligence module completion lifecycle uses persisted candidates +PASS Story Intelligence Job 6 uses bounded concurrent chapter execution +PASS Story Intelligence global progress uses whole run scene totals +PASS Story Intelligence recovered provider failures stay operational +PASS Story Intelligence recovered JSON repair stays operational +PASS Story Intelligence terminal failures remain user visible +PASS Story Intelligence global banner remains visible through finalising gaps +PASS Story Intelligence global banner rejects stale live snapshots +PASS Story Intelligence live global progress publishes authoritative scene aggregates +PASS Story Intelligence global progress survives initial SignalR start races +PASS Story Intelligence scene analysis completion barrier releases review +PASS Story Intelligence active progress only appears in global strip +PASS Story Intelligence book actions do not open review centre while running diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-after.jsonl b/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-after.jsonl new file mode 100644 index 00000000..c84af29f --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-after.jsonl @@ -0,0 +1 @@ +{"Books":"89791473262E3C495D4BFC9BED443A8ED1A7A364492C9CB3315EB883D5161E4B","Chapters":"6616F3C465D9200851146534C132613F47762EE905F56E500B2A8DC45C517DA8","Scenes":"5D0127113BD1DCE00F9C075A5CD327F4C17FE6A253A87433A720ADCE4790D51A","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"F0AE004AD13948C065D207B799A62EC24EAD089F6ABB58D5991D4F4CAE4C22CE","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-before.jsonl new file mode 100644 index 00000000..c84af29f --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/snapshot-before.jsonl @@ -0,0 +1 @@ +{"Books":"89791473262E3C495D4BFC9BED443A8ED1A7A364492C9CB3315EB883D5161E4B","Chapters":"6616F3C465D9200851146534C132613F47762EE905F56E500B2A8DC45C517DA8","Scenes":"5D0127113BD1DCE00F9C075A5CD327F4C17FE6A253A87433A720ADCE4790D51A","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"F0AE004AD13948C065D207B799A62EC24EAD089F6ABB58D5991D4F4CAE4C22CE","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2B/workspace-browser.log b/Docs/Writer/Writer3/Evidence/Phase2B/workspace-browser.log new file mode 100644 index 00000000..c1a4fdc3 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2B/workspace-browser.log @@ -0,0 +1 @@ +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Isolated MVC fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/activity-prestop.jsonl b/Docs/Writer/Writer3/Evidence/Phase2C/activity-prestop.jsonl new file mode 100644 index 00000000..678aa2c5 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/activity-prestop.jsonl @@ -0,0 +1,4 @@ +{"Area":"PlotSynthesis","Status":"Completed","Records":1} +{"Area":"Pipelines","Status":"Complete","Records":1} +{"Area":"CoreImports","Status":"Complete","MarkerStatus":"NotRequested","Records":1} +{"Area":"CharacterEnrichment","Status":"Completed","Records":1} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after-geometry.json b/Docs/Writer/Writer3/Evidence/Phase2C/after-geometry.json new file mode 100644 index 00000000..687504a7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/after-geometry.json @@ -0,0 +1,128 @@ +[ + { + "destination": "Index", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + }, + { + "destination": "Index", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + }, + { + "destination": "Index", + "width": 390, + "overflowX": 0, + "overflowY": 336, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + } +] diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024-collapsed.png new file mode 100644 index 00000000..ea899964 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024.png new file mode 100644 index 00000000..1e7da9c1 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440-collapsed.png new file mode 100644 index 00000000..f321d087 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440.png new file mode 100644 index 00000000..0b2c05dd Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390-companion.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390-companion.png new file mode 100644 index 00000000..0abdb23b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390-companion.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390.png new file mode 100644 index 00000000..d601a509 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Explore-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1024.png new file mode 100644 index 00000000..edec0c8f Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1440.png new file mode 100644 index 00000000..0e67b3ba Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-390.png new file mode 100644 index 00000000..acb4c972 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Index-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1024.png new file mode 100644 index 00000000..2f110edb Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1440.png new file mode 100644 index 00000000..20c95cdf Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-390.png new file mode 100644 index 00000000..306b55fe Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Plan-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1024.png new file mode 100644 index 00000000..44c2063d Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1440.png new file mode 100644 index 00000000..69bf2b6b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-390.png new file mode 100644 index 00000000..d35998b6 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Reflect-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1024.png new file mode 100644 index 00000000..52714971 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1440.png new file mode 100644 index 00000000..91af3e54 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-390.png new file mode 100644 index 00000000..5b35c2a0 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Review-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024-collapsed.png new file mode 100644 index 00000000..61a75fed Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024.png new file mode 100644 index 00000000..1672d17a Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440-collapsed.png new file mode 100644 index 00000000..bd961ee2 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440.png new file mode 100644 index 00000000..672dcb2c Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390-companion.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390-companion.png new file mode 100644 index 00000000..d26e5d1b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390-companion.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390.png new file mode 100644 index 00000000..d95eecc4 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-active-session.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-active-session.png new file mode 100644 index 00000000..99638e64 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-active-session.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-different-session-target.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-different-session-target.png new file mode 100644 index 00000000..3b006a83 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-different-session-target.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-unified-editor.png b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-unified-editor.png new file mode 100644 index 00000000..fe34e39b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/after/Write-unified-editor.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before-geometry.json b/Docs/Writer/Writer3/Evidence/Phase2C/before-geometry.json new file mode 100644 index 00000000..687504a7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/before-geometry.json @@ -0,0 +1,128 @@ +[ + { + "destination": "Index", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 1440, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + }, + { + "destination": "Index", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 1024, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + }, + { + "destination": "Index", + "width": 390, + "overflowX": 0, + "overflowY": 336, + "heading": "Audit: Third Volume ?" + }, + { + "destination": "Write", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Write ?" + }, + { + "destination": "Explore", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Explore ?" + }, + { + "destination": "Plan", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Plan ?" + }, + { + "destination": "Review", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Review ?" + }, + { + "destination": "Reflect", + "width": 390, + "overflowX": 0, + "overflowY": 0, + "heading": "Reflect ?" + } +] diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before-modifier.log b/Docs/Writer/Writer3/Evidence/Phase2C/before-modifier.log new file mode 100644 index 00000000..f956a2d5 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/before-modifier.log @@ -0,0 +1 @@ +{ browserHistoryShortcutPrevented: true } diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024-collapsed.png new file mode 100644 index 00000000..e158e772 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024.png new file mode 100644 index 00000000..e60e6994 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440-collapsed.png new file mode 100644 index 00000000..44758130 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440.png new file mode 100644 index 00000000..c0b95829 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390-companion.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390-companion.png new file mode 100644 index 00000000..66a3202b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390-companion.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390.png new file mode 100644 index 00000000..9a501c3b Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Explore-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1024.png new file mode 100644 index 00000000..7af25d2d Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1440.png new file mode 100644 index 00000000..502b273c Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-390.png new file mode 100644 index 00000000..0668f48c Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Index-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1024.png new file mode 100644 index 00000000..1fecad37 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1440.png new file mode 100644 index 00000000..a327ba66 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-390.png new file mode 100644 index 00000000..1600e7e8 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Plan-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1024.png new file mode 100644 index 00000000..38646aa3 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1440.png new file mode 100644 index 00000000..2e933bea Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-390.png new file mode 100644 index 00000000..db0365f5 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Reflect-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1024.png new file mode 100644 index 00000000..3af8e36a Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1440.png new file mode 100644 index 00000000..e6a86196 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-390.png new file mode 100644 index 00000000..1db5944f Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Review-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024-collapsed.png new file mode 100644 index 00000000..c8f936e3 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024.png new file mode 100644 index 00000000..ffdd58e2 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1024.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440-collapsed.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440-collapsed.png new file mode 100644 index 00000000..be9b619d Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440-collapsed.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440.png new file mode 100644 index 00000000..06c56982 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-1440.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390-companion.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390-companion.png new file mode 100644 index 00000000..f97635ab Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390-companion.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390.png b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390.png new file mode 100644 index 00000000..1fba3f0f Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase2C/before/Write-390.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/build.log b/Docs/Writer/Writer3/Evidence/Phase2C/build.log new file mode 100644 index 00000000..d40f7fd1 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/build.log @@ -0,0 +1,16 @@ + Determining projects to restore... + All projects are up-to-date for restore. + PlotDirector.Companion.Protocol -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Protocol/bin/Debug/netstandard2.0/PlotDirector.Companion.Protocol.dll + PlotDirector.Companion.Client -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Client/bin/Debug/netstandard2.0/PlotDirector.Companion.Client.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0-windows10.0.19041.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Tests -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Tests/bin/Debug/net10.0/PlotDirector.Companion.Tests.dll + PlotLine -> /srv/repos/PlotDirector/PlotLine/bin/Debug/net10.0/PlotLine.dll + WritingSolver -> /srv/repos/PlotDirector/Tools/WritingSolver/bin/Debug/net10.0/WritingSolver.dll + PlotLine.Tests -> /srv/repos/PlotDirector/PlotLine.Tests/bin/Debug/net10.0/PlotLine.Tests.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:26.69 diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/cleanup.log b/Docs/Writer/Writer3/Evidence/Phase2C/cleanup.log new file mode 100644 index 00000000..f4b0a841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/cleanup.log @@ -0,0 +1,2 @@ +{"":true} +{"RemainingSyntheticAccounts":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/deployment-verification.log b/Docs/Writer/Writer3/Evidence/Phase2C/deployment-verification.log new file mode 100644 index 00000000..3c5d8025 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/deployment-verification.log @@ -0,0 +1,7 @@ +active +Local GET 200 +Development TLS GET 200 +052cc7b2d77a836b4336d7eb68e9dbd1ccd944235f43c97c370661ee7133f594 /home/nick/writer3-publish-e9402d0-un0wIp/PlotLine.dll +052cc7b2d77a836b4336d7eb68e9dbd1ccd944235f43c97c370661ee7133f594 /srv/apps/plotdirector-dev/current/PlotLine.dll +.1.0.0+e9402d0c1673d3dc8afcca26bb344b82fa11caf0 +-- No entries -- diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/diagnose.log b/Docs/Writer/Writer3/Evidence/Phase2C/diagnose.log new file mode 100644 index 00000000..6cb7f124 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/diagnose.log @@ -0,0 +1,6 @@ +{"pwa":false,"i":0,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":265,"rootHeight":579,"variable":"--writer-workspace-height: 579px;","headerHeight":127,"workspace":{"x":17.75,"y":463.375,"width":354.5,"height":371.625,"top":463.375,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} +{"pwa":false,"i":1,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":265,"rootHeight":579,"variable":"--writer-workspace-height: 579px;","headerHeight":127,"workspace":{"x":17.75,"y":463.375,"width":354.5,"height":371.625,"top":463.375,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} +{"pwa":false,"i":2,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":265,"rootHeight":579,"variable":"--writer-workspace-height: 579px;","headerHeight":127,"workspace":{"x":17.75,"y":463.375,"width":354.5,"height":371.625,"top":463.375,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} +{"pwa":true,"i":0,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":257,"rootHeight":587,"variable":"--writer-workspace-height: 587px;","headerHeight":106,"workspace":{"x":17.75,"y":434.6875,"width":354.5,"height":400.3125,"top":434.6875,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} +{"pwa":true,"i":1,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":257,"rootHeight":587,"variable":"--writer-workspace-height: 587px;","headerHeight":106,"workspace":{"x":17.75,"y":434.6875,"width":354.5,"height":400.3125,"top":434.6875,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} +{"pwa":true,"i":2,"doc":844,"vh":844,"scroll":0,"root":"writer3 writer3-destination writer3-viewport","top":257,"rootHeight":587,"variable":"--writer-workspace-height: 587px;","headerHeight":106,"workspace":{"x":17.75,"y":434.6875,"width":354.5,"height":400.3125,"top":434.6875,"right":372.25,"bottom":835,"left":17.75},"ribbon":"false"} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/focus-browser.log b/Docs/Writer/Writer3/Evidence/Phase2C/focus-browser.log new file mode 100644 index 00000000..fa8428ce --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/focus-browser.log @@ -0,0 +1 @@ +PASS unified current work: one selector set, save-only, explicit recording/idempotent repeat, saved display/change, active/mismatched targets, explicit proofreading choice, AudioReview chapter rule, dependent scenes, optional scoped scheduling and book-switch clearing in browser/simulated PWA. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/journal-verification.log b/Docs/Writer/Writer3/Evidence/Phase2C/journal-verification.log new file mode 100644 index 00000000..6ba17d74 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/journal-verification.log @@ -0,0 +1 @@ +-- No entries -- diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/live-focus.log b/Docs/Writer/Writer3/Evidence/Phase2C/live-focus.log new file mode 100644 index 00000000..c7a4f3d7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/live-focus.log @@ -0,0 +1 @@ +PASS authenticated Development unified workflow: real objective create/change, explicit Writing session, active target/ID isolation, note/end, invalid scene and unsupported objective rejection, antiforgery400, optional scoped revision planning; fixture focus restored; browser/simulated PWA. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/live-navigation.log b/Docs/Writer/Writer3/Evidence/Phase2C/live-navigation.log new file mode 100644 index 00000000..ff7ae6ea --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/live-navigation.log @@ -0,0 +1,8 @@ +{ + "checks": [ + "Browser: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted.", + "Simulated PWA: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted." + ], + "physicalWindows": false, + "installedPWA": false +} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/live-refinement.log b/Docs/Writer/Writer3/Evidence/Phase2C/live-refinement.log new file mode 100644 index 00000000..053cadc9 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/live-refinement.log @@ -0,0 +1 @@ +PASS Phase2C authenticated Development: marker line wrapping, Help placement/popup, readable collapsed content, browser modifier shortcuts, reduced-motion context, overlay Tab exit, five Help articles and existing session heading. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/live-workspace.log b/Docs/Writer/Writer3/Evidence/Phase2C/live-workspace.log new file mode 100644 index 00000000..30957849 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/live-workspace.log @@ -0,0 +1 @@ +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Authenticated Development fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/navigation-browser.log b/Docs/Writer/Writer3/Evidence/Phase2C/navigation-browser.log new file mode 100644 index 00000000..d8157841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/navigation-browser.log @@ -0,0 +1 @@ +PASS Writer3: 168 destination/theme/width/browser/PWA combinations; Home actions, contextual ribbon, authorisation, book switching, reload/back/forward, keyboard focus, Help, legacy fragments and viewport fit. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/preserved-browser.log b/Docs/Writer/Writer3/Evidence/Phase2C/preserved-browser.log new file mode 100644 index 00000000..61ef1335 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/preserved-browser.log @@ -0,0 +1,10 @@ +PASS Writer reference windows: initial failure/retry, window identity/reuse, pinned book, denied/unavailable display permissions, plan navigation, browser/PWA. +PASS pending native response cancellation, unverified mapping refusal, exact-session query parameters and no recomputation for repeated unchanged scenes +PASS native/legacy race, cross-chapter cursor following, repeated presence without commands/focus, status failure recovery, in-flight invalidation, unchanged-scene fragment retry, trusted explicit navigation and acknowledgement without feedback; simulated Chromium protocol, not Word +PASS native source invariant: selection observation contains no ribbon invalidation or range selection (not runtime Word proof) +PASS Manuscript Reader: real Razor/controller, escaped selectable text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus, 3 widths × 4 themes × browser/PWA +PASS explicit Intent assessment, persisted-result load, cancellation, scene isolation and permission feedback +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: browser +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: simulated PWA +PASS Writer intelligence UI: four themes, two widths, browser/PWA; grounded Help Me, explicit audio start/end/note, disabled unsupported controls, month/year calendar and zero-net revision intensity +PASS Writer 2 overview: real Razor, 48 theme/viewport/history/PWA combinations, single navigation, book scope, honest empty states, chart links and contextual controls. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/refinement-browser.log b/Docs/Writer/Writer3/Evidence/Phase2C/refinement-browser.log new file mode 100644 index 00000000..7eb47f59 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/refinement-browser.log @@ -0,0 +1 @@ +PASS Phase2C isolated MVC: marker line wrapping, Help placement/popup, readable collapsed content, browser modifier shortcuts, reduced-motion context, overlay Tab exit, five Help articles and existing session heading, retained active AudioReview DOM/notes and independent scroll to media controls. diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/regressions.log b/Docs/Writer/Writer3/Evidence/Phase2C/regressions.log new file mode 100644 index 00000000..dc24c774 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/regressions.log @@ -0,0 +1,590 @@ +PASS settlement Marker compatibility, nested geometry/style validation, stable route references and existing map/backup/import JSON contracts. +PASS Settlement boundaries preserve anchors, routes and backup/import contracts +PASS shared boundary server integrity, versions/refs/appearance, duplicate/orphan rejection and project import/export/restore contracts. +PASS Shared boundary topology preserves map and project contracts +PASS geography roots, hierarchy, provider-independent fake, cache identities, ambiguity, failures/backoff and rate reservation. +PASS Geographical roots, providers, queue outcomes and access +PASS Intent evidence preserves provenance and author control +PASS Release triage and browser-only onboarding preserve author decisions +PASS Approved native import source and confirmation remain safe +PASS Native installation renewal and revocation remain account/security scoped +PASS Writer navigation objective activity mappings use supported session types +PASS Writer navigation ambiguous or unsupported recording activity requires explicit compatible choice +PASS Writer navigation session-only activities never become objective types +PASS Writer navigation destination Home preserves authorised book and saved working focus +PASS Writer navigation destination Home never carries a focus into another book +PASS Writer navigation destination Home refuses unavailable book +PASS Writer navigation destination Write preserves authorised book and saved working focus +PASS Writer navigation destination Write never carries a focus into another book +PASS Writer navigation destination Write refuses unavailable book +PASS Writer navigation destination Explore preserves authorised book and saved working focus +PASS Writer navigation destination Explore never carries a focus into another book +PASS Writer navigation destination Explore refuses unavailable book +PASS Writer navigation destination Plan preserves authorised book and saved working focus +PASS Writer navigation destination Plan never carries a focus into another book +PASS Writer navigation destination Plan refuses unavailable book +PASS Writer navigation destination Review preserves authorised book and saved working focus +PASS Writer navigation destination Review never carries a focus into another book +PASS Writer navigation destination Review refuses unavailable book +PASS Writer navigation destination Reflect preserves authorised book and saved working focus +PASS Writer navigation destination Reflect never carries a focus into another book +PASS Writer navigation destination Reflect refuses unavailable book +PASS Writer navigation destination Dashboard preserves authorised book and saved working focus +PASS Writer navigation destination Dashboard never carries a focus into another book +PASS Writer navigation destination Dashboard refuses unavailable book +PASS Writer navigation legacy query routes still reach their actual workspaces/calendar +PASS Writer navigation old objective setup URL reaches Write +PASS Writer navigation full legacy desk, Journey and Workspaces remain rendered, not retired +PASS Writer navigation book-only new route checks access before metadata +PASS Writer navigation book switching retains Write without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Write +PASS Writer navigation book switching retains Explore without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Explore +PASS Writer navigation book switching retains Plan without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Plan +PASS Writer navigation book switching retains Review without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Review +PASS Writer navigation book switching retains Reflect without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Reflect +PASS Writer navigation case-insensitive bookmarked routes retain destination context +PASS Writer navigation book menu never navigates to a mutation action +PASS Writer navigation new author Home has no fabricated book selection +PASS Writer navigation exploration does not require scenes, plans, project or Word +PASS Writer navigation real read paths exercised without calling author-data writes +PASS Writer 3 destination navigation and scope +PASS Writer foundation reference, Reader, session and verified Word selections never overwrite working focus +PASS Writer foundation cross-book selections require a separate authorised context +PASS Writer foundation a scene cannot be projected without its chapter +PASS Writer foundation incomplete native identity cannot be projected as verified +PASS Writer foundation selected book reaches every queue repository before any result limit +PASS Writer foundation inaccessible project never reaches a queue repository +PASS Writer foundation unresolved route scene never becomes a pinned authorised selection +PASS Writer foundation Preview chooses within the selected book and preserves All Books plans +PASS Writer foundation explicit out-of-scope plan cannot silently select another book +PASS Writer foundation new book may still use its project-wide plan +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation context, queue scope and planning +PASS Writer dashboard book selection filters queues and tasks consistently +PASS Writer dashboard book scope reaches schedule service before selection and active workspace persists +PASS Writer dashboard unknown book cannot fall back to another book +PASS Writer dashboard plan setup retains selected book instead of All Books +PASS Writer dashboard plan setup refuses conflicting project and book +PASS Writer dashboard book-only deep link checks access before metadata +PASS Writer dashboard legacy Write redirect preserves book scope +PASS Writer dashboard Writer contextual commands target implemented workspaces and evidence +PASS Writer dashboard book scope +PASS writing activity baseline excludes pre-existing words +PASS writing activity zero-net replacement retains both sides +PASS writing activity moving stable paragraphs has no word growth +PASS writing activity whitespace-only change has no word growth +PASS writing activity deletion preserves old paragraph scope +PASS writing activity paragraph split does not invent growth +PASS writing activity gross and net reconcile +PASS writing activity large replacement explicitly qualifies token balance +PASS Writing activity measurement +PASS Writer intelligence consecutive playing observations produce actual bounded playback coverage +PASS Writer intelligence replaying ten seconds adds playback but does not duplicate unique coverage +PASS Writer intelligence duplicate sequence never creates more playback time +PASS Writer intelligence seek jump is not listening coverage +PASS Writer intelligence interrupted telemetry does not invent activity across a gap +PASS Writer intelligence an explicit seek never bridges playback coverage even when positions look continuous +PASS Writer intelligence paused state does not manufacture playback intervals +PASS Writer intelligence different media source does not contribute to current coverage +PASS Writer intelligence command expiry is explicitly UTC across browser and Windows time zones +PASS Writer intelligence nonfinite media position is refused +PASS Writer intelligence activities share daily capacity and split across dates without exceeding availability +PASS Writer intelligence insufficient capacity explains failure before persistence +PASS Writer intelligence known lengths produce distinct adjustable budgets rather than equal chapter effort +PASS Writer intelligence empty context produces no invented manuscript observations +PASS Writer intelligence zero-net revision and actual chapter evidence supply bounded actionable suggestions +PASS Writer intelligence recommendations do not diagnose writer block from observations +PASS Writer intelligence and measured review +PASS Manuscript Reader: scoped read-only retrieval, ordering, navigation, empty snapshot, accepted updates, pending isolation and accurate timestamps +PASS Manuscript Reader +PASS Opted-in import capture retains raw paragraph text and opaque occurrence identity +PASS Opaque occurrence IDs, including separate identical dialogue +PASS Saved snapshot and process reconstruction retain occurrence identities +PASS Reliable paragraph move updates derived event scene without copying event +PASS Copied paragraph has a distinct identity and no duplicated story event +PASS Rewritten evidence retains original passage and withholds unconfirmed derived facts +PASS Author confirmation verifies changed evidence +PASS Deleting evidence preserves the event and before text +PASS Scene split preserves every raw Word character +PASS Undo restores grouping and opaque scene identity +PASS Boundary moves between adjacent paragraphs +PASS Adjacent merge retains text and retires, rather than destroys, scene identity +PASS Merge undo restores original scene and prior boundary +PASS Author can explicitly confirm a proposed scene grouping without editing Word prose +PASS Grouping confirmation can be undone without discarding the Word snapshot +PASS Previously excluded import sections remain captured without silently importing their prose on sync +PASS An unresolvable excluded-section boundary refuses mutation instead of guessing where that book's prose starts +PASS Identical short dialogue remains associated with its individual native occurrence +PASS Delta sends only changed prose and retains occurrence order +PASS Lost native hints can reconcile a single rewrite between recognised neighbours without matching a moved/copy candidate +PASS Paragraph split retains only the surviving occurrence identity +PASS Word XML hint is restricted to main document part and forbids external entities +PASS Provider schema is bounded by the actual 97 submitted paragraphs, never the raw source count 99 +PASS Legacy request serialization omits new contract field, preserving checkpoint hashes +PASS Versioned integer confidence validation preserves legacy decimals and rejects new fractional scores +PASS 250,000+ word value snapshot reconciliation (396ms; no Word COM performance claim) +PASS Derived evidence display state cannot change legacy backup hashes or accepted event payloads +PASS Missing primary evidence is excluded from verified story facts while unanchored scene events remain compatible +28 paragraph manuscript assertions passed. +PASS Adoption uses only the completed capture's canonical scene map and retains excluded prose outside the imported book +PASS Reconnection cannot silently restore an excluded chapter into canonical scenes +PASS An unfinished import pauses snapshots without changing its accepted source or checkpoints +PASS Explicitly opted-in save/reconnect uses existing exact-session capture channel +PASS Authorised snapshot persists exact new prose and reconciles opaque paragraph identity +PASS Lost acknowledgement retry cannot apply the snapshot twice +PASS Acknowledgement returns canonical occurrence ID for delta recovery +PASS Cancellation retires only pending snapshot and retains already accepted revision +PASS Another account cannot request manuscript synchronisation +PASS Turning off automatic synchronisation changes only preferences even while imports or scene conflicts pause snapshots +PASS A new chapter repair is not hidden behind an older completed full snapshot receipt +PASS Paragraph manuscript identity, evidence and exact-session synchronisation +PASS Native wizard capture is scoped, durable and independent of Word +PASS Native tray presence and PWA review remain scoped, expiring and non-destructive +PASS Native saved workspace and established import eligibility remain scoped and read-only +PASS Native companion authentication, canonical AI mapping and isolated chapter retry +PASS Solver never discards a corroborated concern or exhausts navigation before verification +PASS Solver result evidence covers all reachable diagnoses without changing Stage 1 semantics +PASS Solver result copy follows actual answers, intention, variants and revision +PASS Solver workspace CTAs resolve authorised project/character context and real routes +PASS Stage 1 preserves all 60 strict conversations, corroboration, intent, reachability and adoption +PASS Stage 1 evidence gates, required follow-ups, bounded multi-select and neutral choices are enforced +PASS Neutral endpoints require explicit valid terminal declarations +PASS Neutral reassurance follows selected concerns without evidence and survives revision +PASS Scene navigation does not invent purpose evidence; genuine D05 witnesses survive +PASS D50 requires actual series evidence and preserves D50/D51 witnesses +PASS Curated V2 preserves 60 literal paths and enforces eight explicit Development review exceptions +PASS Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour +PASS Curated V2 passes normal validation and invalid publication stays guarded +PASS Payoff covers all 52 diagnoses with seven archetypes and semantic uncertainty ordering without graph changes +PASS Development review observes every acceptance prefix without changing signals, results or graph; access and durable capture stay isolated +PASS All permanent writing problems have distinct editorial content, intent, metadata, links and real images +PASS Clean solver completion preserves private evidence and permanent indexable URLs +PASS Writing Solver anonymous state is protected, expires and rejects stale versions +PASS Writing Solver scoring, multi-select, revision, fallback and graph routes +PASS Writing Solver import rejects invalid graphs and editorial identities +PASS Book recovery read-only exports and receipt retries remain accessible +PASS Book recovery validates integrity, selection and author-bound upload generations +PASS Project export and restore access gates enforce author and ownership boundaries +PASS Retired checklist bookmarks redirect without report access +PASS Ribbon operation identity and semantic icons stay consistent +PASS Maps Story projects canonical hierarchy, sequence, journeys and evidence without changing geography +Maps Story scale: 500 scenes, 30 characters, 5,000 appearances in 17ms. +PASS Maps Story scales to 500 scenes and 5,000 appearances +PASS Maps Story enforces access and uses bounded repository batches +PASS Maps appearance validates colours, normalized raster images and portable backups +PASS Maps reference assets enforce access +PASS Maps validate rough geometry, relationships, Location intent and access boundaries +PASS Subscription entitlement evaluates trials, paid access, overrides and real plan limits +PASS Subscription overrides control access and dashboard presentation without trial contradictions +PASS Subscription enforcement is concurrent, audited and admin-authorised +PASS Plot Health stays scene-based with 12,000 contributions +PASS Plot Health preserves Discovery planning and boundary contradictions +PASS Plot Health separates stored status and meaningful-progress clocks +PASS Plot Health explains question, payoff, closure and boundary evidence +PASS Plot Health evaluates explicit targets and scoped line rollups +PASS Plot Health respects scenario coverage and ordered chapter identities +PASS Plot Lines Focus and Weave preserve gaps and shared-scene identity +PASS Plot Lines thread, enrichment and Timeline inspector contracts hold +PASS Plot Lines composition remains bounded with a large generated weave +PASS Exception review uses evidence, identity, consequence and directional conflicts +PASS Exception assessment preserves author decisions and scene history +PASS Character card widths reflect displayed text without changing character data +PASS Relationships workspace large cast, temporal states and canonical edits +PASS Scene relationship proposals preserve direction and validate acceptance +PASS Location and asset merges require confirmation and distinct records +PASS Location persisted analysis preserves contextual bedrooms and setting provenance +PASS Location consequence outranks capped recurrence +PASS Location scene significance is attributed only to actual settings +PASS Location significance preserves hierarchy and independent uncertainty +PASS Character profile age uses canonical reference chronology +PASS Character detail and date-only save retain canonical DOB +PASS Story Point presence, previous appearances and age cross book boundaries +PASS Story Point knowledge stops at selected narrative position +PASS Story Point relationships and independent asset state are historical +PASS Story Point threads and continuity warnings respect future evidence +PASS Story Point ownership, AJAX and bounded batch loading require no AI +PASS Story Point narrative tie breakers match canonical order +PASS Malformed confidence 0. is repaired to 0.0 +PASS Markdown fences are stripped +PASS Unescaped backslash in evidence is repaired +PASS Truncated JSON is rejected +PASS Repaired JSON deserialises into SceneIntelligenceScene +PASS Chapter Structure confidence 0. repairs and deserialises +PASS Chapter Structure confidence 0. 8 repairs and deserialises +PASS Chapter Structure confidence 7 .5 repairs when unambiguous +PASS JSON repair leaves decimal-looking prose unchanged +PASS Chapter Structure semantic validation still rejects out-of-range repaired confidence +PASS Structural scene detection parser failure uses friendly diagnostics and retry +PASS Chapter Structure boundary normaliser repairs gaps and overlaps +PASS Chapter Structure boundary normaliser preserves valid coverage +PASS Chapter Structure boundary normaliser handles terminal ghost paragraph +PASS Chapter Structure boundary normaliser discards multiple terminal ghost paragraphs +PASS Chapter Structure boundary normaliser replays full book terminal empty failure +PASS Chapter Structure boundary normaliser keeps meaningful end overflow repair +PASS Chapter Structure boundary normaliser preserves genuine inverted ranges for validation +PASS Structural Word mapping uses paragraph map as authoritative text +PASS Structural Word mapping includes filtered Word paragraphs in source coverage +PASS Structural Word mapping fails precisely when map metadata is incomplete +PASS Structural Word mapping keeps trailing empty normalisation mapped +PASS Shared parser reports raw chapter output on unrecoverable JSON +PASS Character filtering rejects generic groups +PASS Character filtering preserves titled names +PASS Location filtering rejects merged phrases +PASS Location filtering preserves story locations +PASS Location canonical keys merge trivial variants +PASS Location contextual names use POV and structural setting +PASS Location canonical keys merge punctuation and safe plurals +PASS Location candidate consolidation handles generic review variants +PASS Location candidate identity is parent-aware for generic sub-locations +PASS Locations page uses hierarchical sort order +PASS Location review UX supports large candidate sets +PASS Story Intelligence auto resolves exact known locations before review +PASS Story Intelligence location review uses single identity decision +PASS Asset filtering rejects generic objects +PASS Asset filtering preserves story assets +PASS Asset canonical keys merge trivial variants +PASS Asset canonical keys merge contextual vehicle variants +PASS Asset canonical keys keep unrelated owned cars distinct +PASS Asset candidate keys attach unique unowned variants +PASS Asset filtering rejects relationship facts +PASS Asset contextual names resolve POV ownership +PASS Asset structural phrases trim neighbouring nouns +PASS Asset significance is generic and not fixture-specific +PASS Story Intelligence asset review applies current identity rules +PASS Relationship review requires pair evidence and distinguishes social types +PASS Relationship signals map to broad lookup types +PASS Relationship signals infer friendship without romance +PASS Relationship events preserve chronological story order +PASS Relationship progression keeps chronological state +PASS Relationship observations do not create event spam +PASS Relationship review orders by first story appearance +PASS Relationship evidence priority preserves explicit semantics +PASS Relationship evidence handles retained hostile and incidental examples +PASS Knowledge signals map to existing knowledge states +PASS Knowledge recipient resolves narrator through POV +PASS Knowledge identity reveal preserves subjective timing +PASS Knowledge duplicate statements share canonical keys +PASS Knowledge suspicion and certainty remain distinct +PASS Illustration prompt builder separates spec and prompt +PASS Illustration prompt builder uses realistic image direction +PASS Illustration specification validation catches missing typed fields +PASS Illustration category validation rejects unknown values +PASS Illustration status transitions protect approval flow +PASS Illustration status transitions support archive flow +PASS Illustration metadata flags fallback location labels +PASS Illustration location matching rejects vehicle living room reuse +PASS Illustration automatic generation policy blocks vague fallbacks +PASS Story Memory import image generation defaults are safe +PASS Illustration storage codes are normalised safely +PASS Illustration starter batch has required category counts +PASS Illustration starter generation plan skips successful items +PASS Story Intelligence visualisation archive is preserved +PASS Story Intelligence visualisation runtime is removed +PASS Story Intelligence does not retry exhausted billing quota +PASS Illustration bulk retry result reports counts +PASS Illustration bulk retry skips blocking duplicate stable codes +PASS Illustration provider reports missing image model +PASS Illustration provider omits GPT image response format +PASS Illustration matching rejects adult masculine unknown art for Beth +PASS Illustration matching treats Mrs title as hard feminine evidence +PASS Illustration matching infers mother and aunt as mature feminine +PASS Illustration matching rejects duplicate named portrait allocation +PASS Illustration semantic types prevent bathroom office and ambulance car mismatches +PASS Illustration demand archetypes stay broad and use active template +PASS Story Intelligence evidence extraction prevents observed attribute leakage +PASS Story Intelligence scene call uses strict structured output +PASS Story Intelligence scene schema constrains confidence numbers +PASS Story Intelligence scene schema constrains evidence strings +PASS Story Intelligence temporal resolves chapter anchor and afternoon +PASS Story Intelligence temporal rolls over after midnight +PASS Story Intelligence temporal resolves following morning +PASS Story Intelligence temporal resolves exact day offsets +PASS Story Intelligence temporal resolves following weekday +PASS Story Intelligence temporal resolves evening clock time +PASS Story Intelligence temporal rejects unanchored clock time +PASS Story Intelligence temporal preserves yearless calendar date clues +PASS Story Intelligence temporal resolves yearless calendar dates from context +PASS Story Intelligence temporal inherits previous morning when extraction is empty +PASS Story Intelligence temporal inherits previous evening when extraction is empty +PASS Story Intelligence temporal inherits previous night when extraction is empty +PASS Story Intelligence temporal inherits after midnight advancement +PASS Story Intelligence temporal inherits chapter anchor when extraction is empty +PASS Story Intelligence temporal stays unknown without context or extraction +PASS Story Intelligence temporal explicit date overrides previous context +PASS Story Intelligence temporal preserves vague few days +PASS Core import applies structural chronology to canonical scenes +PASS Story Intelligence temporal importer preserves manual chronology +PASS Story Intelligence temporal materialisation saves canonical chronology +PASS Story Intelligence temporal malformed values are discarded +PASS Story Calendar useful months and sparse navigation +PASS Story Calendar places dated scenes on Monday-first month grid +PASS Story Calendar separates unplaced scenes without guessing +PASS Story Calendar book filter and all books scope work +PASS Story Calendar month navigation uses story dates across years +PASS Story Calendar month dropdown follows displayed month +PASS Story Calendar handles no dated scenes +PASS Story Calendar day details endpoint returns partial +PASS Story Calendar day details endpoint respects book filter +PASS Story Calendar day details endpoint handles empty story date +PASS Story Calendar day details endpoint rejects invalid project +PASS Story Calendar index returns surface partial for AJAX +PASS Story Calendar day selection uses progressive AJAX hooks +PASS Story Intelligence structured metric values validate and import +PASS Story Intelligence structured schema covers complete response model +PASS Story Intelligence structured schema remains fixture agnostic +PASS Illustration assignment repair enforces explicit evidence groups and strict subtypes +PASS Lean import removes replay links while retaining progress +PASS Story Intelligence progress does not prematurely report safe close +PASS Structural import creates scenes before Word sync +PASS Structural import creates first scene without placeholder +PASS Structural import persists paragraph mapping and source text +PASS Structural import persists canonical scene source text +PASS Structural import adds summaries without extra scene AI calls +PASS Core import scan stage defers scenes and characters +PASS Core import basic location detector is conservative +PASS Core import basic location detector consolidates and skips existing matches +PASS Core import basic location detector supports pending parent candidates +PASS Core import character discovery protects accepted locations +PASS Core import gates characters behind basic location review +PASS Core import hides exact existing character names from review +PASS Core import hides exact existing character aliases from review +PASS Core import keeps suspected unknown aliases in review +PASS Core import keeps ambiguous existing character matches in review +PASS Core import keeps new characters in review +PASS Core import auto resolved character evidence is preserved +PASS Core import character evidence is candidate specific +PASS Core import deterministically maps known characters +PASS Core import wizard orders scenes before characters +PASS Core import remaps characters after review +PASS Scan review separates known matches from unresolved names +PASS Story Intelligence uses persisted scene source after restart +PASS Story Intelligence canonical mode bypasses duplicate boundary analysis +PASS Story Intelligence progress uses canonical scene summaries +PASS Story Intelligence downstream imports prefer canonical SceneIDs +PASS Story Intelligence scene prompt no longer asks for duplicate factual summary +PASS Story Intelligence review uses canonical structural summaries and counts +PASS Story Intelligence review centre completion is category scoped +PASS Word sync requires save acknowledgement +PASS Word sync retry resumes existing structure +PASS Story Intelligence enriches existing structural scenes +PASS Core import scene titles ride existing structural AI call +PASS Core import scene title preference is review scoped +PASS Core import scene title preference moved to Detect Scenes +PASS Core import Review Chapters is compact and chapter only +PASS Core import Detect Scenes is compact and owns title option +PASS Book context is canonical import metadata +PASS Names defaults from selected book context +PASS Story Intelligence starts from core import complete +PASS Generated scene titles persist with provenance +PASS Scene title display keeps scene numbers visible +PASS Manuscript text statistics handles pure prose +PASS Manuscript text statistics handles pure dialogue +PASS Manuscript text statistics splits narrative before dialogue +PASS Manuscript text statistics splits dialogue before narrative +PASS Manuscript text statistics handles multiple dialogue passages +PASS Manuscript text statistics supports smart quotes +PASS Manuscript text statistics supports straight quotes +PASS Manuscript text statistics carries multi-paragraph dialogue +PASS Manuscript text statistics returns to prose after continued dialogue +PASS Manuscript text statistics ignores empty paragraphs +PASS Manuscript text statistics reconciles scene totals +PASS Manuscript text statistics aggregates chapter scenes +PASS Manuscript text statistics recalculates existing scene sources +PASS Manuscript text statistics does not invoke AI +PASS Phase 21T repairs durable character understanding +PASS Phase 21U extracts mandatory character appearance fixtures +PASS Character sex hints are conservative and reviewable +PASS Character discovery does not truncate scan review candidates +PASS Character discovery rejects sentence-start words +PASS Character discovery rejects fragments and location names +PASS Manuscript scan preview keeps only auto-selected character candidates +PASS Word Companion scan completion uses chunked transport +PASS Word Companion scan chunks assemble full novel payloads +PASS Word Companion scan chunks reject partial and conflicting payloads +PASS Onboarding wizard keeps character pages inside one main step +PASS Scan review aliases feed Story Intelligence known character context +PASS Name Intelligence package contract is present +PASS Name Intelligence reference data is copied on publish +PASS Name Intelligence repository uses stored procedures +PASS Name Intelligence review warning is wired +PASS Name Intelligence library defaults to all locales +PASS Story Intelligence new-format context uses canonical characters +PASS Story Intelligence character defaults link proposed existing matches +PASS Story Intelligence character defaults ignore generic references +PASS Story Intelligence character defaults keep descriptive identities +PASS Story Intelligence character review uses single identity decision +PASS Story Intelligence auto resolves exact known identities before review +PASS Story Intelligence character matching keeps ambiguous known names visible +PASS Story Intelligence descriptive references consolidate articles +PASS Story Intelligence review omits character metrics dashboard +PASS Story Intelligence resumed chapters use canonical labels +PASS Story Intelligence character review posts selected existing match +PASS Story Intelligence character default changes preserve persisted results +PASS Structural POV rides existing chapter analysis +PASS Structural POV persists through import resolution +PASS Chapter POV derives from canonical scenes +PASS Permanent Analyse My Book starts from saved book +PASS Story Intelligence canonical context carries provenance +PASS Scene prompt protects canonical scene context +PASS Structural setting rides existing chapter analysis +PASS Explicit narrator labels detect deterministic POV +PASS AI POV JSON parses into structural models +PASS Post character review resolves persisted structural POV +PASS Normal scene and chapter saves persist POV +PASS Character merge is a reusable stored procedure workflow +PASS Story Intelligence character review suppresses resolved narrator POV +PASS Story Intelligence character review reuses structured appearance aliases +PASS Entity preferred names are peer aliases +PASS Story Intelligence review evidence includes chapter scene labels +PASS Story Intelligence import enables project metric defaults before save +PASS Project metrics add defaults backfills scene values +PASS Story Intelligence scene prompt uses configured metrics +PASS Story Intelligence scene prompt uses scene characters terminology +PASS Story Intelligence downstream imports support canonical scene results +PASS Story Intelligence runner supplies metrics and Plot Lines +PASS Story Intelligence metric persistence uses configured keys +PASS Story Intelligence stabilisation gate materialises strict and legacy metrics +PASS Story Intelligence modern materialisation owns finalisation boundary +PASS Story Intelligence narrative materialisation reads strict scene results +PASS Story Intelligence stabilisation routes normal users to book +PASS Story Intelligence narrative candidates require review +PASS Story Intelligence discovers Plot Lines without preconfiguration +PASS Story Intelligence matches existing Plot Lines without duplicates +PASS Narrative research prototype fixture builds hierarchy +PASS Narrative sibling hotel fixture generalises hierarchy +PASS Narrative trivial one-scene question is suppressed +PASS Narrative short significant thread survives +PASS Narrative semantic evolution consolidates by continuity +PASS Narrative existing thread matching is supported +PASS Narrative candidate merge and parent fields are persisted +PASS Narrative prompt uses one scene call with compact schema +PASS Narrative production code remains fixture agnostic +PASS Whole-book Plot Intelligence prompt carries full manuscript context +PASS Whole-book Plot Intelligence schema requires timeline event types +PASS Whole-book Plot Intelligence author seed inputs persist safely +PASS Whole-book Plot Intelligence structured author seed match survives +PASS Whole-book Plot Intelligence unmatched seeds become review candidates +PASS Whole-book Plot Intelligence uses dedicated output token headroom +PASS Story Intelligence narrative review displays author seed provenance +PASS Story Intelligence narrative review avoids raw author-facing IDs +PASS Story Intelligence author seed decisions are preserved +PASS Whole-book Plot Intelligence production code remains fixture agnostic +PASS Story Intelligence narrative review creates canonical records via existing procs +PASS Story Intelligence narrative stage follows knowledge +PASS Word Companion replays live current scene to writing panes +PASS Scan review post supports full-book form submissions +PASS StoryPosition rejects incomplete or invalid runtime scene positions +PASS StoryPosition builds canonical runtime scene navigation +PASS StoryPosition derives canonical scene context identity +PASS Writing Context route uses canonical story context service +PASS Writing Context client follows canonical story position events +PASS Writing Context preserves selected tab and avoids event loops +PASS Writing Intent route uses canonical story context and planning data +PASS Writing Intent client uses shared writing follow helper +PASS Obsolete global Word navigation is removed while writing windows remain live +PASS Appearance preferences and ribbon destinations +PASS Toolbar preferences, authorisation and contextual routes +PASS Application navigation resolves authorised project and book context +PASS Writing pair shares canonical follow infrastructure +PASS Read-only scene hydration preserves author intent without editing, analysis or manuscript recomputation +PASS Read-only scene hydration rejects another user's project before loading workspace data +PASS Verified native projection leaves working focus independent +PASS Native launch opens its exact verified scene rather than the book's first scene +PASS Native Intent retrieves the selected scene's existing purpose and chapter objectives +PASS Opening Context and Intent preserves all author-entered decisions verbatim +PASS Unsaved native mapping waits without loading an unrelated saved scene +PASS A stale database checkpoint cannot launch a scene merely claimed by the last heartbeat +PASS Chapter-capable sessions without accepted position evidence cannot launch claimed scene IDs +PASS A verified chapter with no mapped scene can show its own saved chapter intent +PASS A Word cursor/revision change during server loading cannot render the earlier cursor as current +PASS Native partial requests reject mappings that change during data loading +PASS Native Context launch authorises the book before resolving or displaying its scene +PASS Exact document selection cannot fall back to another connected Word instance +PASS Incomplete native session identity is rejected +PASS Repeated writing reads share request-scoped scene and chronological projection tasks +PASS Context retains earlier verified viewpoint knowledge and excludes future transitions +PASS Another character's future secret is not exposed as current knowledge +PASS Relationship reference stops at the current narrative position +PASS Context rejects mismatched project and book scopes +PASS Existing Timeline and inspector callers retain their full editing model path +PASS Intent retrieves saved decisions without computing narrative histories +PASS A future narrative scene cannot leak into timeline context even when its story date is earlier +PASS Initial thread context ranks current relevant unresolved threads rather than dumping every novel thread +PASS Missing viewpoint does not invent a knowledge perspective +PASS Scene navigation follows manuscript order rather than numeric IDs or other books +PASS Large-manuscript navigation is one bounded in-memory projection with no per-scene database queries +MEASURE writing navigation projection: 48 chapters/4800 scenes, 6.6ms, no SQL or Word. +PASS Writing Context and Intent resolve native sessions, preserve decisions and reuse bounded chronological data +PASS Writing Context Plot Lines preserves canonical associations, developments and book access +PASS Writing workspace presence scopes browser windows +PASS Writing workspace client uses session window identity and stable names +PASS Writing workspace launcher uses progressive screen placement +PASS Writing workspace pages register roles without changing follow behavior +PASS Word marker client acknowledgements require authenticated ownership +PASS Word Companion exposes writing workspace launch actions +PASS Word Companion writing screens receive resolved context identifiers +PASS Word Companion canonical markers drive runtime follow +PASS Word Companion runtime follows multiple imported scene anchors +PASS Word Companion existing project book linking remains available +PASS Word Companion document identity survives reconnect +PASS Word Companion multiscreen launch and follow remain reachable +PASS Word Companion modes remain distinct +PASS Writing pages do not require Story Intelligence +PASS Word Companion host script has valid tab mapping +PASS Writing screens show diagnostic empty states +PASS Word Companion three-screen flow logs connection identifiers +PASS Admin Story Intelligence reset returns to diagnostics with messages +PASS Project hard delete clears Story Intelligence dependencies in transaction +PASS Permanent project delete keeps archive and name safety gates +PASS Word manuscript cleanup classifies PlotDirector markers by tag only +PASS Word manuscript cleanup preserves content controls content +PASS Word manuscript cleanup UI separates unlink from clean unlink +PASS Word manuscript unlink keeps Story Intelligence data untouched +PASS Word manuscript cleanup remains relinkable and idempotent +PASS Story Intelligence Review Centre route replaces linear review resume +PASS Story Intelligence obsolete create scene workflow is removed +PASS Story Intelligence Review Centre counts only needs-attention categories +PASS Story Intelligence Review Centre uses independent tile grid +PASS Story Intelligence Review Centre opens with character gate +PASS Story Intelligence review modules are independent after character gate +PASS Story Intelligence review module completion is durable and independent +PASS Story Intelligence review module pages omit wizard chrome +PASS Story Intelligence downstream review uses completed scene analysis +PASS Story Intelligence review posts do not use success interstitials +PASS Story Intelligence legacy review completion routes are deleted +PASS Story Intelligence review forms share busy submit guard +PASS Story Intelligence heavy review modules offer bounded rendering +PASS Story Intelligence Review Centre adds no AI calls +PASS Story Intelligence Review Centre uses bounded summary query +PASS Story Intelligence character review queues enrichment beside plot synthesis +PASS Story Intelligence character enrichment uses persisted SignalR progress +PASS Story Intelligence character enrichment preserves author fields +PASS Story Intelligence character enrichment batches by prompt size +PASS Story Intelligence character enrichment promotes structured facts +PASS Character detail can queue single-character enrichment +PASS Single-character enrichment is persisted and duplicate safe +PASS Character detail enrichment status uses scoped SignalR +PASS Story Intelligence detailed review GETs use selected module paths +PASS Story Intelligence completed Character review remains inspectable +PASS Story Intelligence Review Centre completed modules use canonical destinations +PASS Story Intelligence detailed reviews read persisted candidate pages +PASS Story Intelligence module completion lifecycle uses persisted candidates +PASS Story Intelligence Job 6 uses bounded concurrent chapter execution +PASS Story Intelligence global progress uses whole run scene totals +PASS Story Intelligence recovered provider failures stay operational +PASS Story Intelligence recovered JSON repair stays operational +PASS Story Intelligence terminal failures remain user visible +PASS Story Intelligence global banner remains visible through finalising gaps +PASS Story Intelligence global banner rejects stale live snapshots +PASS Story Intelligence live global progress publishes authoritative scene aggregates +PASS Story Intelligence global progress survives initial SignalR start races +PASS Story Intelligence scene analysis completion barrier releases review +PASS Story Intelligence active progress only appears in global strip +PASS Story Intelligence book actions do not open review centre while running diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-before.jsonl new file mode 100644 index 00000000..fd9e08f7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-before.jsonl @@ -0,0 +1 @@ +{"Books":"B3A3904499942C1A6A05CF4CDA5DE1BBE61AB74B0D7916011BDA053CAF51553F","Chapters":"B4B80FD2CE3D3CE83E3F2761DBB1E88705C19C03DF8263194BE1DDE472A2975F","Scenes":"34A59866B43A2C45DD9016ADC92E886245D02B0A54488B99593EBA97C10E6399","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"4201AD116AADD73EBA0F2504A692F27B8144728766409F4CE830D5C14A5EB351","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-predeploy.jsonl b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-predeploy.jsonl new file mode 100644 index 00000000..fd9e08f7 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-predeploy.jsonl @@ -0,0 +1 @@ +{"Books":"B3A3904499942C1A6A05CF4CDA5DE1BBE61AB74B0D7916011BDA053CAF51553F","Chapters":"B4B80FD2CE3D3CE83E3F2761DBB1E88705C19C03DF8263194BE1DDE472A2975F","Scenes":"34A59866B43A2C45DD9016ADC92E886245D02B0A54488B99593EBA97C10E6399","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"4201AD116AADD73EBA0F2504A692F27B8144728766409F4CE830D5C14A5EB351","Plans":null,"Sessions":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-after.jsonl b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-after.jsonl new file mode 100644 index 00000000..478d3559 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-after.jsonl @@ -0,0 +1 @@ +{"Books":"B3A3904499942C1A6A05CF4CDA5DE1BBE61AB74B0D7916011BDA053CAF51553F","Chapters":"B4B80FD2CE3D3CE83E3F2761DBB1E88705C19C03DF8263194BE1DDE472A2975F","Scenes":"34A59866B43A2C45DD9016ADC92E886245D02B0A54488B99593EBA97C10E6399","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"F4908F399F848DB2C08D76A8FC54F7B91D2F54BE2B4E953C76FD0C44F000CD52","Plans":null,"Sessions":"7B1CB1423D8ACBB77FBA2F4167AE50B5AE61F91BF111251381B1E639F18C11DE"} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-before.jsonl new file mode 100644 index 00000000..478d3559 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/snapshot-readonly-before.jsonl @@ -0,0 +1 @@ +{"Books":"B3A3904499942C1A6A05CF4CDA5DE1BBE61AB74B0D7916011BDA053CAF51553F","Chapters":"B4B80FD2CE3D3CE83E3F2761DBB1E88705C19C03DF8263194BE1DDE472A2975F","Scenes":"34A59866B43A2C45DD9016ADC92E886245D02B0A54488B99593EBA97C10E6399","Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objective":"F4908F399F848DB2C08D76A8FC54F7B91D2F54BE2B4E953C76FD0C44F000CD52","Plans":null,"Sessions":"7B1CB1423D8ACBB77FBA2F4167AE50B5AE61F91BF111251381B1E639F18C11DE"} diff --git a/Docs/Writer/Writer3/Evidence/Phase2C/workspace-browser.log b/Docs/Writer/Writer3/Evidence/Phase2C/workspace-browser.log new file mode 100644 index 00000000..c1a4fdc3 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase2C/workspace-browser.log @@ -0,0 +1 @@ +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Isolated MVC fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/Write-authoring.png b/Docs/Writer/Writer3/Evidence/Phase3A/Write-authoring.png new file mode 100644 index 00000000..13bce28c Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3A/Write-authoring.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/Write-inline-editor.png b/Docs/Writer/Writer3/Evidence/Phase3A/Write-inline-editor.png new file mode 100644 index 00000000..a5aae785 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3A/Write-inline-editor.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow-companion.png b/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow-companion.png new file mode 100644 index 00000000..a387b856 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow-companion.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow.png b/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow.png new file mode 100644 index 00000000..45505d64 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3A/Write-narrow.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/authoring-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/authoring-browser.log new file mode 100644 index 00000000..38ec02d6 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/authoring-browser.log @@ -0,0 +1 @@ +PASS Writer3 authoring browser/simulated PWA: scene/chapter/goal editing, Cancel, escaped Unicode, unrelated dirty fields, note/reminder creation/edit, workflow validation, stale409 retention, navigation guard, chapter-only focus, scope and companion overlay. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/backup.log b/Docs/Writer/Writer3/Evidence/Phase3A/backup.log new file mode 100644 index 00000000..94bcf97b --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/backup.log @@ -0,0 +1 @@ +{"VerifiedDatabase":"PlotDirector_Development"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/build.log b/Docs/Writer/Writer3/Evidence/Phase3A/build.log new file mode 100644 index 00000000..63c8a54a --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/build.log @@ -0,0 +1,16 @@ + Determining projects to restore... + All projects are up-to-date for restore. + PlotDirector.Companion.Protocol -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Protocol/bin/Debug/netstandard2.0/PlotDirector.Companion.Protocol.dll + PlotDirector.Companion.Client -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Client/bin/Debug/netstandard2.0/PlotDirector.Companion.Client.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0-windows10.0.19041.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Tests -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Tests/bin/Debug/net10.0/PlotDirector.Companion.Tests.dll + PlotLine -> /srv/repos/PlotDirector/PlotLine/bin/Debug/net10.0/PlotLine.dll + WritingSolver -> /srv/repos/PlotDirector/Tools/WritingSolver/bin/Debug/net10.0/WritingSolver.dll + PlotLine.Tests -> /srv/repos/PlotDirector/PlotLine.Tests/bin/Debug/net10.0/PlotLine.Tests.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:40.05 diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/cleanup.log b/Docs/Writer/Writer3/Evidence/Phase3A/cleanup.log new file mode 100644 index 00000000..f4b0a841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/cleanup.log @@ -0,0 +1,2 @@ +{"":true} +{"RemainingSyntheticAccounts":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/deployment-journal.log b/Docs/Writer/Writer3/Evidence/Phase3A/deployment-journal.log new file mode 100644 index 00000000..6ba17d74 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/deployment-journal.log @@ -0,0 +1 @@ +-- No entries -- diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/deployment-verification.log b/Docs/Writer/Writer3/Evidence/Phase3A/deployment-verification.log new file mode 100644 index 00000000..737a84ca --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/deployment-verification.log @@ -0,0 +1,6 @@ +active +Local GET 200 +Development TLS GET 200 +57c812a3ded4335d5e6665584b53454e4a71618dcd2e8c58a178639665237f3c /home/nick/writer3-publish-64e1782-2D47cK/PlotLine.dll +57c812a3ded4335d5e6665584b53454e4a71618dcd2e8c58a178639665237f3c /srv/apps/plotdirector-dev/current/PlotLine.dll +.1.0.0+64e17824e930626277d853356405994f75cf6087 diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/focus-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/focus-browser.log new file mode 100644 index 00000000..fa8428ce --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/focus-browser.log @@ -0,0 +1 @@ +PASS unified current work: one selector set, save-only, explicit recording/idempotent repeat, saved display/change, active/mismatched targets, explicit proofreading choice, AudioReview chapter rule, dependent scenes, optional scoped scheduling and book-switch clearing in browser/simulated PWA. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/help-live.log b/Docs/Writer/Writer3/Evidence/Phase3A/help-live.log new file mode 100644 index 00000000..26f45f57 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/help-live.log @@ -0,0 +1 @@ +PASS authenticated browser/simulated PWA: writer3.authoring quick popup, More drawer, full article200; narrow Write and companion screenshots. No author-data mutations. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/invariant-comparison.log b/Docs/Writer/Writer3/Evidence/Phase3A/invariant-comparison.log new file mode 100644 index 00000000..e6ac09f5 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/invariant-comparison.log @@ -0,0 +1 @@ +PASS: all14 read-only author-data hashes unchanged. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/invariants.log b/Docs/Writer/Writer3/Evidence/Phase3A/invariants.log new file mode 100644 index 00000000..89e0e7df --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/invariants.log @@ -0,0 +1 @@ +{"VerifiedDatabase":"PlotDirector_Development","MetricValues":0,"EmptyChapterGoals":0,"ExplicitChecklistItems":2,"ActiveSessions":0,"CanonicalSceneState":"Outlined"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/live-authoring.log b/Docs/Writer/Writer3/Evidence/Phase3A/live-authoring.log new file mode 100644 index 00000000..81d30b93 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/live-authoring.log @@ -0,0 +1 @@ +PASS authenticated Development authoring browser/simulated PWA: actual canonical chapter/scene/goals, long Unicode, note/reminder create/edit, workflow validation, explicit session and note isolation, stale409 retained text, chapter focus/scene selection, scope404 and antiforgery400; explicit disposable fixture edits only. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/live-navigation.log b/Docs/Writer/Writer3/Evidence/Phase3A/live-navigation.log new file mode 100644 index 00000000..ff7ae6ea --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/live-navigation.log @@ -0,0 +1,8 @@ +{ + "checks": [ + "Browser: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted.", + "Simulated PWA: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted." + ], + "physicalWindows": false, + "installedPWA": false +} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/live-workspace.log b/Docs/Writer/Writer3/Evidence/Phase3A/live-workspace.log new file mode 100644 index 00000000..d6e7cc50 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/live-workspace.log @@ -0,0 +1,5 @@ +Request failed /Appearance/Ribbon: net::ERR_ABORTED +Request failed /Appearance/Ribbon: net::ERR_ABORTED +Request failed /Appearance/Ribbon: net::ERR_ABORTED +Request failed /Appearance/Ribbon: net::ERR_ABORTED +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Authenticated Development fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration-266.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration-266.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration-267.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration-267.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration-268.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration-268.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration-269.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration-269.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration-270.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration-270.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/migration.log b/Docs/Writer/Writer3/Evidence/Phase3A/migration.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/navigation-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/navigation-browser.log new file mode 100644 index 00000000..d8157841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/navigation-browser.log @@ -0,0 +1 @@ +PASS Writer3: 168 destination/theme/width/browser/PWA combinations; Home actions, contextual ribbon, authorisation, book switching, reload/back/forward, keyboard focus, Help, legacy fragments and viewport fit. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/preserved-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/preserved-browser.log new file mode 100644 index 00000000..1d743d3a --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/preserved-browser.log @@ -0,0 +1,9 @@ +PASS Writer reference windows: initial failure/retry, window identity/reuse, pinned book, denied/unavailable display permissions, plan navigation, browser/PWA. +PASS pending native response cancellation, unverified mapping refusal, exact-session query parameters and no recomputation for repeated unchanged scenes +PASS native/legacy race, cross-chapter cursor following, repeated presence without commands/focus, status failure recovery, in-flight invalidation, unchanged-scene fragment retry, trusted explicit navigation and acknowledgement without feedback; simulated Chromium protocol, not Word +PASS native source invariant: selection observation contains no ribbon invalidation or range selection (not runtime Word proof) +PASS Manuscript Reader: real Razor/controller, escaped selectable text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus, 3 widths × 4 themes × browser/PWA +PASS explicit Intent assessment, persisted-result load, cancellation, scene isolation and permission feedback +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: browser +PASS real browser periodic audio refresh, repeated Play/Pause, supported seeks, stale/unavailable telemetry and recovery: simulated PWA +PASS Writer intelligence UI: four themes, two widths, browser/PWA; grounded Help Me, explicit audio start/end/note, disabled unsupported controls, month/year calendar and zero-net revision intensity diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/read-contracts.log b/Docs/Writer/Writer3/Evidence/Phase3A/read-contracts.log new file mode 100644 index 00000000..5dd08dd0 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/read-contracts.log @@ -0,0 +1,7 @@ +{"ProcedureName":"SceneCharacter_ListByScene","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"Chapter_Get","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"Scene_ListByChapter","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"RelationshipEvent_ListByScene","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"Location_Get","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"ThreadEvent_ListByScene","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} +{"ProcedureName":"SceneAttachment_ListByScene","HasInsert":0,"HasUpdate":0,"HasDelete":0,"HasExec":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/refinement-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/refinement-browser.log new file mode 100644 index 00000000..7eb47f59 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/refinement-browser.log @@ -0,0 +1 @@ +PASS Phase2C isolated MVC: marker line wrapping, Help placement/popup, readable collapsed content, browser modifier shortcuts, reduced-motion context, overlay Tab exit, five Help articles and existing session heading, retained active AudioReview DOM/notes and independent scroll to media controls. diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/regressions.log b/Docs/Writer/Writer3/Evidence/Phase3A/regressions.log new file mode 100644 index 00000000..b2a1c586 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/regressions.log @@ -0,0 +1,601 @@ +PASS settlement Marker compatibility, nested geometry/style validation, stable route references and existing map/backup/import JSON contracts. +PASS Settlement boundaries preserve anchors, routes and backup/import contracts +PASS shared boundary server integrity, versions/refs/appearance, duplicate/orphan rejection and project import/export/restore contracts. +PASS Shared boundary topology preserves map and project contracts +PASS geography roots, hierarchy, provider-independent fake, cache identities, ambiguity, failures/backoff and rate reservation. +PASS Geographical roots, providers, queue outcomes and access +PASS Intent evidence preserves provenance and author control +PASS Release triage and browser-only onboarding preserve author decisions +PASS Approved native import source and confirmation remain safe +PASS Native installation renewal and revocation remain account/security scoped +PASS Writer authoring blank notes are rejected +PASS Writer authoring reminder length is bounded +PASS Writer authoring priority range is enforced +PASS Writer authoring invalid calendar dates are rejected +PASS Writer authoring negative counts are rejected +PASS Writer authoring ordinary author text remains text, not generated markup +PASS Writer authoring chapter intentions remain optional +PASS Writer authoring missing optional records render as empty values +PASS Writer authoring canonical unbounded supporting text is not arbitrarily truncated +PASS Writer authoring unknown editor types are rejected +PASS Writer inline authoring validation +PASS Writer navigation objective activity mappings use supported session types +PASS Writer navigation ambiguous or unsupported recording activity requires explicit compatible choice +PASS Writer navigation session-only activities never become objective types +PASS Writer navigation destination Home preserves authorised book and saved working focus +PASS Writer navigation destination Home never carries a focus into another book +PASS Writer navigation destination Home refuses unavailable book +PASS Writer navigation destination Write preserves authorised book and saved working focus +PASS Writer navigation destination Write never carries a focus into another book +PASS Writer navigation destination Write refuses unavailable book +PASS Writer navigation destination Explore preserves authorised book and saved working focus +PASS Writer navigation destination Explore never carries a focus into another book +PASS Writer navigation destination Explore refuses unavailable book +PASS Writer navigation destination Plan preserves authorised book and saved working focus +PASS Writer navigation destination Plan never carries a focus into another book +PASS Writer navigation destination Plan refuses unavailable book +PASS Writer navigation destination Review preserves authorised book and saved working focus +PASS Writer navigation destination Review never carries a focus into another book +PASS Writer navigation destination Review refuses unavailable book +PASS Writer navigation destination Reflect preserves authorised book and saved working focus +PASS Writer navigation destination Reflect never carries a focus into another book +PASS Writer navigation destination Reflect refuses unavailable book +PASS Writer navigation destination Dashboard preserves authorised book and saved working focus +PASS Writer navigation destination Dashboard never carries a focus into another book +PASS Writer navigation destination Dashboard refuses unavailable book +PASS Writer navigation legacy query routes still reach their actual workspaces/calendar +PASS Writer navigation old objective setup URL reaches Write +PASS Writer navigation full legacy desk, Journey and Workspaces remain rendered, not retired +PASS Writer navigation book-only new route checks access before metadata +PASS Writer navigation book switching retains Write without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Write +PASS Writer navigation book switching retains Explore without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Explore +PASS Writer navigation book switching retains Plan without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Plan +PASS Writer navigation book switching retains Review without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Review +PASS Writer navigation book switching retains Reflect without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Reflect +PASS Writer navigation case-insensitive bookmarked routes retain destination context +PASS Writer navigation book menu never navigates to a mutation action +PASS Writer navigation new author Home has no fabricated book selection +PASS Writer navigation exploration does not require scenes, plans, project or Word +PASS Writer navigation real read paths exercised without calling author-data writes +PASS Writer 3 destination navigation and scope +PASS Writer foundation reference, Reader, session and verified Word selections never overwrite working focus +PASS Writer foundation cross-book selections require a separate authorised context +PASS Writer foundation a scene cannot be projected without its chapter +PASS Writer foundation incomplete native identity cannot be projected as verified +PASS Writer foundation selected book reaches every queue repository before any result limit +PASS Writer foundation inaccessible project never reaches a queue repository +PASS Writer foundation unresolved route scene never becomes a pinned authorised selection +PASS Writer foundation Preview chooses within the selected book and preserves All Books plans +PASS Writer foundation explicit out-of-scope plan cannot silently select another book +PASS Writer foundation new book may still use its project-wide plan +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation context, queue scope and planning +PASS Writer dashboard book selection filters queues and tasks consistently +PASS Writer dashboard book scope reaches schedule service before selection and active workspace persists +PASS Writer dashboard unknown book cannot fall back to another book +PASS Writer dashboard plan setup retains selected book instead of All Books +PASS Writer dashboard plan setup refuses conflicting project and book +PASS Writer dashboard book-only deep link checks access before metadata +PASS Writer dashboard legacy Write redirect preserves book scope +PASS Writer dashboard Writer contextual commands target implemented workspaces and evidence +PASS Writer dashboard book scope +PASS writing activity baseline excludes pre-existing words +PASS writing activity zero-net replacement retains both sides +PASS writing activity moving stable paragraphs has no word growth +PASS writing activity whitespace-only change has no word growth +PASS writing activity deletion preserves old paragraph scope +PASS writing activity paragraph split does not invent growth +PASS writing activity gross and net reconcile +PASS writing activity large replacement explicitly qualifies token balance +PASS Writing activity measurement +PASS Writer intelligence consecutive playing observations produce actual bounded playback coverage +PASS Writer intelligence replaying ten seconds adds playback but does not duplicate unique coverage +PASS Writer intelligence duplicate sequence never creates more playback time +PASS Writer intelligence seek jump is not listening coverage +PASS Writer intelligence interrupted telemetry does not invent activity across a gap +PASS Writer intelligence an explicit seek never bridges playback coverage even when positions look continuous +PASS Writer intelligence paused state does not manufacture playback intervals +PASS Writer intelligence different media source does not contribute to current coverage +PASS Writer intelligence command expiry is explicitly UTC across browser and Windows time zones +PASS Writer intelligence nonfinite media position is refused +PASS Writer intelligence activities share daily capacity and split across dates without exceeding availability +PASS Writer intelligence insufficient capacity explains failure before persistence +PASS Writer intelligence known lengths produce distinct adjustable budgets rather than equal chapter effort +PASS Writer intelligence empty context produces no invented manuscript observations +PASS Writer intelligence zero-net revision and actual chapter evidence supply bounded actionable suggestions +PASS Writer intelligence recommendations do not diagnose writer block from observations +PASS Writer intelligence and measured review +PASS Manuscript Reader: scoped read-only retrieval, ordering, navigation, empty snapshot, accepted updates, pending isolation and accurate timestamps +PASS Manuscript Reader +PASS Opted-in import capture retains raw paragraph text and opaque occurrence identity +PASS Opaque occurrence IDs, including separate identical dialogue +PASS Saved snapshot and process reconstruction retain occurrence identities +PASS Reliable paragraph move updates derived event scene without copying event +PASS Copied paragraph has a distinct identity and no duplicated story event +PASS Rewritten evidence retains original passage and withholds unconfirmed derived facts +PASS Author confirmation verifies changed evidence +PASS Deleting evidence preserves the event and before text +PASS Scene split preserves every raw Word character +PASS Undo restores grouping and opaque scene identity +PASS Boundary moves between adjacent paragraphs +PASS Adjacent merge retains text and retires, rather than destroys, scene identity +PASS Merge undo restores original scene and prior boundary +PASS Author can explicitly confirm a proposed scene grouping without editing Word prose +PASS Grouping confirmation can be undone without discarding the Word snapshot +PASS Previously excluded import sections remain captured without silently importing their prose on sync +PASS An unresolvable excluded-section boundary refuses mutation instead of guessing where that book's prose starts +PASS Identical short dialogue remains associated with its individual native occurrence +PASS Delta sends only changed prose and retains occurrence order +PASS Lost native hints can reconcile a single rewrite between recognised neighbours without matching a moved/copy candidate +PASS Paragraph split retains only the surviving occurrence identity +PASS Word XML hint is restricted to main document part and forbids external entities +PASS Provider schema is bounded by the actual 97 submitted paragraphs, never the raw source count 99 +PASS Legacy request serialization omits new contract field, preserving checkpoint hashes +PASS Versioned integer confidence validation preserves legacy decimals and rejects new fractional scores +PASS 250,000+ word value snapshot reconciliation (493ms; no Word COM performance claim) +PASS Derived evidence display state cannot change legacy backup hashes or accepted event payloads +PASS Missing primary evidence is excluded from verified story facts while unanchored scene events remain compatible +28 paragraph manuscript assertions passed. +PASS Adoption uses only the completed capture's canonical scene map and retains excluded prose outside the imported book +PASS Reconnection cannot silently restore an excluded chapter into canonical scenes +PASS An unfinished import pauses snapshots without changing its accepted source or checkpoints +PASS Explicitly opted-in save/reconnect uses existing exact-session capture channel +PASS Authorised snapshot persists exact new prose and reconciles opaque paragraph identity +PASS Lost acknowledgement retry cannot apply the snapshot twice +PASS Acknowledgement returns canonical occurrence ID for delta recovery +PASS Cancellation retires only pending snapshot and retains already accepted revision +PASS Another account cannot request manuscript synchronisation +PASS Turning off automatic synchronisation changes only preferences even while imports or scene conflicts pause snapshots +PASS A new chapter repair is not hidden behind an older completed full snapshot receipt +PASS Paragraph manuscript identity, evidence and exact-session synchronisation +PASS Native wizard capture is scoped, durable and independent of Word +PASS Native tray presence and PWA review remain scoped, expiring and non-destructive +PASS Native saved workspace and established import eligibility remain scoped and read-only +PASS Native companion authentication, canonical AI mapping and isolated chapter retry +PASS Solver never discards a corroborated concern or exhausts navigation before verification +PASS Solver result evidence covers all reachable diagnoses without changing Stage 1 semantics +PASS Solver result copy follows actual answers, intention, variants and revision +PASS Solver workspace CTAs resolve authorised project/character context and real routes +PASS Stage 1 preserves all 60 strict conversations, corroboration, intent, reachability and adoption +PASS Stage 1 evidence gates, required follow-ups, bounded multi-select and neutral choices are enforced +PASS Neutral endpoints require explicit valid terminal declarations +PASS Neutral reassurance follows selected concerns without evidence and survives revision +PASS Scene navigation does not invent purpose evidence; genuine D05 witnesses survive +PASS D50 requires actual series evidence and preserves D50/D51 witnesses +PASS Curated V2 preserves 60 literal paths and enforces eight explicit Development review exceptions +PASS Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour +PASS Curated V2 passes normal validation and invalid publication stays guarded +PASS Payoff covers all 52 diagnoses with seven archetypes and semantic uncertainty ordering without graph changes +PASS Development review observes every acceptance prefix without changing signals, results or graph; access and durable capture stay isolated +PASS All permanent writing problems have distinct editorial content, intent, metadata, links and real images +PASS Clean solver completion preserves private evidence and permanent indexable URLs +PASS Writing Solver anonymous state is protected, expires and rejects stale versions +PASS Writing Solver scoring, multi-select, revision, fallback and graph routes +PASS Writing Solver import rejects invalid graphs and editorial identities +PASS Book recovery read-only exports and receipt retries remain accessible +PASS Book recovery validates integrity, selection and author-bound upload generations +PASS Project export and restore access gates enforce author and ownership boundaries +PASS Retired checklist bookmarks redirect without report access +PASS Ribbon operation identity and semantic icons stay consistent +PASS Maps Story projects canonical hierarchy, sequence, journeys and evidence without changing geography +Maps Story scale: 500 scenes, 30 characters, 5,000 appearances in 15ms. +PASS Maps Story scales to 500 scenes and 5,000 appearances +PASS Maps Story enforces access and uses bounded repository batches +PASS Maps appearance validates colours, normalized raster images and portable backups +PASS Maps reference assets enforce access +PASS Maps validate rough geometry, relationships, Location intent and access boundaries +PASS Subscription entitlement evaluates trials, paid access, overrides and real plan limits +PASS Subscription overrides control access and dashboard presentation without trial contradictions +PASS Subscription enforcement is concurrent, audited and admin-authorised +PASS Plot Health stays scene-based with 12,000 contributions +PASS Plot Health preserves Discovery planning and boundary contradictions +PASS Plot Health separates stored status and meaningful-progress clocks +PASS Plot Health explains question, payoff, closure and boundary evidence +PASS Plot Health evaluates explicit targets and scoped line rollups +PASS Plot Health respects scenario coverage and ordered chapter identities +PASS Plot Lines Focus and Weave preserve gaps and shared-scene identity +PASS Plot Lines thread, enrichment and Timeline inspector contracts hold +PASS Plot Lines composition remains bounded with a large generated weave +PASS Exception review uses evidence, identity, consequence and directional conflicts +PASS Exception assessment preserves author decisions and scene history +PASS Character card widths reflect displayed text without changing character data +PASS Relationships workspace large cast, temporal states and canonical edits +PASS Scene relationship proposals preserve direction and validate acceptance +PASS Location and asset merges require confirmation and distinct records +PASS Location persisted analysis preserves contextual bedrooms and setting provenance +PASS Location consequence outranks capped recurrence +PASS Location scene significance is attributed only to actual settings +PASS Location significance preserves hierarchy and independent uncertainty +PASS Character profile age uses canonical reference chronology +PASS Character detail and date-only save retain canonical DOB +PASS Story Point presence, previous appearances and age cross book boundaries +PASS Story Point knowledge stops at selected narrative position +PASS Story Point relationships and independent asset state are historical +PASS Story Point threads and continuity warnings respect future evidence +PASS Story Point ownership, AJAX and bounded batch loading require no AI +PASS Story Point narrative tie breakers match canonical order +PASS Malformed confidence 0. is repaired to 0.0 +PASS Markdown fences are stripped +PASS Unescaped backslash in evidence is repaired +PASS Truncated JSON is rejected +PASS Repaired JSON deserialises into SceneIntelligenceScene +PASS Chapter Structure confidence 0. repairs and deserialises +PASS Chapter Structure confidence 0. 8 repairs and deserialises +PASS Chapter Structure confidence 7 .5 repairs when unambiguous +PASS JSON repair leaves decimal-looking prose unchanged +PASS Chapter Structure semantic validation still rejects out-of-range repaired confidence +PASS Structural scene detection parser failure uses friendly diagnostics and retry +PASS Chapter Structure boundary normaliser repairs gaps and overlaps +PASS Chapter Structure boundary normaliser preserves valid coverage +PASS Chapter Structure boundary normaliser handles terminal ghost paragraph +PASS Chapter Structure boundary normaliser discards multiple terminal ghost paragraphs +PASS Chapter Structure boundary normaliser replays full book terminal empty failure +PASS Chapter Structure boundary normaliser keeps meaningful end overflow repair +PASS Chapter Structure boundary normaliser preserves genuine inverted ranges for validation +PASS Structural Word mapping uses paragraph map as authoritative text +PASS Structural Word mapping includes filtered Word paragraphs in source coverage +PASS Structural Word mapping fails precisely when map metadata is incomplete +PASS Structural Word mapping keeps trailing empty normalisation mapped +PASS Shared parser reports raw chapter output on unrecoverable JSON +PASS Character filtering rejects generic groups +PASS Character filtering preserves titled names +PASS Location filtering rejects merged phrases +PASS Location filtering preserves story locations +PASS Location canonical keys merge trivial variants +PASS Location contextual names use POV and structural setting +PASS Location canonical keys merge punctuation and safe plurals +PASS Location candidate consolidation handles generic review variants +PASS Location candidate identity is parent-aware for generic sub-locations +PASS Locations page uses hierarchical sort order +PASS Location review UX supports large candidate sets +PASS Story Intelligence auto resolves exact known locations before review +PASS Story Intelligence location review uses single identity decision +PASS Asset filtering rejects generic objects +PASS Asset filtering preserves story assets +PASS Asset canonical keys merge trivial variants +PASS Asset canonical keys merge contextual vehicle variants +PASS Asset canonical keys keep unrelated owned cars distinct +PASS Asset candidate keys attach unique unowned variants +PASS Asset filtering rejects relationship facts +PASS Asset contextual names resolve POV ownership +PASS Asset structural phrases trim neighbouring nouns +PASS Asset significance is generic and not fixture-specific +PASS Story Intelligence asset review applies current identity rules +PASS Relationship review requires pair evidence and distinguishes social types +PASS Relationship signals map to broad lookup types +PASS Relationship signals infer friendship without romance +PASS Relationship events preserve chronological story order +PASS Relationship progression keeps chronological state +PASS Relationship observations do not create event spam +PASS Relationship review orders by first story appearance +PASS Relationship evidence priority preserves explicit semantics +PASS Relationship evidence handles retained hostile and incidental examples +PASS Knowledge signals map to existing knowledge states +PASS Knowledge recipient resolves narrator through POV +PASS Knowledge identity reveal preserves subjective timing +PASS Knowledge duplicate statements share canonical keys +PASS Knowledge suspicion and certainty remain distinct +PASS Illustration prompt builder separates spec and prompt +PASS Illustration prompt builder uses realistic image direction +PASS Illustration specification validation catches missing typed fields +PASS Illustration category validation rejects unknown values +PASS Illustration status transitions protect approval flow +PASS Illustration status transitions support archive flow +PASS Illustration metadata flags fallback location labels +PASS Illustration location matching rejects vehicle living room reuse +PASS Illustration automatic generation policy blocks vague fallbacks +PASS Story Memory import image generation defaults are safe +PASS Illustration storage codes are normalised safely +PASS Illustration starter batch has required category counts +PASS Illustration starter generation plan skips successful items +PASS Story Intelligence visualisation archive is preserved +PASS Story Intelligence visualisation runtime is removed +PASS Story Intelligence does not retry exhausted billing quota +PASS Illustration bulk retry result reports counts +PASS Illustration bulk retry skips blocking duplicate stable codes +PASS Illustration provider reports missing image model +PASS Illustration provider omits GPT image response format +PASS Illustration matching rejects adult masculine unknown art for Beth +PASS Illustration matching treats Mrs title as hard feminine evidence +PASS Illustration matching infers mother and aunt as mature feminine +PASS Illustration matching rejects duplicate named portrait allocation +PASS Illustration semantic types prevent bathroom office and ambulance car mismatches +PASS Illustration demand archetypes stay broad and use active template +PASS Story Intelligence evidence extraction prevents observed attribute leakage +PASS Story Intelligence scene call uses strict structured output +PASS Story Intelligence scene schema constrains confidence numbers +PASS Story Intelligence scene schema constrains evidence strings +PASS Story Intelligence temporal resolves chapter anchor and afternoon +PASS Story Intelligence temporal rolls over after midnight +PASS Story Intelligence temporal resolves following morning +PASS Story Intelligence temporal resolves exact day offsets +PASS Story Intelligence temporal resolves following weekday +PASS Story Intelligence temporal resolves evening clock time +PASS Story Intelligence temporal rejects unanchored clock time +PASS Story Intelligence temporal preserves yearless calendar date clues +PASS Story Intelligence temporal resolves yearless calendar dates from context +PASS Story Intelligence temporal inherits previous morning when extraction is empty +PASS Story Intelligence temporal inherits previous evening when extraction is empty +PASS Story Intelligence temporal inherits previous night when extraction is empty +PASS Story Intelligence temporal inherits after midnight advancement +PASS Story Intelligence temporal inherits chapter anchor when extraction is empty +PASS Story Intelligence temporal stays unknown without context or extraction +PASS Story Intelligence temporal explicit date overrides previous context +PASS Story Intelligence temporal preserves vague few days +PASS Core import applies structural chronology to canonical scenes +PASS Story Intelligence temporal importer preserves manual chronology +PASS Story Intelligence temporal materialisation saves canonical chronology +PASS Story Intelligence temporal malformed values are discarded +PASS Story Calendar useful months and sparse navigation +PASS Story Calendar places dated scenes on Monday-first month grid +PASS Story Calendar separates unplaced scenes without guessing +PASS Story Calendar book filter and all books scope work +PASS Story Calendar month navigation uses story dates across years +PASS Story Calendar month dropdown follows displayed month +PASS Story Calendar handles no dated scenes +PASS Story Calendar day details endpoint returns partial +PASS Story Calendar day details endpoint respects book filter +PASS Story Calendar day details endpoint handles empty story date +PASS Story Calendar day details endpoint rejects invalid project +PASS Story Calendar index returns surface partial for AJAX +PASS Story Calendar day selection uses progressive AJAX hooks +PASS Story Intelligence structured metric values validate and import +PASS Story Intelligence structured schema covers complete response model +PASS Story Intelligence structured schema remains fixture agnostic +PASS Illustration assignment repair enforces explicit evidence groups and strict subtypes +PASS Lean import removes replay links while retaining progress +PASS Story Intelligence progress does not prematurely report safe close +PASS Structural import creates scenes before Word sync +PASS Structural import creates first scene without placeholder +PASS Structural import persists paragraph mapping and source text +PASS Structural import persists canonical scene source text +PASS Structural import adds summaries without extra scene AI calls +PASS Core import scan stage defers scenes and characters +PASS Core import basic location detector is conservative +PASS Core import basic location detector consolidates and skips existing matches +PASS Core import basic location detector supports pending parent candidates +PASS Core import character discovery protects accepted locations +PASS Core import gates characters behind basic location review +PASS Core import hides exact existing character names from review +PASS Core import hides exact existing character aliases from review +PASS Core import keeps suspected unknown aliases in review +PASS Core import keeps ambiguous existing character matches in review +PASS Core import keeps new characters in review +PASS Core import auto resolved character evidence is preserved +PASS Core import character evidence is candidate specific +PASS Core import deterministically maps known characters +PASS Core import wizard orders scenes before characters +PASS Core import remaps characters after review +PASS Scan review separates known matches from unresolved names +PASS Story Intelligence uses persisted scene source after restart +PASS Story Intelligence canonical mode bypasses duplicate boundary analysis +PASS Story Intelligence progress uses canonical scene summaries +PASS Story Intelligence downstream imports prefer canonical SceneIDs +PASS Story Intelligence scene prompt no longer asks for duplicate factual summary +PASS Story Intelligence review uses canonical structural summaries and counts +PASS Story Intelligence review centre completion is category scoped +PASS Word sync requires save acknowledgement +PASS Word sync retry resumes existing structure +PASS Story Intelligence enriches existing structural scenes +PASS Core import scene titles ride existing structural AI call +PASS Core import scene title preference is review scoped +PASS Core import scene title preference moved to Detect Scenes +PASS Core import Review Chapters is compact and chapter only +PASS Core import Detect Scenes is compact and owns title option +PASS Book context is canonical import metadata +PASS Names defaults from selected book context +PASS Story Intelligence starts from core import complete +PASS Generated scene titles persist with provenance +PASS Scene title display keeps scene numbers visible +PASS Manuscript text statistics handles pure prose +PASS Manuscript text statistics handles pure dialogue +PASS Manuscript text statistics splits narrative before dialogue +PASS Manuscript text statistics splits dialogue before narrative +PASS Manuscript text statistics handles multiple dialogue passages +PASS Manuscript text statistics supports smart quotes +PASS Manuscript text statistics supports straight quotes +PASS Manuscript text statistics carries multi-paragraph dialogue +PASS Manuscript text statistics returns to prose after continued dialogue +PASS Manuscript text statistics ignores empty paragraphs +PASS Manuscript text statistics reconciles scene totals +PASS Manuscript text statistics aggregates chapter scenes +PASS Manuscript text statistics recalculates existing scene sources +PASS Manuscript text statistics does not invoke AI +PASS Phase 21T repairs durable character understanding +PASS Phase 21U extracts mandatory character appearance fixtures +PASS Character sex hints are conservative and reviewable +PASS Character discovery does not truncate scan review candidates +PASS Character discovery rejects sentence-start words +PASS Character discovery rejects fragments and location names +PASS Manuscript scan preview keeps only auto-selected character candidates +PASS Word Companion scan completion uses chunked transport +PASS Word Companion scan chunks assemble full novel payloads +PASS Word Companion scan chunks reject partial and conflicting payloads +PASS Onboarding wizard keeps character pages inside one main step +PASS Scan review aliases feed Story Intelligence known character context +PASS Name Intelligence package contract is present +PASS Name Intelligence reference data is copied on publish +PASS Name Intelligence repository uses stored procedures +PASS Name Intelligence review warning is wired +PASS Name Intelligence library defaults to all locales +PASS Story Intelligence new-format context uses canonical characters +PASS Story Intelligence character defaults link proposed existing matches +PASS Story Intelligence character defaults ignore generic references +PASS Story Intelligence character defaults keep descriptive identities +PASS Story Intelligence character review uses single identity decision +PASS Story Intelligence auto resolves exact known identities before review +PASS Story Intelligence character matching keeps ambiguous known names visible +PASS Story Intelligence descriptive references consolidate articles +PASS Story Intelligence review omits character metrics dashboard +PASS Story Intelligence resumed chapters use canonical labels +PASS Story Intelligence character review posts selected existing match +PASS Story Intelligence character default changes preserve persisted results +PASS Structural POV rides existing chapter analysis +PASS Structural POV persists through import resolution +PASS Chapter POV derives from canonical scenes +PASS Permanent Analyse My Book starts from saved book +PASS Story Intelligence canonical context carries provenance +PASS Scene prompt protects canonical scene context +PASS Structural setting rides existing chapter analysis +PASS Explicit narrator labels detect deterministic POV +PASS AI POV JSON parses into structural models +PASS Post character review resolves persisted structural POV +PASS Normal scene and chapter saves persist POV +PASS Character merge is a reusable stored procedure workflow +PASS Story Intelligence character review suppresses resolved narrator POV +PASS Story Intelligence character review reuses structured appearance aliases +PASS Entity preferred names are peer aliases +PASS Story Intelligence review evidence includes chapter scene labels +PASS Story Intelligence import enables project metric defaults before save +PASS Project metrics add defaults backfills scene values +PASS Story Intelligence scene prompt uses configured metrics +PASS Story Intelligence scene prompt uses scene characters terminology +PASS Story Intelligence downstream imports support canonical scene results +PASS Story Intelligence runner supplies metrics and Plot Lines +PASS Story Intelligence metric persistence uses configured keys +PASS Story Intelligence stabilisation gate materialises strict and legacy metrics +PASS Story Intelligence modern materialisation owns finalisation boundary +PASS Story Intelligence narrative materialisation reads strict scene results +PASS Story Intelligence stabilisation routes normal users to book +PASS Story Intelligence narrative candidates require review +PASS Story Intelligence discovers Plot Lines without preconfiguration +PASS Story Intelligence matches existing Plot Lines without duplicates +PASS Narrative research prototype fixture builds hierarchy +PASS Narrative sibling hotel fixture generalises hierarchy +PASS Narrative trivial one-scene question is suppressed +PASS Narrative short significant thread survives +PASS Narrative semantic evolution consolidates by continuity +PASS Narrative existing thread matching is supported +PASS Narrative candidate merge and parent fields are persisted +PASS Narrative prompt uses one scene call with compact schema +PASS Narrative production code remains fixture agnostic +PASS Whole-book Plot Intelligence prompt carries full manuscript context +PASS Whole-book Plot Intelligence schema requires timeline event types +PASS Whole-book Plot Intelligence author seed inputs persist safely +PASS Whole-book Plot Intelligence structured author seed match survives +PASS Whole-book Plot Intelligence unmatched seeds become review candidates +PASS Whole-book Plot Intelligence uses dedicated output token headroom +PASS Story Intelligence narrative review displays author seed provenance +PASS Story Intelligence narrative review avoids raw author-facing IDs +PASS Story Intelligence author seed decisions are preserved +PASS Whole-book Plot Intelligence production code remains fixture agnostic +PASS Story Intelligence narrative review creates canonical records via existing procs +PASS Story Intelligence narrative stage follows knowledge +PASS Word Companion replays live current scene to writing panes +PASS Scan review post supports full-book form submissions +PASS StoryPosition rejects incomplete or invalid runtime scene positions +PASS StoryPosition builds canonical runtime scene navigation +PASS StoryPosition derives canonical scene context identity +PASS Writing Context route uses canonical story context service +PASS Writing Context client follows canonical story position events +PASS Writing Context preserves selected tab and avoids event loops +PASS Writing Intent route uses canonical story context and planning data +PASS Writing Intent client uses shared writing follow helper +PASS Obsolete global Word navigation is removed while writing windows remain live +PASS Appearance preferences and ribbon destinations +PASS Toolbar preferences, authorisation and contextual routes +PASS Application navigation resolves authorised project and book context +PASS Writing pair shares canonical follow infrastructure +PASS Read-only scene hydration preserves author intent without editing, analysis or manuscript recomputation +PASS Read-only scene hydration rejects another user's project before loading workspace data +PASS Verified native projection leaves working focus independent +PASS Native launch opens its exact verified scene rather than the book's first scene +PASS Native Intent retrieves the selected scene's existing purpose and chapter objectives +PASS Opening Context and Intent preserves all author-entered decisions verbatim +PASS Unsaved native mapping waits without loading an unrelated saved scene +PASS A stale database checkpoint cannot launch a scene merely claimed by the last heartbeat +PASS Chapter-capable sessions without accepted position evidence cannot launch claimed scene IDs +PASS A verified chapter with no mapped scene can show its own saved chapter intent +PASS A Word cursor/revision change during server loading cannot render the earlier cursor as current +PASS Native partial requests reject mappings that change during data loading +PASS Native Context launch authorises the book before resolving or displaying its scene +PASS Exact document selection cannot fall back to another connected Word instance +PASS Incomplete native session identity is rejected +PASS Repeated writing reads share request-scoped scene and chronological projection tasks +PASS Context retains earlier verified viewpoint knowledge and excludes future transitions +PASS Another character's future secret is not exposed as current knowledge +PASS Relationship reference stops at the current narrative position +PASS Context rejects mismatched project and book scopes +PASS Existing Timeline and inspector callers retain their full editing model path +PASS Intent retrieves saved decisions without computing narrative histories +PASS A future narrative scene cannot leak into timeline context even when its story date is earlier +PASS Initial thread context ranks current relevant unresolved threads rather than dumping every novel thread +PASS Missing viewpoint does not invent a knowledge perspective +PASS Scene navigation follows manuscript order rather than numeric IDs or other books +PASS Large-manuscript navigation is one bounded in-memory projection with no per-scene database queries +MEASURE writing navigation projection: 48 chapters/4800 scenes, 1.9ms, no SQL or Word. +PASS Writing Context and Intent resolve native sessions, preserve decisions and reuse bounded chronological data +PASS Writing Context Plot Lines preserves canonical associations, developments and book access +PASS Writing workspace presence scopes browser windows +PASS Writing workspace client uses session window identity and stable names +PASS Writing workspace launcher uses progressive screen placement +PASS Writing workspace pages register roles without changing follow behavior +PASS Word marker client acknowledgements require authenticated ownership +PASS Word Companion exposes writing workspace launch actions +PASS Word Companion writing screens receive resolved context identifiers +PASS Word Companion canonical markers drive runtime follow +PASS Word Companion runtime follows multiple imported scene anchors +PASS Word Companion existing project book linking remains available +PASS Word Companion document identity survives reconnect +PASS Word Companion multiscreen launch and follow remain reachable +PASS Word Companion modes remain distinct +PASS Writing pages do not require Story Intelligence +PASS Word Companion host script has valid tab mapping +PASS Writing screens show diagnostic empty states +PASS Word Companion three-screen flow logs connection identifiers +PASS Admin Story Intelligence reset returns to diagnostics with messages +PASS Project hard delete clears Story Intelligence dependencies in transaction +PASS Permanent project delete keeps archive and name safety gates +PASS Word manuscript cleanup classifies PlotDirector markers by tag only +PASS Word manuscript cleanup preserves content controls content +PASS Word manuscript cleanup UI separates unlink from clean unlink +PASS Word manuscript unlink keeps Story Intelligence data untouched +PASS Word manuscript cleanup remains relinkable and idempotent +PASS Story Intelligence Review Centre route replaces linear review resume +PASS Story Intelligence obsolete create scene workflow is removed +PASS Story Intelligence Review Centre counts only needs-attention categories +PASS Story Intelligence Review Centre uses independent tile grid +PASS Story Intelligence Review Centre opens with character gate +PASS Story Intelligence review modules are independent after character gate +PASS Story Intelligence review module completion is durable and independent +PASS Story Intelligence review module pages omit wizard chrome +PASS Story Intelligence downstream review uses completed scene analysis +PASS Story Intelligence review posts do not use success interstitials +PASS Story Intelligence legacy review completion routes are deleted +PASS Story Intelligence review forms share busy submit guard +PASS Story Intelligence heavy review modules offer bounded rendering +PASS Story Intelligence Review Centre adds no AI calls +PASS Story Intelligence Review Centre uses bounded summary query +PASS Story Intelligence character review queues enrichment beside plot synthesis +PASS Story Intelligence character enrichment uses persisted SignalR progress +PASS Story Intelligence character enrichment preserves author fields +PASS Story Intelligence character enrichment batches by prompt size +PASS Story Intelligence character enrichment promotes structured facts +PASS Character detail can queue single-character enrichment +PASS Single-character enrichment is persisted and duplicate safe +PASS Character detail enrichment status uses scoped SignalR +PASS Story Intelligence detailed review GETs use selected module paths +PASS Story Intelligence completed Character review remains inspectable +PASS Story Intelligence Review Centre completed modules use canonical destinations +PASS Story Intelligence detailed reviews read persisted candidate pages +PASS Story Intelligence module completion lifecycle uses persisted candidates +PASS Story Intelligence Job 6 uses bounded concurrent chapter execution +PASS Story Intelligence global progress uses whole run scene totals +PASS Story Intelligence recovered provider failures stay operational +PASS Story Intelligence recovered JSON repair stays operational +PASS Story Intelligence terminal failures remain user visible +PASS Story Intelligence global banner remains visible through finalising gaps +PASS Story Intelligence global banner rejects stale live snapshots +PASS Story Intelligence live global progress publishes authoritative scene aggregates +PASS Story Intelligence global progress survives initial SignalR start races +PASS Story Intelligence scene analysis completion barrier releases review +PASS Story Intelligence active progress only appears in global strip +PASS Story Intelligence book actions do not open review centre while running diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-after.jsonl b/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-after.jsonl new file mode 100644 index 00000000..8e0e9f75 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-after.jsonl @@ -0,0 +1 @@ +{"Books":"F8C616CDC08E1A31F1FA3770072219FFC52FBCCE12EDC29B8F27525CF1ED13F4","Chapters":"3E9E2CB6F4D0BC95006890923C4203EF1F20B23675266E9402BB1A0C403E6E00","Scenes":"3D38C6B390D969B1E4148302D49469BAB0635D1C269D5EA92947CF7808428DB7","Goals":"2CFB9B801FB0D1C01E3D3329133A97E034B5E216A83C9949F8EB03264CA5F746","Workflow":"6C0751B3F991CFC8467E5B2964A69168886628FE37E5237A3D7069C64C2B10A0","Checklist":"50713C64E702BD50ED3F64A6DBD9C978241914D2F1AA2E6DECE9A1A5C0084A70","Notes":"DCD027B40F4DA91F157862CCFEA0A3163BBCF6A58F939660D990D7AFD8BDB704","Objective":"68C7AEA74DD5D719BCB862BDC37B67DF51CF11E5DD1909E900C05EB95FEF26EA","Plans":null,"Sessions":"84C50DB552802601F7B76A52C305056E7577E5A195285F3E8C94245FABE5F859","Metrics":null,"Purposes":null,"Attachments":null,"Appearances":"EFC345A25295BE924A9980FB48DFC1552F837FD77D7B1593FFE0DCD819DEDEE6"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-before.jsonl new file mode 100644 index 00000000..8e0e9f75 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/snapshot-readonly-before.jsonl @@ -0,0 +1 @@ +{"Books":"F8C616CDC08E1A31F1FA3770072219FFC52FBCCE12EDC29B8F27525CF1ED13F4","Chapters":"3E9E2CB6F4D0BC95006890923C4203EF1F20B23675266E9402BB1A0C403E6E00","Scenes":"3D38C6B390D969B1E4148302D49469BAB0635D1C269D5EA92947CF7808428DB7","Goals":"2CFB9B801FB0D1C01E3D3329133A97E034B5E216A83C9949F8EB03264CA5F746","Workflow":"6C0751B3F991CFC8467E5B2964A69168886628FE37E5237A3D7069C64C2B10A0","Checklist":"50713C64E702BD50ED3F64A6DBD9C978241914D2F1AA2E6DECE9A1A5C0084A70","Notes":"DCD027B40F4DA91F157862CCFEA0A3163BBCF6A58F939660D990D7AFD8BDB704","Objective":"68C7AEA74DD5D719BCB862BDC37B67DF51CF11E5DD1909E900C05EB95FEF26EA","Plans":null,"Sessions":"84C50DB552802601F7B76A52C305056E7577E5A195285F3E8C94245FABE5F859","Metrics":null,"Purposes":null,"Attachments":null,"Appearances":"EFC345A25295BE924A9980FB48DFC1552F837FD77D7B1593FFE0DCD819DEDEE6"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/sql-regression.log b/Docs/Writer/Writer3/Evidence/Phase3A/sql-regression.log new file mode 100644 index 00000000..475ecb43 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/sql-regression.log @@ -0,0 +1,7 @@ +{"":2146} +{"":3340} +{"":2146} +{"":3340} +{"Result":"PASS transactional inline authoring: pure reads, scoped writes, long Unicode, canonical stores, no default checklist, independent status, stale rejection, rollback and access boundaries"} +{"":2147} +{"Result":"PASS repeated create rejects stale collection token and rolls back cleanly"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3A/workspace-browser.log b/Docs/Writer/Writer3/Evidence/Phase3A/workspace-browser.log new file mode 100644 index 00000000..c1a4fdc3 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3A/workspace-browser.log @@ -0,0 +1 @@ +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Isolated MVC fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/Write-after.png b/Docs/Writer/Writer3/Evidence/Phase3B/Write-after.png new file mode 100644 index 00000000..c0dfa3ed Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3B/Write-after.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/Write-before.png b/Docs/Writer/Writer3/Evidence/Phase3B/Write-before.png new file mode 100644 index 00000000..ff307116 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3B/Write-before.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/Write-narrow.png b/Docs/Writer/Writer3/Evidence/Phase3B/Write-narrow.png new file mode 100644 index 00000000..9b8817a5 Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3B/Write-narrow.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/Write-verified-simulated.png b/Docs/Writer/Writer3/Evidence/Phase3B/Write-verified-simulated.png new file mode 100644 index 00000000..ffa2c96e Binary files /dev/null and b/Docs/Writer/Writer3/Evidence/Phase3B/Write-verified-simulated.png differ diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/authoring-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/authoring-browser.log new file mode 100644 index 00000000..38ec02d6 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/authoring-browser.log @@ -0,0 +1 @@ +PASS Writer3 authoring browser/simulated PWA: scene/chapter/goal editing, Cancel, escaped Unicode, unrelated dirty fields, note/reminder creation/edit, workflow validation, stale409 retention, navigation guard, chapter-only focus, scope and companion overlay. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/backup.log b/Docs/Writer/Writer3/Evidence/Phase3B/backup.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/before-live.log b/Docs/Writer/Writer3/Evidence/Phase3B/before-live.log new file mode 100644 index 00000000..4bb04de1 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/before-live.log @@ -0,0 +1 @@ +PASS pre-release authenticated capture. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/build.log b/Docs/Writer/Writer3/Evidence/Phase3B/build.log new file mode 100644 index 00000000..a5bf7c8b --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/build.log @@ -0,0 +1,16 @@ + Determining projects to restore... + All projects are up-to-date for restore. + PlotDirector.Companion.Protocol -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Protocol/bin/Debug/netstandard2.0/PlotDirector.Companion.Protocol.dll + PlotDirector.Companion.Client -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Client/bin/Debug/netstandard2.0/PlotDirector.Companion.Client.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Agent -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Agent/bin/Debug/net10.0-windows10.0.19041.0/PlotDirector.Companion.Agent.dll + PlotDirector.Companion.Tests -> /srv/repos/PlotDirector/PlotDirector.NativeCompanion/Tests/bin/Debug/net10.0/PlotDirector.Companion.Tests.dll + PlotLine -> /srv/repos/PlotDirector/PlotLine/bin/Debug/net10.0/PlotLine.dll + WritingSolver -> /srv/repos/PlotDirector/Tools/WritingSolver/bin/Debug/net10.0/WritingSolver.dll + PlotLine.Tests -> /srv/repos/PlotDirector/PlotLine.Tests/bin/Debug/net10.0/PlotLine.Tests.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:31.34 diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/cleanup.log b/Docs/Writer/Writer3/Evidence/Phase3B/cleanup.log new file mode 100644 index 00000000..f4b0a841 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/cleanup.log @@ -0,0 +1,2 @@ +{"":true} +{"RemainingSyntheticAccounts":0} diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/deployment-journal.log b/Docs/Writer/Writer3/Evidence/Phase3B/deployment-journal.log new file mode 100644 index 00000000..6ba17d74 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/deployment-journal.log @@ -0,0 +1 @@ +-- No entries -- diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/deployment-verification.log b/Docs/Writer/Writer3/Evidence/Phase3B/deployment-verification.log new file mode 100644 index 00000000..6752b022 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/deployment-verification.log @@ -0,0 +1,6 @@ +active +Local GET 200 +Development TLS GET 200 +26aabdca47bf9dbcf86981f316c9f0571f091ae8e11ea303b135020f0f163486 /home/nick/writer3b-publish-9969c9b-hC0LLJ/PlotLine.dll +26aabdca47bf9dbcf86981f316c9f0571f091ae8e11ea303b135020f0f163486 /srv/apps/plotdirector-dev/current/PlotLine.dll +.1.0.0+9969c9b47be8ee0bc036687e516031c6c1e6e3bc diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/focus-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/focus-browser.log new file mode 100644 index 00000000..fa8428ce --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/focus-browser.log @@ -0,0 +1 @@ +PASS unified current work: one selector set, save-only, explicit recording/idempotent repeat, saved display/change, active/mismatched targets, explicit proofreading choice, AudioReview chapter rule, dependent scenes, optional scoped scheduling and book-switch clearing in browser/simulated PWA. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/invariants.log b/Docs/Writer/Writer3/Evidence/Phase3B/invariants.log new file mode 100644 index 00000000..cc323547 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/invariants.log @@ -0,0 +1 @@ +PASS:14 scoped author/manuscript-data hashes unchanged through authenticated read-only qualification. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/live-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/live-browser.log new file mode 100644 index 00000000..8b1486fb --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/live-browser.log @@ -0,0 +1,3 @@ +MEASURE authenticated HTTPS status (browser, no Word/accepted snapshot): n=10 p50=11.8ms p95=52.2ms; includes public network and SQL metadata, not Word latency. +MEASURE authenticated HTTPS status (simulated PWA, no Word/accepted snapshot): n=10 p50=10.0ms p95=11.4ms; includes public network and SQL metadata, not Word latency. +PASS authenticated Development browser/simulated PWA: disconnected status, canonical metadata, scope404, missing-CSRF400, unverified handoff409, missing receipt404, Help popup/drawer/article, focused Reader and narrow layout. No real Word available; no author/story writes. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/migration.log b/Docs/Writer/Writer3/Evidence/Phase3B/migration.log new file mode 100644 index 00000000..e69de29b diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/native-chapter-sync.log b/Docs/Writer/Writer3/Evidence/Phase3B/native-chapter-sync.log new file mode 100644 index 00000000..653e20e6 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/native-chapter-sync.log @@ -0,0 +1,465 @@ +PASS Range-only fingerprint uses the accepted paragraph-delimited algorithm +PASS Complete unchanged XML identity evidence avoids the native paragraph walk +PASS Range baselines and read-only flags survive the actual native IPC codec +PASS Locally verified XML emits the existing compact identity frames without transmitting XML +PASS A same-length text edit is found without length or saved-state changes +PASS Identical prose with replaced native identity is a changed chapter +PASS Missing exported native identities require detailed verification rather than guessed checkpoint reuse +PASS Floating drawing evidence retains the qualified native anchor reader +PASS Structural tbl cannot take the lightweight reuse path +PASS Structural fldChar cannot take the lightweight reuse path +PASS Structural ins cannot take the lightweight reuse path +PASS Structural del cannot take the lightweight reuse path +PASS Structural footnoteReference cannot take the lightweight reuse path +PASS Structural object cannot take the lightweight reuse path +PASS Structural altChunk cannot take the lightweight reuse path +PASS Changed chapter order and boundaries cannot retain range evidence +PASS Native geometry gaps always retain measured position validation +PASS Scale range fingerprint preserves exact chapter content 0 +PASS Scale range fingerprint preserves exact chapter content 1 +PASS Scale range fingerprint preserves exact chapter content 2 +PASS Scale range fingerprint preserves exact chapter content 3 +PASS Scale range fingerprint preserves exact chapter content 4 +PASS Scale range fingerprint preserves exact chapter content 5 +PASS Scale range fingerprint preserves exact chapter content 6 +PASS Scale range fingerprint preserves exact chapter content 7 +PASS Scale range fingerprint preserves exact chapter content 8 +PASS Scale range fingerprint preserves exact chapter content 9 +PASS Scale range fingerprint preserves exact chapter content 10 +PASS Scale range fingerprint preserves exact chapter content 11 +PASS Scale range fingerprint preserves exact chapter content 12 +PASS Scale range fingerprint preserves exact chapter content 13 +PASS Scale range fingerprint preserves exact chapter content 14 +PASS Scale range fingerprint preserves exact chapter content 15 +PASS Scale range fingerprint preserves exact chapter content 16 +PASS Scale range fingerprint preserves exact chapter content 17 +PASS Scale range fingerprint preserves exact chapter content 18 +PASS Scale range fingerprint preserves exact chapter content 19 +PASS Scale range fingerprint preserves exact chapter content 20 +PASS Scale range fingerprint preserves exact chapter content 21 +PASS Scale range fingerprint preserves exact chapter content 22 +PASS Scale range fingerprint preserves exact chapter content 23 +PASS Scale range fingerprint preserves exact chapter content 24 +PASS Scale range fingerprint preserves exact chapter content 25 +PASS Scale range fingerprint preserves exact chapter content 26 +PASS Scale range fingerprint preserves exact chapter content 27 +PASS Scale range fingerprint preserves exact chapter content 28 +PASS Scale range fingerprint preserves exact chapter content 29 +PASS Scale range fingerprint preserves exact chapter content 30 +PASS Scale range fingerprint preserves exact chapter content 31 +PASS Scale range fingerprint preserves exact chapter content 32 +PASS Scale range fingerprint preserves exact chapter content 33 +PASS Scale range fingerprint preserves exact chapter content 34 +PASS Scale range fingerprint preserves exact chapter content 35 +PASS Scale range fingerprint preserves exact chapter content 36 +PASS Scale range fingerprint preserves exact chapter content 37 +PASS Scale range fingerprint preserves exact chapter content 38 +PASS Scale range fingerprint preserves exact chapter content 39 +PASS Scale range fingerprint preserves exact chapter content 40 +PASS Scale range fingerprint preserves exact chapter content 41 +PASS Scale range fingerprint preserves exact chapter content 42 +PASS Scale range fingerprint preserves exact chapter content 43 +PASS Scale range fingerprint preserves exact chapter content 44 +PASS Scale range fingerprint preserves exact chapter content 45 +PASS Scale range fingerprint preserves exact chapter content 46 +PASS Scale range fingerprint preserves exact chapter content 47 +MEASURE range fingerprint CPU only: 48 chapters, 1530278 UTF-16 units, 30.5ms. Text was preallocated in memory. Range.Text extraction, Word XML export and Word UI responsiveness NOT measured. +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PASS New-session live evidence retains existing v1 content and identities +PORTABLE live verification: 48 chapters, 8457 paragraphs, 153139 words, 70.9 ms; excludes COM, network and UI. +PORTABLE previous XML parse and fingerprints: 110.8 ms; excludes Word XML extraction and native identity enumeration. +PASS Saved/offline/unsaved text edits cannot produce unchanged content evidence +PASS Saved/offline/unsaved text edits cannot produce unchanged content evidence +PASS Saved/offline/unsaved text edits cannot produce unchanged content evidence +PASS Deleted paragraph changes content evidence +PASS Inserted scene changes content evidence +PASS Chapter rename/reorder is not filename-based identity +PASS Interrupted identity frames are refused +PASS Missing paragraph evidence is refused +PASS Duplicate native identities are refused +PASS Invalid native outline is refused +PASS Unaccounted native text is refused +PASS Only genuinely edited chapters fail saved content fingerprints +PASS Only genuinely edited chapters fail saved content fingerprints +PASS Bounded chapter batching removes one timer tick per paragraph +SCHEDULER MODEL: old 8457 ticks / 211425 ms minimum, new 529 ticks / 13225 ms minimum; portable execution 9.0 ms. No COM latency simulated. +PASS Chapter batching yields immediately to pending selection +PASS Selection executes before further chapter reads +PASS Author activity interrupts a chapter batch +PASS A timer tick cannot execute unbounded chapter continuations +PASS Reopened chapter-capable document requests a bounded current-chapter read, never a full snapshot +PASS Checking progress reports committed acceptances, never a queued chapter number +PASS Unchanged chapter uploads hashes and native identity evidence, not manuscript prose +PASS Reopened unchanged chapter validates without any XML frame +PASS Chapter lifecycle does not invoke the full manuscript capture endpoint +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Passive selection never returns a navigation command +PASS Repeated cursor events reuse accepted current-session chapter validation +PASS Chapter completion is reported only after server acceptance +PASS Chapter chunks do not schedule repeated ribbon updates or invalidate Word during extraction +PASS Delayed duplicate chapter frames cannot resubmit an accepted operation +PASS A second Word document has independent chapter work and cannot inherit the first session's trust +PASS Closing a document rejects late extraction frames and preserves already accepted chapters +PASS Unindexed legacy identity displays actionable review instead of a zero-count scan +PASS No automatic chapter read is queued when every legacy heading lacks a native ID +PASS Native geometry reading is enabled only by the server manifest's support +PASS Agent preserves native Word spans, exact text lengths and geometry hash without uploading unchanged prose +PASS Structural review starts with the other chapter already durably accepted +PASS Unsupported final structure completes under review without rereading or revoking the accepted chapter +PASS Stationary observations do not restart an unsupported structural chapter +PASS Rejected-chapter fixture starts a bounded read +PASS Specific server rejection survives completion and is displayed to the author +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Stationary cursor does not restart a rejected chapter +PASS Rejected chapter waits for an explicit retry rather than reading Word repeatedly +PASS Chapter frames require negotiated native capability; legacy clients remain isolated +PASS Live chapter evidence requires separate capability negotiation +PASS Native text certification requires its separately negotiated capability +PASS Native physical position evidence requires its separately negotiated capability +PASS Initial reopen retains the existing qualified native identity reader +PASS Automatic chapter checking waits for three seconds of edit inactivity +PASS An older in-flight presence revision cannot discard newly accepted chapter work or restart verification +PASS A single saved chapter edit performs forty-seven lightweight checks and one detailed chapter read +PASS Automatic lifecycle reuses forty-seven checkpoints in batches and reconciles only Chapter 14 +PASS Automatic saved edit returns to forty-eight verified without a ribbon command +MEASURE incremental HTTP fixture: debounce=3s virtual, rangeChecks=48, detailedReads=1, reused=47, reconciled=1, processingMs=1398.0; includes held presence reply, synthetic XML, no Word extraction or COM. +PASS Periodic verification does not run continuously after a completed cycle +PASS Sixty-second unchanged checks retain all live checkpoints without any server reacceptance +PASS Manual Synchronise uses the range pipeline without invoking Repair +PASS Periodic range checks discover same-length edits without relying on Word change notifications +PASS A detected periodic mismatch is reconciled only under the newly registered revision +PASS Undo restoring accepted chapter content reuses checkpoints without reconciliation +PASS Redo takes the same selective automatic lifecycle +PASS Edits in two chapters rebase later seek hints and reconcile only the two changed chapters +PASS Unsaved range observations detect edited content without submitting incoherent native positions +PASS Periodic observations detect same-length changes and Undo while Word remains already unsaved +PASS Saving observed in-memory edits automatically reconciles only the remaining changed chapter +PASS An unassociated session diagnoses the missing book instead of implying verification is underway +PASS Synchronise on an unsaved edit shows the save requirement +PASS Repair reports its saved-state refusal without submitting stale evidence +PASS Revision change clears old commands without emitting a stale cancel +PASS Repeated clicks coalesce and an HTTP repair refusal reaches the ribbon +PASS Repair starts verification against the freshly confirmed saved revision +PASS Synchronise joins an active explicitly authorised verification +PASS Further edits retire the old chapter command +PASS Interrupted verification reports the revision change +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Matching chapters use two bounded acknowledgements, including early current-chapter readiness +PASS Actual request counts prove only changed chapters submit reconciliation prose +PASS Batch reuse reaches independently confirmed Up to date +PASS Diagnostics distinguish reused, submitted and reconciled chapters +MEASURE agent HTTP-contract fixture: chapters=48 changed=0 reuseRequests=2 acceptanceRequests=0 reconciled=0 payloadBytes=38625 totalMs=1262.3; HTTP in-memory, no Word/real network/SQL. +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Matching chapters use two bounded acknowledgements, including early current-chapter readiness +PASS Actual request counts prove only changed chapters submit reconciliation prose +PASS Batch reuse reaches independently confirmed Up to date +PASS Diagnostics distinguish reused, submitted and reconciled chapters +MEASURE agent HTTP-contract fixture: chapters=48 changed=1 reuseRequests=2 acceptanceRequests=2 reconciled=1 payloadBytes=71305 totalMs=1265.2; HTTP in-memory, no Word/real network/SQL. +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Matching chapters use two bounded acknowledgements, including early current-chapter readiness +PASS Actual request counts prove only changed chapters submit reconciliation prose +PASS Batch reuse reaches independently confirmed Up to date +PASS Diagnostics distinguish reused, submitted and reconciled chapters +MEASURE agent HTTP-contract fixture: chapters=48 changed=3 reuseRequests=2 acceptanceRequests=6 reconciled=3 payloadBytes=136657 totalMs=1258.6; HTTP in-memory, no Word/real network/SQL. +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Matching chapters use two bounded acknowledgements, including early current-chapter readiness +PASS Actual request counts prove only changed chapters submit reconciliation prose +PASS Batch reuse reaches independently confirmed Up to date +PASS Diagnostics distinguish reused, submitted and reconciled chapters +MEASURE agent HTTP-contract fixture: chapters=48 changed=0 reuseRequests=2 acceptanceRequests=1 reconciled=0 payloadBytes=38624 totalMs=1260.0; HTTP in-memory, no Word/real network/SQL. +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Matching chapters use two bounded acknowledgements, including early current-chapter readiness +PASS Actual request counts prove only changed chapters submit reconciliation prose +PASS Batch reuse reaches independently confirmed Up to date +PASS Diagnostics distinguish reused, submitted and reconciled chapters +MEASURE agent HTTP-contract fixture: chapters=48 changed=0 reuseRequests=2 acceptanceRequests=1 reconciled=0 payloadBytes=38624 totalMs=1262.7; HTTP in-memory, no Word/real network/SQL. +PASS Writing Context is available before the other 47 chapters are acknowledged +PASS Progress counts acknowledged checkpoints rather than completed Word reads +PASS Forty-seven calculated fingerprints remain pending until the server acknowledges their checkpoints +PASS Closing during final batch rejects the late reuse acknowledgement +PASS Interrupted reuse cannot report whole-manuscript completion after close +PASS Author quiet periods suppress accelerated chapter scheduling +PASS Chapter work respects an outstanding author quiet period +PASS Only runnable chapter work requests the shorter timer cadence +PASS Monotonic queue timings separate author delay and eligible timer/host idle +PASS Queue timing separates earlier scheduled active work from idle waiting +PASS Paragraph batches always make bounded progress and stop on either time or count limit +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Bounded native identity batches preserve exact accepted paragraph partition and content hash +PASS Changed native identity with unchanged prose cannot reuse the checkpoint +PASS Scale fixture visits every required native identity once with 288 collection acquisitions instead of 8457 +PORTABLE read fixture: 48 chapters / 8457 paragraphs / 153139 words, 120.1ms. Point/collection setups 8457 -> 288; saved-state calls for the paragraph walk 16914 -> 1152. No Word/COM timing. +PASS Inserted/deleted/moved native paragraph gaps cannot be accepted as contiguous evidence +PASS A paragraph extending across the live chapter boundary is refused +PASS Moving identical prose paragraphs changes identity evidence even when the chapter text fingerprint matches +PASS Writing Context becomes ready from verified current-cursor scene evidence before book completion +PASS A late presence reply cannot restore the scene at a previous cursor +PASS A verified chapter without a mapped scene never acquires a first-scene fallback +PASS Only whole-manuscript verification can distinguish an outside-chapter cursor from pending verification +PASS A reentrant timer cannot nest Word COM work inside an active callback +PASS Stale Word revision cannot make Context ready +PASS Unsaved Word state cannot claim a verified Context scene +PASS Chapter handoff exposes actual pipe and worker-idle timing +PASS Next asynchronous chapter command arrives without another selection or metrics frame +PORTABLE real pipe handoff (Linux sockets): 82.5ms, 2 polls; not Windows IPC/Word performance. +PASS Fast command polling expires after a bounded window instead of running permanently diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/native-regressions.log b/Docs/Writer/Writer3/Evidence/Phase3B/native-regressions.log new file mode 100644 index 00000000..8cb07eba --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/native-regressions.log @@ -0,0 +1,290 @@ +PASS One controllable audio source is selected automatically +PASS Ambiguous media sources require selection +PASS Explicit source selection resolves ambiguity +PASS Missing telemetry retains the binding and the same paused source can recover +PASS An existing review cannot switch to a different native media key +PASS selection scheduler coalesces bursts +PASS Word operation timing recorded +PASS only latest selection executes on owner +PASS obsolete Word work cancelled +PASS bounded Word queue accepts capacity slot 0 +PASS bounded Word queue accepts capacity slot 1 +PASS bounded Word queue accepts capacity slot 2 +PASS bounded Word queue accepts capacity slot 3 +PASS bounded Word queue accepts capacity slot 4 +PASS bounded Word queue accepts capacity slot 5 +PASS bounded Word queue accepts capacity slot 6 +PASS bounded Word queue accepts capacity slot 7 +PASS bounded Word queue accepts capacity slot 8 +PASS bounded Word queue accepts capacity slot 9 +PASS bounded Word queue accepts capacity slot 10 +PASS bounded Word queue accepts capacity slot 11 +PASS bounded Word queue accepts capacity slot 12 +PASS bounded Word queue accepts capacity slot 13 +PASS bounded Word queue accepts capacity slot 14 +PASS bounded Word queue accepts capacity slot 15 +PASS bounded Word queue accepts capacity slot 16 +PASS bounded Word queue accepts capacity slot 17 +PASS bounded Word queue accepts capacity slot 18 +PASS bounded Word queue accepts capacity slot 19 +PASS bounded Word queue accepts capacity slot 20 +PASS bounded Word queue accepts capacity slot 21 +PASS bounded Word queue accepts capacity slot 22 +PASS bounded Word queue accepts capacity slot 23 +PASS bounded Word queue accepts capacity slot 24 +PASS bounded Word queue accepts capacity slot 25 +PASS bounded Word queue accepts capacity slot 26 +PASS bounded Word queue accepts capacity slot 27 +PASS bounded Word queue accepts capacity slot 28 +PASS bounded Word queue accepts capacity slot 29 +PASS bounded Word queue accepts capacity slot 30 +PASS bounded Word queue accepts capacity slot 31 +PASS bounded Word queue accepts capacity slot 32 +PASS bounded Word queue accepts capacity slot 33 +PASS bounded Word queue accepts capacity slot 34 +PASS bounded Word queue accepts capacity slot 35 +PASS bounded Word queue accepts capacity slot 36 +PASS bounded Word queue accepts capacity slot 37 +PASS bounded Word queue accepts capacity slot 38 +PASS bounded Word queue accepts capacity slot 39 +PASS bounded Word queue accepts capacity slot 40 +PASS bounded Word queue accepts capacity slot 41 +PASS bounded Word queue accepts capacity slot 42 +PASS bounded Word queue accepts capacity slot 43 +PASS bounded Word queue accepts capacity slot 44 +PASS bounded Word queue accepts capacity slot 45 +PASS bounded Word queue accepts capacity slot 46 +PASS bounded Word queue accepts capacity slot 47 +PASS bounded Word queue accepts capacity slot 48 +PASS bounded Word queue accepts capacity slot 49 +PASS bounded Word queue accepts capacity slot 50 +PASS bounded Word queue accepts capacity slot 51 +PASS bounded Word queue accepts capacity slot 52 +PASS bounded Word queue accepts capacity slot 53 +PASS bounded Word queue accepts capacity slot 54 +PASS bounded Word queue accepts capacity slot 55 +PASS bounded Word queue accepts capacity slot 56 +PASS bounded Word queue accepts capacity slot 57 +PASS bounded Word queue accepts capacity slot 58 +PASS bounded Word queue accepts capacity slot 59 +PASS bounded Word queue accepts capacity slot 60 +PASS bounded Word queue accepts capacity slot 61 +PASS bounded Word queue accepts capacity slot 62 +PASS bounded Word queue accepts capacity slot 63 +PASS Word queue rejects overflow without waiting +PASS Word scheduler rejects wrong thread +PASS author activity suspends low priority work +PASS IPC coalesces selection storm to latest value +PASS coalesced position is latest +PASS IPC snapshot queue backpressure bounded +PASS IPC selection session slots bounded +PASS missing required protocol capabilities refused +PASS three books have independent live sessions +PASS commit structural snapshot Discovery +PASS positional scene resolution independent of repeated text Discovery +PASS commit structural snapshot Reckoning +PASS positional scene resolution independent of repeated text Reckoning +PASS commit structural snapshot Redemption +PASS positional scene resolution independent of repeated text Redemption +PASS rapid three-document switching preserves active identity +PASS cancelled snapshot cannot commit +PASS partial snapshot cannot masquerade as complete +PASS oversized extraction fragment refused +PASS stale revision refused +PASS peer cannot address another instance lease +PASS duplicate/out-of-order sequence refused +PASS closing one document retires only its state +PASS old disconnect cannot retire replacement lease +PASS disconnect releases all owned sessions and snapshots +PASS one Word process cannot route into another process document +PASS terminating one Word process preserves another instance +PASS new observation revision invalidates in-flight old extraction +PASS malformed null document cannot crash agent session processing +PASS oversized frame rejected before allocation +PASS versioned frame round-trip retains identity +PASS offline work persisted without manuscript prose +PASS On Save mode cannot be triggered by automatic quiet period +PASS offline work survives agent restart +PASS new scene revision supersedes queued older work +PASS stale offline revision cannot replace newer work +PASS old acknowledgement cannot remove newer work +PASS matching idempotency acknowledgement retires work +PASS durable queue rejects capacity overflow +PASS real pipe rejects incompatible handshake +PASS same-version optional capabilities remain compatible +PASS agent advertises optional structural review capability +PASS real named-pipe handshake reconciles three documents +PASS agent receives actual asynchronous positional/lifecycle traffic +PASS real pipe returns document analysis results +PASS agent shutdown retires peer sessions +PASS idle keepalive detects agent loss without a Word event +PASS agent restart reconnects and reconciles without UI waits +PASS analysis can be repeated after actual pipe host restart +PASS real pipe document close is isolated +PASS link shutdown cancels background worker promptly +PASS untrusted agent owner callback rejects connection before handshake +PASS unresponsive agent handshake times out off producer thread +PASS theme policy follows Windows with accessible light fallback +PASS connection requires verified fresh health +PASS cached server success never produces stale green state +PASS expired sign-in has actionable explanation +PASS first run remains useful without Word +PASS book association precedes analysis +PASS analysis completion never claims import completion +PASS pending browser approval has no duplicate sign-in action +PASS explicit connected state still requires current verification +PASS Advanced mode is off for new installations +PASS trusted access renewal does not offer repeated browser sign-in +PASS invalid installation offers the existing browser sign-in action +PASS server success never implies Word is connected +PASS stale Word registration cannot be displayed as connected to book +PASS ribbon cleanup matches exact legacy marker identifiers only +PASS maintenance recognises established PlotDirector marker ownership +PASS maintenance leaves unrelated controls and bookmarks alone +PASS document-property deletion uses an explicit owned allowlist +PASS blank document has an explicit empty analysis +PASS normal snapshot counts across split fragments without retaining review candidates +PASS plain chapter labels and separators become review suggestions +PASS ambiguous text and heading levels explain uncertainty instead of approving import +PASS analysis reuses existing PlotDirector marker interpretation +PASS fragment splits do not inflate word or paragraph counts +PASS 250000-word many-paragraph manuscript analysed incrementally +Agent synthetic 250000-word analysis: 100ms (not Word extraction/UI timing). +PASS review suggestion storage is bounded with explicit truncation +PASS analysis results are paginated +PASS review page fits bounded IPC frame +PASS analysis result contract round-trips over framing +PASS document-specific analysis returns structured results and progress +PASS document-specific analysis returns structured results and progress +PASS document-specific analysis returns structured results and progress +PASS another document's snapshot cannot retrieve results +PASS analysis acknowledges bounded partial progress before cancellation +PASS cancelled analysis cannot complete +PASS analysis waiting for Word scheduler is cancellable +PASS pending analysis cancellation does not require extraction +PASS review rejects results from a different document +PASS late results cannot replace cancellation +PASS new analysis rejects obsolete revision and snapshot +PASS review completes only matching analysis +PASS selection replies cannot regress completed review progress +PASS late page zero cannot replace requested later page +PASS agent restart releases document analysis state +PASS native connection rejects unsafe site root +PASS native connection rejects unsafe site root +PASS native connection rejects unsafe site root +PASS native connection rejects unsafe site root +PASS native connection rejects unsafe site root +PASS incompatible agent handshake enters recovery instead of killing the client worker +PASS browser-approved sign-in loads only authorised book choices +PASS sign-in and local work never upload chapter prose +PASS AI chapter capture starts only after an explicit command +PASS bounded chapter capture reports progress without submitting early +PASS duplicate submit uses one HTTP call and preserves exact chapter mapping +PASS worst-case bounded AI page fits IPC framing +PASS AI result contract round-trips on actual frame codec +PASS unchanged chapter uses agent content fingerprint without another prose upload +PASS late cancellation cannot retire a replacement AI chapter +PASS another document cannot retrieve an AI result +PASS cancelled network chapter cannot reappear in review +PASS authorisation failure is isolated and actionable +PASS malformed AI fields fail safely instead of leaving a chapter spinning +PASS upload consent pins document snapshot and authentication context +PASS account/site change refuses old consent before any chapter HTTP upload +PASS sign-out forgets credential and book list +PASS local chapters supply explicit nonoverlapping AI extraction ranges +PASS duplicate live session identity cannot cross Word instances +PASS book association round-trips stable identity and server in one metadata value +PASS remembered book restores by authorised identifier after a title change +PASS saved association cannot cross server or bypass accessible-book permissions +PASS invalid identity and non-root saved site are rejected +PASS expired verification never presents cached sign-in/book as live +PASS IPC outage overrides previously successful server state +PASS book switch rejects late saved data +PASS late successful response cannot revive a cancelled client preview +PASS one parent chapter is retained across local and AI pages +PASS cross-page preview selection is bounded without silently dropping selected rows +PASS multiple document saved contexts remain isolated +PASS older workspace binding cannot fetch or overwrite a replacement +PASS cancelled import preview cannot reappear after delayed completion +PASS unfinished snapshot reports count unavailable rather than zero +PASS ordinary structural snapshots report a count without explicit analysis +PASS selection reuses completed count without another extraction +PASS new structural snapshot refreshes saved scene at stationary cursor without a selection event +PASS document revision invalidates completed snapshot word count +PASS server loss clears a previously verified online indicator +PASS explicit connection check detects recovery +PASS authentication expiry rotates scope and removes verified authentication +PASS expired credentials cannot display an old authenticated workspace +PASS snapshot cache transfers only changed paragraph prose using acknowledged server occurrence IDs +PASS another live document cannot use this session's delta base +PASS account switching never reuses prior account cache identities or source +PASS mismatched server base falls back to a complete authorised snapshot +PASS agent restart/disconnect has no plaintext cache dependency; server reconciliation recovers from full snapshot +PASS Open Companion activates existing agent without another UI process +PASS presentation collections are isolated from background chapter updates +PASS tray detection command addresses exact document session and follows cancellation +PASS tray chapter list uses Heading 1 not paragraph-name heuristics and remains document-isolated +PASS tray preserves original leading front-matter exclusions before Heading 1 chapters +PASS tray book association is explicit and isolated +PASS tray refuses unauthorised books before Word metadata command +PASS stationary scene does not repeatedly post presence between heartbeats +PASS changed scene posts lightweight presence before the periodic heartbeat +PASS another Word document cannot acknowledge this navigation +PASS exact adapter result reaches document-scoped presence acknowledgement +PASS stale native acknowledgement cannot replace completed navigation +PASS native execution gate rejects foreign session, dirty state and expired UI queue without COM work +PASS reconciliation preserves verified book and monotonic heartbeat state +PASS wizard request reuses bounded snapshot IPC and acknowledges only the completed server transfer +PASS one rejected book registration does not disconnect other authorised books +PASS explicit tray selection starts chapter-only extraction queue +PASS multiple document AI batches serialize against existing per-author provider limits +PASS tray cancellation stops queued chapters without affecting another document +PASS late disconnect cannot remove a replacement tray lease or its verified session-only book association +PASS older Word adapter cannot receive unsupported maintenance commands +PASS maintenance requires explicit adapter capability negotiation +PASS inspection command targets exact selected document and revision +PASS another document cannot replace pending inspection results +PASS correlated inspection result is available in Advanced settings +PASS remember targets the selected document and waits for Word acknowledgement +PASS another Word document cannot acknowledge the association +PASS matching Word acknowledgement shows a save reminder +PASS normal Word save clears the reminder +PASS unlink does not claim success before Word acknowledges cleanup +PASS failed cleanup preserves document association +PASS association reset retains live-session manuscript identity while removing persisted metadata +PASS acknowledged reset unlinks only the selected session +PASS pipe disconnect removes exact Word instance sessions and pending control work +PASS new book invalidation during an in-flight check is not lost; existing presence refreshes without restart or approval +PASS unchanged catalogue does not trigger repeated book-list polling +PASS unassociated Word manuscript is visible without automatically uploading prose +PASS explicit wizard request associates a new authorised book and queues extraction for the exact existing session +PASS first pairing saves approved installation, not a four-hour-only sign-in +PASS native activity observation persists before offline delivery +PASS pending outbox uses a protected state version that older agents refuse instead of discarding observations +PASS offline retries preserve immutable identity without duplicate queue entries +PASS short-lived access tokens are never persisted in settings +PASS normal process disposal preserves trust and settings +PASS offline startup makes a bounded renewal attempt without browser approval +PASS drained outbox restores the older compatible settings version +PASS native restart recovers and acknowledges durable observation without prose upload +PASS process/network recovery restores scoped association and preferences without interaction +PASS expired authentication displays sign-in required and retains the open document's saved association +PASS reauthentication restores the existing open manuscript without writing a new association +PASS access expiry renews without changing account context or asking for browser approval +PASS persisted association is not restored when current book permission is missing +PASS lost renewal response retains the exact pending rotation securely for recovery +PASS restart recovers committed rotation and acquires a fresh process connection without re-pairing +PASS offline explicit sign-out disables local trust and durably queues server revocation +PASS signed-out process restart never silently resumes the old account +PASS queued sign-out revokes server approval after connectivity returns +PASS account switching never delivers the previous account's queued activity under new credentials +PASS account change requires explicit approval and cannot reuse another account's manuscript association +PASS server revocation stops renewal and requires a genuine new approval +PASS startup, renewal, settings, reconnect and sign-out never upload manuscript prose +PASS credential files contain protected bytes, never clear credentials +PASS protected settings round trip through injected protection on Linux +PASS a different user protection key cannot read saved approval +PASS tampering with the account scope cannot decrypt or redirect an approval +PASS failed protected write preserves the previous complete settings file +PASS production protection never falls back to plaintext on non-Windows hosts +Native foundation: 288 checks passed. Linux named-pipe API uses Unix domain sockets; Windows ACL/COM/Word responsiveness NOT verified. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/preserved-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/preserved-browser.log new file mode 100644 index 00000000..c088f1b4 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/preserved-browser.log @@ -0,0 +1,5 @@ +PASS Writer reference windows: initial failure/retry, window identity/reuse, pinned book, denied/unavailable display permissions, plan navigation, browser/PWA. +PASS pending native response cancellation, unverified mapping refusal, exact-session query parameters and no recomputation for repeated unchanged scenes +PASS native/legacy race, cross-chapter cursor following, repeated presence without commands/focus, status failure recovery, in-flight invalidation, unchanged-scene fragment retry, trusted explicit navigation and acknowledgement without feedback; simulated Chromium protocol, not Word +PASS native source invariant: selection observation contains no ribbon invalidation or range selection (not runtime Word proof) +PASS Manuscript Reader: real Razor/controller, escaped selectable text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus, 3 widths × 4 themes × browser/PWA diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/reader-freshness-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/reader-freshness-browser.log new file mode 100644 index 00000000..06d48aba --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/reader-freshness-browser.log @@ -0,0 +1 @@ +PASS Reader accepted-metadata notification updates timestamps without replacing prose, selected text or Focused Reading; Next preserves focus. Browser/simulated PWA. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/reader-live-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/reader-live-browser.log new file mode 100644 index 00000000..11b0e188 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/reader-live-browser.log @@ -0,0 +1 @@ +PASS Reader live updates: accepted fingerprint/no-op sync, no reload, paragraph position, selection deferral/latest version, listening pause, hidden resume, offline recovery, single loop, stale navigation response, focus Next/Previous/selector/top/boundaries, access/cache rules; desktop/mobile and simulated PWA. Synchronisations simulated, no Word or database writes. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/regressions.log b/Docs/Writer/Writer3/Evidence/Phase3B/regressions.log new file mode 100644 index 00000000..5f174221 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/regressions.log @@ -0,0 +1,603 @@ +PASS settlement Marker compatibility, nested geometry/style validation, stable route references and existing map/backup/import JSON contracts. +PASS Settlement boundaries preserve anchors, routes and backup/import contracts +PASS shared boundary server integrity, versions/refs/appearance, duplicate/orphan rejection and project import/export/restore contracts. +PASS Shared boundary topology preserves map and project contracts +PASS geography roots, hierarchy, provider-independent fake, cache identities, ambiguity, failures/backoff and rate reservation. +PASS Geographical roots, providers, queue outcomes and access +PASS Intent evidence preserves provenance and author control +PASS Release triage and browser-only onboarding preserve author decisions +PASS Approved native import source and confirmation remain safe +PASS Native installation renewal and revocation remain account/security scoped +MEASURE 10000 navigation execution gates: 0.58ms; pure managed checks, no Word/COM benchmark. +PASS Writer Word verified navigation and acknowledgement +PASS Writer authoring blank notes are rejected +PASS Writer authoring reminder length is bounded +PASS Writer authoring priority range is enforced +PASS Writer authoring invalid calendar dates are rejected +PASS Writer authoring negative counts are rejected +PASS Writer authoring ordinary author text remains text, not generated markup +PASS Writer authoring chapter intentions remain optional +PASS Writer authoring missing optional records render as empty values +PASS Writer authoring canonical unbounded supporting text is not arbitrarily truncated +PASS Writer authoring unknown editor types are rejected +PASS Writer inline authoring validation +PASS Writer navigation objective activity mappings use supported session types +PASS Writer navigation ambiguous or unsupported recording activity requires explicit compatible choice +PASS Writer navigation session-only activities never become objective types +PASS Writer navigation destination Home preserves authorised book and saved working focus +PASS Writer navigation destination Home never carries a focus into another book +PASS Writer navigation destination Home refuses unavailable book +PASS Writer navigation destination Write preserves authorised book and saved working focus +PASS Writer navigation destination Write never carries a focus into another book +PASS Writer navigation destination Write refuses unavailable book +PASS Writer navigation destination Explore preserves authorised book and saved working focus +PASS Writer navigation destination Explore never carries a focus into another book +PASS Writer navigation destination Explore refuses unavailable book +PASS Writer navigation destination Plan preserves authorised book and saved working focus +PASS Writer navigation destination Plan never carries a focus into another book +PASS Writer navigation destination Plan refuses unavailable book +PASS Writer navigation destination Review preserves authorised book and saved working focus +PASS Writer navigation destination Review never carries a focus into another book +PASS Writer navigation destination Review refuses unavailable book +PASS Writer navigation destination Reflect preserves authorised book and saved working focus +PASS Writer navigation destination Reflect never carries a focus into another book +PASS Writer navigation destination Reflect refuses unavailable book +PASS Writer navigation destination Dashboard preserves authorised book and saved working focus +PASS Writer navigation destination Dashboard never carries a focus into another book +PASS Writer navigation destination Dashboard refuses unavailable book +PASS Writer navigation legacy query routes still reach their actual workspaces/calendar +PASS Writer navigation old objective setup URL reaches Write +PASS Writer navigation full legacy desk, Journey and Workspaces remain rendered, not retired +PASS Writer navigation book-only new route checks access before metadata +PASS Writer navigation book switching retains Write without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Write +PASS Writer navigation book switching retains Explore without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Explore +PASS Writer navigation book switching retains Plan without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Plan +PASS Writer navigation book switching retains Review without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Review +PASS Writer navigation book switching retains Reflect without chapter parameters +PASS Writer navigation single existing ribbon exposes all destinations on Reflect +PASS Writer navigation case-insensitive bookmarked routes retain destination context +PASS Writer navigation book menu never navigates to a mutation action +PASS Writer navigation new author Home has no fabricated book selection +PASS Writer navigation exploration does not require scenes, plans, project or Word +PASS Writer navigation real read paths exercised without calling author-data writes +PASS Writer 3 destination navigation and scope +PASS Writer foundation reference, Reader, session and verified Word selections never overwrite working focus +PASS Writer foundation cross-book selections require a separate authorised context +PASS Writer foundation a scene cannot be projected without its chapter +PASS Writer foundation incomplete native identity cannot be projected as verified +PASS Writer foundation selected book reaches every queue repository before any result limit +PASS Writer foundation inaccessible project never reaches a queue repository +PASS Writer foundation unresolved route scene never becomes a pinned authorised selection +PASS Writer foundation Preview chooses within the selected book and preserves All Books plans +PASS Writer foundation explicit out-of-scope plan cannot silently select another book +PASS Writer foundation new book may still use its project-wide plan +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation plan management action retains the requesting list scope +PASS Writer foundation context, queue scope and planning +PASS Writer dashboard book selection filters queues and tasks consistently +PASS Writer dashboard book scope reaches schedule service before selection and active workspace persists +PASS Writer dashboard unknown book cannot fall back to another book +PASS Writer dashboard plan setup retains selected book instead of All Books +PASS Writer dashboard plan setup refuses conflicting project and book +PASS Writer dashboard book-only deep link checks access before metadata +PASS Writer dashboard legacy Write redirect preserves book scope +PASS Writer dashboard Writer contextual commands target implemented workspaces and evidence +PASS Writer dashboard book scope +PASS writing activity baseline excludes pre-existing words +PASS writing activity zero-net replacement retains both sides +PASS writing activity moving stable paragraphs has no word growth +PASS writing activity whitespace-only change has no word growth +PASS writing activity deletion preserves old paragraph scope +PASS writing activity paragraph split does not invent growth +PASS writing activity gross and net reconcile +PASS writing activity large replacement explicitly qualifies token balance +PASS Writing activity measurement +PASS Writer intelligence consecutive playing observations produce actual bounded playback coverage +PASS Writer intelligence replaying ten seconds adds playback but does not duplicate unique coverage +PASS Writer intelligence duplicate sequence never creates more playback time +PASS Writer intelligence seek jump is not listening coverage +PASS Writer intelligence interrupted telemetry does not invent activity across a gap +PASS Writer intelligence an explicit seek never bridges playback coverage even when positions look continuous +PASS Writer intelligence paused state does not manufacture playback intervals +PASS Writer intelligence different media source does not contribute to current coverage +PASS Writer intelligence command expiry is explicitly UTC across browser and Windows time zones +PASS Writer intelligence nonfinite media position is refused +PASS Writer intelligence activities share daily capacity and split across dates without exceeding availability +PASS Writer intelligence insufficient capacity explains failure before persistence +PASS Writer intelligence known lengths produce distinct adjustable budgets rather than equal chapter effort +PASS Writer intelligence empty context produces no invented manuscript observations +PASS Writer intelligence zero-net revision and actual chapter evidence supply bounded actionable suggestions +PASS Writer intelligence recommendations do not diagnose writer block from observations +PASS Writer intelligence and measured review +PASS Manuscript Reader: scoped read-only retrieval, ordering, navigation, empty snapshot, accepted updates, pending isolation and accurate timestamps +PASS Manuscript Reader +PASS Opted-in import capture retains raw paragraph text and opaque occurrence identity +PASS Opaque occurrence IDs, including separate identical dialogue +PASS Saved snapshot and process reconstruction retain occurrence identities +PASS Reliable paragraph move updates derived event scene without copying event +PASS Copied paragraph has a distinct identity and no duplicated story event +PASS Rewritten evidence retains original passage and withholds unconfirmed derived facts +PASS Author confirmation verifies changed evidence +PASS Deleting evidence preserves the event and before text +PASS Scene split preserves every raw Word character +PASS Undo restores grouping and opaque scene identity +PASS Boundary moves between adjacent paragraphs +PASS Adjacent merge retains text and retires, rather than destroys, scene identity +PASS Merge undo restores original scene and prior boundary +PASS Author can explicitly confirm a proposed scene grouping without editing Word prose +PASS Grouping confirmation can be undone without discarding the Word snapshot +PASS Previously excluded import sections remain captured without silently importing their prose on sync +PASS An unresolvable excluded-section boundary refuses mutation instead of guessing where that book's prose starts +PASS Identical short dialogue remains associated with its individual native occurrence +PASS Delta sends only changed prose and retains occurrence order +PASS Lost native hints can reconcile a single rewrite between recognised neighbours without matching a moved/copy candidate +PASS Paragraph split retains only the surviving occurrence identity +PASS Word XML hint is restricted to main document part and forbids external entities +PASS Provider schema is bounded by the actual 97 submitted paragraphs, never the raw source count 99 +PASS Legacy request serialization omits new contract field, preserving checkpoint hashes +PASS Versioned integer confidence validation preserves legacy decimals and rejects new fractional scores +PASS 250,000+ word value snapshot reconciliation (438ms; no Word COM performance claim) +PASS Derived evidence display state cannot change legacy backup hashes or accepted event payloads +PASS Missing primary evidence is excluded from verified story facts while unanchored scene events remain compatible +28 paragraph manuscript assertions passed. +PASS Adoption uses only the completed capture's canonical scene map and retains excluded prose outside the imported book +PASS Reconnection cannot silently restore an excluded chapter into canonical scenes +PASS An unfinished import pauses snapshots without changing its accepted source or checkpoints +PASS Explicitly opted-in save/reconnect uses existing exact-session capture channel +PASS Authorised snapshot persists exact new prose and reconciles opaque paragraph identity +PASS Lost acknowledgement retry cannot apply the snapshot twice +PASS Acknowledgement returns canonical occurrence ID for delta recovery +PASS Cancellation retires only pending snapshot and retains already accepted revision +PASS Another account cannot request manuscript synchronisation +PASS Turning off automatic synchronisation changes only preferences even while imports or scene conflicts pause snapshots +PASS A new chapter repair is not hidden behind an older completed full snapshot receipt +PASS Paragraph manuscript identity, evidence and exact-session synchronisation +PASS Native wizard capture is scoped, durable and independent of Word +PASS Native tray presence and PWA review remain scoped, expiring and non-destructive +PASS Native saved workspace and established import eligibility remain scoped and read-only +PASS Native companion authentication, canonical AI mapping and isolated chapter retry +PASS Solver never discards a corroborated concern or exhausts navigation before verification +PASS Solver result evidence covers all reachable diagnoses without changing Stage 1 semantics +PASS Solver result copy follows actual answers, intention, variants and revision +PASS Solver workspace CTAs resolve authorised project/character context and real routes +PASS Stage 1 preserves all 60 strict conversations, corroboration, intent, reachability and adoption +PASS Stage 1 evidence gates, required follow-ups, bounded multi-select and neutral choices are enforced +PASS Neutral endpoints require explicit valid terminal declarations +PASS Neutral reassurance follows selected concerns without evidence and survives revision +PASS Scene navigation does not invent purpose evidence; genuine D05 witnesses survive +PASS D50 requires actual series evidence and preserves D50/D51 witnesses +PASS Curated V2 preserves 60 literal paths and enforces eight explicit Development review exceptions +PASS Curated V2 exhausts real-engine states and preserves revision/multi-select behaviour +PASS Curated V2 passes normal validation and invalid publication stays guarded +PASS Payoff covers all 52 diagnoses with seven archetypes and semantic uncertainty ordering without graph changes +PASS Development review observes every acceptance prefix without changing signals, results or graph; access and durable capture stay isolated +PASS All permanent writing problems have distinct editorial content, intent, metadata, links and real images +PASS Clean solver completion preserves private evidence and permanent indexable URLs +PASS Writing Solver anonymous state is protected, expires and rejects stale versions +PASS Writing Solver scoring, multi-select, revision, fallback and graph routes +PASS Writing Solver import rejects invalid graphs and editorial identities +PASS Book recovery read-only exports and receipt retries remain accessible +PASS Book recovery validates integrity, selection and author-bound upload generations +PASS Project export and restore access gates enforce author and ownership boundaries +PASS Retired checklist bookmarks redirect without report access +PASS Ribbon operation identity and semantic icons stay consistent +PASS Maps Story projects canonical hierarchy, sequence, journeys and evidence without changing geography +Maps Story scale: 500 scenes, 30 characters, 5,000 appearances in 15ms. +PASS Maps Story scales to 500 scenes and 5,000 appearances +PASS Maps Story enforces access and uses bounded repository batches +PASS Maps appearance validates colours, normalized raster images and portable backups +PASS Maps reference assets enforce access +PASS Maps validate rough geometry, relationships, Location intent and access boundaries +PASS Subscription entitlement evaluates trials, paid access, overrides and real plan limits +PASS Subscription overrides control access and dashboard presentation without trial contradictions +PASS Subscription enforcement is concurrent, audited and admin-authorised +PASS Plot Health stays scene-based with 12,000 contributions +PASS Plot Health preserves Discovery planning and boundary contradictions +PASS Plot Health separates stored status and meaningful-progress clocks +PASS Plot Health explains question, payoff, closure and boundary evidence +PASS Plot Health evaluates explicit targets and scoped line rollups +PASS Plot Health respects scenario coverage and ordered chapter identities +PASS Plot Lines Focus and Weave preserve gaps and shared-scene identity +PASS Plot Lines thread, enrichment and Timeline inspector contracts hold +PASS Plot Lines composition remains bounded with a large generated weave +PASS Exception review uses evidence, identity, consequence and directional conflicts +PASS Exception assessment preserves author decisions and scene history +PASS Character card widths reflect displayed text without changing character data +PASS Relationships workspace large cast, temporal states and canonical edits +PASS Scene relationship proposals preserve direction and validate acceptance +PASS Location and asset merges require confirmation and distinct records +PASS Location persisted analysis preserves contextual bedrooms and setting provenance +PASS Location consequence outranks capped recurrence +PASS Location scene significance is attributed only to actual settings +PASS Location significance preserves hierarchy and independent uncertainty +PASS Character profile age uses canonical reference chronology +PASS Character detail and date-only save retain canonical DOB +PASS Story Point presence, previous appearances and age cross book boundaries +PASS Story Point knowledge stops at selected narrative position +PASS Story Point relationships and independent asset state are historical +PASS Story Point threads and continuity warnings respect future evidence +PASS Story Point ownership, AJAX and bounded batch loading require no AI +PASS Story Point narrative tie breakers match canonical order +PASS Malformed confidence 0. is repaired to 0.0 +PASS Markdown fences are stripped +PASS Unescaped backslash in evidence is repaired +PASS Truncated JSON is rejected +PASS Repaired JSON deserialises into SceneIntelligenceScene +PASS Chapter Structure confidence 0. repairs and deserialises +PASS Chapter Structure confidence 0. 8 repairs and deserialises +PASS Chapter Structure confidence 7 .5 repairs when unambiguous +PASS JSON repair leaves decimal-looking prose unchanged +PASS Chapter Structure semantic validation still rejects out-of-range repaired confidence +PASS Structural scene detection parser failure uses friendly diagnostics and retry +PASS Chapter Structure boundary normaliser repairs gaps and overlaps +PASS Chapter Structure boundary normaliser preserves valid coverage +PASS Chapter Structure boundary normaliser handles terminal ghost paragraph +PASS Chapter Structure boundary normaliser discards multiple terminal ghost paragraphs +PASS Chapter Structure boundary normaliser replays full book terminal empty failure +PASS Chapter Structure boundary normaliser keeps meaningful end overflow repair +PASS Chapter Structure boundary normaliser preserves genuine inverted ranges for validation +PASS Structural Word mapping uses paragraph map as authoritative text +PASS Structural Word mapping includes filtered Word paragraphs in source coverage +PASS Structural Word mapping fails precisely when map metadata is incomplete +PASS Structural Word mapping keeps trailing empty normalisation mapped +PASS Shared parser reports raw chapter output on unrecoverable JSON +PASS Character filtering rejects generic groups +PASS Character filtering preserves titled names +PASS Location filtering rejects merged phrases +PASS Location filtering preserves story locations +PASS Location canonical keys merge trivial variants +PASS Location contextual names use POV and structural setting +PASS Location canonical keys merge punctuation and safe plurals +PASS Location candidate consolidation handles generic review variants +PASS Location candidate identity is parent-aware for generic sub-locations +PASS Locations page uses hierarchical sort order +PASS Location review UX supports large candidate sets +PASS Story Intelligence auto resolves exact known locations before review +PASS Story Intelligence location review uses single identity decision +PASS Asset filtering rejects generic objects +PASS Asset filtering preserves story assets +PASS Asset canonical keys merge trivial variants +PASS Asset canonical keys merge contextual vehicle variants +PASS Asset canonical keys keep unrelated owned cars distinct +PASS Asset candidate keys attach unique unowned variants +PASS Asset filtering rejects relationship facts +PASS Asset contextual names resolve POV ownership +PASS Asset structural phrases trim neighbouring nouns +PASS Asset significance is generic and not fixture-specific +PASS Story Intelligence asset review applies current identity rules +PASS Relationship review requires pair evidence and distinguishes social types +PASS Relationship signals map to broad lookup types +PASS Relationship signals infer friendship without romance +PASS Relationship events preserve chronological story order +PASS Relationship progression keeps chronological state +PASS Relationship observations do not create event spam +PASS Relationship review orders by first story appearance +PASS Relationship evidence priority preserves explicit semantics +PASS Relationship evidence handles retained hostile and incidental examples +PASS Knowledge signals map to existing knowledge states +PASS Knowledge recipient resolves narrator through POV +PASS Knowledge identity reveal preserves subjective timing +PASS Knowledge duplicate statements share canonical keys +PASS Knowledge suspicion and certainty remain distinct +PASS Illustration prompt builder separates spec and prompt +PASS Illustration prompt builder uses realistic image direction +PASS Illustration specification validation catches missing typed fields +PASS Illustration category validation rejects unknown values +PASS Illustration status transitions protect approval flow +PASS Illustration status transitions support archive flow +PASS Illustration metadata flags fallback location labels +PASS Illustration location matching rejects vehicle living room reuse +PASS Illustration automatic generation policy blocks vague fallbacks +PASS Story Memory import image generation defaults are safe +PASS Illustration storage codes are normalised safely +PASS Illustration starter batch has required category counts +PASS Illustration starter generation plan skips successful items +PASS Story Intelligence visualisation archive is preserved +PASS Story Intelligence visualisation runtime is removed +PASS Story Intelligence does not retry exhausted billing quota +PASS Illustration bulk retry result reports counts +PASS Illustration bulk retry skips blocking duplicate stable codes +PASS Illustration provider reports missing image model +PASS Illustration provider omits GPT image response format +PASS Illustration matching rejects adult masculine unknown art for Beth +PASS Illustration matching treats Mrs title as hard feminine evidence +PASS Illustration matching infers mother and aunt as mature feminine +PASS Illustration matching rejects duplicate named portrait allocation +PASS Illustration semantic types prevent bathroom office and ambulance car mismatches +PASS Illustration demand archetypes stay broad and use active template +PASS Story Intelligence evidence extraction prevents observed attribute leakage +PASS Story Intelligence scene call uses strict structured output +PASS Story Intelligence scene schema constrains confidence numbers +PASS Story Intelligence scene schema constrains evidence strings +PASS Story Intelligence temporal resolves chapter anchor and afternoon +PASS Story Intelligence temporal rolls over after midnight +PASS Story Intelligence temporal resolves following morning +PASS Story Intelligence temporal resolves exact day offsets +PASS Story Intelligence temporal resolves following weekday +PASS Story Intelligence temporal resolves evening clock time +PASS Story Intelligence temporal rejects unanchored clock time +PASS Story Intelligence temporal preserves yearless calendar date clues +PASS Story Intelligence temporal resolves yearless calendar dates from context +PASS Story Intelligence temporal inherits previous morning when extraction is empty +PASS Story Intelligence temporal inherits previous evening when extraction is empty +PASS Story Intelligence temporal inherits previous night when extraction is empty +PASS Story Intelligence temporal inherits after midnight advancement +PASS Story Intelligence temporal inherits chapter anchor when extraction is empty +PASS Story Intelligence temporal stays unknown without context or extraction +PASS Story Intelligence temporal explicit date overrides previous context +PASS Story Intelligence temporal preserves vague few days +PASS Core import applies structural chronology to canonical scenes +PASS Story Intelligence temporal importer preserves manual chronology +PASS Story Intelligence temporal materialisation saves canonical chronology +PASS Story Intelligence temporal malformed values are discarded +PASS Story Calendar useful months and sparse navigation +PASS Story Calendar places dated scenes on Monday-first month grid +PASS Story Calendar separates unplaced scenes without guessing +PASS Story Calendar book filter and all books scope work +PASS Story Calendar month navigation uses story dates across years +PASS Story Calendar month dropdown follows displayed month +PASS Story Calendar handles no dated scenes +PASS Story Calendar day details endpoint returns partial +PASS Story Calendar day details endpoint respects book filter +PASS Story Calendar day details endpoint handles empty story date +PASS Story Calendar day details endpoint rejects invalid project +PASS Story Calendar index returns surface partial for AJAX +PASS Story Calendar day selection uses progressive AJAX hooks +PASS Story Intelligence structured metric values validate and import +PASS Story Intelligence structured schema covers complete response model +PASS Story Intelligence structured schema remains fixture agnostic +PASS Illustration assignment repair enforces explicit evidence groups and strict subtypes +PASS Lean import removes replay links while retaining progress +PASS Story Intelligence progress does not prematurely report safe close +PASS Structural import creates scenes before Word sync +PASS Structural import creates first scene without placeholder +PASS Structural import persists paragraph mapping and source text +PASS Structural import persists canonical scene source text +PASS Structural import adds summaries without extra scene AI calls +PASS Core import scan stage defers scenes and characters +PASS Core import basic location detector is conservative +PASS Core import basic location detector consolidates and skips existing matches +PASS Core import basic location detector supports pending parent candidates +PASS Core import character discovery protects accepted locations +PASS Core import gates characters behind basic location review +PASS Core import hides exact existing character names from review +PASS Core import hides exact existing character aliases from review +PASS Core import keeps suspected unknown aliases in review +PASS Core import keeps ambiguous existing character matches in review +PASS Core import keeps new characters in review +PASS Core import auto resolved character evidence is preserved +PASS Core import character evidence is candidate specific +PASS Core import deterministically maps known characters +PASS Core import wizard orders scenes before characters +PASS Core import remaps characters after review +PASS Scan review separates known matches from unresolved names +PASS Story Intelligence uses persisted scene source after restart +PASS Story Intelligence canonical mode bypasses duplicate boundary analysis +PASS Story Intelligence progress uses canonical scene summaries +PASS Story Intelligence downstream imports prefer canonical SceneIDs +PASS Story Intelligence scene prompt no longer asks for duplicate factual summary +PASS Story Intelligence review uses canonical structural summaries and counts +PASS Story Intelligence review centre completion is category scoped +PASS Word sync requires save acknowledgement +PASS Word sync retry resumes existing structure +PASS Story Intelligence enriches existing structural scenes +PASS Core import scene titles ride existing structural AI call +PASS Core import scene title preference is review scoped +PASS Core import scene title preference moved to Detect Scenes +PASS Core import Review Chapters is compact and chapter only +PASS Core import Detect Scenes is compact and owns title option +PASS Book context is canonical import metadata +PASS Names defaults from selected book context +PASS Story Intelligence starts from core import complete +PASS Generated scene titles persist with provenance +PASS Scene title display keeps scene numbers visible +PASS Manuscript text statistics handles pure prose +PASS Manuscript text statistics handles pure dialogue +PASS Manuscript text statistics splits narrative before dialogue +PASS Manuscript text statistics splits dialogue before narrative +PASS Manuscript text statistics handles multiple dialogue passages +PASS Manuscript text statistics supports smart quotes +PASS Manuscript text statistics supports straight quotes +PASS Manuscript text statistics carries multi-paragraph dialogue +PASS Manuscript text statistics returns to prose after continued dialogue +PASS Manuscript text statistics ignores empty paragraphs +PASS Manuscript text statistics reconciles scene totals +PASS Manuscript text statistics aggregates chapter scenes +PASS Manuscript text statistics recalculates existing scene sources +PASS Manuscript text statistics does not invoke AI +PASS Phase 21T repairs durable character understanding +PASS Phase 21U extracts mandatory character appearance fixtures +PASS Character sex hints are conservative and reviewable +PASS Character discovery does not truncate scan review candidates +PASS Character discovery rejects sentence-start words +PASS Character discovery rejects fragments and location names +PASS Manuscript scan preview keeps only auto-selected character candidates +PASS Word Companion scan completion uses chunked transport +PASS Word Companion scan chunks assemble full novel payloads +PASS Word Companion scan chunks reject partial and conflicting payloads +PASS Onboarding wizard keeps character pages inside one main step +PASS Scan review aliases feed Story Intelligence known character context +PASS Name Intelligence package contract is present +PASS Name Intelligence reference data is copied on publish +PASS Name Intelligence repository uses stored procedures +PASS Name Intelligence review warning is wired +PASS Name Intelligence library defaults to all locales +PASS Story Intelligence new-format context uses canonical characters +PASS Story Intelligence character defaults link proposed existing matches +PASS Story Intelligence character defaults ignore generic references +PASS Story Intelligence character defaults keep descriptive identities +PASS Story Intelligence character review uses single identity decision +PASS Story Intelligence auto resolves exact known identities before review +PASS Story Intelligence character matching keeps ambiguous known names visible +PASS Story Intelligence descriptive references consolidate articles +PASS Story Intelligence review omits character metrics dashboard +PASS Story Intelligence resumed chapters use canonical labels +PASS Story Intelligence character review posts selected existing match +PASS Story Intelligence character default changes preserve persisted results +PASS Structural POV rides existing chapter analysis +PASS Structural POV persists through import resolution +PASS Chapter POV derives from canonical scenes +PASS Permanent Analyse My Book starts from saved book +PASS Story Intelligence canonical context carries provenance +PASS Scene prompt protects canonical scene context +PASS Structural setting rides existing chapter analysis +PASS Explicit narrator labels detect deterministic POV +PASS AI POV JSON parses into structural models +PASS Post character review resolves persisted structural POV +PASS Normal scene and chapter saves persist POV +PASS Character merge is a reusable stored procedure workflow +PASS Story Intelligence character review suppresses resolved narrator POV +PASS Story Intelligence character review reuses structured appearance aliases +PASS Entity preferred names are peer aliases +PASS Story Intelligence review evidence includes chapter scene labels +PASS Story Intelligence import enables project metric defaults before save +PASS Project metrics add defaults backfills scene values +PASS Story Intelligence scene prompt uses configured metrics +PASS Story Intelligence scene prompt uses scene characters terminology +PASS Story Intelligence downstream imports support canonical scene results +PASS Story Intelligence runner supplies metrics and Plot Lines +PASS Story Intelligence metric persistence uses configured keys +PASS Story Intelligence stabilisation gate materialises strict and legacy metrics +PASS Story Intelligence modern materialisation owns finalisation boundary +PASS Story Intelligence narrative materialisation reads strict scene results +PASS Story Intelligence stabilisation routes normal users to book +PASS Story Intelligence narrative candidates require review +PASS Story Intelligence discovers Plot Lines without preconfiguration +PASS Story Intelligence matches existing Plot Lines without duplicates +PASS Narrative research prototype fixture builds hierarchy +PASS Narrative sibling hotel fixture generalises hierarchy +PASS Narrative trivial one-scene question is suppressed +PASS Narrative short significant thread survives +PASS Narrative semantic evolution consolidates by continuity +PASS Narrative existing thread matching is supported +PASS Narrative candidate merge and parent fields are persisted +PASS Narrative prompt uses one scene call with compact schema +PASS Narrative production code remains fixture agnostic +PASS Whole-book Plot Intelligence prompt carries full manuscript context +PASS Whole-book Plot Intelligence schema requires timeline event types +PASS Whole-book Plot Intelligence author seed inputs persist safely +PASS Whole-book Plot Intelligence structured author seed match survives +PASS Whole-book Plot Intelligence unmatched seeds become review candidates +PASS Whole-book Plot Intelligence uses dedicated output token headroom +PASS Story Intelligence narrative review displays author seed provenance +PASS Story Intelligence narrative review avoids raw author-facing IDs +PASS Story Intelligence author seed decisions are preserved +PASS Whole-book Plot Intelligence production code remains fixture agnostic +PASS Story Intelligence narrative review creates canonical records via existing procs +PASS Story Intelligence narrative stage follows knowledge +PASS Word Companion replays live current scene to writing panes +PASS Scan review post supports full-book form submissions +PASS StoryPosition rejects incomplete or invalid runtime scene positions +PASS StoryPosition builds canonical runtime scene navigation +PASS StoryPosition derives canonical scene context identity +PASS Writing Context route uses canonical story context service +PASS Writing Context client follows canonical story position events +PASS Writing Context preserves selected tab and avoids event loops +PASS Writing Intent route uses canonical story context and planning data +PASS Writing Intent client uses shared writing follow helper +PASS Obsolete global Word navigation is removed while writing windows remain live +PASS Appearance preferences and ribbon destinations +PASS Toolbar preferences, authorisation and contextual routes +PASS Application navigation resolves authorised project and book context +PASS Writing pair shares canonical follow infrastructure +PASS Read-only scene hydration preserves author intent without editing, analysis or manuscript recomputation +PASS Read-only scene hydration rejects another user's project before loading workspace data +PASS Verified native projection leaves working focus independent +PASS Native launch opens its exact verified scene rather than the book's first scene +PASS Native Intent retrieves the selected scene's existing purpose and chapter objectives +PASS Opening Context and Intent preserves all author-entered decisions verbatim +PASS Unsaved native mapping waits without loading an unrelated saved scene +PASS A stale database checkpoint cannot launch a scene merely claimed by the last heartbeat +PASS Chapter-capable sessions without accepted position evidence cannot launch claimed scene IDs +PASS A verified chapter with no mapped scene can show its own saved chapter intent +PASS A Word cursor/revision change during server loading cannot render the earlier cursor as current +PASS Native partial requests reject mappings that change during data loading +PASS Native Context launch authorises the book before resolving or displaying its scene +PASS Exact document selection cannot fall back to another connected Word instance +PASS Incomplete native session identity is rejected +PASS Repeated writing reads share request-scoped scene and chronological projection tasks +PASS Context retains earlier verified viewpoint knowledge and excludes future transitions +PASS Another character's future secret is not exposed as current knowledge +PASS Relationship reference stops at the current narrative position +PASS Context rejects mismatched project and book scopes +PASS Existing Timeline and inspector callers retain their full editing model path +PASS Intent retrieves saved decisions without computing narrative histories +PASS A future narrative scene cannot leak into timeline context even when its story date is earlier +PASS Initial thread context ranks current relevant unresolved threads rather than dumping every novel thread +PASS Missing viewpoint does not invent a knowledge perspective +PASS Scene navigation follows manuscript order rather than numeric IDs or other books +PASS Large-manuscript navigation is one bounded in-memory projection with no per-scene database queries +MEASURE writing navigation projection: 48 chapters/4800 scenes, 2.7ms, no SQL or Word. +PASS Writing Context and Intent resolve native sessions, preserve decisions and reuse bounded chronological data +PASS Writing Context Plot Lines preserves canonical associations, developments and book access +PASS Writing workspace presence scopes browser windows +PASS Writing workspace client uses session window identity and stable names +PASS Writing workspace launcher uses progressive screen placement +PASS Writing workspace pages register roles without changing follow behavior +PASS Word marker client acknowledgements require authenticated ownership +PASS Word Companion exposes writing workspace launch actions +PASS Word Companion writing screens receive resolved context identifiers +PASS Word Companion canonical markers drive runtime follow +PASS Word Companion runtime follows multiple imported scene anchors +PASS Word Companion existing project book linking remains available +PASS Word Companion document identity survives reconnect +PASS Word Companion multiscreen launch and follow remain reachable +PASS Word Companion modes remain distinct +PASS Writing pages do not require Story Intelligence +PASS Word Companion host script has valid tab mapping +PASS Writing screens show diagnostic empty states +PASS Word Companion three-screen flow logs connection identifiers +PASS Admin Story Intelligence reset returns to diagnostics with messages +PASS Project hard delete clears Story Intelligence dependencies in transaction +PASS Permanent project delete keeps archive and name safety gates +PASS Word manuscript cleanup classifies PlotDirector markers by tag only +PASS Word manuscript cleanup preserves content controls content +PASS Word manuscript cleanup UI separates unlink from clean unlink +PASS Word manuscript unlink keeps Story Intelligence data untouched +PASS Word manuscript cleanup remains relinkable and idempotent +PASS Story Intelligence Review Centre route replaces linear review resume +PASS Story Intelligence obsolete create scene workflow is removed +PASS Story Intelligence Review Centre counts only needs-attention categories +PASS Story Intelligence Review Centre uses independent tile grid +PASS Story Intelligence Review Centre opens with character gate +PASS Story Intelligence review modules are independent after character gate +PASS Story Intelligence review module completion is durable and independent +PASS Story Intelligence review module pages omit wizard chrome +PASS Story Intelligence downstream review uses completed scene analysis +PASS Story Intelligence review posts do not use success interstitials +PASS Story Intelligence legacy review completion routes are deleted +PASS Story Intelligence review forms share busy submit guard +PASS Story Intelligence heavy review modules offer bounded rendering +PASS Story Intelligence Review Centre adds no AI calls +PASS Story Intelligence Review Centre uses bounded summary query +PASS Story Intelligence character review queues enrichment beside plot synthesis +PASS Story Intelligence character enrichment uses persisted SignalR progress +PASS Story Intelligence character enrichment preserves author fields +PASS Story Intelligence character enrichment batches by prompt size +PASS Story Intelligence character enrichment promotes structured facts +PASS Character detail can queue single-character enrichment +PASS Single-character enrichment is persisted and duplicate safe +PASS Character detail enrichment status uses scoped SignalR +PASS Story Intelligence detailed review GETs use selected module paths +PASS Story Intelligence completed Character review remains inspectable +PASS Story Intelligence Review Centre completed modules use canonical destinations +PASS Story Intelligence detailed reviews read persisted candidate pages +PASS Story Intelligence module completion lifecycle uses persisted candidates +PASS Story Intelligence Job 6 uses bounded concurrent chapter execution +PASS Story Intelligence global progress uses whole run scene totals +PASS Story Intelligence recovered provider failures stay operational +PASS Story Intelligence recovered JSON repair stays operational +PASS Story Intelligence terminal failures remain user visible +PASS Story Intelligence global banner remains visible through finalising gaps +PASS Story Intelligence global banner rejects stale live snapshots +PASS Story Intelligence live global progress publishes authoritative scene aggregates +PASS Story Intelligence global progress survives initial SignalR start races +PASS Story Intelligence scene analysis completion barrier releases review +PASS Story Intelligence active progress only appears in global strip +PASS Story Intelligence book actions do not open review centre while running diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-after.jsonl b/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-after.jsonl new file mode 100644 index 00000000..51b44fb9 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-after.jsonl @@ -0,0 +1 @@ +{"Books":"B61B3F247EE55F90003F41E019C47138A7F71E94633BA7FF6CDCF760AD64177B","Chapters":"2AD48D8C0C3121B0A8C4FCFDA876082059991C45B1F053A98E3D169FB326BE7E","Scenes":null,"Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objectives":"B2AC2DB40F7F1C9316CBB09E8C2966B9031EA3E8B7C102DA5A8652B50DDE961C","Plans":null,"Sessions":null,"Metrics":null,"Purposes":null,"Manuscript":null,"Validations":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-before.jsonl b/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-before.jsonl new file mode 100644 index 00000000..51b44fb9 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/snapshot-before.jsonl @@ -0,0 +1 @@ +{"Books":"B61B3F247EE55F90003F41E019C47138A7F71E94633BA7FF6CDCF760AD64177B","Chapters":"2AD48D8C0C3121B0A8C4FCFDA876082059991C45B1F053A98E3D169FB326BE7E","Scenes":null,"Goals":null,"Workflow":null,"Checklist":null,"Notes":null,"Objectives":"B2AC2DB40F7F1C9316CBB09E8C2966B9031EA3E8B7C102DA5A8652B50DDE961C","Plans":null,"Sessions":null,"Metrics":null,"Purposes":null,"Manuscript":null,"Validations":null} diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/sql-regression.log b/Docs/Writer/Writer3/Evidence/Phase3B/sql-regression.log new file mode 100644 index 00000000..cf5c2605 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/sql-regression.log @@ -0,0 +1,2 @@ +{"VerifiedDatabase":"PlotDirector_Development","Result":"PASS metadata read creates no snapshot and rejects foreign actor/chapter"} +{"Result":"PASS distinct canonical snapshot and chapter acceptance times; synthetic insert rolled back"} diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/word-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/word-browser.log new file mode 100644 index 00000000..968e68ea --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/word-browser.log @@ -0,0 +1 @@ +PASS Writer Word browser/simulated PWA: exact document status, focus isolation, old/uncertain/unsaved/cross-book rejection, explicit chapter handoff, acknowledgement versus request, timeout, repeat guard, bounded check, multi-document selection, disconnect, retained notes/DOM, verified-origin adoption, Help and narrow overlay. Native events and acknowledgements simulated. diff --git a/Docs/Writer/Writer3/Evidence/Phase3B/workspace-browser.log b/Docs/Writer/Writer3/Evidence/Phase3B/workspace-browser.log new file mode 100644 index 00000000..9758327c --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Phase3B/workspace-browser.log @@ -0,0 +1,51 @@ +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +Request failed /native-companion/status: net::ERR_ABORTED +PASS Writer3 workspace: 200 rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. Isolated MVC fixture. Physical Windows/installed PWA/multi-monitor not tested. diff --git a/Docs/Writer/Writer3/Evidence/Queue-Regression.jsonl b/Docs/Writer/Writer3/Evidence/Queue-Regression.jsonl new file mode 100644 index 00000000..a0df5a50 --- /dev/null +++ b/Docs/Writer/Writer3/Evidence/Queue-Regression.jsonl @@ -0,0 +1 @@ +{"Result":"PASS scoped cap, four canonical queues and legacy blocked compatibility; fixture rolled back"} diff --git a/Docs/Writer/Writer3/Help-Coverage.md b/Docs/Writer/Writer3/Help-Coverage.md new file mode 100644 index 00000000..e22d855c --- /dev/null +++ b/Docs/Writer/Writer3/Help-Coverage.md @@ -0,0 +1,108 @@ +# Writer 3.0 Help coverage register + +HelpService loads front-matter Markdown; HelpIconTagHelper resolves contextKey and exposes micro/quickTitle/quickSummary plus full Help links. Existing client handles popups; HelpController renders full articles. No alternative system introduced. Plain names/obvious buttons do not need field icons. Source articles remain authoritative for all three presentations. + +Phase1: corrected workspace/queue/goal guidance; added workingContext and writingPlans articles; added icons on the desk, workspace heading, Intent workflow and four schedule pages. Review all applicable tooltip, popup and full-article content before each phase completes. Videos remain optional Phase8 scripts/captions/transcripts, not a Phase1 dependency. Mapping is ownership coverage, not a claim every feature already has a dedicated article/icon; later destinations need targeted Help in their delivery phase. + +| Audit feature | Capability | Help key/owner | Coverage / follow-up | +|---|---|---|---| +| F01 | Desk identity and Companion status | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F02 | Help Me | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F03 | Start Here / objective setup | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F04 | Continue Writing | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F05 | Next Planned Session | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F06 | Your Manuscript / Writing Progress | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F07 | Recent Activity | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F08 | Month calendar | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F09 | Year overview | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F10 | Selected day and session history | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F11 | Planned work ahead | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F12 | Writing Rhythm session toolbar | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F13 | Audio Review controls | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F14 | Workspace navigation | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F15 | Scene queue cards | workspace.overview | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F16 | Story Health reminders | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F17 | Today's planned writing | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F18 | Word Companion & Display Setup | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F19 | Plan management table | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F20 | Delete Writing Plan modal | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F21 | Plan scope and goal form | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F22 | Writing Availability | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F23 | Candidate review and budgets | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F24 | No candidates / replacement warning | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F25 | Writing Plan Selection | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F26 | Reviewed writing activities | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F27 | Legacy schedule summary/table | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F28 | Availability/deadline editor | workspace.writingPlans | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F29 | Chapter workflow counters | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F30 | Chapter Goals | workspace.chapterGoals | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F31 | Workflow Summary | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F32 | Retained evidence table | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F33 | Baseline prompt | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F34 | Privacy and retention | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F35 | Delete retained activity | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F36 | Scene navigation and follow status | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F37 | Overview tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F38 | People tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F39 | Relationships tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F40 | Maps tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F41 | Floor Plans tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F42 | Story tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F43 | Plot Lines tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F44 | Metrics tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F45 | Intent navigation and identity | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F46 | Plan tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F47 | Must Include tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F48 | Notes tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F49 | Threads tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F50 | Evidence tab and result cards | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F51 | Checklist tab | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F52 | Reader chapter navigation | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F53 | Reader update controls | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F54 | Reading & Audio Review disclosure | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F55 | Drafting support card and menu | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F56 | Purpose editor | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F57 | Notes editor | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F58 | Checklist editor | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F59 | Workflow editor | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F60 | Attachments editor | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F61 | Problem Solver questions, browse and results | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | +| F62 | Workspace context chooser | workspace.workingContext | Existing Help tooltip/popup/full article; destination-specific expansion in delivery phase | + +## Phase 2A navigation Help + +| Key | Surface | Tooltip / popup / full article | +|---|---|---| +| writer3.home | Writer Home | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.write | Writer Write | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.explore | Writer Explore | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.plan | Writer Plan | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.review | Writer Review | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.reflect | Writer Reflect | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | +| writer3.dashboard | Writer Dashboard | Existing HelpIconTagHelper micro/quick metadata, browser popup, PWA promoted Help/drawer, full Help article; qualification in Phase2A report | + +Existing workspace.overview now describes the preserved Writing desk at /Writer/Overview. Shared workingContext and writingPlans articles remain authoritative for selection and task semantics. No competing Help implementation. + +## Phase 2B layout Help + +`writer3.layout` uses the existing Markdown tag helper beside the labelled layout controls on each split destination. Covers pointer/keyboard resizing, minimum widths, collapse/restore, independent device preferences, responsive overlay/focus, storage failure and standalone-window separation. The five destination articles also explain the controls. Browser popup, PWA drawer and full article are qualification gates. + +## Phase 2C Help review + +Destination Help remains at the heading. The layout tooltip/popup icon is grouped with Show/Hide companion and Layout Help, removing ambiguous adjacent heading icons. `writer3.layout` now explains browser modifier shortcuts, PWA Page Help with collapsed ribbon, and control locations. Five destination articles and Write session grouping are updated. Existing micro/quick/full content, popup, drawer and full article are exercised in rendered qualification. Standalone Context/Intent authority and media/accepted-text boundaries remain unchanged. + +Phase2C amendment: `writer3.write` explains the single working-focus selection, separate save/record/plan actions, actual objective/session mappings, explicit proofreading recording choice, recording-only activities, active-target differences and optional book-scoped planning. Existing working-context/session/native and planning Help remain authoritative; no data consolidation. + +Phase2C qualified: existing micro/quick/full articles, browser popup and PWA drawer verified through targeted and navigation/live suites. Real unified actions and rejection/antiforgery checks passed in Development. See Phase2C-Report.md for full evidence and physical acceptance limits. + +## Phase 3A authoring + +`writer3.authoring` reuses the Markdown tag helper for tooltip, quick popup and full article/drawer. Covers optional chapter/scene intentions, section Save/Cancel, stale/conflict recovery, navigation guards, scene-note/checklist/workflow scopes, explicit initialisation, deferred attachment/category editors, saved companion references and session/Reader/native isolation. `writer3.write` now describes the integrated surface without changing the unified Current Work actions. Qualification is recorded in Phase3A-Report.md. + +Phase3A qualification exercises the dynamically loaded authoring Help icon in browser and simulated PWA: quick popup, More drawer and full article. Existing site Help initialisation is explicitly applied to loaded fragments. Updated Write and all previous destination articles remain covered by authenticated navigation. See Phase3A-Report.md and its Help evidence. + +## Phase 3B Word continuity + +`writer3.word` uses existing micro/quick/full Markdown Help in the Write companion. It covers exact manuscript selection, verified position, working-focus/session/Reader independence, acknowledged chapter and optional verified-scene navigation, accepted-content freshness, bounded saved-manuscript checks, recovery, multiple documents and return/adopt. Check controls and additional explanation use optional Connection and update options. Updated `writer3.write` links the concepts; existing native/Reader/standalone Help remains authoritative. Qualification and physical Windows limits are recorded in Phase3B-Report.md. + +Phase3B qualified: quick popup, More drawer and full writer3.word article verified in authenticated Development browser/simulated PWA. Current Word status/navigation fixtures also cover hidden title-bar presence and cached return. Physical installed PWA/Word and assistive-technology acceptance remain manual; see Phase3B-Report.md. diff --git a/Docs/Writer/Writer3/Implementation-Tracker.md b/Docs/Writer/Writer3/Implementation-Tracker.md new file mode 100644 index 00000000..8955323c --- /dev/null +++ b/Docs/Writer/Writer3/Implementation-Tracker.md @@ -0,0 +1,357 @@ +# Writer 3.0 implementation tracker + +Baseline: `9a8b9a3`, shared branch `codex/word-companion-native-phase1-20261104`, 16 November 2026. The original kickoff authorised Phase 1 implementation and Development deployment; the master specification governs product direction even though its header says Proposed. The subsequent Phase2A kickoff explicitly authorised Home, navigation, destination shells and Development deployment; Phase2B was subsequently explicitly authorised for layout infrastructure and Development deployment; Phase2C is implemented and Development-qualified, including the explicit single-focus workflow amendment; Phase3A integrated authoring is implemented and Development-qualified; Phase3B verified Word continuity is implemented and Development-qualified, with physical Windows acceptance outstanding; Phase3C remains unauthorised. No feature is retired. Unrelated investigation file is preserved. + +## Phase 1 screen and interaction states before implementation + +No new workspace shell in this phase. Existing Overview/Journey/Workspaces routes, ribbon and disclosures remain. Queue tabs consistently say Write Next / In Progress / Revision / Final Pass; empty help describes their canonical statuses. Intent Checklist shows canonical Revision Status; legacy stored DraftStatus is preserved but not presented as a competing status. Plan management returns to the selected project/book after mutations; scoped Preview lists the chosen book plus All Books plans. Explicit selection of another accessible plan changes plan context visibly. Setup/edit validation loads after jQuery. No exploratory/pinned/Reader selection becomes a Word-navigation command merely by constructing the shared context. Standalone Context/Intent keep existing native verification, layouts and display controls. + +## Eight-phase execution breakdown + +### Phase 1 — Foundation and corrections + +- Objective/deliverables: Queue repair and book-before-cap filtering; canonical status presentation; typed independent focus contracts; scoped plan navigation/selection; validation ordering; Help and regressions. +- Batches: 1A queue/SQL; 1B status/context; 1C scheduling/validation; 1D Help/tests/deployment +- Reuse: WriterController, WriterWorkspaceService/Repository, WritingController, Reader, schedule service, existing HelpService/tag helper +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: 264 forward-only procedure repair; no new tables. +- Dependencies/risks: shared-branch concurrency; live/source procedure drift; existing permissions and native compatibility. +- Acceptance: Queue >40 other-book fixture; permissions and cross-book IDs; status divergence; independently selected session/Reader/pinned targets; browser/PWA forms; native-follow regression; Development smoke. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Development-qualified; deployed c769e11; physical acceptance pending. + +### Phase 2 — Writer Home and workspace shell + +- Objective/deliverables: Three Home actions and five destinations; resizable workspace/companion; contextual ribbon and return state. +- Current authorised batches: 2A.1 routes/ribbon; 2A.2 Home; 2A.3 destination shells; 2A.4 Help/testing/Development. Phase2B resizable companion work is Development-qualified; this supersedes the original provisional batch labels. +- Reuse: ApplicationNavigation/Ribbon, existing theme/PWA shell and workspace maximise conventions +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: None assumed. +- Dependencies/risks: Phase 1 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: New author entry; existing deep links; keyboard resizing; mobile/PWA; all preservation mappings reachable. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Phase2A Development-qualified; application commit f96259a, release f96259a-20261116T155614Z. Phase2B Development-qualified; app10bf9db, release10bf9db-20261116T164516Z; see Phase2B-Report.md. See Phase2A-Report.md for qualification and physical acceptance limits. + +### Phase 3 — Write and Review integration + +- Objective/deliverables: Inline chapter goals, purpose/outcome, notes/checklist/workflow/attachments; Reader/Audio Review and revision handoff. +- Current authorised batches: 3A.1 current focus; 3A.2 inline chapter/scene editing; 3A.3 notes/checklist/workflow; 3A.4 saved companion references; 3A.5 Help/qualification/Development. These supersede the original provisional labels. Phase3B is subsequently authorised for verified Word integration in batches3B.1–3B.6. +- Reuse: ChapterGoal/Scene repositories, SceneInspectorV2 editors, Reader, IntentAssessmentService, WriterWork toolbar +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: Reuse authoritative storage; new revision-task storage only after gap review. +- Dependencies/risks: Phase 2 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Round-trip authored fields; attachment permissions/quota; focused Reader/refresh; session scope; evidence decisions never complete objectives automatically. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Phase3A implemented and Development-qualified. Main implementation024e668; final lazy Help correction64e1782. Additive procedures265–270; no new tables. See [Phase3A-Report.md](Phase3A-Report.md) for release, gates, preserved contracts, deferred editors and physical acceptance. Phase3B subsequently delivered below; physical Windows acceptance remains outstanding. + +### Phase 4 — Context, Intent and display modes + +- Objective/deliverables: Integrated/separate/adaptive arrangements; compact integrated references; preserve eight standalone Context categories and persistent standalone Intent. +- Batches: 4A standalone baselines; 4B integrated Context/Intent; 4C modes/preferences; 4D concurrent windows +- Reuse: WritingController, writing-follow/workspace/launcher, lazy maps/plots/metrics, native presence and accepted-position validation +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: Prefer existing browser preferences; review account persistence only if needed. +- Dependencies/risks: Phase 3 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Single-screen versus physical multiple monitors; denied permissions; named-window reuse; pinned/exploration do not silently move Word; stale mapping conflicts. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Not started; not deployed at tracker creation. + +### Phase 5 — Explore and creative guidance + +- Objective/deliverables: Question-first author journeys; solver reuse; persistent back/skip/resume; saved next actions; separately validated manuscript-aware guidance. +- Batches: 5A plain-language paths; 5B history/resume; 5C save canonical outcomes; 5D separate evidence-backed manuscript analysis +- Reuse: WritingSolverEngine/editorial graph, workspace chooser, canonical notes/goals/plot records +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: Persistent journey/decision record may be needed; design bounded retention and permission before migration. +- Dependencies/risks: Phase 4 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Graph branches/back/skip/resume; author-fact/inference separation; canonical writes only after author action; missing source/entitlement states. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Not started; not deployed at tracker creation. + +### Phase 6 — Writing Plans and Dashboard + +- Objective/deliverables: Goal-first visual calendar, transparent assumptions, editable draft allocation; coherent legacy/reviewed presentation without destructive conversion. +- Batches: 6A draft planning model; 6B calendar edit/confirm; 6C legacy/reviewed adapters; 6D dashboard +- Reuse: WritingPlans/ScheduleItems/WriterPlannedActivities, allocation and schedule services, Journey/calendar primitives +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: No conversion assumed; milestones/exceptions only if existing data insufficient. +- Dependencies/risks: Phase 5 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Chapters without estimates; insufficient capacity; overlapping activities; completed-work preservation; All Books; no fictitious forecast precision. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Not started; not deployed at tracker creation. + +### Phase 7 — Writing Process and reflective insights + +- Objective/deliverables: Optional self-description, evidence-threshold observations, expectation comparison, disagreement/dismiss/revisit, reversible preferences. +- Batches: 7A evidence specification; 7B preferences/self-description; 7C visual comparisons; 7D thresholds/privacy tests +- Reuse: WritingActivity/WriterWork retained evidence, privacy/retention, existing preferences +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: Likely explicit self-description/insight decision records; minimise observations and respect existing erasure. +- Dependencies/risks: Phase 6 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Sparse/paused/retention-limited history; sample size; no quality inference; no automatic schedule/style changes; revoke/disagree. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Not started; not deployed at tracker creation. + +### Phase 8 — Help, tutorials and final qualification + +- Objective/deliverables: Full Help coverage, companion full articles, accessible optional tutorial entry points, video scripts/transcripts; complete feature qualification. +- Batches: 8A final Help audit; 8B tutorial scripts/transcripts; 8C full browser/PWA/accessibility/native acceptance; 8D final report +- Reuse: HelpService, HelpIconTagHelper, Markdown, current Help controller/client; existing browser/native harness +- New/change: implement the batch deliverables inside the existing MVC application; no parallel Writer. +- Database: None expected. +- Dependencies/risks: Phase 7 acceptance; preserve canonical records and scoped return state; avoid hidden context changes. +- Acceptance: Tooltip/popup/full Help in integrated/standalone; every F/I destination; physical Windows/multimonitor; caption/transcript access; complete regressions. +- Preservation: all mapped F/I capabilities below; reader/source/privacy/native safeguards remain authoritative. +- Help: review existing Markdown keys for affected capabilities; update tooltip, popup and full article together; register coverage. +- Status / Development deployment: Not started; not deployed at tracker creation. + +## Writer 2.0 reconciliation + +Read baseline: `Docs/Investigations/Writer2Audit/Writer2_Spec.md`, sprint `Docs/Sprints/Writer2/{Implementation,UsabilityCorrection,IntelligentWorkspace,SprintResults}.md` and Writer audit. Verified current routes/services before editing. + +| Writer 2.0 requirement | Current implementation | Writer 3.0 disposition | +|---|---|---| +| Existing ribbon/Overview/Journey/Plans/Workspaces/Reports/deep links | Implemented; redirects retained | Preserve Phase 1; reuse within five destinations Phase 2; old links continue | +| Gross accepted additions/deletions/net, baseline/dedup/coverage/privacy | Implemented259/260 and paragraph acceptance | Preserve unchanged; Reflect reuses in Phases6/7 | +| Explicit sessions/return notes and monthly/yearly Journey | Implemented262; engagement separate from elapsed; not full timed sprint | Preserve; integrate Phases3/6; no claim timer/pause/extend already exists | +| Weekly rhythm painting, irregular availability, holidays/exceptions | Only day/minute availability currently | Deferred to Phase6; preserve existing plans; no silent removal | +| Timed focus sprints/presets/break/pause/extend | Not delivered by current session toolbar | Product scope question for Phase3/6: retain as outstanding Writer2 requirement, do not replace explicit sessions with inferred activity | +| Zoomable timeline, overlapping passes/milestones/chapter-pass matrix | Month/year Journey and separate task systems, not full pass model | Phase6/7; pass/milestone semantics require explicit design before schema | +| Display detection, arbitrary screens, profiles | Existing placement/detection/fallback and named windows; no complete profile editor | Preserve standalone facilities; Phase4 extends integrated/separate/adaptive; physical verification required | +| Insights with evidence thresholds/dismissal | Not implemented | Phase7; no quality judgements/automatic preferences | +| Collaboration/editorial assignments | General access exists; Writer assignment model not delivered | Deferred beyond currently concrete Phase1 scope; preserve permissions; product decision before promising assignments | +| Detailed provenance reports and signed PDF/verification | Retained JSON evidence/export exists; signing/report model absent | Explicitly deferred; separate security/product gate; not silently retired or folded into ordinary progress | +| Help Me generic suggestions / explicit Intent AI / Reader / Audio Review | Delivered current functionality | Preserve; Phase5 manuscript-aware guidance separate from generic solver; Phase3/4 keep saved-evidence boundaries | + +Master3 supersedes navigation layout and staged delivery, not completed functionality. Its “migration rollback” wording means application rollback compatibility for forward-only SQL; old numbered scripts will not be edited or destructive reverse migrations introduced. + +## Feature preservation map — all 62 audit units + +Classification describes destination intent; Phase1 only repairs foundations. “Reused” does not mean already moved. Utilities includes existing standalone windows/connection/display/settings. No retirement authorised. + +| Audit ID | Existing unit | Destination | Classification | Delivery / preservation | +|---|---|---|---|---| +| F01 | Desk identity and Companion status | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F02 | Help Me | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F03 | Start Here / objective setup | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F04 | Continue Writing | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F05 | Next Planned Session | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F06 | Your Manuscript / Writing Progress | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F07 | Recent Activity | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F08 | Month calendar | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F09 | Year overview | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F10 | Selected day and session history | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F11 | Planned work ahead | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F12 | Writing Rhythm session toolbar | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F13 | Audio Review controls | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F14 | Workspace navigation | Write | Enhanced or consolidated | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F15 | Scene queue cards | Write | Enhanced or consolidated | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F16 | Story Health reminders | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F17 | Today's planned writing | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F18 | Word Companion & Display Setup | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F19 | Plan management table | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F20 | Delete Writing Plan modal | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F21 | Plan scope and goal form | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F22 | Writing Availability | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F23 | Candidate review and budgets | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F24 | No candidates / replacement warning | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F25 | Writing Plan Selection | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F26 | Reviewed writing activities | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F27 | Legacy schedule summary/table | Plan / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F28 | Availability/deadline editor | Plan / Dashboard | Enhanced or consolidated | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F29 | Chapter workflow counters | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F30 | Chapter Goals | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F31 | Workflow Summary | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F32 | Retained evidence table | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F33 | Baseline prompt | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F34 | Privacy and retention | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F35 | Delete retained activity | Reflect / Dashboard | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F36 | Scene navigation and follow status | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F37 | Overview tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F38 | People tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F39 | Relationships tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F40 | Maps tab | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F41 | Floor Plans tab | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F42 | Story tab | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F43 | Plot Lines tab | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F44 | Metrics tab | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F45 | Intent navigation and identity | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F46 | Plan tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F47 | Must Include tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F48 | Notes tab | Write / Utilities standalone | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F49 | Threads tab | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F50 | Evidence tab and result cards | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F51 | Checklist tab | Review | Enhanced or consolidated | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F52 | Reader chapter navigation | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F53 | Reader update controls | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F54 | Reading & Audio Review disclosure | Review | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F55 | Drafting support card and menu | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F56 | Purpose editor | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F57 | Notes editor | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F58 | Checklist editor | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F59 | Workflow editor | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F60 | Attachments editor | Write | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F61 | Problem Solver questions, browse and results | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | +| F62 | Workspace context chooser | Explore | Reused within redesigned destination | Phase1 preserves route/storage; Phases2–4 integration, or5 Explore,6 Plan,7 Reflect as applicable. | + +## Interaction preservation map — all 96 families + +| Audit ID | Existing location / controls | Destination | Classification | Existing handler preservation | +|---|---|---|---|---| +| I001 | Shell — Overview; Writing Journey; Writing Plan; Workspaces; Reports; Display Setup | Home / destination ribbon | Reused within redesigned destination | Preserve Follow named ribbon route with projectId/bookId; Reports owner-only; Display Setup redirects to fragment | +| I002 | Shell — Book choice | Home / destination ribbon | Reused within redesigned destination | Preserve Navigates Writer Index with selected project/book when active Writer; elsewhere Book Details | +| I003 | Help Me — Help Me | Explore / saved focus | Reused within redesigned destination | Preserve Unhides #writer-help-options and sets aria-expanded=true | +| I004 | Help Me — Dismiss suggestions | Explore / saved focus | Reused within redesigned destination | Preserve Hides panel and restores focus to Help Me | +| I005 | Help Me — Return to Writing | Explore / saved focus | Reused within redesigned destination | Preserve Writer.Index with project/book and #working-focus | +| I006 | Help Me — Return to your current focus | Explore / saved focus | Reused within redesigned destination | Preserve Scenes.Edit(scene), Writer.Chapter(chapter) or Writer.Index(book) | +| I007 | Help Me — Open your next planned activity; Open this planned scene | Explore / saved focus | Reused within redesigned destination | Preserve Reviewed activity target or workflow scene editor | +| I008 | Help Me — Set this chapter's Intent | Explore / saved focus | Reused within redesigned destination | Preserve Writer.Chapter(id) goal form | +| I009 | Help Me — Review this scene; Work on the next outlined scene | Explore / saved focus | Reused within redesigned destination | Preserve Scenes.Edit(id) | +| I010 | Help Me — Review the change evidence | Explore / saved focus | Reused within redesigned destination | Preserve WritingActivity.Index with bookId | +| I011 | Help Me — Read or start Audio Review | Explore / saved focus | Reused within redesigned destination | Preserve ManuscriptReader.Index with chapterId/bookId | +| I012 | Help Me — Review this captured note; Explore or add chapters | Explore / saved focus | Reused within redesigned destination | Preserve Scenes.Edit(note scene) or Books.Details(book) | +| I013 | Objective — Continue an existing manuscript | Write | Reused within redesigned destination | Preserve Opens objective-setup disclosure via writer-objective.js | +| I014 | Objective — Working activity; Begin with; Scene (optional) | Write | Reused within redesigned destination | Preserve Choose Activity, ChapterID, SceneID; chapter change filters scene options | +| I015 | Objective — Save objective · start without a schedule | Write | Reused within redesigned destination | Preserve POST Writer.SaveObjective scheduleNow=false → Writer.Index(bookId) | +| I016 | Objective — Save & plan writing time | Write | Reused within redesigned destination | Preserve Same save with scheduleNow=true → ScheduleSetup(bookId) | +| I017 | Objective — Continue Writing; Change objective | Write | Reused within redesigned destination | Preserve Scene editor/chapter workflow/book chapters, or Writer?setup=true#working-objective | +| I018 | Next plan / progress — Create a writing plan; Manage writing plans; Open Chapters; Browse chapters | Write | Reused within redesigned destination | Preserve ScheduleSetup/WritingPlans/Books.Details#chapters | +| I019 | Progress / queue strip — Write Next; In Progress; Revision; Final Pass | Write | Reused within redesigned destination | Preserve Writer.Workspaces(workspace=WriteNext/InProgress/Revision/FinalPass) | +| I020 | Progress — Reports & activity settings; Writing Journey; activity date cell | Write | Reused within redesigned destination | Preserve Activity(book) or Journey(book,year,month,day) | +| I021 | Workspaces — Chapter and scene workspaces | Write | Reused within redesigned destination | Preserve Toggle native details open state | +| I022 | Workspaces — Story Health | Write | Reused within redesigned destination | Preserve Writer.Workspaces(workspace=StoryHealth) | +| I023 | Queue cards — Scene title; Open scene; Session brief; Timeline; Warnings | Write | Reused within redesigned destination | Preserve Scenes.Edit; Exports.WritingSession(sceneId); Timeline(projectId,bookId,selectedSceneId); Warnings(projectId,bookId,sceneId) | +| I024 | Story Health — Reminder title; Project story health | Write | Reused within redesigned destination | Preserve Writer.Chapter(id), Scenes.Edit(sceneId), or Analytics.Index(projectId,bookId) | +| I025 | Today's tasks — Mark complete; Skip | Review / Reflect | Reused within redesigned destination | Preserve POST Writer.MarkScheduleItemComplete / SkipScheduleItem → Index(projectId,bookId) | +| I026 | Journey — Previous month; Next month; date; year cell; year overview | Review / Reflect | Reused within redesigned destination | Preserve Journey GET with book/year/month/day; native details toggle for year | +| I027 | Journey — Accepted-change evidence; Export recent session evidence (up to 50) | Review / Reflect | Reused within redesigned destination | Preserve WritingActivity.Index(bookId,day); WriterWork.Export(bookId,day) | +| I028 | Work session — Activity; Chapter; Start session / Start Audio Review | Review / Reflect | Reused within redesigned destination | Preserve POST /Writer/Work/Start with kind, chapterId, request UUID, pauseOnEdit | +| I029 | Work session — Return / review note (optional); End session & save note | Review / Reflect | Reused within redesigned destination | Preserve POST /Writer/Work/End with sessionId and note ≤2000 chars | +| I030 | Work session — Writing Rhythm & Journey | Review / Reflect | Reused within redesigned destination | Preserve Writer.Journey(bookId) | +| I031 | Audio — Play; Pause; Back 15 seconds; Forward 15 seconds | Review / Reflect | Reused within redesigned destination | Preserve POST /Writer/Work/Command play/pause/back15/forward15 | +| I032 | Audio — Pause on Edit | Review / Reflect | Reused within redesigned destination | Preserve POST /Writer/Work/Preference | +| I033 | Display — Word Companion & Display Setup; Connection & Display Setup | Utilities / standalone references | Reused within redesigned destination | Preserve Details toggle / #display-setup auto-opens details | +| I034 | Display — Context display; Intent display | Utilities / standalone references | Reused within redesigned destination | Preserve Select left/primary/right or detected physical screen; savePreferences | +| I035 | Display — Detect displays | Utilities / standalone references | Reused within redesigned destination | Preserve getScreenLayout(true), browser window-management permission/enumeration | +| I036 | Display — Open Context; Open Intent | Utilities / standalone references | Reused within redesigned destination | Preserve Open/reuse named reference window with project/book scope | +| I037 | Display — Start / Reapply Workspace; Focus Context; Focus Intent | Utilities / standalone references | Reused within redesigned destination | Preserve Register launcher/open reference windows or focus existing window | +| I038 | Plans — View plans across all projects and books; Create Writing Schedule; Schedule Preview | Plan | Reused within redesigned destination | Preserve Unfiltered WritingPlans; scoped ScheduleSetup; unscoped Preview | +| I039 | Plans — View Schedule; Edit Plan; Review chapter activities | Plan | Reused within redesigned destination | Preserve Preview/Edit/PlanActivities(writingPlanId) | +| I040 | Plans — Activate Plan; Deactivate Plan | Plan | Reused within redesigned destination | Preserve POST Writer.ActivateWritingPlan/DeactivateWritingPlan → unfiltered WritingPlans | +| I041 | Plans — Regenerate workflow scene tasks | Plan | Reused within redesigned destination | Preserve POST Writer.RegenerateWritingPlanSchedule; existing reviewed allocations redirect to PlanActivities | +| I042 | Plans — Delete Plan; Close; Cancel; Delete | Plan | Reused within redesigned destination | Preserve Open/close per-plan modal; Delete POST Writer.DeleteWritingPlan | +| I043 | Setup — Plan Name; Goal Type; Project; Book; Start Date; Deadline Date | Plan | Reused within redesigned destination | Preserve Edit setup model; Book blank means All Books | +| I044 | Setup — Rebalance Mode; Available; Session Length; Include Blocked Scenes | Plan | Reused within redesigned destination | Preserve Edit seven-day capacity and planning options | +| I045 | Setup — Review activities | Plan | Reused within redesigned destination | Preserve POST ScheduleSetup → creates active WritingPlan → /Writer/PlanActivities | +| I046 | Setup — Skip scheduling · return to Writer; Schedule Preview | Plan | Reused within redesigned destination | Preserve Scoped Writer or unscoped Preview | +| I047 | Review activities — Include; Activity; Working budget (minutes) | Plan | Reused within redesigned destination | Preserve Per-candidate Selected, Kind, Minutes | +| I048 | Review activities — I have reviewed these activities and budgets…; Commit reviewed schedule | Plan | Reused within redesigned destination | Preserve POST WriterPlanning.Index → Allocate → repository.Save → Preview | +| I049 | Review activities — Edit availability / deadline; Return to Writing; View existing schedule; Review chapters and scenes | Plan | Reused within redesigned destination | Preserve Edit plan, Writer, Preview or Book chapter catalogue | +| I050 | Preview — Writing plan; Select; row Select | Plan | Reused within redesigned destination | Preserve GET SchedulePreview(writingPlanId) | +| I051 | Preview — Mark complete | Plan | Reused within redesigned destination | Preserve POST /Writer/PlanActivities/Complete(writingPlanId,activityId) | +| I052 | Edit Plan — Plan Name; Deadline Date; Rebalance Mode; day availability/minutes; Include Blocked Scenes; Active | Plan | Reused within redesigned destination | Preserve Edit mutable settings | +| I053 | Edit Plan — Save Plan; Cancel; Review and reallocate them | Plan | Reused within redesigned destination | Preserve POST EditWritingPlan; scoped WritingPlans; PlanActivities | +| I054 | Chapter — Goal summary; Emotional goal; Reader takeaway; Must include; Risks or concerns; Save chapter goals | Write | Reused within redesigned destination | Preserve POST SaveChapterGoal → Chapter(id), AJAX branch returns ok | +| I055 | Chapter — Open timeline; Export brief; Markdown; Warnings; Open scene | Write | Reused within redesigned destination | Preserve Timeline(project/book), Exports.ChapterBrief(id[,format=markdown]), Warnings(book), Scenes.Edit | +| I056 | Reports — Record current baseline / Record current accepted baseline | Reflect | Reused within redesigned destination | Preserve POST Activity.Baseline | +| I057 | Reports — Export recent evidence (JSON); Earlier evidence; All retained activity; chapter link | Reflect | Reused within redesigned destination | Preserve Activity.Export(book), Index(book,before,day), Index(book), Writer.Chapter | +| I058 | Reports — Record activity for this book; Keep activity for; Save privacy settings | Reflect | Reused within redesigned destination | Preserve POST Activity.Settings(enabled,retentionDays) | +| I059 | Reports — Delete retained activity; confirmation; Delete activity | Reflect | Reused within redesigned destination | Preserve Expand, then POST Activity.Erase(confirm=true) | +| I060 | Reports — Export recent work and Audio Review sessions (up to 50); Back to Writer | Reflect | Reused within redesigned destination | Preserve WriterWork.Export(book); Writer.Index(project/book) | +| I061 | Context — Overview; People; Relationships; Maps; Floor Plans; Story; Plot Lines; Metrics | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Activate data-writing-context-tab; lazy fetch map/plot/metrics on demand | +| I062 | Context navigation — ← Previous; Next →; Jump to scene; Open Scene | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Load saved scene fragment; explicit trusted action may request Word navigation; editor in new tab | +| I063 | Context Maps — Map; Lens; Refresh saved data; Fit map; Show scene location; +; −; Inspect place | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Fetch selected saved map; adjust lens/viewport/focus/inspection | +| I064 | Context Maps — Map pointer drag; wheel; arrow keys; Enter / Space on feature | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Pan/zoom canvas or select saved place | +| I065 | Context Floor Plans — Zoom; scroll/pan | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Range70–200 scales floor-plan preview; native scrolling | +| I066 | Context Plot Lines — Active here; Nearby; Elsewhere; Show all; Explore scenes; ‹; ›; Show current scene; Go to scene in Word; Refresh saved data | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Filter saved plot cards, explore different scene, explicit navigate/fetch | +| I067 | Context Metrics — Metric; Show current scene; manuscript scene buttons; Explore scenes; Go to scene; Refresh saved data | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Select stored metric graph, inspect indexed scene, explicit navigate/fetch | +| I068 | Context reference links — Source scene; Calendar; Story Maps · choose a saved map; Linked floor plan; Plot Lines; Characters and relationships; thread title | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Scenes.Edit, StoryCalendar, Maps story, FloorPlans.Edit, PlotLineWorkspace, RelationshipMap, PlotThreads.Edit | +| I069 | Intent — Plan; Must Include; Notes; Threads; Evidence; Checklist | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Activate Intent tab via writing-follow.js | +| I070 | Intent navigation — Jump to chapter; Jump to scene; Edit Scene; Edit Chapter Plan | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Load intent fragment or navigate to Scenes.Edit/Writer.Chapter | +| I071 | Intent evidence — Show saved evidence | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve GET IntentAssessment.Read(sceneId), partial result | +| I072 | Intent evidence — Assess saved prose with AI; Cancel | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve POST Analyse; AbortController cancellation | +| I073 | Intent evidence cards — Expand objective; Keep evidence; Dismiss; Defer; Revisit | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Disclosure or POST decision(sceneId,hash,key,acknowledged/dismissed/deferred/pending) | +| I074 | Intent checklist — Review objectives and completion in the scene editor; Edit intentions and objective completion | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Scenes.Edit(scene) | +| I075 | Reference tabs keyboard — ArrowLeft; ArrowRight; Home; End | Write / Explore / Utilities standalone | Reused within redesigned destination | Preserve Focus/activate adjacent/first/last tab through writing-follow.js | +| I076 | Reader — ← Previous chapter; Next chapter →; Chapter; Read; Refresh manuscript | Review | Reused within redesigned destination | Preserve Reader.Index with book/chapter/focus or enhanced chapter fetch | +| I077 | Reader — Focus reading; Escape | Review | Reused within redesigned destination | Preserve Toggle reader focus class/query state; Escape exits focus | +| I078 | Reader — Pause automatic updates while listening; Show updated chapter | Review | Reused within redesigned destination | Preserve Pause accepted-text replacement, then explicitly fetch queued new chapter | +| I079 | Reader — Reading & Audio Review; Return to Writing; Return to Chapters | Review | Reused within redesigned destination | Preserve Toggle embedded session toolbar; Writer.Index(book); Books.Details(book) | +| I080 | Scene card — Edit Writer; Show writer editor actions; Notes; Checklist; Workflow; Attachments | Write | Reused within redesigned destination | Preserve Load corresponding Scenes.Scene…Editor partial into inspector drawer | +| I081 | Scene Purpose — Purpose types; purpose notes; expected outcome; Save purpose; Cancel | Write | Reused within redesigned destination | Preserve POST Scenes.SaveScenePurpose or close drawer | +| I082 | Scene Notes — Type; Title; Text; Pinned; Resolved; Remove; new note; Save notes; Cancel | Write | Reused within redesigned destination | Preserve POST SaveSceneNotes, iterate validated scene-owned records | +| I083 | Scene Checklist — Item text; completed; Remove; new item; Save checklist; Cancel | Write | Reused within redesigned destination | Preserve POST SaveSceneChecklist, validated existing items and optional new | +| I084 | Scene Workflow — Priority; Estimated words; Actual words; Drafted date; Last worked on; Blocked; Blocked reason; Save workflow; Cancel | Write | Reused within redesigned destination | Preserve POST SaveSceneWorkflow → writer service | +| I085 | Scene Attachments — Type; Title; file; External link; Notes; Add attachment; Save attachment | Write | Reused within redesigned destination | Preserve POST Scenes.SaveAttachment multipart | +| I086 | Scene Attachments — Open; Download; Open link; Remove attachment; Close | Write | Reused within redesigned destination | Preserve Stored href/download/new tab; POST DeleteAttachment; close drawer | +| I087 | Scene header — Prepare Writing Session | Write | Reused within redesigned destination | Preserve Exports.WritingSession(sceneId) | +| I088 | Word ribbon — Book; Chapter; Scene | Utilities / native Word | Reused within redesigned destination | Preserve Read-only display editBoxes restored via RestoreTitle | +| I089 | Word ribbon — Writing Context; Writing Intent; PlotDirector | Utilities / native Word | Reused within redesigned destination | Preserve WordAdapter.OpenWritingWorkspace tray-context/tray-intent/tray-workspace | +| I090 | Word ribbon — Open Companion; Audio Review | Utilities / native Word | Reused within redesigned destination | Preserve Both NativeRibbon.OpenCompanion | +| I091 | Word ribbon — Play; Pause; Back 15 seconds; Forward 15 seconds | Utilities / native Word | Reused within redesigned destination | Preserve WordAdapter.RequestAudio same four command names | +| I092 | Word ribbon — Synchronise; Repair Synchronisation | Utilities / native Word | Reused within redesigned destination | Preserve RequestChapterSynchronisation(false/true) | +| I093 | Word ribbon Tools — Remove Legacy Markers; Troubleshooting | Utilities / native Word | Reused within redesigned destination | Preserve WordAdapter.RemoveLegacyMarkers / ShowTroubleshooting | +| I094 | Office.js shell — Open PlotDirector Companion | Utilities / native Word | Reused within redesigned destination | Preserve Manifest task pane loads /word-companion | +| I095 | Problem Solver — Question choices; continue/back/start; browse area; result capability link | Explore | Reused within redesigned destination | Preserve Protected answer history POST /problem-solver/answer → graph evaluation/editorial result | +| I096 | Problem Solver workspace — Project / character; Open capability → | Explore | Reused within redesigned destination | Preserve GET /problem-solver/workspace/{capability}; validate IDs then LocalRedirect | + +## Phase 1 qualification ledger + +| Batch | Implementation | Automated / fixture qualification | Development | +|---|---|---|---| +|1A queues / book scope|Implemented264; optional BookID reaches SQL before TOP40; legacy queues retained|Transactional Development fixture passes4 statuses,45 other-book scenes,40 per-book cap,legacy Blocked; rolled back|Copy-only checksum backup succeeded;264 applied; no data conversion| +|1B canonical status / independent context|Canonical Intent status; immutable independent selection projection on desk/reference/Reader; existing native checks retained|Context separation/cross-scope/invalid mapping tests and full harness pass; physical host manual|Deployed c769e11-20261116T151427Z; authenticated browser/simulated PWA acceptance passed| +|1C scheduling / validation / navigation|Scoped Preview selection/returns; reviewed data retained on rebalance GET; validation loads after jQuery; queue/waiting copy corrected|Service/controller tests pass; isolated browser/PWA and live post-deployment acceptance passed|Deployed c769e11-20261116T151427Z; authenticated browser/simulated PWA acceptance passed| +|1D Help / qualification / release|62-feature Help ownership map; existing articles corrected; new context/plan articles and existing tag-helper icons|Build0warnings; full harness exit0; Reader/Intent/standalone browser suites pass|Deployed; matching DLL hash/metadata; HTTP200/service active; no warnings; synthetic fixtures removed| + +Physical Windows Word, actual media playback, installed Windows PWA and multiple-monitor placement are manual acceptance gates; a Chromium simulated PWA is labelled as such. Stop after Phase1 report. Recommended Phase2 first batch: Home/destination route state and static viewport layouts, retaining old URLs and utilities before resizable composition. + +## Bounded follow-up after Phase 1 + +Legacy rebalance operations remain callable but no replacement rebalance review UI is added here; unify their presentation and explain Automatic mode in Phase6 after its scheduling design. Existing project change in setup is still server-validated rather than introducing a new dependent-selector API; visual goal-first planning replaces this in Phase6. Phase1 typed context is a projection/adaptation layer, not persisted cross-window global focus; explicit interactive indicators/returns and independent exploration commands are Phases2–4. Timed sprints, overlapping passes, collaboration assignments and signed provenance remain outstanding Writer2 requirements recorded above; none is falsely labelled delivered. No author-data semantics or native protocol changed. + +## Phase 1 completion — 16 November 2026 + +Implementation/deployed source: `c769e1119a2542e256374db3c48eeb324c2663ab`. Release `c769e11-20261116T151427Z`. Build and full harness passed (543 PASS records, exit0). Scoped transactional SQL regression and authenticated Development browser/simulated PWA acceptance passed. Live canonical status remained Outlined while legacy DraftStatus remained Planned, confirming presentation repair without conversion. All dedicated fixture projects/account removed; RemainingSyntheticAccounts=0. Physical Windows/installed PWA/multi-monitor acceptance remains manual. See [Phase1 report](Phase1-Report.md) for commands, limits and release evidence. Phase2 is not started and requires explicit acceptance. + +## Phase 2A delivery scope + +User authorised2A only after Phase1 acceptance. [Execution breakdown and layouts](Phase2A-Execution.md). Existing62 features/96 interaction families remain preserved by routes, contextual ribbon and legacy desk; new destination links reuse their recorded destination owners. No retirement or replacement storage. Full integration and resizable companions remain2B/Phases3–4; no fake guidance/schedule/insight results. + +## Phase 2A completion — 16 November 2026 + +Home, five destination shells, Plan/Reflect Dashboard and contextual existing ribbon are implemented. Entire old desk remains at Overview; Workspaces/Journey/Display Setup, native windows and specialist routes are preserved. Seven Markdown Help articles use the existing tooltip/popup/PWA drawer/full article infrastructure. No schema or native protocol changes. Build: zero warnings/errors; full harness:584 PASS; responsive navigation:168 combinations; preserved desk:48 combinations; Reader/Intent/Context/native-follow simulations/chapter goals/audio state suites passed. Authenticated Development browser and simulated PWA tests passed; scoped author-data hashes identical before/after navigation; disposable account and projects removed (RemainingSyntheticAccounts=0). Deployed DLL hash and commit metadata match. Physical Windows Word, installed PWA, actual playback and monitor placement remain manual. [Completion report](Phase2A-Report.md). Phase2B has not begun. + +## Phase 2B authorised scope + +[Execution and layout contract](Phase2B-Execution.md). Five viewport workspaces, reusable resize/collapse/overlay infrastructure and per-actor/per-destination device preferences; preserve current task/session/audio controls and independent standalone windows. No story data/schema/native protocol changes. Home spacing refinements only. Phase2C not started. Qualification and Development deployment complete; see Phase2B-Report.md. + +## Phase 2B completion — 16 November 2026 + +Application `10bf9db9061fdec340acf7ff0df96f3dfd299814`, release `10bf9db-20261116T164516Z`. Shared viewport composition, pointer/keyboard split, collapse/restore, narrow overlay, per-actor/per-destination device preferences, compact Home spacing and existing-system layout Help delivered. No schema, author-story-data, native protocol or standalone-window changes. Build0warnings/errors; full harness584 PASS; isolated and authenticated Development workspace matrices200 cases each; navigation168 cases; legacy desk48 cases; Reader/Intent/native-follow/reference/audio preservation passed. Live scoped author-data hashes identical; fixture account/projects removed. DLL hash/metadata matched; service active, TLS GET200, warning journal clear. Physical Windows/installed PWA/real media/multi-monitor and assistive-technology checks remain manual. [Phase2B report and screenshots](Phase2B-Report.md). Phase2C not started. + +## Phase 2C authorised scope + +[Observed issue register](Phase2C-Issues.md). Pre-change authenticated Development capture complete; correcting observed Explore marker wrapping, collapsed reading widths, Help placement, session hierarchy and modified-key interception. Reuse current routes/ribbon/workspace and storage. No future feature integration. Full regression, browser matrices and Development acceptance passed; see Phase2C-Report.md. Phase3 not started. + +## Phase 2C / Phase 2 software completion — 16 November 2026 + +Application `e9402d0c1673d3dc8afcca26bb344b82fa11caf0`, release `e9402d0-20261116T171812Z`. Observed marker wrapping, wide reading lines, Help ambiguity and modified-key interception corrected. User amendment delivered one focus selection with separate save/record/plan actions, explicit activity adapters and active-session target separation. Existing storage/services/native authority retained. Build0warnings/errors; full harness587 PASS; navigation168 cases, isolated/live workspace200 cases each; focused unification, actual Development objective/session/validation/planning, refinement, Reader/Intent/standalone/native-follow/audio/legacy desk coverage passed. Before/after read-only ten-field hashes identical; fixture projects/account removed, private identity removed. DLL hash/metadata match; service active, TLS GET200, actual deployment-to-acceptance warning journal clear. [Report and before/after evidence](Phase2C-Report.md). Physical Windows/installed PWA/real Word/media/multi-monitor and assistive-technology checks remain manual. Phase3 not started. + +## Phase3A authorised implementation + +[Execution and canonical-data contract](Phase3A-Execution.md). Current Work remains unified; optional chapter/scene intentions, notes, reminders and working details use existing records through pure inspection and scoped concurrency-safe saves. Companion shows only saved references. Full native/context redesign, manuscript editing, new planning and AI engines remain out of scope. Help,598-regression, transactional SQL, browser/PWA and real authenticated authoring qualification passed. Development release64e1782-20261116T202418Z; see [completion report](Phase3A-Report.md), screenshots and evidence for endpoint distinctions, invariants, cleanup and physical acceptance. Phase3B subsequently delivered below; physical Windows acceptance remains outstanding. + + +## Phase3B authorised implementation + +Batches3B.1–3B.6: native contract audit, shared Word status presentation, explicit acknowledged chapter/scene navigation, accepted Reader freshness, return/recovery, Help/qualification/Development. Existing native identity/range/checkpoint/Reader/session/follow contracts remain authoritative. Additive read-only metadata procedure271 and negotiated acknowledged-navigation-v1; matched native developer source1.0.0.37, no Windows installation. Writer companion shows Word status without displacing intentions or active-session controls. Detailed qualification and final release are in Phase3B-Report.md. Phase3C/4 not started by this authorisation. + +Phase3B software qualification complete: application/native source9969c9b, Development release9969c9b-20261116T210203Z;599 web,288 native and453 chapter-sync assertions; authenticated read-only data hashes unchanged and disposable fixture removed. Matched1.0.0.37 Windows build/install/physical acceptance remains manual. Phase3C not started. diff --git a/Docs/Writer/Writer3/Master-Specification.md b/Docs/Writer/Writer3/Master-Specification.md new file mode 100644 index 00000000..93f514ff --- /dev/null +++ b/Docs/Writer/Writer3/Master-Specification.md @@ -0,0 +1,365 @@ +# PlotDirector Writer 3.0 +## Master Implementation Plan and Phased Delivery Specification + +**Status:** Proposed implementation baseline +**Target:** PlotDirector Development +**Scope:** Writer experience, existing integrations, contextual Help and new guided capabilities + +### 1. Product objective + +Transform Writer from a collection of sophisticated but fragmented tools into a connected authoring environment that helps people write, develop, plan, review and understand their stories. + +The primary audience includes people who have a story to tell but little or no formal understanding of novel-writing methods. + +Experienced authors must retain direct access to detailed controls and specialist workspaces. + +**Central principle:** The author should receive useful assistance before being expected to invest substantial time entering supporting information. + +### 2. Non-negotiable design requirements + +1. Preserve existing functionality and authoritative story records. +2. Retain the PlotDirector theme, ribbon, PWA behaviour and familiar application conventions. +3. Provide three clear Writer Home choices: Continue Writing, Explore Your Story and Writing Dashboard. +4. Organise detailed functionality into five destinations: Write, Explore, Plan, Review and Reflect. +5. Avoid long, vertically stacked feature pages. Use viewport-aware workspaces, tabs, drawers and independently scrolling content regions. +6. Use a resizable main workspace and contextual companion where appropriate. +7. Preserve dedicated standalone Context and Intent windows for multi-monitor working. +8. Create distinct integrated Context and Intent presentations for single-screen working. +9. Preserve Word Companion integration, synchronisation, native follow, Reader and Audio Review. +10. Allow inline authoring of information where its absence becomes relevant. +11. Make planning and story exploration useful without compulsory metadata preparation. +12. Reuse existing Plot Lines, Relationships, Maps, Floor Plans, Threads and Emotion Metrics information rather than duplicating their storage or business logic. +13. Preserve the existing Markdown Help/tag-helper architecture, including tooltip, popup and full-document content. +14. Keep all suggested creative interpretations distinguishable from recorded author facts. +15. Never silently change manuscript text, author intentions, scene status or writing preferences based on AI recommendations. +16. Support new books, partially planned books and existing manuscripts with substantial content. + +### 3. Navigation architecture + +**Writer Home** + +Present three clear actions, with current book and optional recent focus: + +- Continue Writing → Write +- Explore Your Story → Explore +- Writing Dashboard → overview of Plan and Reflect + +The ribbon provides direct access to Write, Explore, Plan, Review and Reflect without forcing authors through Home repeatedly. + +Contextual ribbon tabs change with the selected destination. A separate Utilities area retains Workspaces, Display Setup, Word Companion connection information and relevant settings. + +The active book must be explicit and authorised. Chapter/scene focus must be distinguishable from temporary exploration and pinned references. + +### 4. Functional destination requirements + +#### Write + +Provide a primary working surface for the current chapter or scene. + +Include current objective, chapter goals, scene purpose/outcome, notes, checklist, workflow, revision status and attachments. + +Provide relevant contextual information in a companion pane, including plot developments, emotional progression and character relationships. + +Allow optional inline editing without leaving the working task. + +Support launching or following Word, saving/synchronising, recording work sessions and returning to the same task. + +Do not require a completed chapter plan or scene checklist before the author can begin. + +#### Explore + +Start with the author's question or concern, not a request to choose a specialist tool. + +Support guided journeys for beginning a story, developing characters, discovering plot direction, resolving uncertainty and improving a developing manuscript. + +Reuse the existing Writing Problem Solver and its editorial question graph where appropriate. + +Allow authors to inspect story references and visualisations during exploration. + +Offer concrete outcomes: save an idea, create or update a chapter/scene intention, add a note, propose a plot development or identify a next writing task. + +Manuscript-aware analysis must be implemented and validated separately from the existing generic Problem Solver. Do not represent current fixed-rule Help Me suggestions as semantic story diagnosis. + +#### Plan + +Begin with the author's intended outcome and a small amount of availability information. + +Produce a useful draft plan from existing chapters, scenes and available scheduling information, with clearly identified assumptions. + +Provide a visual schedule/calendar and allow adjustments before confirmation. + +Support optional scene estimates, priorities, blockers, milestones and more detailed allocations. + +Unify the presentation of existing legacy schedule tasks and reviewed planned activities. Preserve existing data during transition and avoid contradictory completion semantics. + +#### Review + +Bring together the read-only Manuscript Reader, Focused Reading, Audio Review, chapter/scene intentions, evidence assessment and revision decisions. + +Focused Reading must remain distraction-free. + +Provide clear separation between recorded intention, saved manuscript evidence, AI interpretation and author-confirmed completion. + +Allow the author to move from a review finding to a specific revision task and back to the manuscript. + +Preserve Reader automatic-refresh behaviour, focused-mode navigation, source freshness and Word synchronisation boundaries. + +#### Reflect + +Present writing progress, Writing Journey, sessions, accepted manuscript changes, reports and retained activity. + +Introduce Your Writing Process: + +- The author's self-described working preferences. +- Observed activity patterns, subject to evidence thresholds. +- Comparison between expectations and recorded behaviour. +- Optional suggestions for adapting Writer's presentation or planning approach. + +Do not infer writing quality from word counts, editing frequency or session duration. + +Clearly explain insufficient evidence, disabled tracking and data-retention effects. + +Preserve existing activity privacy, export and erasure controls. + +### 5. Single-screen and multi-screen architecture + +Provide three user-selectable arrangements: + +**Integrated:** Context and Intent are presented as task-specific companion views within Writer. + +**Separate windows:** Standalone Context and Intent remain available as persistent reference windows, with their own layouts and controls. + +**Adaptive:** Uses saved preferences and available display capabilities, with explicit user override. + +Preserve display detection, permission handling, placement preferences, named-window reuse, native Word follow and fallback behaviour. + +Distinguish: + +- Working focus: the author's active writing target. +- Exploration focus: an independently selected reference. +- Pinned reference: information intentionally held on screen. + +An exploratory selection must not automatically move Word. + +Integrated and standalone presentations must use the same underlying canonical data and service contracts. + +Standalone Context retains its eight existing reference categories. Standalone Intent should prioritise persistent chapter/scene guidance, objectives, checklist and evidence rather than becoming a full data-entry screen. + +### 6. Contextual Help and tutorials + +Retain the existing Help tag helper and Markdown-backed tooltip, popup and full-document structure. + +For each changed feature, verify that all applicable Help levels remain accurate. + +Make full Help available inside the companion surface when appropriate. + +Plan a small series of core author-journey videos, with optional feature-specific demonstrations. + +Videos must not be required for task completion. + +Provide accessible captions and written transcripts. + +### 7. Shared engineering requirements + +- Maintain a consistent and authorised book/chapter/scene context contract. +- Preserve existing source-of-truth tables and repositories. +- Reuse canonical story services and existing visualisation components. +- Preserve user state when switching destinations, opening Help or returning from specialist editors. +- Use existing PlotDirector architectural conventions and security controls. +- Keep the Word Companion's native/agent integration stable. +- Avoid adding a new database schema where existing records are sufficient. +- Treat missing metadata, stale manuscript evidence and unavailable integrations explicitly. +- Do not invent historical writing activity. +- Ensure browser, PWA, keyboard and responsive behaviour remain usable. +- Ensure privacy, retention and permissions apply to any new observations. + +### 8. Delivery phases + +#### Phase 1 — Foundation and corrections + +**Objective:** Establish reliable integration contracts before changing the interface. + +Tasks: + +1. Reconcile this specification with the existing Writer 2.0 requirements and completed work. +2. Confirm the current repository baseline and preserve existing development work. +3. Fix the scene-queue stored procedure/application naming mismatch and pre-filter result cap. +4. Reconcile canonical revision status with legacy workflow status presentation. +5. Define shared working, exploration and pinned-reference context contracts. +6. Document session, Word-follow and Reader selection behaviour. +7. Clarify legacy versus reviewed scheduling data and completion semantics. +8. Fix confirmed validation and navigation defects affecting planned journeys. +9. Establish regression fixtures covering existing Writer functionality. +10. Review the Help tag-helper integration and create a feature-to-Help coverage register. + +**Acceptance:** Existing Writer, Word Companion, Context, Intent, Reader, plans and reports remain functional. Known defects are corrected or explicitly recorded with bounded follow-up. + +#### Phase 2 — Writer Home and workspace shell + +**Objective:** Deliver the new navigation experience without removing old capabilities. + +Tasks: + +1. Implement calm, single-viewport Writer Home. +2. Add three primary choices. +3. Implement five destination navigation states. +4. Build the resizable main/companion workspace layout. +5. Implement contextual ribbon navigation. +6. Preserve selected book and working focus. +7. Add appropriate empty states and contextual Help. +8. Preserve full specialist-workspace navigation and return context. +9. Verify PWA, desktop and responsive layouts. + +**Acceptance:** A new author can immediately identify where to begin. An experienced author can reach existing tools without extra steps. No main destination requires scrolling merely to discover its features. + +#### Phase 3 — Write and Review integration + +**Objective:** Make everyday writing and reviewing coherent. + +Tasks: + +1. Consolidate current focus, chapter and scene workflows. +2. Provide inline editing for chapter goals and scene support information. +3. Integrate relevant notes, checklists, statuses and attachments. +4. Provide compact contextual story references. +5. Connect working objectives, sessions and Word status. +6. Integrate Reader and Audio Review as Review destinations. +7. Preserve focused reading and automatic accepted-text refresh. +8. Create clear revision-decision and return-to-writing actions. +9. Ensure edits update existing authoritative records. + +**Acceptance:** An author can select a chapter, prepare, write in Word, review accepted text, record a revision and resume without repeatedly searching other sections. + +#### Phase 4 — Context, Intent and display modes + +**Objective:** Support single-screen and multi-monitor working as first-class experiences. + +Tasks: + +1. Preserve and regression-test existing standalone windows. +2. Build compact integrated Context. +3. Build interactive integrated Intent. +4. Improve standalone Intent's persistent reference presentation. +5. Implement integrated/separate/adaptive preferences. +6. Preserve display detection, placement and permission fallbacks. +7. Implement reliable working/exploration/pinned-reference indicators. +8. Preserve verified Word-follow and explicit navigation controls. +9. Verify simultaneous multi-window state and synchronisation. + +**Acceptance:** Single-screen authors can use Context and Intent naturally inside Writer. Multi-monitor authors retain dedicated, persistent companion windows. Exploring references does not unexpectedly retarget Word. + +#### Phase 5 — Explore and creative guidance + +**Objective:** Help authors who know their story but not the tools. + +Tasks: + +1. Build guided entry points using everyday author language. +2. Integrate the existing Writing Problem Solver. +3. Provide persistent question history, back/skip and resumption. +4. Surface relevant story references and contextual visualisations. +5. Support saving decisions to appropriate canonical records. +6. Provide inline access to missing information. +7. Develop manuscript-aware guidance only where source availability, permission and evidence can be verified. +8. Clearly separate guidance, inference and author decisions. +9. Provide beginner and experienced-author routes. + +**Acceptance:** An author can arrive with an idea or story concern, receive meaningful guidance and leave with a saved next step without knowing PlotDirector's technical terminology. + +#### Phase 6 — Writing Plans and Dashboard + +**Objective:** Produce useful visual plans from minimal input. + +Tasks: + +1. Design the goal-first planning entry. +2. Derive available scope and activity candidates from existing records. +3. Propose reasonable, transparent assumptions. +4. Build a visual calendar/schedule with editable allocations. +5. Provide optional detailed planning controls. +6. Integrate reviewed activities and legacy schedule data. +7. Connect plan progress to the Writing Dashboard. +8. Preserve existing activity and session tracking. +9. Explain missing estimates and unavailable forecasts without fabricating precision. + +**Acceptance:** An author with chapters but no detailed scene estimates can produce, adjust and confirm a meaningful draft plan. + +#### Phase 7 — Writing Process and reflective insights + +**Objective:** Help authors discover how they work. + +Tasks: + +1. Provide optional self-description using plain-language writing approaches. +2. Define observable activity signals and their limitations. +3. Reuse retained activity evidence where reliable. +4. Implement evidence thresholds and confidence explanations. +5. Present visual comparisons between perceived and observed process. +6. Support disagreement, dismissal and revisiting insights. +7. Suggest reversible Writer preferences where appropriate. +8. Keep insights separate from judgements about writing quality. +9. Test disabled tracking, limited history and retention boundaries. + +**Acceptance:** Insights appear only when supported by sufficient evidence, remain understandable and never automatically impose a writing style. + +#### Phase 8 — Help, tutorials and final qualification + +**Objective:** Complete the integrated experience and documentation. + +Tasks: + +1. Verify Help coverage for all Writer features and new workflows. +2. Repair missing or outdated Markdown articles and tag-helper links. +3. Validate tooltip, popup and full-document presentation. +4. Add tutorial entry points for selected complex journeys. +5. Prepare core video scripts and a consistent example-story outline. +6. Verify Help works within integrated and standalone presentations. +7. Complete accessibility, PWA, responsive and multi-monitor testing. +8. Run complete Writer and Word Companion regressions. +9. Resolve navigation inconsistencies and duplicated entry points. +10. Produce a final feature coverage and acceptance report. + +**Acceptance:** All audited Writer features have a documented destination, appropriate Help coverage and a verified route to use them. Any remaining limitations are explicitly recorded. + +### 9. Phase execution and quality gates + +Each phase must: + +- Begin from a clean, synchronised shared Git baseline. +- Use the established shared-branch workflow; do not create competing branches for Atlas and Windows work. +- Preserve unrelated changes and avoid force pushes. +- Include implementation, automated tests and relevant browser/PWA tests. +- Include native Word qualification where the change touches Word integration. +- Update affected Help Markdown in the same phase. +- Test both populated and empty/new-book states. +- Test single-screen and standalone-window regression where relevant. +- Validate data permissions and migrations, including rollback when applicable. +- Deploy to Development only after qualification. +- Report commits, tests, deployment results, known limitations and manual acceptance steps. +- Await explicit acceptance before proceeding to the next major phase. + +Do not deploy to Production without explicit approval. + +### 10. Feature preservation and traceability + +Use the existing Writer audit inventory, interaction register, feature activation register, context matrix and Help rules as the starting traceability baseline. + +Every audited feature and interaction family must be classified as: + +- Preserved unchanged. +- Reused within a redesigned destination. +- Enhanced or consolidated. +- Intentionally retired, requiring explicit approval. +- Deferred with a documented reason. + +No feature may disappear merely because its original page or panel has been redesigned. + +### 11. Delivery order and approval + +Proceed sequentially, but allow low-risk preparatory work for later phases when it does not interfere with the current acceptance gate. + +Before substantial implementation, produce screen layouts and interaction states for the affected phase. + +Do not undertake an unbounded application-wide rewrite. + +The successful outcome is not a new-looking Writer. It is a Writer that allows a novice author to begin immediately, supports sophisticated planning when desired, and preserves the powerful specialist and multi-screen facilities already built into PlotDirector. diff --git a/Docs/Writer/Writer3/Phase1-Report.md b/Docs/Writer/Writer3/Phase1-Report.md new file mode 100644 index 00000000..3a6b03bc --- /dev/null +++ b/Docs/Writer/Writer3/Phase1-Report.md @@ -0,0 +1,93 @@ +# Writer 3.0 Phase 1 — delivery and Development qualification + +Date: 16 November 2026 (London). Shared branch: `codex/word-companion-native-phase1-20261104`. +Implementation and deployed source: **`c769e1119a2542e256374db3c48eeb324c2663ab`**. The following documentation/test-only commit records final live acceptance; it does not change the deployed application binary. Phase2 has not begun. + +## Delivered foundation + +- Added migration264 to reconcile the live readiness-only queue procedure with current canonical queue requests. Optional BookID reaches SQL before TOP40, including default dashboard book selection. Existing legacy queues, subtitle output and ordering remain compatible. Queues remain bounded at40 scenes per selected book; Help explains the bound. +- Intent Checklist now displays the scene's canonical Revision Status through its existing lookup. Legacy DraftStatus/readiness fields are retained. Live synthetic verification: canonical Outlined with legacy Planned still stored. No status backfill or manuscript-data conversion. +- Introduced immutable shared context/selection projections with separate scope, saved objective, working, exploration, pinned, Reader, session and verified Word slots. Dashboard, resolved reference page models and Reader use adapters; reference-role metadata is emitted. Construction is not authorisation or a navigation command. Existing entity access, exact native document/lease/accepted-position validation and race checks remain authoritative. Unresolved scene URLs cannot become valid pinned selections. Active sessions retain the existing UUID/activity/chapter/native binding and polling rather than following a global selector. +- Book/project scope is preserved by plan-list preview links and activation/deactivation/deletion/legacy-regeneration returns. Preview filters plans before choosing its default, includes All Books plans, and rejects an explicit out-of-scope plan. Empty scoped previews retain book context. Rebalance GET reuses the normal preview loading path so reviewed allocations remain available; no premature replacement of either scheduling store. +- Setup/edit validation partials now load in the Scripts section after layout jQuery. Queue terminology matches In Progress/Final Pass. Sparse Context messages no longer falsely claim a supplied book ID was missing. +- Existing Help architecture reused: corrected workspace/queue/goal articles, new working-context and plan articles, existing tag-helper icons on affected surfaces, and a 62-unit Help ownership register. +- Permanent eight-phase tracker includes implementation batches, reuse/data/dependency/risk/test/Help/deployment gates, explicit mapping of all62 features and96 interaction families, and Writer2 reconciliation. Timed sprints, richer passes, collaborator assignments and signed provenance remain honestly recorded as outstanding requirements rather than silently retired. + +## Files and components + +| Component | Changed files | +|---|---| +| Context contract | `PlotLine/Services/Writer/WriterContext.cs`; context/dashboard/preview models in `PlotLine/ViewModels/CoreViewModels.cs`; Reader adapter in `Services/Manuscript/ManuscriptReaderService.cs` | +| Queue and plan plumbing | `PlotLine/Controllers/WriterController.cs`, `PlotLine/Services/CoreServices.cs`, `PlotLine/Data/Repositories.cs`, `PlotLine/Sql/264_WriterFoundationQueues.sql` | +| Reference verification/projection | `PlotLine/Controllers/WritingController.cs`; `Views/Writing/Context.cshtml`, `Intent.cshtml`, `_WritingIntentChecklist.cshtml` | +| Existing Writer surfaces | `Views/Writer/Index.cshtml`, `_WriterSceneQueue.cshtml`, `WritingPlans.cshtml`, `ScheduleSetup.cshtml`, `SchedulePreview.cshtml`, `EditWritingPlan.cshtml` | +| Regression protection | `PlotLine.Tests/WriterFoundationTests.cs`, `WritingIntegrationTests.cs`, harness registration in `Program.cs`, `Sql/WriterFoundation.sql`, `Browser/writer-foundation-live.cjs` | +| Help | `PlotLine/Help/Articles/Workspace/{Overview,WriteNext,RevisionQueue,PolishingQueue,ChapterGoals,WorkflowSummary,WorkingContext,WritingPlans}.md` | +| Programme documentation | `Docs/Writer/Writer3/{Master-Specification,Implementation-Tracker,Context-Contract,Help-Coverage,Phase1-Report}.md` and sanitised acceptance evidence | + +No native add-in/agent/protocol code, styles, production settings or author story semantics changed. The unrelated untracked CanonicalManuscriptArchitectureAssessment document was preserved. + +## Database qualification + +Effective Development configuration was parsed privately with SqlConnectionStringBuilder and DB_NAME verified as `PlotDirector_Development`. Before writes/migration, a fresh copy-only checksum backup succeeded and its nonempty container file was checked: + +`/var/opt/mssql/backup/writer3-before-264-20261116-phase1.bak` + +An earlier optional RESTORE VERIFYONLY attempt was refused because the application SQL account lacks CREATE DATABASE permission. No privilege escalation, restore/reset or database overwrite was attempted. Backup command completion/file existence is verified; a restore test is not claimed. + +Applied only264, with ANSI_NULLS and QUOTED_IDENTIFIER enabled. It changes one procedure and adds no tables, columns or destructive migration. Earlier numbered migrations remain unchanged. The old application remains compatible with the optional parameter and retained queue names. + +`PlotLine.Tests/Sql/WriterFoundation.sql` ran against verified Development inside a transaction and rolled back. It established45 scenes in another book cannot exclude the selected-book target, the selected-book cap remains40, all four canonical statuses map correctly, and legacy Blocked still works. Follow-up metadata verified BookID scope and zero remaining transactional fixture projects. Fixtures contain no actual author manuscript. + +## Automated and browser results + +| Gate | Command / coverage | Result | +|---|---|---| +| Build | `dotnet build PlotLine.slnx --no-restore` | Exit0;0warnings/errors | +| Full harness | `dotnet run --no-build --project PlotLine.Tests/PlotLine.Tests.csproj` | Exit0;543 PASS records, no FAIL records; includes new context/queue/plan tests plus existing native auth, manuscript, intent, activity and security regressions | +| Standalone windows | `node writer-workspace.cjs` | Browser/simulated PWA pass: initial failure/retry, per-window identity/reuse, selected-book isolation, denied/unavailable display API and plan navigation | +| Native-follow simulation | `node writing-context-follow-recovery.cjs` | Pass: exact-session queries, pending/invalid mappings, races/cancellation, cross-chapter updates and trusted explicit navigation; simulated protocol, not Word | +| Reader | `node manuscript-reader.cjs` | Pass: real Razor/controller, escaped text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus;3widths×4themes×browser/PWA | +| Intent | `node intent-assessment.cjs` | Pass: explicit assessment/saved-result load/cancellation/scene isolation/permission feedback with isolated fixtures; no paid production AI execution | +| Chapter goals | `node writer-goal-navigation.cjs` | Pass: unsaved guard, cancel/discard, antiforgery saves, Unicode, save-and-leave failure/retry/concurrent edits; browser/PWA | +| Work/audio UI | `node writer-intelligent.cjs` | Pass:4themes,2widths,browser/PWA; fixed-rule suggestions, session start/end/note, periodic controls, seeks/stale/recovery under simulated media, month/year activity | +| Dashboard | `node writer2-dashboard.cjs` | Pass:48theme/viewport/history/PWA combinations; navigation, selected book, empty states and chart links | +| Live post-deployment | `PD_WRITER_FOUNDATION_IDENTITY= node PlotLine.Tests/Browser/writer-foundation-live.cjs` | Browser and simulated PWA pass; [sanitised observations](Evidence/Development-Browser-Acceptance.json) | + +Isolated browser tests used the existing loopback fixture host, never the deployed Production service or database. The live test used normal Development login and only dedicated disposable entities. It exercised four populated queues, pinned canonical status, empty-book entry, real setup/confirmed allocations, scoped/empty Preview, activation/deactivation returns, out-of-scope plan404, incomplete native-session400, empty Reader, and validation load without JavaScript errors. Help microcontent and browser popup, PWA contextual ribbon/drawer and full article GET were checked. Initial test iterations were corrected to target promoted PWA Help and wait for its asynchronous content; no application failure was hidden. + +The synthetic owner/projects/books/scenes/plans were removed using guarded existing project/account deletion procedures. Final query returned RemainingSyntheticAccounts=0; the temporary credential file was removed. The transactional queue fixture also left no rows. No real manuscripts were used for writes. + +## Development deployment + +Release: **`c769e11-20261116T151427Z`**. + +- Fresh Release publish archived at `/srv/apps/plotdirector-dev/releases/c769e11-20261116T151427Z`. +- No queued/processing Story Intelligence jobs, active core imports, synthesis or character enrichment found before service stop; existing states were Complete/Completed. +- Prior physical current directory retained at `/srv/apps/plotdirector-dev/current-before-c769e11-20261116T151427Z`. +- Replaced Development current via rsync while stopped, preserving appsettings, environment files, App_Data, uploads and logs. Ownership restored; service restarted. +- `systemctl is-active plotdirector-dev`: active. Local GET `http://127.0.0.1:5050/`:200. Public TLS-validated GET `https://dev.plotdirector.com/`:200. +- Published/deployed PlotLine.dll SHA256 both `7ebc3af6895af46d6be2e353f6d9c3595796fb9023fbe7852f743caeb3ee2a39`. +- Deployed informational metadata: `1.0.0+c769e1119a2542e256374db3c48eeb324c2663ab`. +- Recent warning/error journal clear. Authenticated changed-route acceptance passed after deployment. + +The initial nonprivileged deployed-file hash check was permission denied; it was repeated successfully with sudo. Deployment itself succeeded. Application rollback can use the retained prior directory without reversing264; optional BookID and legacy queue support retain compatibility. Production was not touched. + +## Limitations and bounded follow-up + +Physical Windows Word, installed Windows PWA, actual ElevenReader playback/Pause on Edit latency, and monitor placement have not been tested on Atlas. Existing protocol/fixture regressions passed; they are not physical acceptance. No AI-generated creative decisions were accepted into story records. No new global working selector or integrated pane was introduced. The shared projection supports future shell work while retaining independent authorities. + +Legacy/reviewed schedule stores and completion semantics remain separate. Richer visual unification, milestones/exceptions, dynamic planning controls and a complete rebalance-review interface remain Phase6 work. Setup still validates project/book compatibility on the server rather than introducing a new selector API. Other missing-data and full-graph audit gaps remain recorded; this foundation release does not claim to complete all Writer2 or Writer3 features. + +## Specific manual acceptance + +1. On Windows, open an existing linked saved manuscript. Confirm ribbon book/chapter/scene and live standalone Context/Intent follow the accepted mapping; unsaved or mapping-pending states must not guess a scene. +2. Open Context and Intent on separate monitors. Check Detect displays with allowed/denied permission, named-window reuse, focus, reconnect and changed monitor topology. Verify existing fallback and Windows-controlled Word placement. +3. Keep a pinned reference on another scene; explore plot/metric/map references. The saved working objective and session target must remain unchanged. Only an explicit Word-navigation control should request a cursor move. +4. Select a different Reader chapter while a session is active. Confirm Reader text changes independently and the active session remains associated with its original chapter. Check actual accepted-text refresh and Focus reading with the installed Windows PWA. +5. Start Audio Review after compatible Companion/player registration. Check repeated Play/Pause/±15s, actual text-edit pause, cursor/scroll negative cases, source loss/recovery, explicit resume, End tracking versus external Pause, and Journey evidence with no duplicated duration. +6. In the installed Windows PWA, open page Help through the contextual ribbon and inspect full article/drawer. Check plan returns with multiple books and All Books plans. Repeat inaccessible-book checks using a genuine collaborator account without owner evidence authority. + +## Next phase + +Await explicit acceptance before Phase2. Recommended first batch:2A Home/destination route states and viewport/keyboard interaction sketches using the existing application shell, preserving all legacy routes and Utilities. Then implement the three Home choices and five destinations before the resizable main/companion composition. Do not remove standalone Context/Intent. diff --git a/Docs/Writer/Writer3/Phase2A-Execution.md b/Docs/Writer/Writer3/Phase2A-Execution.md new file mode 100644 index 00000000..3d01040f --- /dev/null +++ b/Docs/Writer/Writer3/Phase2A-Execution.md @@ -0,0 +1,43 @@ +# Phase 2A — Home, navigation and application shell + +Authorisation: the user-provided Phase2A kickoff, following Phase1 acceptance. Baseline `5d18f6c`, established shared branch. Scope ends at2A; draggable companions, persisted splitter state, integrated Context/Intent, a creative-guidance engine, visual scheduling and reflective insights are not implemented here. + +## Visual and interaction direction + +The supplied six-screen image is the visual benchmark: existing PlotDirector chrome, restrained gold/orange accents, purposeful compact panels and three dominant Home choices. Use the existing theme variables, Segoe UI typography, SVG icon paths, buttons, menus and Help infrastructure. Retain all user-selectable themes rather than imposing dark mode. No manuscript-specific example names or imagery are production logic. + +Home: book identity/cover and short introduction; three equally weighted cards in one desktop row. Saved focus appears inside Continue Writing. No extra charts, session controls or stacked secondary dashboard below the choices. Narrow screens stack the same choices without horizontal overflow. + +Destinations: same compact book/title/connection header, a main working region and a smaller tools/reference region. Each region may scroll independently on tall desktop viewports; both remain keyboard focusable. Narrow screens use document flow. These are existing-tool entry shells, not simulated integrated Context/Intent panes. There is no splitter or preference persistence in2A. + +Navigation: a single Writer group in the existing ribbon provides Home/Write/Explore/Plan/Review/Reflect. A small contextual group changes with the destination; Utilities retains Workspaces and Display Setup. Dashboard is an overview of Plan/Reflect. No duplicate destination navigation strip below the ribbon. Book-menu switching retains a recognised destination but passes only authorised project/book IDs, never stale chapter/scene/native IDs. + +## Route and preservation contracts + +| Route | Behavior / real existing functionality | +|---|---| +| `/Writer`, `/Writer/Index` | New three-choice Home; legacy workspace/journey/setup queries still dispatch to their actual surface | +| `/Writer/Write` | Saved objective/current chapter or scene; same extracted objective form and session toolbar; chapter/scene links and standalone reference launchers | +| `/Writer/Explore` | Real Problem Solver/questionnaire/browse links; Timeline and existing Character/Relationship/Plot/Map/Floor Plan/Metric tools; works without a project/manuscript | +| `/Writer/Plan` | Existing setup, scoped plan management/preview and real upcoming activities | +| `/Writer/Review` | Accepted-text Reader/focused reading; Audio Review instructions and existing Reader controls; standalone Intent/Evidence and revision queue | +| `/Writer/Reflect` | Actual retained change evidence, Journey, owner-private reports/privacy/export links; forthcoming insights are clearly labelled text | +| `/Writer/Dashboard` | Compact Plan/Reflect overview of actual manuscript progress and upcoming work | +| `/Writer/Overview` | Entire previous desk preserved as `Legacy.cshtml`, including Help Me, recent activity, tasks, queue panels, session controls and Display Setup | +| `/Writer/Workspaces`, `/Writer/Journey` | Existing implementation retained through Legacy view | +| `/Writer/DisplaySetup` | Redirects to the actual retained display panel on Overview | +| `/Writer#display-setup`, `#workspaces`, old objective fragments | Small Home compatibility script replaces URL with matching retained panel/Write route; no chapter/native context copied | +| `/Write`, `/Write/Index` and all plan/chapter/report/Reader/reference routes | Retained; old root Write redirects to Home, with the new Write destination prominently available | + +All new actions reuse the same read/authorisation pipeline and Phase1 context projection. No new database storage or migration. Opening a destination does not call SceneWorkflow_Get or initialise story metadata. Only explicit existing forms start sessions, save objectives or change author data. Live qualification compares core fixture records around navigation; login/window presence and explicit session observations are separate operational data. + +## Coherent batches + +-2A.1: destination route contracts, request-scoped presentation state, contextual Writer ribbon and book-switch whitelist. +-2A.2: Home with real book cover/fallback, saved focus and three functional actions; old desk retained. +-2A.3: six initial shells (five destinations plus Plan/Reflect Dashboard), actual entry points and honest new-book/private-evidence states. Shared objective form avoids parallel save logic. +-2A.4: seven Help articles/keys, preservation Help updates, route/security/unit and responsive browser/PWA/keyboard/back/forward tests, standalone/Reader/Intent regression, Development-only release/acceptance. + +## Qualification status + +Implemented and Development-qualified as application commit `f96259a`. Build, tests, screenshots, deployment and actual results are recorded in [Phase2A-Report.md](Phase2A-Report.md). Physical Windows, installed PWA and monitor placement are never inferred from Chromium emulation. Phase2B requires separate explicit acceptance. diff --git a/Docs/Writer/Writer3/Phase2A-Report.md b/Docs/Writer/Writer3/Phase2A-Report.md new file mode 100644 index 00000000..e8d182c3 --- /dev/null +++ b/Docs/Writer/Writer3/Phase2A-Report.md @@ -0,0 +1,90 @@ +# Writer 3.0 Phase 2A completion report + +16 November 2026. Implemented, pushed and deployed to **Development only**. Phase2B has not begun. + +Application commit: `f96259a378f22dd80075676be34ea5e269ae091f` on `codex/word-companion-native-phase1-20261104`. Baseline `5d18f6c`; Phase1 application baseline `c769e11`. This report/evidence is a subsequent documentation commit; the deployed application source remains f96259a. + +## Delivered behavior and visual direction + +Writer now opens a quiet Home with book cover (or a monogram when no cover exists), book title, Companion connection indication and three equal cards: Continue Writing, Explore Your Story and Writing Dashboard. Continue Writing shows the saved objective when available; an empty book has a real starting action. Home has no secondary dashboard stack. The supplied six-screen mockup guided the compact dark panels, restrained gold accents and clear screen purposes. All four existing themes remain selectable; the existing PlotDirector typography, icons, shell and ribbon are retained. + +Write, Explore, Plan, Review and Reflect have consistent book/title/purpose headers, a main working region and a smaller tools/reference region. Desktop regions can scroll independently and receive keyboard focus; narrow screens use normal document flow. Dashboard is an overview of Plan and Reflect, with recorded data rather than generated insights. The shell does not include a draggable divider or integrated Context/Intent panels. + +[Home screenshot](Evidence/Phase2A/Home-Development.png) · [Write](Evidence/Phase2A/Write-Development.png) · [Explore](Evidence/Phase2A/Explore-Development.png) · [Plan](Evidence/Phase2A/Plan-Development.png) · [Review](Evidence/Phase2A/Review-Development.png) · [Reflect](Evidence/Phase2A/Reflect-Development.png) · [Dashboard](Evidence/Phase2A/Dashboard-Development.png). These screenshots use a disposable synthetic author/book on Development; no manuscript example is production logic. Screenshots capture transient hover/Companion polling states. + +## Routes, views and ribbon + +| Route | Result / preserved entry points | +|---|---| +| `/Writer`, `/Writer/Index` | Three-choice Home in `Index.cshtml`; legacy query parameters still dispatch to the matching surface | +| `/Writer/Write` | Saved focus, existing objective form/session toolbar, chapters/scenes, standalone Context/Intent launchers | +| `/Writer/Explore` | Problem Solver, story/Timeline, Characters, Relationships, Plot Lines, Maps, Floor Plans and Metrics; no scene, plan or linked Word document required | +| `/Writer/Plan` | Existing writing plans, setup, scoped preview and actual upcoming activities | +| `/Writer/Review` | Accepted-text Manuscript Reader, focused reading, Audio Review instructions, Intent/evidence and revision workspace | +| `/Writer/Reflect` | Retained writing evidence, Journey and owner-private reports/export/privacy; future process insights explicitly forthcoming | +| `/Writer/Dashboard` | Compact real progress and planning overview | +| `/Writer/Overview` | Complete former Overview preserved in `Legacy.cshtml`, including Help Me, queues, sessions, recent activity and display controls | +| `/Writer/Workspaces`, `/Writer/Journey` | Existing Legacy implementations retained | +| `/Writer/DisplaySetup` | Existing Display Setup panel at Overview | + +`Destination.cshtml`, `_Writer3Header` and destination partials share layout and context. `_ObjectiveForm` extracts the existing form so the old desk and new Write use the same persistence path. `writer3.css` is scoped to the new surfaces; `writer3-navigation.js` repairs old Home fragments to the retained panels. Existing `/Write` compatibility redirects remain. + +`WriterNavigation` holds route/presentation metadata, not persistent selection. The existing Writer ribbon shows Home and the five destinations, then a small contextual action group and Workspaces/Display Setup utilities. There is no second navigation strip. ApplicationNavigation, ApplicationRibbon and the two existing shell/navigation partials reuse this metadata. Book switching preserves an allowed destination using project/book IDs only; chapter/scene/native IDs are not carried to another book. Lowercase bookmarked route names retain their destination context. + +## Preservation and data boundaries + +All mapped Phase1 feature families remain available through their existing route, a destination link or the complete legacy desk. Existing Help Me and whole-book-focus suggestions now return to Write where appropriate. Writing Plans, Preview, Journey, reports, Reader, Audio Review and specialist tools retain their implementation. Standalone Context/Intent windows retain their named-window reuse, independent pinned/working/Reader/native projections, follow rules and placement facilities. No Word Companion source or native protocol changed. + +New destination actions use the existing authorised read pipeline. Unavailable books return404; no route calls workflow initialisation simply to render its shell. No schema migration, new author-data store, global focus authority, creative engine, scheduling engine or manuscript synchronisation change was introduced. The Review explanation explicitly distinguishes accepted server text from unsynchronised Word edits. + +A dedicated disposable Development owner had a populated book/saved objective and a second empty book. Hashes of Books, Chapters, Scenes, Goals, Workflow, Checklist, Notes, Objectives, Plans and Sessions were identical before and after authenticated navigation. Empty workflow/checklist/note/plan/session records remained absent. Login/presence operational state is outside this author-data comparison. No author-data forms were submitted during the live navigation test. This fixture result is evidence for these paths, not a claim that every existing GET throughout the application is read-only. + +A verified copy-only checksum backup preceded explicit fixture creation: `/var/opt/mssql/backup/writer3-phase2a-before-fixtures-20261116.bak`. Existing guarded deletion procedures removed the dedicated fixture projects/account after acceptance; `RemainingSyntheticAccounts=0`. The private credential file was removed. Unrelated untracked investigation work was preserved. + +## Help + +Seven existing-system Markdown articles/keys were added: `writer3.home`, `writer3.write`, `writer3.explore`, `writer3.plan`, `writer3.review`, `writer3.reflect`, `writer3.dashboard`. They explain changed ribbon navigation, real entry points, scope and empty states. The retained Overview article explains the legacy desk and new Home. Header Help uses the existing tag helper inside the heading, supporting browser tooltip/popover, PWA Help promotion/drawer and full articles. [Help coverage](Help-Coverage.md) records the additions. + +## Verification + +| Gate | Actual result | +|---|---| +| `dotnet build PlotLine.slnx` | Passed, zero warnings/errors | +| `dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj` | Passed,584 PASS records, exit0 | +| New real MVC/Razor navigation browser test | Passed168 combinations: seven surfaces × four themes × three widths(390/1024/1440) × browser/simulated PWA | +| Navigation assertions | Three Home actions, contextual ribbon, scoped links,404, focus isolation, book switch, reload/back/forward, legacy fragments, keyboard activation/visible focus, Help, overflow/desktop fit and CTA contrast≥4.5 | +| Preserved legacy Overview | Passed48 browser/theme/viewport/history/PWA combinations | +| Focused preservation suites | Standalone reference-window identity/reuse/pinning/display denial/retry; native-follow races/recovery simulations; Reader three widths/four themes/browser/PWA; Intent assessment/cancel/permissions; chapter-goal unsaved/antiforgery/Unicode/concurrency controls; existing audio refresh/seek/stale-state and intelligent desk tests passed | +| Authenticated deployed Development | Both books × seven surfaces in browser and simulated PWA; three Home actions; scope/back/forward/reload; saved objective; five legacy pages; Display Setup; unavailable-book404; seven Help articles and PWA drawer passed; no page JavaScript errors | +| Author-data invariant | Ten scoped before/after hash fields matched exactly | +| Cleanup | Dedicated fixture account/projects removed, remaining synthetic accounts0 | + +Evidence and logs are in [Evidence/Phase2A](Evidence/Phase2A). New repeatable scripts are `PlotLine.Tests/Browser/writer3-navigation.cjs`, `writer3-navigation-live.cjs` and `WriterNavigationTests.cs`. The live script deliberately requires a privately supplied disposable Development identity; credentials are not committed. The isolated host fixtures preserve the old desk suite while new routes render through MVC and the actual application shell. Tests and build ran serially. A screenshot inspection caught inherited CTA text contrast; existing standard button classes repaired it and an explicit contrast check now covers the new controls. + +## Development release + +Release: `f96259a-20261116T155614Z`. + +- Fresh Release publish archived at `/srv/apps/plotdirector-dev/releases/f96259a-20261116T155614Z`. +- Rollback copy: `/srv/apps/plotdirector-dev/current-before-f96259a-20261116T155614Z`. +- No queued/processing import, Story Intelligence, synthesis, pipeline or enrichment work at the pre-stop check. +- Physical `current` directory installed with deployed configuration, data protection, uploads and logs preserved. +- `plotdirector-dev` active; local GET and TLS-validated public Development GET200. +- DLL informational version contains `1.0.0+f96259a378f22dd80075676be34ea5e269ae091f`. +- Published and deployed `PlotLine.dll` SHA256: `cf57c3e221d94641938b0a6956ec45f5f47a09784692899f7966403de81a2314`. +- Warning/error service journal had no entries from deployment through authenticated acceptance. +- No Production access or deployment. No SQL migration to roll back. + +## Limits and manual acceptance + +These destinations are useful existing-tool shells. Inline authoring, integrated companions, new visual planning and process insights remain later work. Simulated Chromium PWA/native telemetry tests do not prove installed Windows PWA, real Word integration, physical monitor placement or media playback. + +1. On Windows, open the installed Development PWA with a real book. Check Home's three actions and each destination/ribbon in the preferred theme; switch books and use back/forward/reload. +2. Confirm the saved working chapter/scene, then open the existing scene tool and Reader. Verify accepted text and unsynchronised Word edits are described accurately; confirm the original session controls work during an intentional writing session. +3. With the native Companion connected, open standalone Context and Intent; check pinned selections, verified cursor following, repeated window reuse and explicit display placement on the available monitors. Exercise denied display permission and recovery. +4. Use the existing Reader Audio Review with supported Windows media software; verify start/pause/seek/end and real telemetry. Check Word ribbon actions and synchronisation with a deliberate test edit. +5. At a narrow window size, tab through Home/ribbon/destination controls and scroll the focused panels; check Help popup/drawer/full article and existing plans/Journey/reports permissions. + +## Recommended Phase 2B approach + +Begin only after explicit acceptance. Extend the existing main/reference grid with a progressively enhanced, keyboard-operable divider; retain usable CSS flow when scripts, display permissions or storage are unavailable. Define minimum panel widths and narrow-screen collapse behavior first. Store only layout preferences, separately from the independent working/exploration/pinned/Reader/native authorities. Reuse named standalone windows and display placement rather than replacing them. Qualify keyboard resize, theme/zoom/narrow layouts, per-destination preference restoration and physical Windows multi-monitor behavior before integrating later Context/Intent editing. No Phase2B code or preference persistence is included in this release. diff --git a/Docs/Writer/Writer3/Phase2B-Execution.md b/Docs/Writer/Writer3/Phase2B-Execution.md new file mode 100644 index 00000000..7057c2b2 --- /dev/null +++ b/Docs/Writer/Writer3/Phase2B-Execution.md @@ -0,0 +1,21 @@ +# Phase 2B execution and layout contract + +Authorised by the Phase2B kickoff after Development screenshot acceptance of2A. Scope is layout infrastructure only; no Phase2C/Phase3/Phase4 feature integration. + +- **2B.1:** Enhance the five existing destination grids progressively. Measure the root’s actual top against the visual viewport, observe shell/header/help-container size, and respond to ribbon, resize and fullscreen events. CSS flex/grid handles the remaining header/tool/panel allocation; no fixed ribbon offset. Panels scroll independently. In exceptionally short or heavily scaled windows use unclipped document flow. +- **2B.2:** Accessible vertical separator, pointer capture/interruption cleanup, keyboard Left/Right/Shift/Home/End, minimum main440px and companion280px, proportional constraints on wider screens. Collapse hides the original DOM; no replacement rendering, reload or session teardown. +- **2B.3:** Below900px actual workspace width, use one primary column and a non-modal contextual overlay. Escape/Back restores toggle focus; leaving the overlay by keyboard closes it without trapping application ribbon or Help. A temporary overlay does not overwrite desktop collapse preference. +- **2B.4:** Five destination contents and standalone launchers remain intact. No new companion sections are invented. Home card spacing is reduced and aligned; Dashboard remains the existing Plan/Reflect overview. Existing Markdown Help covers layout controls and their limits. +- **2B.5:** Full build/harness, rendered responsive/browser/simulated-PWA layout and preservation suites; authenticated Development interactions with scoped author-data comparison; rollback archive, screenshots and report. + +## Device preferences + +`plotdirector.writerLayout.v1..` in localStorage, matching existing non-sensitive device layout conventions. JSON contains only schema version, companion-width fraction and desktop collapsed flag. Different destinations/authors use independent keys; book/story IDs, scene selections, session/native state and prose are absent. No database or server preference writes. No companion tabs exist in these shells, so no selected-section field is applicable; later integration must explicitly define bounded section keys rather than storing story context. + +Saved widths are constrained on read and to the current usable track width on render. Malformed/unknown versions default safely; denied storage disables persistence but leaves controls available. The desired width fraction survives temporary small-window clamping. Current layout content remains in the original DOM during collapse/overlay changes, preserving local values and existing handlers. + +## Independent context + +Layout actions do not call application APIs. Working, exploration, pinned, Reader, verified Word and active-session authorities remain those documented in Context-Contract.md. Standalone Context/Intent windows keep their own state and placement protocols. Opening/hiding the contextual companion never launches/closes them or navigates Word. + +Implemented and Development-qualified as application10bf9db; actual qualification and deployment results are recorded in [Phase2B-Report.md](Phase2B-Report.md). Physical Windows/installed PWA/real media/multi-monitor checks must remain explicitly manual when unavailable. diff --git a/Docs/Writer/Writer3/Phase2B-Report.md b/Docs/Writer/Writer3/Phase2B-Report.md new file mode 100644 index 00000000..bb0d8552 --- /dev/null +++ b/Docs/Writer/Writer3/Phase2B-Report.md @@ -0,0 +1,76 @@ +# Writer 3.0 Phase 2B completion report + +16 November 2026. Layout infrastructure implemented, pushed and deployed to **Development only**. Phase2C has not begun. + +Application commit: `10bf9db9061fdec340acf7ff0df96f3dfd299814` on `codex/word-companion-native-phase1-20261104`. Application baseline: Phase2A `f96259a`; repository baseline `4dc50e1`. The subsequent report/evidence and live-test adjustment commit does not change the deployed application. + +## Delivered workspace + +Write, Explore, Plan, Review and Reflect now share a progressively enhanced viewport workspace. The original content and handlers remain in their existing main/reference panels. The default companion occupies33% of the usable track width; authors can resize or hide it without reloading. Home retains its three choices with reduced card padding/minimum height and responsive top spacing. Dashboard remains the existing Plan/Reflect overview, outside the five split destinations. + +The workspace measures its actual document position against the visual viewport, then uses CSS flex/grid to allocate the remaining height beneath the existing shell. ResizeObserver responds to header, shell and Help-container changes; resize, fullscreen, visual-viewport, font-ready and ribbon events schedule measurement. There is no fixed ribbon-height subtraction. Main and companion panels scroll independently. Exceptionally short or heavily text-scaled windows use document flow; returning from a scrolled flow layout to a normal desktop recovers the viewport without a stray page scrollbar. + +The restrained divider has separator semantics, an accessible label, announced current/min/max width, visible focus and keyboard instructions. Drag uses primary-pointer capture, animation-frame updates and completion-only storage writes. Pointer cancellation, lost capture, window blur, resize and navigation clean up dragging. Mouse/touch pointers and Left/Right/Shift/Home/End keys work. Main width stays at least440px and companion at least280px in split mode, with proportional bounds on larger screens; below900px actual workspace width the layout switches to one main column. Coarse-pointer divider targets are44px wide. + +Hide companion expands the main panel while retaining the same companion DOM. Show companion restores it. Local values, existing session controls and handlers are not reconstructed. On narrow screens, Show companion opens the contextual content as a non-modal overlay; Back to workspace or Escape returns focus to the toggle. Tabbing outside closes the overlay without trapping the application ribbon or Help. Temporary overlay visibility never overwrites desktop collapse preferences, and resizing back to a collapsed desktop arrangement restores focus safely. + +## Components and storage + +| Component | Change | +|---|---| +| `wwwroot/js/writer3-workspace.js` | Reusable enhancement for the five existing main/reference compositions; measurement, sizing, pointer/keyboard controls, collapse, overlay and preferences | +| `wwwroot/css/writer3.css` | Flex/grid viewport allocation, independent scrolling, restrained handle, responsive overlay, coarse-pointer targets, flow fallback and smaller Home cards | +| `Views/Writer/Destination.cshtml` | Loads the component and emits signed-in actor identity for layout namespacing | +| `Views/Writer/_Writer3Header.cshtml` | Existing Markdown layout Help tag; destination Help retained | +| Existing five destination partials | Content and business logic preserved; no duplicate planning, Reader, reporting or creative engine | +| `PlotLine.Tests/Browser/writer3-workspace.cjs` | Rendered isolated MVC and optional authenticated Development qualification | +| `writer3-navigation-live.cjs` | Existing PWA Help check explicitly expands a persisted collapsed ribbon before accessing Page Help | + +Storage key: `plotdirector.writerLayout.v1..`, following existing non-sensitive device-preference localStorage conventions. Stored JSON contains only version, companion width fraction and desktop collapsed boolean. Preferences are independent for each author and destination on that browser/device; they do not synchronise across devices. No database table, server preference endpoint, book/scene/native selection or session binding is introduced. Malformed/unknown versions use defaults; invalid field types are ignored; saved widths are clamped to the current usable space. Denied storage leaves controls working without persistence. The desired fraction survives temporary window-size clamping. + +The current companions have no selectable tabs/sections, so selected-section persistence is not applicable and no artificial section selector was added. Collapsing preserves the original content and any local values. Future section keys must remain presentation preferences rather than becoming story context. + +## Preserved behavior and Help + +Existing working objectives, chapter/scene links, work and Audio Review controls, Problem Solver starting choices and limitations, plans, Reader, Journey, reports/privacy and specialist story references remain. There is no Phase3 control restructuring. Context and Intent still launch independently through the unchanged named-window/display-placement/native-follow infrastructure. Layout operations do not fetch or post story data, launch/close standalone windows, move Word, change pinned/Reader/exploration/working selections or rebind sessions. + +New Markdown key `writer3.layout` explains resizing, keyboard controls, collapse/restore, device preferences, narrow overlays, flow fallback and standalone separation. It uses the existing tag helper/popover and full article. Layout Help opens the existing Help drawer, including in PWA mode; no new Help implementation exists. All five destination articles and [Help coverage](Help-Coverage.md) were updated. + +## Qualification + +| Gate | Result | +|---|---| +| `dotnet build PlotLine.slnx` | Passed; zero warnings/errors | +| `dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj` | Passed;584 PASS records, exit0; serial with build | +| New isolated rendered workspace matrix | Passed200 cases: five destinations × four themes × five viewports(390×844,1024×768,1440×900,1920×1080,2560×1440) × browser/simulated PWA | +| Workspace interactions | Passed mouse/touch drag, keyboard limits, cancellation, collapse/restore, reload, independent destination preferences, malformed/old/extreme values, denied storage, narrow overlay/Escape/focus, resize, actual headless Chromium fullscreen, ribbon height and200% text scaling | +| Active controls/local state | Isolated Writing/AudioReview fixtures retained the same session DOM, bound chapter, unsaved note and audio controls across layout actions; no session/media POST was triggered by those actions | +| Navigation regression | Passed168 destination/theme/width/browser/PWA combinations, including Home, book scope, back/forward/reload, unavailable-book404, keyboard and Help | +| Preservation suites | Standalone window identity/reuse/pinning/display-denial/retry; native management/presence; native-follow races and recovery simulations; Intent assessment/cancel/permissions; Reader three widths/four themes/browser/PWA; audio refresh/repeated commands/seeks/stale recovery; intelligent desk and48-case legacy Overview suites passed | +| Authenticated Development workspace | Same200 rendered cases and layout interactions passed with a disposable owner/book; browser and simulated PWA | +| Authenticated Development navigation | Existing/empty books, seven surfaces, Home actions, book isolation, reload/history, legacy routes,404 and Help passed in browser/simulated PWA | +| Author-data invariant | Ten scoped before/after hash fields identical; absent workflow/checklist/notes/plans/sessions stayed absent | +| Fixture cleanup | Dedicated synthetic projects/account removed; RemainingSyntheticAccounts=0; private identity file removed | + +The live workspace run does not create a real work or audio session. Active-session retention is qualified with isolated existing-client fixtures, not claimed as physical Word/media proof. The headless fullscreen check is actual Chromium fullscreen; “PWA” cases simulate installed-mode signals and do not prove an installed Windows PWA. The scoped data comparison covers Books, Chapters, Scenes, ChapterGoals, SceneWorkflow, checklist, notes, objectives, plans and sessions; login/presence and explicit ribbon appearance preferences are separate operational data. + +A guarded Development SQL runner verified the effective database. A copy-only checksum backup succeeded and its nonempty file was checked before explicit fixture creation: `/var/opt/mssql/backup/writer3-phase2b-before-fixtures-20261116.bak`. Fixture setup/deletion used existing stored procedures. No schema migration or author-data conversion was needed. Unrelated untracked investigation work was preserved. + +Evidence: [qualification logs and snapshots](Evidence/Phase2B), [Write, resized](Evidence/Phase2B/Write.png), [Explore, resized](Evidence/Phase2B/Explore.png), [narrow companion](Evidence/Phase2B/Explore-narrow.png), [Plan](Evidence/Phase2B/Plan.png), [Review](Evidence/Phase2B/Review.png), [Reflect](Evidence/Phase2B/Reflect.png), [refined Home](Evidence/Phase2B/Home-Development.png). Screenshots use synthetic Development content, not real author manuscripts. Desktop companion proportions in these screenshots reflect deliberate test resizing; the initial default is33%. + +## Development deployment + +Release `10bf9db-20261116T164516Z`; archived at `/srv/apps/plotdirector-dev/releases/10bf9db-20261116T164516Z`. Rollback: `/srv/apps/plotdirector-dev/current-before-10bf9db-20261116T164516Z`. + +No queued/processing import, Story Intelligence, synthesis, pipeline or enrichment work was present at the pre-stop check. Fresh Release publish installed into physical `current` with deployed configuration, data protection, uploads and logs preserved. `plotdirector-dev` is active; local GET and TLS-validated public GET return200. DLL metadata contains `1.0.0+10bf9db9061fdec340acf7ff0df96f3dfd299814`. Published/deployed SHA256 both `53cd9b9c1e15f273bc9978fca535c0a355bc7e5fca528c8515d9cb08a2565e59`. Warning/error service journal was clear through live acceptance. No Production deployment or schema change. + +## Manual Windows acceptance and Phase 2C recommendation + +1. In the installed Development PWA and a normal Windows browser, resize/collapse each destination with mouse, touch where available and keyboard; reload/switch destinations. Check comfortable proportions, focus, high DPI, zoom/text scaling, ribbon collapse and fullscreen. +2. With a deliberate real writing/Audio Review session, resize and hide/restore the contextual companion. Verify the same chapter/session, visible/reachable audio controls, unsaved note, playback telemetry and explicit pause/seek/end behavior. +3. Launch standalone Context and Intent, reuse their windows and check manual exploration, pinned selection, verified Word following, permission denial and multi-monitor placement. Layout actions must leave their selection and native binding unchanged. +4. Narrow the window, open/close the contextual overlay, Escape/Tab back to work and open Help. Restore a larger window and check each destination’s saved layout. Verify behavior when browser storage is blocked. + +Actual Windows Word, installed Windows PWA, real media playback, assistive-technology announcements and physical multi-monitor placement remain manual checks. Device preferences intentionally do not sync between browsers/devices. At very short/scaled viewports document scrolling is an accessibility fallback, not hidden clipping. + +Recommended Phase2C: start with these physical acceptance results and focused shell/return-navigation polish, including clear context-role indicators and returning from specialist tools without stale scope. Keep working/exploration/pinned/Reader/native/session authorities independent; define explicit acceptance for any additional companion-section state. Do not move full Context/Intent editing, guided exploration, visual scheduling or reflective insights into a shell-polish batch. Phase2C requires explicit authorisation and is not started. diff --git a/Docs/Writer/Writer3/Phase2C-Issues.md b/Docs/Writer/Writer3/Phase2C-Issues.md new file mode 100644 index 00000000..39cf5abe --- /dev/null +++ b/Docs/Writer/Writer3/Phase2C-Issues.md @@ -0,0 +1,27 @@ +# Phase 2C inspection and issue register + +Baseline: deployed10bf9db / source01c1197. Authenticated Development renders captured **before any layout changes** using a disposable author and saved scene, at1440×900,1024×900,390×844, Home and all five destinations; Write/Explore expanded/collapsed or narrow overlay variants. Existing six-screen mockup used for hierarchy/density, not literal controls. No horizontal overflow in the18 baseline normal states. All destination states and desktop Home fit vertically; narrow Home naturally stacks its cards and scrolls336px. Before screenshots and geometry are retained in Phase2C evidence. + +| Issue | Evidence | Bounded correction | +|---|---|---| +| Explore number01 breaks into two lines at1024px | before/Explore-1024.png | Non-shrinking two-character marker; allow adjacent copy to wrap | +| Collapsed Write session descriptions/rules span the entire wide panel | before/Write-1440-collapsed.png | Limit content reading width while allowing the panel to use available space | +| Two anonymous Help icons beside destination title, plus separate Layout Help | before/Write-1440.png; same across destinations | Move existing Markdown layout Help icon beside labelled layout controls; retain destination Help at heading and existing drawer button | +| Session activity selector competes with saved focus without its own heading | before/Write-1440.png | Label the existing always-available session group; preserve DOM/controls and semantics | +| Divider consumes modified Left/Right including Alt+Left browser history | before-modifier.log: browserHistoryShortcutPrevented=true | Reserve only unmodified/Shift arrows for resizing; leave Ctrl/Alt/Meta navigation to browser/OS | + +Home cards are balanced, aligned, dominant and fit the desktop viewport; preserve them. Plan, Review and Reflect have clear primary actions and appropriate empty/evidence copy; apply shared utility/readability corrections only. Tall panels reflect viewport allocation, not permission to fill empty space with unrelated content. No mock insights, new planning engine, guided exploration or integrated Context/Intent editing. + +Qualification: existing matrices plus targeted rendered checks for marker wrapping, Help placement, reading width, modified-key preservation, reduced motion, independent panel scrolling, overlay tab exit and active audio-control reachability. Physical Windows/installed PWA/media/multiple-monitor acceptance remains manual. + +## Additional authorised Current Work correction + +The user’s mid-batch amendment identifies duplicated objective and session activity/chapter selectors, especially in the empty/edit state. Integrate into2C before qualification/deployment; retain completed visual work and shared branch. + +One editor now chooses activity/chapter/optional scene. Save working focus uses existing SaveObjective only. Record this session bridges that selection to the unchanged WriterWork session-start implementation, with its antiforgery, busy guard, stable retry UUID and canonical SQL. Plan writing time is an optional GET to the book-scoped planner with a validated activity-derived goal category, without saving/recording. Existing schedule chapter/scene allocation remains there; no new scene scheduling engine. + +Actual objective activities from WriterObjective model/SQL: Drafting, Revising, Editing, Researching, Proofreading. Actual session kinds from WriterWork controller/SQL: Writing, Editing, Planning, Reading, AudioReview. Preserve established Drafting→Writing, Revising/Editing→Editing and Researching→Planning adapters, and announce the recording type. Proofreading has no automatic adapter: require explicit Editing or Reading choice. Planning/Reading/AudioReview are recording-only options and cannot be saved to objective storage. AudioReview still requires a chapter. + +Saved focus is read-only on return, with a Change action and optional recording/planning actions. New Write renders no duplicate session selectors. Existing active controls remain in the same client-owned DOM and show actual activity/chapter; explicit text distinguishes the active recording from saved focus. Objective edits do not issue a session retarget. Legacy desk and other independent session entry points remain unchanged. No database consolidation, migration or native protocol change. + +Qualification also caught a tooltip overlay intercepting adjacent layout controls after regrouping; the existing tooltip receives a scoped non-interactive class, while the interactive Help popup/article are unchanged. Visual inspection of the unified form caught its inherited white-on-gold Save label; scoped existing theme tokens now provide the correct foreground, with an explicit four-theme contrast assertion. Neither correction changes global Help or button styling. diff --git a/Docs/Writer/Writer3/Phase2C-Report.md b/Docs/Writer/Writer3/Phase2C-Report.md new file mode 100644 index 00000000..72014c07 --- /dev/null +++ b/Docs/Writer/Writer3/Phase2C-Report.md @@ -0,0 +1,93 @@ +# Writer 3.0 Phase 2C completion report + +16 November 2026. Implemented, pushed and Development-qualified. Deployed to **Development only**. Phase3 has not begun. + +Application commit: `e9402d0c1673d3dc8afcca26bb344b82fa11caf0` on `codex/word-companion-native-phase1-20261104`. Baseline source01c1197 / Phase2B application10bf9db. A subsequent documentation/test-only commit records screenshots, final qualification and stronger test readiness; it does not change the deployed application binary. + +## Inspection and bounded corrections + +Before modifying the layout, authenticated Development captures covered Home and all five destinations at1440×900,1024×900 and390×844, plus collapsed Write/Explore and narrow companion overlays. All18 baseline normal-state captures had zero horizontal overflow. The five destinations and desktop Home fit vertically; narrow Home intentionally stacks the three cards and scrolls336px, unchanged before/after. Existing mockup direction was retained: clear task hierarchy, compact panels, existing PlotDirector chrome/themes and restrained accents. [Issue register](Phase2C-Issues.md). + +| Observed issue | Correction / evidence | +|---|---| +| Explore01 wraps onto two lines at1024px | Fixed-width non-shrinking two-character marker; neighbouring prose still wraps. [Before](Evidence/Phase2C/before/Explore-1024.png) / [after](Evidence/Phase2C/after/Explore-1024.png) | +| Collapsed Write session explanations/rules span an excessive reading width | Cap main content width at80ch while retaining full workspace width and independent scrolling. [Before](Evidence/Phase2C/before/Write-1440-collapsed.png) / [after](Evidence/Phase2C/after/Write-1440-collapsed.png) | +| Anonymous destination and layout question marks compete beside the title | Keep destination Help at heading; move existing layout tooltip/popup beside labelled layout controls. Existing full drawer remains. [Before](Evidence/Phase2C/before/Write-1440.png) / [after](Evidence/Phase2C/after/Write-1440.png) | +| Session controls lack a clear group; objective and session selectors duplicate activity/chapter in edit state | Label existing active controls and implement the user's additional single-focus workflow below. [Unified editor](Evidence/Phase2C/after/Write-unified-editor.png) | +| Divider consumes Alt+Left and other modified arrows | Preserve Ctrl/Alt/Meta shortcuts; reserve ordinary/Shift resize keys. Baseline diagnostic recorded browserHistoryShortcutPrevented=true; targeted browser check now verifies false | +| Regrouped Help tooltip could intercept an adjacent layout button | Scope non-interactive styling to that existing tooltip; popup/article links remain interactive | +| Unified Save inherits white-on-gold text | Scoped existing theme tokens give readable Save text; four-theme contrast≥4.5 assertion added | + +Home was already balanced and aligned, with three dominant choices and no desktop overflow; no speculative redesign or extra panels were added. Plan, Review and Reflect retain their own content and primary actions, receiving the shared utility/readability corrections. No ribbon controls/routes were retired or duplicated. Existing selected destination, icons/groups, project/book scope, reload/deep links/history and browser/PWA behavior remain covered by the navigation matrix. + +## Additional authorised Current Work unification + +The user’s amendment was incorporated into the same Phase2C implementation before deployment, on the same shared branch. This bounded workflow correction does not begin full Phase3 integration. + +One editor chooses **What am I doing?**, **Which chapter?**, and **Which scene?**. Chapter changes clear incompatible scenes; scene options are restricted to that chapter. Three separate actions reuse that selection: + +- **Save working focus:** existing antiforgery-protected SaveObjective POST; does not record a session. Repeat submission is guarded and canonical SQL still performs a scoped upsert. +- **Record this session:** explicit existing WriterWork Start through its established client, busy guard and retry UUID; does not save an objective. Recording remains optional and independent. +- **Plan writing time:** optional GET to existing book-scoped ScheduleSetup, with a validated selected activity-derived draft/revision goal category; does not save or record. Existing planner chooses chapter/scene allocations later. No scene scheduling engine or new planning store is implied. + +A saved objective returns as prominent read-only current work, including chapter identity where applicable, with Change working focus and genuine resume links. The lower toolbar has no second visible activity/chapter selector or redundant Start form. Existing active timing, notes, end, Audio Review and native-bound playback controls remain in the same client-owned DOM, with actual recording activity/chapter. An explicit message identifies a session that differs from the saved focus; editing/saving focus never silently retargets it. [Active recording](Evidence/Phase2C/after/Write-active-session.png) / [different focus/session targets](Evidence/Phase2C/after/Write-different-session-target.png). + +Inspected authoritative types: + +| Objective activity | Recording behavior | +|---|---| +| Drafting | Existing Writing session type | +| Revising / Editing | Existing Editing type | +| Researching | Existing Planning type | +| Proofreading | No guessed mapping; explicitly choose Editing or Reading review | +| Planning / Reading / AudioReview | Recording-only choices; cannot be saved as objective activities; AudioReview requires a chapter | + +`WriterFocusActivities` supplies mapping metadata to the Razor controls. `writer-focus.js` coordinates presentation with the existing session client through scoped events. `_WriterFocusForm` is used only by the new Write destination; original `_ObjectiveForm`, legacy desk and independent Reader/session entry points remain. The shared `WriterWorkToolbar` adds an opt-in Unified parameter; other callers retain their existing behavior. ScheduleSetup accepts only known objective activity hints. No database consolidation, migration, new story authority or native protocol change. + +## Help and accessibility + +Existing Markdown Help/tag-helper infrastructure is retained. `writer3.write` now explains the single selector set, separate save/record/plan actions, actual activity mappings, explicit proofreading choice, session-only activities and active-target separation. Layout Help explains modified browser keys, new Help placement and PWA Page Help when the ribbon is collapsed. All five destination articles and [Help coverage](Help-Coverage.md) are updated. Tooltip, quick popup, full drawer/article remain usable; no second Help implementation. + +Keyboard divider semantics/focus/limits, overlay Escape and Tab exit, per-destination preferences and reduced-motion context remain qualified. Targeted tests scroll active audio controls inside the main panel while document scroll stays zero, retaining unsaved notes and the same session DOM. Home/action contrast coverage is retained and the new Save action is explicitly checked in four themes. + +## Qualification results + +| Gate | Result | +|---|---| +| `dotnet build PlotLine.slnx` | Passed; zero warnings/errors | +| `dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj` | Passed;587 PASS records, exit0; build/harness serial | +| Existing navigation matrix | Passed168 destination/theme/width/browser/simulated-PWA cases | +| Existing isolated workspace matrix | Passed200 cases, five destinations/four themes/five viewport sizes/browser/simulated PWA, plus pointer/touch/keyboard limits, cancellation, independent preferences, invalid/stale/blocked storage, narrow overlays, ribbon, headless fullscreen and200% text scale | +| Targeted refinement browser test | Passed Help placement/popup, marker wrapping, reading width, modified shortcuts, reduced-motion context, overlay Tab exit and retained active AudioReview DOM/notes/media controls/independent scrolling | +| Unified work browser/PWA test | Passed save-only, repeat Save/Record guards, explicit recording, actual mappings, active/mismatched targets, proofreading choice, AudioReview chapter rule, dependent scenes, optional planning and book switch clearing | +| Preservation suites | Passed standalone launch/reuse/pinning/display-permission fallback, native-follow race/recovery simulations, Reader at three widths/four themes/browser/PWA, Intent assessment/cancel/scope, periodic audio refresh/commands/seeks/stale recovery, intelligent desk and48-case legacy Overview | +| Real authenticated Development workflow | Passed actual objective save/change, explicit Writing start, active ID/chapter isolation while changing objective, note/end, invalid scene pairing and unsupported objective rejection, antiforgery400, scoped revision planning; browser/simulated PWA | +| Authenticated refinement/navigation | Passed populated and empty books, all destinations/Home actions, scope/history/reload/deep links, legacy routes,404 and Help; rendered refinement checks passed | +| Authenticated workspace matrix | Passed all200 rendered cases and interaction checks after explicit font/shell readiness | +| Author-data invariant / cleanup | Both read-only before/after comparisons matched all ten fields; dedicated projects/account removed, RemainingSyntheticAccounts=0; private identity removed | + +The real workflow test intentionally changes only disposable fixture objective/session records. It restores the fixture's saved focus and ends recordings; these explicit writes are separate from read-only qualification. Initial inspection hashes matched before/after predeployment navigation. A fresh ten-field baseline after explicit workflow tests is compared with all final opening/resizing/navigation operations. Fields cover Books, Chapters, Scenes, Goals, Workflow, checklist, notes, objectives, plans and sessions. Login/presence and explicit appearance settings are operational data outside that comparison. + +A live matrix iteration encountered an unavailable theme function and another captured a transient pre-settled narrow geometry; the precise transient cause was not independently proven. Test diagnostics now assert HTTP200 and application-shell presence, wait for the theme function, fonts and layout-observer frames before measuring. Direct narrow Reflect diagnostics showed stable viewport fit in both modes; no application code was changed during the release. The final full200-case rerun passed. Logs and snapshots are retained in [Evidence/Phase2C](Evidence/Phase2C). + +## Development deployment + +Release `e9402d0-20261116T171812Z`. Archive `/srv/apps/plotdirector-dev/releases/e9402d0-20261116T171812Z`; rollback `/srv/apps/plotdirector-dev/current-before-e9402d0-20261116T171812Z`. + +Fresh Release publish installed with deployed configuration, data protection, uploads and logs preserved. Pre-stop check found no queued/processing import, Story Intelligence, synthesis, pipeline or enrichment work. Service active; local GET and TLS-validated public GET200. DLL informational version contains `1.0.0+e9402d0c1673d3dc8afcca26bb344b82fa11caf0`; published/deployed SHA256 both `052cc7b2d77a836b4336d7eb68e9dbd1ccd944235f43c97c370661ee7133f594`. No Production deployment or SQL migration. Warning/error journal is checked from the actual deployment timestamp through final acceptance. + +Verified copy-only checksum backup before fixture creation: `/var/opt/mssql/backup/writer3-phase2c-before-fixtures-20261116.bak`. Fixture setup and guarded cleanup use existing stored procedures. No real author data, production configuration or unrelated investigation work was changed. + +## Phase 2 completion and remaining acceptance + +The Phase2 software foundation now provides Home, five destinations, contextual existing ribbon, viewport panels, reliable resize/collapse/restore, per-author/destination device preferences and real existing tool entry points. No new companion tabs exist, so selected-section persistence is not applicable; local DOM values remain during collapse. Preferences are device-local. Very short/heavily scaled windows intentionally use document flow. Current companions contain honest links/summaries; full integrated Context/Intent, guided exploration, new planning and process insights remain future phases. Planner setup is book/goal scoped; selecting chapter/scene allocations remains its existing later step. + +Physical Windows, actual installed PWA, browser-chrome zoom/high-DPI, assistive-technology announcements, Word/media playback and multiple-monitor placement are not proven by headless Chromium or simulated PWA/native telemetry. Specific manual checks: + +1. In Windows browser and installed Development PWA, exercise Home/all destinations, ribbon expanded/collapsed, DPI/zoom/text scaling/fullscreen, keyboard resize and narrow overlay Escape/Tab/focus. +2. Create/change focus, Save without recording, explicitly Record from that selection, choose Proofreading’s recording type, and use optional planning. During a real active session save a different focus; verify actual ID/chapter/timing/note remain and the difference is clear. +3. With supported Windows media and Companion, check active AudioReview pause/seek/note/end and preserved binding while resizing/collapsing. Starting a record does not start external playback automatically. +4. Launch/reuse standalone Context and Intent on available monitors. Check display placement/permission denial, pinned/manual exploration and verified Word following. Layout/focus edits must not navigate Word or change Reader/reference selection. +5. Check owner/collaborator privacy and permission differences with real accounts and Help tooltip/popup/PWA drawer/full article; test storage blocked and device preferences on another browser. + +Recommended first Phase3 batch: bounded inline chapter-goal and scene-purpose editing for the authorised saved working focus, reusing existing canonical services/forms, validations and round-trip tests. Preserve the new single selection, active-session isolation and separate Reader/native/pinned authorities. Begin with one proven authoring round trip before adding notes/checklists/attachments or integrated reference editing. **Do not begin Phase3 without explicit authorisation.** diff --git a/Docs/Writer/Writer3/Phase3A-Execution.md b/Docs/Writer/Writer3/Phase3A-Execution.md new file mode 100644 index 00000000..85b315ec --- /dev/null +++ b/Docs/Writer/Writer3/Phase3A-Execution.md @@ -0,0 +1,23 @@ +# Phase3A execution and authoring contracts + +Authorised3A only after Phase2 completion. Shared branch; unrelated investigation retained. No manuscript editor or3B native changes. + +## Authoritative discovery + +Chapter purpose is ChapterPurposeID lookup plus existing Summary; chapter intentions are the five ChapterGoals fields, not a new notebook. Scene intent/outcome are ScenePurposeNotes/SceneOutcomeNotes. SceneNotes retain type/pinned/resolved/order; SceneChecklistItems retain independent completion; SceneWorkflow retains separate priority/count/date/blocker/readiness and legacy draft fields. Canonical scene revision state remains Scenes.RevisionStatusID. Session notes, accepted manuscript evidence and story references remain separate systems. + +Existing Scene_Get/SceneMetric_ListByScene seed metric defaults, so the new surface uses the pure chapter scene list and location read instead. Existing ChapterGoal_Get creates a row; SceneWorkflow_Get creates workflow and eight default checklist items; SceneService edit/writing loaders call those getters. New inspection therefore uses a bounded, authorised read procedure with no initialisation. Existing canonical goal/note/checklist/workflow saves are reused under a transaction. Chapter summary/purpose and scene intent/outcome use narrow updates to the existing columns rather than broad entity saves that may replace unrelated metadata. + +Field-scoped fingerprints plus row/range locks protect stale updates and repeated creates. No new tables. Normal read fingerprints exclude unrelated parent/audit timestamps. Canonical nvarchar(max) text remains unrestricted beyond existing HTTP limits; note titles200 and checklist text300 retain canonical bounds. Optional integer/date controls remain NULL when blank. + +## Batches + +-3A.1: compact saved focus and existing unified Save/Record/Plan; chapter-only/scene-specific authoring, explicit scene-focus change, optional whole-book/no-focus state. +-3A.2: chapter purpose/summary/goals and scene purpose/outcome; independent editors, Save/Cancel, errors, stale409, retained dirty values and navigation guard. +-3A.3: scene notes/checklist/workflow, explicit creation only, progressive details; canonical revision/readiness preserved. Attachments, deletion and complex category/dependency edits remain labelled existing routes. +-3A.4: saved setting/appearances/threads/verified relationship events and chapter feeling intention; no inference, analysis or replacement standalone windows. +-3A.5: Markdown Help, schema/controller/browser/PWA and transactional SQL coverage, full harness, authenticated Development qualification, snapshots, cleanup and rollback release. + +SQL265 introduces procedures;266–270 are forward-only corrections discovered through live-schema/transactional qualification (optional NULLs, long JSON conversion, field-level concurrency, empty collection tokens and canonical text lengths). Already-applied numbered scripts remain immutable. All are additive procedure changes, compatible with the Phase2 application. Verified Development backup precedes application/fixture writes. Final status and deferred editors are recorded in Phase3A-Report.md. + +Completed: batches3A.1–3A.5 implemented, tested and deployed to Development; final release and evidence in [Phase3A-Report.md](Phase3A-Report.md). Phase3B remains unstarted. diff --git a/Docs/Writer/Writer3/Phase3A-Report.md b/Docs/Writer/Writer3/Phase3A-Report.md new file mode 100644 index 00000000..692e6253 --- /dev/null +++ b/Docs/Writer/Writer3/Phase3A-Report.md @@ -0,0 +1,92 @@ +# Writer 3.0 Phase 3A completion report + +16 November 2026. Integrated Write authoring implemented on `codex/word-companion-native-phase1-20261104`, pushed and deployed to Development only. Phase3B has not begun. Application implementation commit `024e668978e7373c99907b885e9f106cbda43ae5`; final application commit `64e17824e930626277d853356405994f75cf6087` adds lazy Help initialisation. + +## Delivered author experience + +Write keeps the Phase2C compact saved working focus and one Change selection with separate Save working focus, Record this session and Plan writing time actions. The main panel now shows the selected scene's intention and intended outcome, or chapter intentions for chapter-level work. All are optional. A short preview prioritises pinned unresolved notes and outstanding reminders; additional chapter details, historical notes and working details expand on demand. The next action reflects actual focus, missing intention and accepted chapter availability. Chapter-level work lists scenes with an explicit Work on this scene action, and supports chapters without scenes. + +| Canonical information | Inline capability | +|---|---| +| Chapters | Existing purpose lookup and Summary | +| ChapterGoals | Existing summary, emotional intention, reader takeaway, things to include and concerns | +| Scenes | Existing ScenePurposeNotes and SceneOutcomeNotes; canonical revision status remains separate | +| SceneNotes | Explicit creation and editing, including type, pinned/resolved state and order | +| SceneChecklistItems | Explicit creation and editing, independent completion and order | +| SceneWorkflow | Existing priority, working word counts, drafted/last-worked dates and blocker/reason; readiness, canonical revision and legacy draft status preserved | +| References | Read-only saved setting, character appearances, thread events, verified relationship events and chapter feeling intention | + +Each record has its own readable display, Edit/Add, Save and Cancel. Validation, network failures and stale409 responses retain text. Repeated submission is guarded. Refresh replaces only the saved card and derived read-only previews; unrelated editors and session DOM remain intact. Conflicts offer explicit reload with a warning to copy wanted text first. Dirty editors cannot be hidden by closing their details; navigation and unload guards protect unsaved work. Keyboard focus returns to the saved/cancelled record. + +The companion uses existing resize/collapse/overlay behaviour and keeps prominent standalone Context and Intent launchers. Saved summaries do not infer story facts or start analysis. Manuscript prose remains in Word. No native IPC, binding, synchronisation or follow protocol was changed. + +## Authoritative reuse and persistence + +`WriterAuthoringController` and scoped `WriterAuthoringService` compose existing canonical records through Dapper/stored procedures. ProjectAccessFilter plus procedure-level actor/book/chapter/scene checks enforce scope; POSTs require antiforgery. Existing Chapter_Get, Scene_ListByChapter, location, character-appearance, thread-event, relationship-event and attachment repositories supply read-only information. Existing lookup and note-type services provide choices. Canonical goal, note, checklist and workflow save procedures are reused transactionally. Chapter/scene intentions use narrow updates to existing columns and the existing project-activity recorder, avoiding broad saves that overwrite unrelated metadata. + +Discovery found that Scene_Get/metric loaders can initialise metric defaults, ChapterGoal_Get can create a row, and SceneWorkflow_Get can create workflow plus default checklist items. The new inspection path avoids those getters. New `WriterAuthoring_Sections` is a bounded pure read; opening Write never invokes the save procedure. SQL module inspection confirmed the reused read procedures contain no write/EXEC statements. + +Forward-only migrations265–270 add/refine the two authoring procedures; no tables or columns were added. Qualification corrections preserve optional NULLs, safely handle long JSON scalar conversion, scope fingerprints to editable fields rather than parent/audit timestamps, support empty-collection creation tokens and retain canonical nvarchar(max) lengths. Applied numbered scripts remain immutable. Row/range locks and fingerprints prevent stale overwrites and repeated creates. Creation tokens conservatively conflict when the corresponding collection changes. Legacy full editors retain their existing concurrency contracts; this phase does not upgrade every editor globally. Normal HTTP request limits still apply; bounded note titles200 and checklist text300 retain canonical limits. + +A verified Development copy-only checksum backup preceded migrations and fixture edits: `/var/opt/mssql/backup/writer3-phase3a-before-265-20261116.bak`. Application rollback remains compatible with these additive procedures; it does not reverse SQL. + +## Preservation and deferred editors + +Saved objective, actual active session, temporary exploration, pinned reference, Reader selection and verified Word position remain independent. Changing focus does not move Word or retarget a session. Existing session controls show the actual target and remain above authoring when active; moving the same DOM preserves Audio Review state, timing and unsaved return notes. No second session form or manuscript editor exists. + +Attachment titles and links remain available; upload/download/delete and permissions/quota continue through existing specialist editors. Scene categories/purpose-type associations, canonical revision transitions and complex dependencies remain in their existing editors. No separate chapter-note storage was invented: existing chapter goals/summary and scene-scoped notes retain their scopes, while session return notes remain session records. The companion links to existing people, plot, relationship, maps and metrics tools. Full integrated Context/Intent belongs to Phase4. + +## Help and accessibility + +New `writer3.authoring` Markdown covers optional intentions, independent saves, stale recovery, notes/reminders/workflow, explicit initialisation, deferred editors and reference/session/Word boundaries. Updated `writer3.write` explains the integrated surface while retaining unified focus semantics. Both use existing Help tag-helper infrastructure. Lazy-loaded authoring content explicitly initialises the existing Help controls; a rendered regression exercises quick popup and More drawer. Help coverage register is updated. + +Editors have explicit labels, accessible error/status regions, clear Save/Cancel, keyboard focus handling and dirty-state guards. Independent panels keep viewport fit; positioned scrolling panels contain visually-hidden field labels that would otherwise extend the document on narrow layouts. Physical screen-reader announcements, browser zoom and Windows high-DPI remain manual acceptance. + +## Qualification + +| Gate | Result | +|---|---| +| Build | `dotnet build PlotLine.slnx`, zero warnings/errors | +| Full harness | `dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj`,598 PASS records, exit0 | +| Transactional SQL | Canonical round trips,4500-character Unicode, optional NULLs, no default seeding, preserved revision, stale updates/repeated creates rollback, actor/scope rejection | +| Authoring browser / simulated PWA | Scene/chapter/goals, Save/Cancel, escaped Unicode, unrelated dirty editors, notes/reminders, validation,503 retention, stale409, navigation guard, active AudioReview DOM/note/target preservation, chapter-only, book/scope isolation and narrow overlay; authoring Help popup/drawer | +| Navigation |168 local rendered cases; authenticated populated/empty books, Home actions, five destinations, legacy routes, history/reload/book scope,404 and Help | +| Workspace |200 local rendered combinations across five destinations, four themes, five sizes, browser/simulated PWA, plus resize/collapse/storage/touch/keyboard/fullscreen/text-scale checks | +| Focus/refinement/preservation | Unified focus, standalone Context/Intent, simulated follow races/recovery, Reader, Intent assessment and intelligent desk suites passed | +| Real authenticated authoring | Actual canonical chapter/scene/goals, long Unicode, note/reminder creation/edit, workflow validation, explicit recording/end, unchanged active ID/target/unsaved note during inline saves, concurrent409 retention, missing-CSRF400, invalid graph404, chapter-only/no-scenes, explicit scene selection and saved reference summaries | + +Real authoring writes were confined to a disposable synthetic owner/project. Read-only qualification uses a fresh baseline after those explicit edits; hashes cover Books, Chapters, Scenes, Goals, Workflow, checklist, notes, objectives, plans, sessions, metrics, purposes, attachments and appearances. An active default metric type deliberately tests accidental Scene_Get seeding. The empty chapter deliberately tests accidental goal creation. Final read-only comparison and cleanup are recorded below. Login/presence and explicit layout/appearance preferences are operational data outside those author-data hashes. + +Headless PWA and native-follow simulations do not prove an installed Windows PWA, real Word automation, media playback or physical monitor placement. + +## Completed workspace screenshots + +Synthetic Development fixture only; no real author prose or credentials. + +![Saved focus, scene intention and saved references](Evidence/Phase3A/Write-authoring.png) + +![Inline scene editor and independent companion](Evidence/Phase3A/Write-inline-editor.png) + +[Narrow notes/reminders](Evidence/Phase3A/Write-narrow.png) · [Narrow companion overlay](Evidence/Phase3A/Write-narrow-companion.png) + +## Final release and evidence + +Final release `64e1782-20261116T202418Z`, archive `/srv/apps/plotdirector-dev/releases/64e1782-20261116T202418Z`, rollback `/srv/apps/plotdirector-dev/current-before-64e1782-20261116T202418Z`. A fresh Release publish preserved deployed configuration, data protection, uploads and logs. Pre-stop checks found no queued/processing imports, Story Intelligence, synthesis, pipeline or enrichment work. Service active; local GET200 and TLS-validated public GET200. Informational version `1.0.0+64e17824e930626277d853356405994f75cf6087`; published/deployed DLL SHA256 both `57c812a3ded4335d5e6665584b53454e4a71618dcd2e8c58a178639665237f3c`. + +Public HTTPS authenticated navigation and actual authoring passed. The rapid public layout sweep encountered `net::ERR_FAILED` script loads and uninitialised fallback geometry; its precise transport cause was not established. The final authenticated200-case matrix uses the local Development service endpoint, with explicit shell/workspace/font readiness, against the same deployed binary. No geometry defect was reproduced once scripts loaded. The report distinguishes that matrix from the public functional checks rather than claiming a successful public200-case sweep. + +Final read-only before/after snapshots matched all14 hashes. Metric values remained0 despite an active default metric type, empty-chapter goals remained0, only the two explicitly created checklist items existed, no active fixture sessions remained, and canonical scene state remained Outlined. Guarded canonical project/account deletion completed with `RemainingSyntheticAccounts=0`; the private identity file was removed. The warning/error service journal from final deployment through acceptance contained no entries. + +The final evidence commit changes tests/documentation only and does not alter the deployed application binary. + +Evidence: [Phase3A qualification artifacts](Evidence/Phase3A). The unrelated investigation document remains untouched. No Production deployment or data changes were authorised or performed. + +## Manual acceptance and recommended Phase3B scope + +1. On Windows, open a real bound document in Word Companion and confirm verified manuscript status. Change working focus while Word follows a different chapter: verify Word and the active session retain their actual targets. +2. Open/reuse standalone Context and Intent on separate monitors; pin a reference, change Write focus and edit intentions. Verify independent pinned/follow state, placement and display-permission fallback. +3. Use real Audio Review playback while editing scene metadata; verify timing, media controls, pause-on-edit behaviour, return-note retention and explicit completion. Repeat with Reader independently selected. +4. Install/relaunch the actual PWA; test reauthentication, deep links, keyboard Save/Cancel, Help popup/drawer/article, companion resize/collapse and narrow overlay. Check high-DPI/browser zoom, very short windows, screen-reader errors/status announcements and keyboard focus across both scroll panels. +5. Use two authorised windows to edit the same record and confirm retained stale text with explicit reload; interrupt network during save and confirm recovery without duplicate creation. + +Recommend Phase3B concentrate on verified Word handoff and review/return interactions through the existing native/Reader/session contracts, including disconnected/stale-binding recovery and physical Windows/multi-monitor acceptance. Keep objective, session, Reader and pinned contexts independent. Agree that scope before implementation; no Phase3B work has begun. diff --git a/Docs/Writer/Writer3/Phase3B-Execution.md b/Docs/Writer/Writer3/Phase3B-Execution.md new file mode 100644 index 00000000..94cacbe3 --- /dev/null +++ b/Docs/Writer/Writer3/Phase3B-Execution.md @@ -0,0 +1,25 @@ +# Phase3B authoritative contract and execution ledger + +Authorised Phase3B only, shared branch retained; fetched remote and verified no incoming commits before editing. The unrelated canonical-manuscript investigation is untouched. No Windows software installation is authorised by this implementation task. + +## 3B.1 findings + +The current VSTO/agent chapter-range implementation, rather than historical README claims, is authoritative. Saved-state fences, paragraph identities, checkpoint/hash joins, three-second saved-change debounce, periodic bounded range verification and per-document/session/revision cancellation remain intact. Unsaved observations do not accept prose or verify navigation positions. Reader already preserves Focused Reading in Previous/Next, selected text and paragraph anchors, with pause/update controls; no replacement Reader is needed. + +NativePresenceStore carries expiring authenticated document leases. NativeWorkspace status already supplies accepted revision, mapping state and chapter progress through one existing status loop/SignalR invalidation. Writing.Context/Navigate already verifies scene anchors but reports only requested; VSTO returns adapter-result locally, and the agent did not expose correlated navigation completion to the web. The minimum extension is capability-negotiated acknowledged navigation plus an expiry/manuscript fence, reusing existing exact-session delivery and adapter-result. + +ChapterSync.List supplies bounded live chapter starts, but a list row alone is not proof: Writer rechecks its first position with ChapterSync.Position against current accepted hashes, manuscript, session and revision. Existing verified scene-start and paragraph position procedures remain authoritative. No scene title/order approximation or synthetic marker is introduced. + +## 3B.2–3B.5 composition + +Write consumes an optional Writer envelope on the existing status request. A new pure metadata procedure returns only accepted snapshot/chapter times; no manuscript payload is sent for routine status. Verified cursor labels come from current server position lookups and authorised structure names. Several matching documents require explicit choice; an exact live Word-origin session hint can select its own document without changing working focus. A separate explicit canonical SaveObjective action adopts its verified chapter if desired. + +Explicit chapter/scene handoff requires acknowledged-navigation capability. Server, agent and VSTO fence exact session/revision/document and command expiry; only the correlated adapter result completes the receipt. Bounded receipt checks exist only during that explicit action. No second background native poller or reconciliation engine is created. Check saved manuscript uses the established snapshot endpoint's bounded chapter check; it never requests fullSnapshot or forces a save. + +Reader consumes accepted-revision notifications through existing presence and refreshes timestamps without replacing unchanged prose. Existing accepted-text replacement/pause/selection/anchor policy is preserved. Native Return to Writer reuses the authenticated launcher; standalone Context/Intent placement/follow/pinned behavior is unchanged. + +## 3B.6 gates + +Build, full web/native executable harnesses, scoped resolver/receipt/adapter-policy assertions, browser/PWA status/navigation/recovery, Reader freshness, existing authoring/focus/layout and standalone follow tests; verified backup and additive metadata procedure; authenticated Development no-Word/permission/rejection checks; scoped author-data hashes and guarded fixture cleanup; final release/report/evidence. Physical VSTO compile/load, real Word navigation/UI timing/media and multiple monitors remain explicitly manual. + +Batches3B.1–3B.6 implemented and Development software-qualified at9969c9b. See [final report](Phase3B-Report.md) for release/evidence, measured limits, fixture cleanup and exact Windows acceptance/installation steps. No Windows install, Production deployment or Phase3C work occurred. diff --git a/Docs/Writer/Writer3/Phase3B-Report.md b/Docs/Writer/Writer3/Phase3B-Report.md new file mode 100644 index 00000000..e07a1ab7 --- /dev/null +++ b/Docs/Writer/Writer3/Phase3B-Report.md @@ -0,0 +1,107 @@ +# Writer 3.0 Phase3B report + +16 November 2026. Phase3B only, shared branch `codex/word-companion-native-phase1-20261104`. Main implementation and native source commit: `9969c9b47be8ee0bc036687e516031c6c1e6e3bc`. Development release verification is recorded below. No Production changes or Windows installation. + +## Authoritative audit and delivered capabilities + +The current chapter-range implementation supersedes older prototype README limitations. The VSTO add-in observes document identity, saved state and cursor, while the existing agent performs bounded chapter checks and server reconciliation. Exact instance/session/manuscript/revision and current checkpoint hashes govern positions. Unsaved observations are deliberately not accepted prose or verified navigation positions. Existing three-second debounce, periodic range checks, chapter reuse, cancellation and restart recovery are retained. + +Before Phase3B, Context already validated scene navigation but reported requested, and VSTO returned adapter-result only locally. Writer lacked a composed verified status/handoff surface. Reader already preserved Focused Reading through Previous/Next and had accepted-version, selected-text, pause and paragraph-anchor refresh policies; those were reused. + +| Surface | Delivered behaviour | +|---|---| +| Write companion | Bound manuscript identity, server-verified chapter/scene where available, honest pending/checking/review/failed state, accepted chapter/snapshot timestamp. No optimistic assertion that every later edit is current | +| Working focus | Remains independent of Word, active session, exploration, Reader, pinned Context and standalone Intent | +| Open this chapter in Word | Explicit authorised exact-document request, verified live chapter start plus current hash/position recheck; no title/order approximation | +| Open this scene in Word | Uses the existing exact accepted scene paragraph anchor and live verification. Missing/unresolved anchors reject safely; no artificial scene markers | +| Confirmation | Requested differs from completed. Only correlated authenticated native adapter acknowledgement reports Word confirmed navigation | +| Check saved manuscript | Calls the existing bounded saved-manuscript check endpoint without fullSnapshot, forced save, import or broad acceptance | +| Return to Writer | Native Companion button and existing web workspace link use the authenticated launcher. Exact live origin is a hint only; explicit SaveObjective adopts the verified Word chapter | +| Reader | Existing safe replacement/selection/pause/anchor policy retained. Accepted-metadata timestamps update without replacing unchanged prose; native revision invalidation uses existing stream, and cached return keeps reading position | +| Recovery | Expiring commands, stale-document/revision rejection, exact manuscript choice for multiple documents, bounded timeout feedback, status-stream resume on cached return | + +Word status sits in the existing resizable companion beside current work, preserving primary intentions and active session controls. Less frequent connection/check controls are under optional details. Standalone Context/Intent launchers remain prominent and independent. The shared status stream also works when the title-bar presence preference is hidden. + +## Reused and new contracts + +Reuse: NativePresenceStore, cookie-authenticated native presence hub, existing status loop/debounced SignalR invalidation, NativePresenceController's authorised position resolution, IWordCompanionRepository structure, ParagraphManuscript and ChapterSync repositories, current scene-start/position/checkpoint joins, existing bounded snapshot/check endpoint, VSTO range selection and adapter-result, existing authenticated PWA/browser launcher, SaveObjective and Reader service/client. + +New additive capability `acknowledged-navigation-v1` is advertised by the matched client and recognised by the agent before CanAcknowledgeNavigation is reported. Protocol version remains1. Commands add manuscript identity and UTC expiry; native presence adds correlated acknowledgement ID/result. Writer's receipt is author/book/document/grant/revision scoped, bounded and ephemeral. Old add-ins/agents keep existing APIs; they cannot enable the new confirmed-navigation controls. Updating only the web application does not update Windows software. + +Server delivery rejects changed revision/book/manuscript and expired commands. Agent routes only the exact current document; native UI-thread execution rechecks session/revision/manuscript/expiry/saved state immediately before Range.Select. No document open/close/save, manuscript mutation or explicit application activation was added. Word's own range-selection foreground behaviour remains a physical acceptance item. A command lost to a busy queue or missing acknowledgement remains unconfirmed. Concurrent windows cannot replace another pending confirmed navigation. Same command ID is not replayed as a second selection. + +`WriterWordService` composes these existing authorities; native and web responsibilities are not merged. Optional Writer metadata/verified-position fields extend the existing status request, preserving the legacy array response for callers that do not request them. No second background status loop is introduced. Only an explicit handoff performs a bounded receipt check, at most30 one-second attempts. Existing15-second presence fallback and SignalR invalidation remain. The saved-manuscript check tracks its own returned operation ID before enabling another request. + +Migration271 adds only `WriterWord_Status`, a scoped pure metadata read of the existing accepted manuscript/checkpoints. No new storage, inline application SQL, manuscript editor, prose acceptance engine, scene mapping or global selection. Backup before migration/fixtures: `/var/opt/mssql/backup/writer3-phase3b-before-271-20261116.bak`, copy-only/checksum, verified nonempty. Previous numbered migrations remain unchanged. Application rollback does not undo this compatible additive procedure. + +## Qualification and performance + +| Gate | Evidence | +|---|---| +| Build | `dotnet build PlotLine.slnx`, zero warnings/errors | +| Web executable harness |599 PASS records, exit0; authorised chapter/scene resolution, current live checkpoint versus stale list, capability, correlated/foreign/stale ack, timeout, expiry, revision/document/author/book isolation | +| Native executable harness |288 PASS records, exit0; real coordinator adapter-result propagation, wrong-document/stale ack rejection and native execution gate | +| Native chapter-sync specialist |453 PASS records, exit0; bounded reconciliation, unchanged reuse, unsaved observations, document switching, restart/pipe recovery and stale response guards | +| Writer browser/simulated PWA | Connected/uncertain/old/unsaved/disconnected/cross-book state, exact request and acknowledgement distinction, timeout/repeated action, bounded check, multi-document selection, cached return, retained session DOM/return note, origin/adopt, Help and narrow overlay | +| Reader browser | Metadata notifications preserve prose DOM, selected text and Focused Reading; existing live-update, pause/listening, offline/hidden recovery, anchor, stale response and Next/Previous/selector suites | +| Preservation | Existing authoring, unified focus,200-case workspace matrix and standalone Context/Intent/follow recovery suites | +| SQL | Empty reads do not seed a snapshot; actor/chapter rejection; distinct snapshot and chapter-acceptance timestamps verified through a rolled-back synthetic insert | +| Authenticated Development | Passed real browser/simulated PWA: disconnected/empty canonical state, actor/chapter scope404, missing-CSRF400, unverified navigation409, absent receipt404, Help popup/drawer/article, focused Reader and narrow companion. Native connection/ack events remain simulated in fixture tests; no physical Word available. | + +Measured portable gates:10,000 native navigation fences took0.58ms total. Existing48-chapter range fingerprint fixture processed1,530,278 preallocated UTF-16 units in30.5ms; synthetic250,000-word analysis100ms. Existing Linux named-pipe handoff measured82.5ms/2 polls. These are managed/in-memory/Linux measurements, not Word extraction, Windows IPC, network or typing latency. The new routine status transfers metadata only and adds no COM calls or manuscript traversal; explicit navigation adds a small identity/expiry fence before the existing single range selection. Physical190,000–250,000-word responsiveness is not claimed. The explicit native handoff adds one saved-state COM read immediately before selection; its actual Word cost must be measured on Windows. + +Authenticated public HTTPS status checks without an open Word document or accepted snapshot measured10 samples per mode: browser p50=11.8ms/p95=52.2ms; simulated PWA p50=10.0ms/p95=11.4ms. These include public transport and the new SQL metadata projection, and are not an incremental old-versus-new benchmark or a large-manuscript/Word performance claim. + +## Screenshots + +Synthetic fixtures only. The connected illustration uses simulated native events; it is not evidence of physical Word acceptance. + +![Before: Write on Development before Phase3B](Evidence/Phase3B/Write-before.png) + +![After: authenticated Development Word status](Evidence/Phase3B/Write-after.png) + +[Simulated verified connection with independent active Audio Review](Evidence/Phase3B/Write-verified-simulated.png) · [Narrow companion](Evidence/Phase3B/Write-narrow.png) + +## Development release and data invariants + +Release `9969c9b-20261116T210203Z`; archive `/srv/apps/plotdirector-dev/releases/9969c9b-20261116T210203Z`; rollback `/srv/apps/plotdirector-dev/current-before-9969c9b-20261116T210203Z`. Fresh Release publish preserved appsettings/environment, data protection, uploads and logs. Pre-stop queue checks found no active import, Story Intelligence, pipeline, synthesis or enrichment. Service active, local GET200 and TLS-validated public GET200. Deployed informational version `1.0.0+9969c9b47be8ee0bc036687e516031c6c1e6e3bc`; published/deployed DLL SHA256 both `26aabdca47bf9dbcf86981f316c9f0571f091ae8e11ea303b135020f0f163486`. The warning/error journal from deployment through acceptance has no entries. + +All14 scoped author/manuscript-data hashes matched before/after real read-only acceptance, including canonical manuscript and live validation tables. The disposable project/account were removed through guarded existing deletion procedures, RemainingSyntheticAccounts=0, and the private identity was deleted. Explicit fixture setup and rolled-back SQL timestamp tests are separate from read-only checks; no real author manuscript was used. The unrelated investigation file remains untouched. A subsequent documentation/evidence-only commit does not alter deployed binaries. + +[Qualification evidence](Evidence/Phase3B), including before/after hashes, successful logs and screenshots. + +## Native build and precise outstanding Windows acceptance + +Native developer version **1.0.0.37**, source commit `9969c9b47be8ee0bc036687e516031c6c1e6e3bc`. Managed protocol/client/agent builds passed, including the Windows-targeted agent compilation. The classic VSTO project needs Visual Studio Office tools on Windows and was not compiled or loaded here. No installable signed Windows package was produced on Linux, and no author's add-in/agent was replaced. + +After separate authorisation to install, use the existing Windows checkout and preserve any local native edits before synchronising this shared branch. Build/test without installation: + +```powershell +.\PlotDirector.NativeCompanion\WindowsValidation\Update-WordCompanion.ps1 +``` + +The script safely fetches/fast-forwards the shared branch, uses the existing signing certificate and prints the verified package path under Downloads\PlotDirectorWordCompanion\1.0.0.37-. If several certificates exist, pass `-CertificateThumbprint `; do not create/distribute secrets. The native implementation was introduced at9969c9b; the final report/evidence commit changes no native source. The build script records the exact shared HEAD it packages, so its eight-character suffix can differ from the implementation commit. Record that generated commit, verify its native diff from9969c9b is empty or separately reviewed, and inspect the package's version/commit before installation. Only after installation is authorised, close Word normally and use the exact generated package path: + +```powershell +.\PlotDirector.NativeCompanion\WindowsValidation\Install-WordCompanion.ps1 -PackagePath '' -StopAgent +``` + +Do not install only an agent DLL or mix add-in/protocol/client/agent versions. Retain the existing rollback package; the existing installer supports `-Rollback`. Web rollback is separate. + +Use disposable or backed-up manuscripts against Development. Record OS/Word build/bitness, package SHA, document identities and timings: + +1. Bind the correct book/document; check Writer name, verified chapter/scene and accepted times. Open another book and multiple documents, including same-title documents. Ambiguity must require choice, and uncertain identity must disable handoff. +2. Save a working focus different from Word's verified chapter. Start a session for another chapter with an unsaved return note. Explicitly navigate chapter and verified scene; verify a single range selection only after that click, acknowledgement, no forced save/document reopening, unchanged objective/session/note/Reader/pinned targets and expected Windows foreground behaviour. +3. Type unsaved changes, including same-length changes and Undo. Confirm pending/uncertain status; navigation must not force a save. Save normally, wait for bounded reconciliation/acceptance and verify status/Reader timestamps. Select Reader text or pause updates; later content must follow the existing deliberate update policy with Focused Reading and anchors retained. +4. Stop/restart the agent; close/reopen, rename, Save As and replace documents; disconnect network/server during handoff and synchronisation. Wait beyond command expiry before reconnecting. Old commands/acks must not select another document or claim completion. Retry only after current verification. +5. Return to Writer through Companion; verify existing browser/PWA launcher behaviour and current focus. Origin selection never silently saves an objective; adopt only explicitly. Test two Writer windows and back/forward/cached return. +6. Keep Context pinned on one monitor and Intent following on another while moving Word and changing Writer focus. Verify named-window reuse, display-permission fallback, independent selection and reconnect. +7. Preserve actual Audio Review playback, timing, source binding and note through Word movement/disconnect/reconnect; no automatic session start/end/retarget. +8. With190,000- and250,000-word fixtures, record before/after keystroke, cursor/scroll/ribbon response, UI tick/COM p50/p95/max, CPU/memory, bounded queues and reconciliation payloads. Repeated status and handoff must not initiate full-document traversal. Use existing WindowsValidation measurement scripts; managed CPU numbers do not replace this step. +9. Check installed PWA, narrow companion overlay, four themes, high-DPI/zoom, keyboard and screen-reader status/error announcements. + +## Deferred scope + +Real Windows compilation/loading, signed packaging/installation and physical Word/media/multi-monitor/performance acceptance remain outstanding. No guessed scene navigation, forced unsaved acceptance, native synchronisation redesign or full integrated Context/Intent was added. Scene handoff is conditional on verified existing anchors. + +Recommend Phase3C focus on deliberate review/return and revision handoff around accepted Reader evidence and existing author decisions, after the physical Phase3B gate and separately agreed scope. Phase3C and Phase4 have not begun automatically. diff --git a/PlotDirector.NativeCompanion/Agent/PipeHost.cs b/PlotDirector.NativeCompanion/Agent/PipeHost.cs index 5c2ca543..d46dfb38 100644 --- a/PlotDirector.NativeCompanion/Agent/PipeHost.cs +++ b/PlotDirector.NativeCompanion/Agent/PipeHost.cs @@ -56,7 +56,7 @@ public sealed class PipeHost(string pipeName, SessionManager sessions, Action{if(Current==null)throw new InvalidOperationException("Open an associated manuscript first.");control.OpenPage(Current.Session,"writer");})); authorise.Click+=(_,_)=>Safe(()=>cloud.Connect(cloud.Status().ServerUrl)); var manuscript=Card();manuscript.Controls.Add(Heading("CURRENT MANUSCRIPT"));manuscript.Controls.Add(documents);manuscript.Controls.Add(guidance); var bookLayout=new TableLayoutPanel{Dock=DockStyle.Top,AutoSize=true,ColumnCount=2,Margin=new(0,6,0,4),MinimumSize=new(0,164)};bookLayout.ColumnStyles.Add(new(SizeType.Absolute,110));bookLayout.ColumnStyles.Add(new(SizeType.Percent,100));bookLayout.Controls.Add(cover,0,0); diff --git a/PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs b/PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs index 9aaa637c..c979fa27 100644 --- a/PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs +++ b/PlotDirector.NativeCompanion/Agent/TrayCoordinator.cs @@ -7,7 +7,7 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway private readonly Guid agentInstance=Guid.NewGuid(),agentSession=Guid.NewGuid();private int lastBook;private Guid lastAuthentication;private long agentSequence;private long presenceSequence=DateTime.UtcNow.Ticks;private int uploading;private DateTime lastAgentPresence;private bool agentOnlyPublished; private bool ParagraphCapable(Guid instance){lock(gate)return paragraphInstances.Contains(instance);} private readonly ParagraphSnapshotCache paragraphSnapshots=new(); - private readonly HashSet rangeInstances=[];private readonly HashSet paragraphInstances=[];private readonly HashSet chapterInstances=[]; + private readonly HashSet acknowledgedNavigationInstances=[];private readonly HashSet rangeInstances=[];private readonly HashSet paragraphInstances=[];private readonly HashSet chapterInstances=[]; private readonly object gate=new();private readonly Dictionary documents=[]; private readonly Dictionary> commands=[];private readonly Dictionary leases=[];private readonly HashSet captureInstances=[];private readonly HashSet maintenanceInstances=[];private readonly Dictionary maintenance=[];private readonly Dictionary<(Guid,Guid),(Guid Manuscript,Guid Authentication,int Book,DateTime Expires)> reconnectBindings=[]; public event Action? OpenRequested; @@ -15,7 +15,7 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway internal Func? AudioStatus { get; set; } public TrayDocument[] Documents {get{lock(gate)return documents.Values.OrderByDescending(d=>d.Observed).ToArray();}} public TrayDocument[] PresentationDocuments {get{lock(gate)return documents.Values.OrderByDescending(d=>d.Observed).Select(d=>d.Snapshot()).ToArray();}} - public void Attach(Guid instance,Guid lease,bool capture=false,bool canMaintain=false,bool paragraphs=false,bool chapters=false,bool rangeChecks=false){lock(gate){Disconnected(instance);if(rangeChecks)rangeInstances.Add(instance);if(chapters)chapterInstances.Add(instance);else chapterInstances.Remove(instance);if(paragraphs)paragraphInstances.Add(instance);else paragraphInstances.Remove(instance);leases[instance]=lease;if(canMaintain)maintenanceInstances.Add(instance);else maintenanceInstances.Remove(instance);if(capture)captureInstances.Add(instance);else captureInstances.Remove(instance);}} + public void Attach(Guid instance,Guid lease,bool capture=false,bool canMaintain=false,bool paragraphs=false,bool chapters=false,bool rangeChecks=false,bool acknowledgedNavigation=false){lock(gate){Disconnected(instance);if(acknowledgedNavigation)acknowledgedNavigationInstances.Add(instance);if(rangeChecks)rangeInstances.Add(instance);if(chapters)chapterInstances.Add(instance);else chapterInstances.Remove(instance);if(paragraphs)paragraphInstances.Add(instance);else paragraphInstances.Remove(instance);leases[instance]=lease;if(canMaintain)maintenanceInstances.Add(instance);else maintenanceInstances.Remove(instance);if(capture)captureInstances.Add(instance);else captureInstances.Remove(instance);}} public Message Exchange(Guid instance,Message request,Message answer,Guid lease=default) { lock(gate) @@ -55,7 +55,10 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway if(request.Kind.StartsWith("snapshot-",StringComparison.Ordinal)&&answer.Status is not ("ok" or "analysis-complete" or "awaiting-structure")){Cancel(doc);doc.Status="Local reading failed: "+answer.Status+". Detect chapters again.";} if(request.Kind=="snapshot-fragment")doc.Progress=answer.Progress; if(request.Kind=="snapshot-end"&&answer.Status=="analysis-complete"){doc.Chapters=sessions.Chapters(instance,doc.Session);doc.Status=$"Detected {doc.Chapters.Length} Heading 1 / existing-marker chapters. Scenes require explicit server AI analysis.";doc.Progress=100;} - if(request.Kind=="adapter-result"&&maintenance.Remove(request.SnapshotId,out var operation)&&operation.Session==doc.Session){doc.MaintenanceReport=request.OperationMessage;if(request.OperationMessage.StartsWith("Complete:",StringComparison.Ordinal)&&operation.Kind is "reset" or "clean"){cloud.ForgetBinding(operation.Manuscript,operation.Authentication);doc.Book=0;doc.AssociationRequest=Guid.Empty;doc.AssociationNeedsSave=false;doc.AssociationNotice="";doc.RememberedBook=null;doc.AssociationSite="";doc.ChapterId=null;doc.SceneId=null;doc.LastPresenceKey="";_=cloud.RemovePresence(doc.Instance,doc.Session,doc.PresenceSequence);} } + if(request.Kind=="adapter-result"&&doc.PendingNavigation!=Guid.Empty&&request.SnapshotId==doc.PendingNavigation){ + if(request.Revision==doc.NavigationRevision&&request.Revision==doc.Revision&&DateTime.UtcNow<=doc.NavigationExpires){doc.NavigationAcknowledgedId=request.SnapshotId;doc.NavigationResult=request.OperationMessage=="ok"?"completed":"failed";doc.LastPresenceKey="";doc.LastPresenceUtc=DateTime.MinValue;}doc.PendingNavigation=Guid.Empty; + } + else if(request.Kind=="adapter-result"&&maintenance.Remove(request.SnapshotId,out var operation)&&operation.Session==doc.Session){doc.MaintenanceReport=request.OperationMessage;if(request.OperationMessage.StartsWith("Complete:",StringComparison.Ordinal)&&operation.Kind is "reset" or "clean"){cloud.ForgetBinding(operation.Manuscript,operation.Authentication);doc.Book=0;doc.AssociationRequest=Guid.Empty;doc.AssociationNeedsSave=false;doc.AssociationNotice="";doc.RememberedBook=null;doc.AssociationSite="";doc.ChapterId=null;doc.SceneId=null;doc.LastPresenceKey="";_=cloud.RemovePresence(doc.Instance,doc.Session,doc.PresenceSequence);} } else if(request.Kind=="adapter-result"&&request.SnapshotId==doc.AssociationRequest&&doc.AssociationRequest!=Guid.Empty){ doc.AssociationRequest=Guid.Empty; doc.AssociationNeedsSave=request.OperationMessage=="association-written"; @@ -79,7 +82,7 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway return answer; } } - public void Disconnected(Guid instance,Guid lease=default){lock(gate){if(lease!=Guid.Empty&&leases.GetValueOrDefault(instance)!=lease)return;leases.Remove(instance);rangeInstances.Remove(instance);chapterInstances.Remove(instance);paragraphInstances.Remove(instance);captureInstances.Remove(instance);maintenanceInstances.Remove(instance);foreach(var expired in reconnectBindings.Where(p=>p.Value.Expires<=DateTime.UtcNow).Select(p=>p.Key).ToArray())reconnectBindings.Remove(expired);foreach(var doc in documents.Values.Where(d=>d.Instance==instance).ToArray()){if(doc.Book>0&&reconnectBindings.Count<256)reconnectBindings[(instance,doc.Session)]=(doc.Manuscript,doc.Authentication,doc.Book,DateTime.UtcNow.AddMinutes(2));Remove(doc.Session);}commands.Remove(instance);}} + public void Disconnected(Guid instance,Guid lease=default){lock(gate){if(lease!=Guid.Empty&&leases.GetValueOrDefault(instance)!=lease)return;leases.Remove(instance);acknowledgedNavigationInstances.Remove(instance);rangeInstances.Remove(instance);chapterInstances.Remove(instance);paragraphInstances.Remove(instance);captureInstances.Remove(instance);maintenanceInstances.Remove(instance);foreach(var expired in reconnectBindings.Where(p=>p.Value.Expires<=DateTime.UtcNow).Select(p=>p.Key).ToArray())reconnectBindings.Remove(expired);foreach(var doc in documents.Values.Where(d=>d.Instance==instance).ToArray()){if(doc.Book>0&&reconnectBindings.Count<256)reconnectBindings[(instance,doc.Session)]=(doc.Manuscript,doc.Authentication,doc.Book,DateTime.UtcNow.AddMinutes(2));Remove(doc.Session);}commands.Remove(instance);}} private void Remove(Guid session){chapterWork.Remove(session);paragraphSnapshots.Remove(session);foreach(var key in maintenance.Where(p=>p.Value.Session==session).Select(p=>p.Key).ToArray())maintenance.Remove(key);if(documents.Remove(session,out var doc)){Cancel(doc);_ = cloud.RemovePresence(doc.Instance,doc.Session,doc.PresenceSequence);}} private bool Queue(TrayDocument doc,AdapterCommand command){if(!commands.TryGetValue(doc.Instance,out var queue))commands[doc.Instance]=queue=new();if(queue.Count>=16){doc.Status="Word request queue is busy. Retry after current operation.";return false;}command.SessionId=doc.Session;command.Revision=doc.Revision;queue.Enqueue(command);return true;} public bool CanMaintain(Guid session){lock(gate)return documents.TryGetValue(session,out var d)&&maintenanceInstances.Contains(d.Instance);} @@ -116,7 +119,7 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway if(!Queue(doc,new(){Id=doc.Job,Kind="extract-ai",Chapter=doc.Current,BookId=doc.Book,AuthenticationContext=doc.Authentication})){doc.Job=Guid.Empty;doc.Pending.Clear();} } public void Cancel(Guid session){lock(gate)if(documents.TryGetValue(session,out var doc)){Cancel(doc);doc.Status="Cancelled. Successful server suggestions remain available.";}} - private void Cancel(TrayDocument doc,bool notifyWord=true){CancelChapterWork(doc);doc.PendingRibbonCommand="";doc.RibbonPermit=Guid.Empty;doc.RibbonRequestedUtc=default;doc.RibbonNotice=null;doc.RetryCapture=null;foreach(var request in maintenance.Where(p=>p.Value.Session==doc.Session).Select(p=>p.Key).ToArray()){maintenance.Remove(request);doc.MaintenanceReport="Stopped: superseded by a document or account change. Inspect before retrying cleanup.";}if(doc.Capture!=null)_=cloud.FailCapture(doc.Capture.RequestId,doc.Authentication);doc.Capture=null;doc.CaptureFragments.Clear();if(doc.Job!=Guid.Empty)ai.Clear(doc.Session);doc.Job=Guid.Empty;doc.Pending.Clear();if(commands.TryGetValue(doc.Instance,out var q))commands[doc.Instance]=new(q.Where(c=>c.SessionId!=doc.Session));if(notifyWord)Queue(doc,new(){Kind="cancel"});} + private void Cancel(TrayDocument doc,bool notifyWord=true){doc.PendingNavigation=Guid.Empty;doc.NavigationAcknowledgedId=null;doc.NavigationResult="";CancelChapterWork(doc);doc.PendingRibbonCommand="";doc.RibbonPermit=Guid.Empty;doc.RibbonRequestedUtc=default;doc.RibbonNotice=null;doc.RetryCapture=null;foreach(var request in maintenance.Where(p=>p.Value.Session==doc.Session).Select(p=>p.Key).ToArray()){maintenance.Remove(request);doc.MaintenanceReport="Stopped: superseded by a document or account change. Inspect before retrying cleanup.";}if(doc.Capture!=null)_=cloud.FailCapture(doc.Capture.RequestId,doc.Authentication);doc.Capture=null;doc.CaptureFragments.Clear();if(doc.Job!=Guid.Empty)ai.Clear(doc.Session);doc.Job=Guid.Empty;doc.Pending.Clear();if(commands.TryGetValue(doc.Instance,out var q))commands[doc.Instance]=new(q.Where(c=>c.SessionId!=doc.Session));if(notifyWord)Queue(doc,new(){Kind="cancel"});} public void Navigate(Guid session,int start){lock(gate)if(documents.TryGetValue(session,out var doc))Queue(doc,new(){Kind="navigate",Chapter=new(){Start=start}});} public async Task Tick(CancellationToken cancellation) { @@ -147,17 +150,19 @@ public sealed partial class TrayCoordinator(SessionManager sessions,CloudGateway } }); - public void OpenPage(Guid session,string page){lock(gate){if(!documents.TryGetValue(session,out var doc)||!cloud.Allows(doc.Authentication,doc.Book))throw new InvalidOperationException("Select an authorised book first.");cloud.OpenCompanionPage(page=="review"&&!string.IsNullOrEmpty(doc.ReviewPath)?doc.ReviewPath:$"/native-companion/workspace?bookId={doc.Book}&instanceId={doc.Instance}&sessionId={doc.Session}&view={page}",doc.Authentication);}} + public void OpenPage(Guid session,string page){lock(gate){if(!documents.TryGetValue(session,out var doc)||!cloud.Allows(doc.Authentication,doc.Book))throw new InvalidOperationException("Select an authorised book first.");cloud.OpenCompanionPage(page=="writer"?$"/Writer/Write?bookId={doc.Book}&wordInstanceId={doc.Instance}&wordSessionId={doc.Session}":page=="review"&&!string.IsNullOrEmpty(doc.ReviewPath)?doc.ReviewPath:$"/native-companion/workspace?bookId={doc.Book}&instanceId={doc.Instance}&sessionId={doc.Session}&view={page}",doc.Authentication);}} public async Task Heartbeat(CancellationToken cancellation) { while(!cancellation.IsCancellationRequested){await Task.Delay(TimeSpan.FromMilliseconds(500),cancellation);var available=Documents.Where(d=>d.Authentication==cloud.Status().AuthenticationContext&&cloud.Status().Health?.Authentication=="verified").ToArray(); - foreach(var doc in available){if(doc.LastPresenceKey==""&&DateTime.UtcNow-doc.LastPresenceUtc0&&reply.ParagraphRevision0&&reply.ParagraphRevision0&&!ChapterCapable(doc.Instance))lock(gate)if(documents.GetValueOrDefault(doc.Session)==doc&&reply.Revision==doc.Revision&&doc.Authentication==cloud.Status().AuthenticationContext){doc.ChapterId=reply.ChapterId;doc.SceneId=reply.SceneId;} if(reply.Navigation is {Kind:"wizard-capture",BookId:>0} requested&&requested.SessionId==doc.Session&&requested.Revision==doc.Revision&&doc.Book==0){await cloud.CheckConnection();lock(gate){if(doc.Book==0&&requested.SessionId==doc.Session&&requested.Revision==doc.Revision&&doc.Authentication==cloud.Status().AuthenticationContext&&cloud.Allows(doc.Authentication,requested.BookId)&&documents.GetValueOrDefault(doc.Session)==doc){doc.Book=requested.BookId;cloud.RememberBinding(doc.Manuscript,doc.Book,doc.Authentication);doc.LastPresenceKey="";}}} if(reply.Navigation!=null)lock(gate)if(documents.GetValueOrDefault(doc.Session)==doc&&reply.Navigation.SessionId==doc.Session&&reply.Navigation.Revision==doc.Revision){if((reply.Navigation.Kind is "wizard-capture" or "paragraph-snapshot")&&captureInstances.Contains(doc.Instance)&&(reply.Navigation.BookId==0||reply.Navigation.BookId==doc.Book)&&cloud.Allows(doc.Authentication,doc.Book)){if(uploading!=0||documents.Values.Any(d=>d.Capture!=null)){_=cloud.FailCapture(reply.Navigation.Id,doc.Authentication);continue;}var retained=doc.RetryCapture;var reusable=retained!=null&&doc.RetryAuthentication==doc.Authentication&&doc.RetryBook==doc.Book&&retained.ManuscriptId==doc.Manuscript&&retained.Revision==doc.Revision&&retained.ParagraphTracking==reply.Navigation.ParagraphTracking; Cancel(doc);doc.Capture=new(){RequestId=reply.Navigation.Id,InstanceId=doc.Instance,SessionId=doc.Session,ManuscriptId=doc.Manuscript,Revision=doc.Revision,ParagraphTracking=reply.Navigation.ParagraphTracking,End=reusable?retained!.End:0};doc.CaptureBaseRevision=reply.Navigation.BaseRevision;doc.CaptureBaseHash=reply.Navigation.BaseSnapshotHash;doc.CaptureFragments.Clear(); if(reusable){doc.CaptureFragments.AddRange(retained!.Paragraphs);doc.Status="Retrying the retained unchanged manuscript at your import request…";CaptureFrame(doc,new(){Kind="snapshot-end",SnapshotId=reply.Navigation.Id},new(){Status="ok"});} - else{doc.Status="Reading manuscript for the PlotDirector import wizard…";Queue(doc,reply.Navigation);}}else if(reply.Navigation.Kind is "wizard-capture" or "paragraph-snapshot")_=cloud.FailCapture(reply.Navigation.Id,doc.Authentication);else if(reply.Navigation.Kind=="cancel")Cancel(doc);else if(reply.Navigation.Kind=="chapter-repair"){BeginChapterRepair(doc,reply.Navigation.Id);}else if(reply.Navigation.Kind=="navigate")Queue(doc,reply.Navigation);}}catch(Exception e)when(NetworkFailure(e)) {doc.Status=e.Message;doc.LastPresenceKey="";doc.LastPresenceUtc=DateTime.UtcNow;}} + else{doc.Status="Reading manuscript for the PlotDirector import wizard…";Queue(doc,reply.Navigation);}}else if(reply.Navigation.Kind is "wizard-capture" or "paragraph-snapshot")_=cloud.FailCapture(reply.Navigation.Id,doc.Authentication);else if(reply.Navigation.Kind=="cancel")Cancel(doc);else if(reply.Navigation.Kind=="chapter-repair"){BeginChapterRepair(doc,reply.Navigation.Id);}else if(reply.Navigation.Kind=="navigate"&&(reply.Navigation.BookId==0||reply.Navigation.BookId==doc.Book)&&(reply.Navigation.ManuscriptId==Guid.Empty||reply.Navigation.ManuscriptId==doc.Manuscript)&&(reply.Navigation.ExpiresUtc==default||reply.Navigation.ExpiresUtc>DateTime.UtcNow)){ + if(Queue(doc,reply.Navigation)){doc.PendingNavigation=reply.Navigation.Id;doc.NavigationRevision=doc.Revision;doc.NavigationExpires=reply.Navigation.ExpiresUtc==default?DateTime.UtcNow.AddSeconds(25):reply.Navigation.ExpiresUtc;} + }}}catch(Exception e)when(NetworkFailure(e)) {doc.Status=e.Message;doc.LastPresenceKey="";doc.LastPresenceUtc=DateTime.UtcNow;}} if(available.Length==0&&cloud.Status().Health?.Authentication=="verified"&&DateTime.UtcNow-lastAgentPresence>=TimeSpan.FromSeconds(15)){lastAgentPresence=DateTime.UtcNow;agentOnlyPublished=true;try{await cloud.Presence(agentInstance,agentSession,new(){WordRunning=leases.Count>0,BookId=0,Sequence=Interlocked.Increment(ref agentSequence),WordAvailable=false,DocumentTitle="No Word document"},cloud.Status().AuthenticationContext);}catch(Exception e)when(NetworkFailure(e)) {}} else if(available.Length>0&&agentOnlyPublished){agentOnlyPublished=false;await cloud.RemovePresence(agentInstance,agentSession);} } @@ -206,7 +211,7 @@ public sealed class TrayDocument { internal long AudioTextChanges; public PlotDirector.Companion.Protocol.Manuscript.ChapterSyncProgress? ChapterProgress; - public string LastPresenceKey="";public DateTime LastPresenceUtc;public Guid Instance,Session,Manuscript,Authentication,Job;public long Revision,PresenceSequence;public string Title="",AssociationSite="",ChapterTitle="",SceneTitle="",Status="Link this manuscript to a book, then use Import manuscript in PlotDirector.",ReviewPath=""; + public Guid? NavigationAcknowledgedId;public string NavigationResult="";public Guid PendingNavigation;public long NavigationRevision;public DateTime NavigationExpires;public string LastPresenceKey="";public DateTime LastPresenceUtc;public Guid Instance,Session,Manuscript,Authentication,Job;public long Revision,PresenceSequence;public string Title="",AssociationSite="",ChapterTitle="",SceneTitle="",Status="Link this manuscript to a book, then use Import manuscript in PlotDirector.",ReviewPath=""; internal ManuscriptCapture? RetryCapture;internal Guid RetryAuthentication;internal int RetryBook; public long CaptureBaseRevision;public string CaptureBaseHash="";public ManuscriptCapture? Capture;public List CaptureFragments=[];public bool? WordSaved;public long? AcceptedRevision; internal string LastRibbonCommand="",LastRibbonOutcome="",PendingRibbonCommand="",LastChapterInterruption=""; diff --git a/PlotDirector.NativeCompanion/Client/AgentLink.cs b/PlotDirector.NativeCompanion/Client/AgentLink.cs index a110d58f..9516ae66 100644 --- a/PlotDirector.NativeCompanion/Client/AgentLink.cs +++ b/PlotDirector.NativeCompanion/Client/AgentLink.cs @@ -119,7 +119,7 @@ public sealed class AgentLink : IDisposable lock (gate) activePipe = pipe; await pipe.ConnectAsync(700, stop.Token).ConfigureAwait(false); if (!verifyServer(pipe)) throw new UnauthorizedAccessException("Unexpected agent owner."); - await ExchangeAsync(pipe, new Message { Kind = "hello", WordInstanceId = instanceId, Capabilities=ProtocolVersion.Capabilities+","+ProtocolVersion.AnalysisCapability+","+ProtocolVersion.ChapterAiCapability+","+ProtocolVersion.WorkflowCapability+","+ProtocolVersion.TrayCapability+","+ProtocolVersion.CaptureCapability+","+ProtocolVersion.MaintenanceCapability+","+ProtocolVersion.ParagraphCapability+","+ProtocolVersion.ChapterSyncCapability+","+ProtocolVersion.NativeChapterTextCapability+","+ProtocolVersion.NativeChapterPositionsCapability+","+ProtocolVersion.LiveChapterTextCapability+","+ProtocolVersion.ChapterRangeCapability }, stop.Token).ConfigureAwait(false); + await ExchangeAsync(pipe, new Message { Kind = "hello", WordInstanceId = instanceId, Capabilities=ProtocolVersion.Capabilities+","+ProtocolVersion.AnalysisCapability+","+ProtocolVersion.ChapterAiCapability+","+ProtocolVersion.WorkflowCapability+","+ProtocolVersion.TrayCapability+","+ProtocolVersion.CaptureCapability+","+ProtocolVersion.MaintenanceCapability+","+ProtocolVersion.ParagraphCapability+","+ProtocolVersion.ChapterSyncCapability+","+ProtocolVersion.NativeChapterTextCapability+","+ProtocolVersion.NativeChapterPositionsCapability+","+ProtocolVersion.LiveChapterTextCapability+","+ProtocolVersion.ChapterRangeCapability+","+ProtocolVersion.AcknowledgedNavigationCapability }, stop.Token).ConfigureAwait(false); mailbox.Clear(); // Reconcile authoritative open documents; never replay stale extraction fragments. await ExchangeAsync(pipe, Reconcile(), stop.Token).ConfigureAwait(false); attempt = 0; StateChanged?.Invoke("connected"); diff --git a/PlotDirector.NativeCompanion/DeveloperVersion.props b/PlotDirector.NativeCompanion/DeveloperVersion.props index 9d393ef9..789737e1 100644 --- a/PlotDirector.NativeCompanion/DeveloperVersion.props +++ b/PlotDirector.NativeCompanion/DeveloperVersion.props @@ -1 +1 @@ -1.0.0.38 +1.0.0.39 diff --git a/PlotDirector.NativeCompanion/Protocol/Messages.cs b/PlotDirector.NativeCompanion/Protocol/Messages.cs index 87a3c946..3ca1768c 100644 --- a/PlotDirector.NativeCompanion/Protocol/Messages.cs +++ b/PlotDirector.NativeCompanion/Protocol/Messages.cs @@ -5,6 +5,7 @@ namespace PlotDirector.Companion.Protocol; public static class ProtocolVersion { public const int Current = 1; + public const string AcknowledgedNavigationCapability="acknowledged-navigation-v1"; public const string ChapterRangeCapability="chapter-range-verification-v1"; public const string LiveChapterTextCapability="chapter-live-text-v1"; public const string NativeChapterPositionsCapability="chapter-native-positions-v1"; diff --git a/PlotDirector.NativeCompanion/Protocol/NavigationPolicy.cs b/PlotDirector.NativeCompanion/Protocol/NavigationPolicy.cs new file mode 100644 index 00000000..1c24f0c9 --- /dev/null +++ b/PlotDirector.NativeCompanion/Protocol/NavigationPolicy.cs @@ -0,0 +1,9 @@ +namespace PlotDirector.Companion.Protocol; +// Pure gate, also used on Word's UI thread immediately before selection. Never opens or saves a document. +public static class NavigationPolicy +{ + public static bool Current(AdapterCommand command,Guid session,long revision,Guid manuscript,DateTime utcNow,bool saved)=> + command.SessionId==session&&command.Revision==revision&& + (command.ManuscriptId==Guid.Empty||command.ManuscriptId==manuscript&&saved)&& + (command.ExpiresUtc==default||command.ExpiresUtc>utcNow); +} diff --git a/PlotDirector.NativeCompanion/Protocol/TrayContracts.cs b/PlotDirector.NativeCompanion/Protocol/TrayContracts.cs index bf16c495..7d9d8941 100644 --- a/PlotDirector.NativeCompanion/Protocol/TrayContracts.cs +++ b/PlotDirector.NativeCompanion/Protocol/TrayContracts.cs @@ -4,6 +4,8 @@ namespace PlotDirector.Companion.Protocol; public sealed class AdapterCommand { [DataMember] public PlotDirector.Companion.Protocol.Manuscript.ChapterManifestItem? RangeBaseline {get;set;} + [DataMember] public DateTime ExpiresUtc {get;set;} + [DataMember] public Guid ManuscriptId {get;set;} [DataMember] public bool RecheckRevision {get;set;} [DataMember] public bool ObserveOnly {get;set;} [DataMember] public Guid OperationId {get;set;} @@ -24,6 +26,9 @@ public sealed class AdapterCommand [DataContract] public sealed class NativePresence { + [DataMember] public bool CanAcknowledgeNavigation {get;set;} + [DataMember] public Guid? NavigationAcknowledgedId {get;set;} + [DataMember] public string NavigationResult {get;set;}=""; [DataMember] public Guid[]? CanonicalParagraphIds {get;set;} [DataMember] public long ParagraphRevision {get;set;} [DataMember] public string ParagraphSnapshotHash {get;set;}=""; diff --git a/PlotDirector.NativeCompanion/Tests/TrayTests.cs b/PlotDirector.NativeCompanion/Tests/TrayTests.cs index 211fb1f5..4f8a0136 100644 --- a/PlotDirector.NativeCompanion/Tests/TrayTests.cs +++ b/PlotDirector.NativeCompanion/Tests/TrayTests.cs @@ -31,7 +31,12 @@ internal static class TrayTests check(handler.Heartbeats==1,"stationary scene does not repeatedly post presence between heartbeats");control.Documents.Single(d=>d.Session==first.SessionId).SceneId=20;await Until(()=>handler.Heartbeats==2); check(true,"changed scene posts lightweight presence before the periodic heartbeat");heartbeatStop.Cancel();try{await heartbeat;}catch(OperationCanceledException){} } - var registered=control.Documents.Single(d=>d.Session==first.SessionId);var priorSequence=registered.PresenceSequence;Apply(new(){Kind="reconcile",Documents=[first,second]});check(control.Documents.Single(d=>d.Session==first.SessionId).Book==3&&control.Documents.Single(d=>d.Session==first.SessionId).PresenceSequence==priorSequence,"reconciliation preserves verified book and monotonic heartbeat state"); + var registered=control.Documents.Single(d=>d.Session==first.SessionId); + var navigation=Guid.NewGuid();registered.PendingNavigation=navigation;registered.NavigationRevision=1;registered.NavigationExpires=DateTime.UtcNow.AddSeconds(20); + Apply(new(){Kind="adapter-result",SessionId=second.SessionId,Revision=1,SnapshotId=navigation,OperationMessage="ok"});check(registered.NavigationAcknowledgedId==null,"another Word document cannot acknowledge this navigation"); + Apply(new(){Kind="adapter-result",SessionId=first.SessionId,Revision=1,SnapshotId=navigation,OperationMessage="ok"});check(registered.NavigationAcknowledgedId==navigation&®istered.NavigationResult=="completed"&®istered.PendingNavigation==Guid.Empty,"exact adapter result reaches document-scoped presence acknowledgement"); + registered.PendingNavigation=Guid.NewGuid();registered.NavigationRevision=0;registered.NavigationExpires=DateTime.UtcNow.AddSeconds(20);Apply(new(){Kind="adapter-result",SessionId=first.SessionId,Revision=0,SnapshotId=registered.PendingNavigation,OperationMessage="ok"});check(registered.NavigationAcknowledgedId==navigation,"stale native acknowledgement cannot replace completed navigation"); + var fenced=new AdapterCommand{SessionId=first.SessionId,Revision=1,ManuscriptId=first.ManuscriptId,ExpiresUtc=DateTime.UtcNow.AddSeconds(10)};check(NavigationPolicy.Current(fenced,first.SessionId,1,first.ManuscriptId,DateTime.UtcNow,true)&&!NavigationPolicy.Current(fenced,second.SessionId,1,first.ManuscriptId,DateTime.UtcNow,true)&&!NavigationPolicy.Current(fenced,first.SessionId,1,first.ManuscriptId,DateTime.UtcNow,false)&&!NavigationPolicy.Current(fenced,first.SessionId,1,first.ManuscriptId,DateTime.UtcNow.AddSeconds(11),true),"native execution gate rejects foreign session, dirty state and expired UI queue without COM work");var priorSequence=registered.PresenceSequence;Apply(new(){Kind="reconcile",Documents=[first,second]});check(control.Documents.Single(d=>d.Session==first.SessionId).Book==3&&control.Documents.Single(d=>d.Session==first.SessionId).PresenceSequence==priorSequence,"reconciliation preserves verified book and monotonic heartbeat state"); handler.Command=new(){Id=Guid.NewGuid(),Kind="wizard-capture",SessionId=first.SessionId,Revision=1};var captureId=handler.Command.Id;registered.SceneId=null;registered.LastPresenceKey="";registered.LastPresenceUtc=DateTime.MinValue; using(var stop=new CancellationTokenSource()){ var heartbeats=control.Heartbeat(stop.Token);await Until(()=>control.Documents.Single(d=>d.Session==first.SessionId).Capture!=null); diff --git a/PlotDirector.NativeCompanion/Vsto/Properties/AssemblyInfo.cs b/PlotDirector.NativeCompanion/Vsto/Properties/AssemblyInfo.cs index fdf28783..b6557421 100644 --- a/PlotDirector.NativeCompanion/Vsto/Properties/AssemblyInfo.cs +++ b/PlotDirector.NativeCompanion/Vsto/Properties/AssemblyInfo.cs @@ -3,6 +3,6 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("PlotDirector Word Companion — Native development")] [assembly: AssemblyCompany("Nick Beckley")] [assembly: AssemblyProduct("PlotDirector")] -[assembly: AssemblyVersion("1.0.0.38")] -[assembly: AssemblyFileVersion("1.0.0.38")] +[assembly: AssemblyVersion("1.0.0.39")] +[assembly: AssemblyFileVersion("1.0.0.39")] [assembly: ComVisible(false)] diff --git a/PlotDirector.NativeCompanion/Vsto/WordAdapter.cs b/PlotDirector.NativeCompanion/Vsto/WordAdapter.cs index 6cc6d4c3..903de5af 100644 --- a/PlotDirector.NativeCompanion/Vsto/WordAdapter.cs +++ b/PlotDirector.NativeCompanion/Vsto/WordAdapter.cs @@ -276,6 +276,7 @@ namespace PlotDirector.WordAddIn } else if(command.Kind=="cancel"){CancelChapterRead(doc);CancelExtraction(doc);doc.AiJob=Guid.Empty;} else if(command.Kind=="navigate"&&command.Chapter!=null){ + if(!NavigationPolicy.Current(command,doc.Session,doc.Revision,doc.Identity,DateTime.UtcNow,Com(()=>doc.Document.Saved)))throw new InvalidOperationException("Navigation expired or document changed."); if(completedNavigationIds.Contains(command.Id)){Reply(command,"ok");return;} var position=command.Chapter.Start;if(position<0||position>DocumentEnd(doc.Document))throw new InvalidOperationException("Position no longer exists."); Word.Range range=null;try{range=Com(()=>doc.Document.Range(position,position));Com(()=>{range.Select();return true;});navigationExecutions++;lastNavigationId=command.Id;if(completedNavigationIds.Count==64)completedNavigationIds.Dequeue();completedNavigationIds.Enqueue(command.Id);}finally{Release(range);} diff --git a/PlotDirector.NativeCompanion/WindowsValidation/Setup/Release.json b/PlotDirector.NativeCompanion/WindowsValidation/Setup/Release.json index 04571ebb..ef9bb44d 100644 --- a/PlotDirector.NativeCompanion/WindowsValidation/Setup/Release.json +++ b/PlotDirector.NativeCompanion/WindowsValidation/Setup/Release.json @@ -1,7 +1,7 @@ { - "version": "1.0.0.38", - "msiVersion": "1.0.38", - "productCode": "{A9EE39D7-33C6-4F0C-B1B6-DF94FAAE88E9}", + "version": "1.0.0.39", + "msiVersion": "1.0.39", + "productCode": "{42F15A51-BC72-4783-814C-E8C8E5708839}", "upgradeCode": "{641A087B-9779-458C-B290-BCBBAD49319A}", "atlasBaseline": "9fed339879887964d526cff00772ffc4dc522c5d", "baselineProductCode": "{98F46939-764D-407F-BD1F-1D88315D010A}", diff --git a/PlotLine.Tests/Browser/reader-word-freshness.cjs b/PlotLine.Tests/Browser/reader-word-freshness.cjs new file mode 100644 index 00000000..ab6d7494 --- /dev/null +++ b/PlotLine.Tests/Browser/reader-word-freshness.cjs @@ -0,0 +1,2 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'); +(async()=>{const b=await chromium.launch();try{for(const pwa of[false,true]){const c=await b.newContext();if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));const p=await c.newPage();let stamp='2026-11-16T12:00:00Z',checks=0;await p.route('**/manuscript/reader/changes?*',r=>{checks++;const u=new URL(r.request().url());return r.fulfill({json:{revision:u.searchParams.get('knownRevision'),version:u.searchParams.get('knownVersion'),changed:false,lastSuccessfulSyncUtc:stamp,snapshotCapturedUtc:'2026-11-15T12:00:00Z'}})});await p.goto('http://127.0.0.1:5238/manuscript/reader?bookId=12&chapterId=21&focus=true');await p.locator('#reader-timestamps time[datetime="'+stamp+'"]').waitFor();const row=await p.locator('[data-paragraph-id]').first().elementHandle();await row.evaluate(n=>{const r=document.createRange();r.selectNodeContents(n);getSelection().removeAllRanges();getSelection().addRange(r)});const selected=await p.evaluate(()=>getSelection().toString());const before=checks;stamp='2026-11-16T13:00:00Z';await p.evaluate(()=>window.dispatchEvent(new CustomEvent('native-companion-presence',{detail:[{bookId:12,snapshotRevision:99999}]})));await p.locator('#reader-timestamps time[datetime="'+stamp+'"]').waitFor();assert(checks>before);assert(await row.evaluate(n=>n===document.querySelector('[data-paragraph-id]')));assert.equal(await p.evaluate(()=>getSelection().toString()),selected);assert.equal(await p.locator('.manuscript-reader').getAttribute('data-focus'),'true');const next=p.locator('a[rel=next]');if(await next.count())assert(new URL(await next.getAttribute('href'),'http://fixture').searchParams.get('focus')==='true');await c.close();}console.log('PASS Reader accepted-metadata notification updates timestamps without replacing prose, selected text or Focused Reading; Next preserves focus. Browser/simulated PWA.');}finally{await b.close()}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer-foundation-live.cjs b/PlotLine.Tests/Browser/writer-foundation-live.cjs new file mode 100644 index 00000000..cf72f4cf --- /dev/null +++ b/PlotLine.Tests/Browser/writer-foundation-live.cjs @@ -0,0 +1,68 @@ +// Explicit Development acceptance; requires the dedicated disposable author and its owned scope. +const {chromium}=require('playwright'); +const fs=require('node:fs'); +const assert=require('node:assert/strict'); +(async()=>{ + const w=JSON.parse(fs.readFileSync(process.env.PD_WRITER_FOUNDATION_IDENTITY)); + assert(w.Database==='PlotDirector_Development'&&/^pwa-browser-.*@example\.invalid$/.test(w.Email)); + for(const key of ['project','book','chapter','scene','other'])assert(Number.isSafeInteger(w[key])&&w[key]>0); + const browser=await chromium.launch(),base='https://dev.plotdirector.com',checks=[]; + try {for(const pwa of [false,true]){ + const context=await browser.newContext({viewport:{width:1440,height:1000}}); + if(pwa)await context.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true})); + const page=await context.newPage(),errors=[];page.setDefaultTimeout(20000);page.on('pageerror',e=>errors.push(e.message)); + await page.goto(base+'/Account/Login');await page.locator('[name=Email]').fill(w.Email);await page.locator('[name=Password]').fill(w.Password); + await Promise.all([page.waitForURL('**/Projects'),page.locator('button[type=submit]').click()]); + for(const [queue,status]of [['WriteNext','Outlined'],['InProgress','Drafted'],['Revision','Needs Work'],['FinalPass','Revised']]){ + await page.goto(`${base}/Writer/Workspaces?bookId=${w.book}&workspace=${queue}`); + assert((await page.locator(`[data-writer-queue=${queue}]`).innerText()).includes('Audit '+status)); + } + checks.push('All four selected-book queues render the correct canonical fixture scene'); + await page.goto(`${base}/Writing/Intent?projectId=${w.project}&bookId=${w.book}&sceneId=${w.scene}&pinned=true`); + assert.equal(await page.locator('[data-writing-intent]').getAttribute('data-writer-selection-role'),'pinned'); + await page.locator('[data-writing-intent-tab=checklist]').click(); + const canonical=page.locator('[data-writing-intent-panel=checklist] dt').filter({hasText:'Revision Status'}); + assert.equal((await canonical.locator('xpath=following-sibling::dd[1]').innerText()).trim(),'Outlined'); + checks.push('Pinned Intent displays canonical Outlined without overwriting legacy draft data'); + await page.goto(`${base}/Writer?bookId=${w.other}`);assert.equal(await page.getByRole('heading',{name:'Start Here',exact:true}).isVisible(),true); + await page.goto(`${base}/Writer/ScheduleSetup?bookId=${w.book}`); + await page.waitForFunction(()=>!!window.jQuery?.fn?.validate);assert.equal(await page.locator('[name=BookID]').inputValue(),String(w.book)); + const name='Foundation acceptance '+(pwa?'PWA':'browser');await page.locator('[name=PlanName]').fill(name); + await page.getByRole('button',{name:'Review activities',exact:true}).click();await page.waitForURL('**/Writer/PlanActivities?*'); + const plan=Number(new URL(page.url()).searchParams.get('writingPlanId')); + await page.locator('[name=Confirm][type=checkbox]').check();await page.getByRole('button',{name:'Commit reviewed schedule',exact:true}).click();await page.waitForURL('**/Writer/SchedulePreview?*'); + assert((await page.locator('main').innerText()).includes('Reviewed writing activities')); + await page.goto(`${base}/Writer/WritingPlans?projectId=${w.project}&bookId=${w.book}`); + await page.getByRole('link',{name:'Schedule Preview',exact:true}).click();await page.waitForURL('**/Writer/SchedulePreview?*'); + assert.equal(new URL(page.url()).searchParams.get('bookId'),String(w.book)); + await page.goto(`${base}/Writer/WritingPlans?projectId=${w.project}&bookId=${w.other}`);await page.getByRole('link',{name:'Schedule Preview',exact:true}).click(); + await page.waitForURL('**/Writer/SchedulePreview?*');assert((await page.locator('main').innerText()).includes('No writing plans found.')); + assert.equal(await page.locator('select[name=writingPlanId]').count(),0,'Other-book plans do not leak into an empty book preview'); + await page.goto(`${base}/Writer/WritingPlans?projectId=${w.project}&bookId=${w.book}`); + await page.locator(`tr[data-pd-context-id="${plan}"]`).getByRole('button',{name:'Deactivate Plan',exact:true}).click();await page.waitForLoadState(); + assert.equal(new URL(page.url()).searchParams.get('bookId'),String(w.book)); + await page.locator(`tr[data-pd-context-id="${plan}"]`).getByRole('button',{name:'Activate Plan',exact:true}).click();await page.waitForLoadState(); + assert.equal(new URL(page.url()).searchParams.get('projectId'),String(w.project)); + await page.goto(`${base}/Writer/EditWritingPlan?writingPlanId=${plan}`);await page.waitForFunction(()=>!!window.jQuery?.fn?.validate); + const help=page.locator('[data-help-key="workspace.writingPlans"]').first(); + const heading=await help.getAttribute('data-help-url');assert(heading); + assert((await help.locator('[data-help-micro]').getAttribute('data-help-micro')).includes('measured')); + if(pwa){ + await page.locator('[data-help-open="workspace.writingPlans"]:visible').click(); + await page.locator('[data-help-drawer]').waitFor({state:'visible'}); + await page.waitForFunction(()=>document.querySelector('[data-help-drawer]')?.innerText.includes('Writing plans')); + }else{ + await help.locator('button').click();await page.locator('.plotline-help-popover').waitFor(); + assert((await page.locator('.plotline-help-popover').innerText()).includes('Reviewed allocations')); + } + const fullHelp=await page.request.get(base+heading);assert.equal(fullHelp.status(),200);assert((await fullHelp.text()).includes('recorded work')); + checks.push('Real setup/confirmation, empty/scoped Preview, activate/deactivate return filters and validation dependencies pass'); + const otherPlan=await page.request.get(`${base}/Writer/SchedulePreview?writingPlanId=${plan}&bookId=${w.other}`);assert.equal(otherPlan.status(),404); + const invalidNative=await page.request.get(`${base}/Writing/Context?bookId=${w.book}&instanceId=00000000-0000-0000-0000-000000000001`);assert.equal(invalidNative.status(),400); + await page.goto(`${base}/manuscript/reader?bookId=${w.other}`);assert((await page.locator('main').innerText()).includes('No accepted manuscript text')); + assert.deepEqual(errors,[],'No JavaScript errors, including jQuery validation load order'); + checks.push((pwa?'Simulated PWA':'Browser')+': empty Reader, native incomplete-session refusal, out-of-scope plan404 and Help full article pass'); + await context.close(); + }}finally{await browser.close();} + console.log(JSON.stringify({checks,physicalWindows:false,installedPWA:false},null,2)); +})().catch(e=>{console.error(e.message);process.exitCode=1;}); diff --git a/PlotLine.Tests/Browser/writer3-authoring-live.cjs b/PlotLine.Tests/Browser/writer3-authoring-live.cjs new file mode 100644 index 00000000..ee4e41f4 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-authoring-live.cjs @@ -0,0 +1,21 @@ +// Explicit writes only to a dedicated disposable Development fixture; no native Word automation. +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +(async()=>{const w=JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY));assert(w.Database==='PlotDirector_Development'&&w.Email.endsWith('@example.invalid'));const b=await chromium.launch();try{for(const pwa of[false,true]){ + const c=await b.newContext({viewport:{width:1440,height:1000}});await c.addInitScript(id=>localStorage.setItem('plotdirector.desktop.v1.'+id,JSON.stringify({dismissedAt:Date.now()})),w.UserID);if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));const p=await c.newPage(),errors=[];p.on('pageerror',e=>errors.push(e.message));const base='https://dev.plotdirector.com',url=`${base}/Writer/Write?projectId=${w.project}&bookId=${w.book}`; + await p.goto(base+'/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]); + await p.goto(url);const sceneKey='Scene-'+w.scene,goalKey='Goals-'+w.chapter,chapterKey='Chapter-'+w.chapter,workflowKey='Workflow-'+w.scene;const card=k=>p.locator(`[data-key="${k}"]`),edit=async k=>{await card(k).locator('[data-authoring-edit]').click();},save=async k=>{await card(k).locator('[data-authoring-save]').click();await card(k).locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor();};await card(sceneKey).waitFor();assert.equal(await p.locator('[data-writer-work]').count(),1);assert((await p.locator('[data-authoring-references]').textContent()).includes('Recorded reference person'));assert((await p.locator('[data-authoring-references]').textContent()).includes('Recorded reference place')); + await edit(sceneKey);await card(sceneKey).locator('[name=ScenePurposeNotes]').fill('Explicit fixture intention — '+ '界'.repeat(4500));await card(sceneKey).locator('[name=SceneOutcomeNotes]').fill('An explicitly recorded outcome');await save(sceneKey);await edit(sceneKey);assert((await card(sceneKey).locator('[name=ScenePurposeNotes]').inputValue()).length>4500);await card(sceneKey).locator('[name=ScenePurposeNotes]').fill('Establish the next development and give the scene a clear direction.');await save(sceneKey); + await p.getByText('Chapter summary and additional intentions',{exact:true}).click();await edit(chapterKey);await card(chapterKey).locator('[name=Summary]').fill('A chapter summary entered through Write');await save(chapterKey);await edit(goalKey);await card(goalKey).locator('[name=GoalSummary]').fill('A chapter goal entered through Write');await card(goalKey).locator('[name=EmotionalGoal]').fill('A recorded feeling intention');await card(goalKey).locator('[name=MustInclude]').fill('An important detail');await save(goalKey);assert((await p.locator('[data-authoring-references]').textContent()).includes('recorded feeling intention')); + await edit('AddNote-0');await card('AddNote-0').locator('[name=NoteTitle]').fill('Disposable inline note');await card('AddNote-0').locator('[name=NoteText]').fill('Remember this saved scene detail');await save('AddNote-0');const note=p.locator('[data-authoring-new-records] [data-kind=Note]').last();await note.locator('[data-authoring-edit]').click();await note.locator('[name=NoteText]').fill('Edited saved note');await note.locator('[data-authoring-save]').click();await p.locator('[data-authoring-new-records] [data-kind=Note]').last().locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor(); + await edit('AddChecklist-0');await card('AddChecklist-0').locator('[name=ItemText]').fill('A saved reminder');await save('AddChecklist-0');const reminder=p.locator('[data-authoring-new-records] [data-kind=Checklist]').last();await reminder.locator('[data-authoring-edit]').click();await reminder.locator('[name=IsCompleted]').check();await reminder.locator('[data-authoring-save]').click();await p.locator('[data-authoring-new-records] [data-kind=Checklist]').last().locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor(); + await p.getByText('All scene notes, reminders and working details',{exact:true}).click();await edit(workflowKey);await card(workflowKey).locator('[name=Priority]').fill('11');await card(workflowKey).locator('[data-authoring-save]').click();await card(workflowKey).locator('[data-authoring-error]:visible').waitFor();assert.equal(await card(workflowKey).locator('[name=Priority]').inputValue(),'11');await card(workflowKey).locator('[name=Priority]').fill('2');await card(workflowKey).locator('[name=IsBlocked]').check();await card(workflowKey).locator('[name=BlockedReason]').fill('An explicitly recorded blocker');await save(workflowKey); + await p.locator('[data-record-focus]:enabled').waitFor();await p.locator('[data-record-focus]').click();await p.locator('[data-work-current]:visible').waitFor();const readSession=async()=>await(await p.request.get(`${base}/Writer/Work/State?bookId=${w.book}`)).json();const active=(await readSession()).session;await p.locator('[data-work-note]').fill('Return note retained during inline save');await edit(sceneKey);await card(sceneKey).locator('[name=SceneOutcomeNotes]').fill('Outcome edited during a real recording');await save(sceneKey);assert.equal((await readSession()).session.sessionID,active.sessionID);assert.equal((await readSession()).session.chapterID,w.chapter);assert.equal(await p.locator('[data-work-note]').inputValue(),'Return note retained during inline save');await p.locator('[data-work-end]').click();await p.locator('[data-work-current]').waitFor({state:'hidden'}); + await edit(sceneKey);await card(sceneKey).locator('[name=SceneOutcomeNotes]').fill('Stale unsaved outcome');const q=await c.newPage();await q.goto(url);const other=q.locator(`[data-key="${sceneKey}"]`);await other.locator('[data-authoring-edit]').click();await other.locator('[name=SceneOutcomeNotes]').fill('A concurrent recorded outcome');await other.locator('[data-authoring-save]').click();await other.locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor();await q.close();await card(sceneKey).locator('[data-authoring-save]').click();await card(sceneKey).locator('[data-authoring-reload]:visible').waitFor();assert.equal(await card(sceneKey).locator('[name=SceneOutcomeNotes]').inputValue(),'Stale unsaved outcome');await card(sceneKey).locator('[data-authoring-cancel]').click();await p.reload();await card(sceneKey).waitFor();assert((await card(sceneKey).locator('[data-authoring-display]').textContent()).includes('concurrent recorded outcome')); + const token=await card(sceneKey).locator('[name=__RequestVerificationToken]').inputValue();assert.equal((await p.request.post(base+'/WriterAuthoring/Save',{form:{bookId:String(w.book),chapterId:String(w.chapter),sceneId:String(w.scene),kind:'Scene',entityId:String(w.scene),version:'0'.repeat(64),__RequestVerificationToken:token}})).status(),409);assert.equal((await p.request.post(base+'/WriterAuthoring/Save',{form:{bookId:String(w.book),chapterId:String(w.chapter),sceneId:String(w.scene),kind:'Scene',entityId:String(w.scene)}})).status(),400);assert.equal((await p.request.get(`${base}/WriterAuthoring/Inspect?bookId=${w.other}&chapterId=${w.chapter}&sceneId=${w.scene}`)).status(),404); + if(!pwa&&process.env.PD_WRITER3_SCREENSHOTS){fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));await p.locator('.writer3-main').evaluate(n=>n.scrollTop=0);await p.screenshot({path:process.env.PD_WRITER3_SCREENSHOTS+'/Write-authoring.png',animations:'disabled'});await edit(sceneKey);await card(sceneKey).locator('[data-authoring-form]').scrollIntoViewIfNeeded();await p.screenshot({path:process.env.PD_WRITER3_SCREENSHOTS+'/Write-inline-editor.png',animations:'disabled'});await card(sceneKey).locator('[data-authoring-cancel]').click();} + // Chapter-level focus has goals and scene choices without forcing a scene. + await p.goto(url+'&setup=true');await p.locator('[data-objective-scene]').selectOption('');await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);await card(goalKey).waitFor();assert.equal(await p.locator(`[data-key="${sceneKey}"]`).count(),0);assert(await p.getByRole('button',{name:'Work on this scene'}).isVisible());await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.getByRole('button',{name:'Work on this scene'}).click()]);await card(sceneKey).waitFor(); + if(w.emptyChapter){await p.goto(url+'&setup=true');await p.locator('[data-objective-chapter]').selectOption(String(w.emptyChapter));await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);await p.getByText('There are no scenes yet.',{exact:false}).waitFor();assert.equal(await p.locator('[data-key="Scene-'+w.scene+'"]').count(),0);await p.goto(url+'&setup=true');await p.locator('[data-objective-chapter]').selectOption(String(w.chapter));await p.locator('[data-objective-scene]').selectOption(String(w.scene));await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);await card(sceneKey).waitFor();} + assert.deepEqual(errors,[]);await c.close();} + console.log('PASS authenticated Development authoring browser/simulated PWA: actual canonical chapter/scene/goals, long Unicode, note/reminder create/edit, workflow validation, explicit session and note isolation, stale409 retained text, chapter focus/scene selection, scope404 and antiforgery400; explicit disposable fixture edits only.'); +}finally{await b.close()}})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-authoring.cjs b/PlotLine.Tests/Browser/writer3-authoring.cjs new file mode 100644 index 00000000..374092f3 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-authoring.cjs @@ -0,0 +1,23 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'); +(async()=>{const b=await chromium.launch();try{for(const pwa of[false,true]){ + const c=await b.newContext({viewport:{width:1440,height:1000}});await c.addInitScript(()=>localStorage.setItem('plotdirector.desktop.v1.4',JSON.stringify({dismissedAt:Date.now()})));if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));await c.route('**/Writer/Work/State?*',r=>r.fulfill({json:{session:null,defaultPauseOnEdit:true}})); + const p=await c.newPage(),errors=[];let posts=0;p.on('request',r=>{if(r.method()==='POST'&&new URL(r.url()).pathname==='/WriterAuthoring/Save')posts++;});p.on('pageerror',e=>errors.push(e.message));const url='http://127.0.0.1:5238/Writer/Write?projectId=7&bookId=12&objective=true';await p.goto(url);await p.locator('[data-key="Scene-31"]').waitFor();assert((await p.locator('[data-authoring-references]').textContent()).includes('Fixture character')); + const help=p.locator('[data-help-key="writer3.authoring"] button');await help.click();await p.locator('.plotline-help-popover').waitFor();assert((await p.locator('.plotline-help-popover').textContent()).includes('More...'));await p.locator('.plotline-help-more').click();await p.locator('[data-help-content] .help-drawer-article').waitFor();assert((await p.locator('[data-help-content]').textContent()).includes('Cancel'));await p.locator('[data-help-close]').click(); + const card=k=>p.locator(`[data-key="${k}"]`),edit=async k=>{await card(k).getByRole('button',{name:/^Edit|^Add/}).first().click();},save=async k=>{const before=posts;await card(k).locator('[data-authoring-form]').evaluate(n=>{n.requestSubmit();n.requestSubmit();});await card(k).locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor();assert.equal(posts,before+1,'duplicate submit is ignored');}; + await edit('Scene-31');await card('Scene-31').locator('[name=ScenePurposeNotes]').fill('Unsaved cancellation');await card('Scene-31').locator('[data-authoring-cancel]').click();assert(!(await card('Scene-31').textContent()).includes('Unsaved cancellation')); + await edit('Scene-31');await card('Scene-31').locator('[name=ScenePurposeNotes]').fill('Unicode intention — 界 ');await card('Scene-31').locator('[name=SceneOutcomeNotes]').fill('A different ending'); + await p.getByText('Chapter summary and additional intentions',{exact:true}).click();await edit('Goals-21');await card('Goals-21').locator('[name=GoalSummary]').fill('Keep unrelated unsaved goal');await save('Scene-31');assert.equal(await card('Goals-21').locator('[name=GoalSummary]').inputValue(),'Keep unrelated unsaved goal');assert(await card('Goals-21').locator('[data-authoring-form]').isVisible());assert((await card('Scene-31').locator('[data-authoring-display]').textContent()).includes(''));await save('Goals-21'); + await edit('Chapter-21');await card('Chapter-21').locator('[name=Summary]').fill('Chapter summary inline');await card('Chapter-21').locator('[name=ChapterPurposeID]').selectOption('1');await save('Chapter-21'); + await edit('AddNote-0');await card('AddNote-0').locator('[name=NoteText]').fill('Remember the recorded detail');await card('AddNote-0').locator('[name=NoteTitle]').fill('Inline note');await save('AddNote-0');const note=p.locator('[data-authoring-new-records] [data-kind=Note]').last();await note.getByRole('button',{name:/^Edit/}).click();await note.locator('[name=NoteText]').fill('Edited note');await note.locator('[data-authoring-save]').click();await p.locator('[data-authoring-new-records] [data-kind=Note]').last().locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor(); + await edit('AddChecklist-0');await card('AddChecklist-0').locator('[name=ItemText]').fill('A reminder');await save('AddChecklist-0'); + await p.getByText('All scene notes, reminders and working details',{exact:true}).click();await edit('Workflow-31');await card('Workflow-31').locator('[name=Priority]').fill('11');await card('Workflow-31').locator('[data-authoring-save]').click();await card('Workflow-31').locator('[data-authoring-error]:visible').waitFor();assert.equal(await card('Workflow-31').locator('[name=Priority]').inputValue(),'11');await card('Workflow-31').locator('[name=Priority]').fill('2');await card('Workflow-31').locator('[name=IsBlocked]').check();await save('Workflow-31'); + await edit('Scene-31');await card('Scene-31').locator('[name=ScenePurposeNotes]').fill('Retain after network failure');await p.route('**/WriterAuthoring/Save',r=>r.fulfill({status:503,body:'temporarily unavailable'}));await card('Scene-31').locator('[data-authoring-save]').click();await card('Scene-31').locator('[data-authoring-error]:visible').waitFor();assert.equal(await card('Scene-31').locator('[name=ScenePurposeNotes]').inputValue(),'Retain after network failure');await p.unroute('**/WriterAuthoring/Save');await card('Scene-31').locator('[data-authoring-cancel]').click(); + // A second page commits first; the original editor must retain its stale unsaved text with409. + await edit('Scene-31');await card('Scene-31').locator('[name=ScenePurposeNotes]').fill('Stale unsaved intention');const q=await c.newPage();await q.goto(url);const other=q.locator('[data-key="Scene-31"]');await other.locator('[data-authoring-edit]').click();await other.locator('[name=ScenePurposeNotes]').fill('Concurrent author change');await other.locator('[data-authoring-save]').click();await other.locator('[data-authoring-status]').filter({hasText:'Saved.'}).waitFor();await q.close();await card('Scene-31').locator('[data-authoring-save]').click();await card('Scene-31').locator('[data-authoring-reload]:visible').waitFor();assert.equal(await card('Scene-31').locator('[name=ScenePurposeNotes]').inputValue(),'Stale unsaved intention'); + p.once('dialog',d=>d.dismiss());await p.locator('#ribbon-panel-writer').getByRole('link',{name:'Explore',exact:true}).click();assert(new URL(p.url()).pathname==='/Writer/Write');await card('Scene-31').locator('[data-authoring-cancel]').click(); + const session={sessionID:'33333333-3333-3333-3333-333333333333',kind:'AudioReview',bookID:12,chapterID:22,chapterTitle:'Bound audio chapter',startedUtc:new Date().toISOString(),engagedSeconds:60,playbackSeconds:20,uniqueSeconds:10,pauseOnEdit:true,live:true,playbackState:'playing',capabilities:'play,pause,back15,forward15',sequence:1};await p.route('**/Writer/Work/State?*',r=>r.fulfill({json:{session}}));await p.goto(url);await p.locator('[data-work-audio]:visible').waitFor();await card('Scene-31').waitFor();assert(await p.locator('.writer3-session-block').evaluate(n=>n.nextElementSibling?.matches('[data-writer-authoring]')),'active controls remain above authoring');const work=await p.locator('[data-writer-work]').elementHandle();await p.locator('[data-work-note]').fill('Unsaved audio return note');await edit('Scene-31');await card('Scene-31').locator('[name=SceneOutcomeNotes]').fill('An explicit outcome during audio review');await save('Scene-31');assert(await work.evaluate(n=>n===document.querySelector('[data-writer-work]')));assert.equal(await p.locator('[data-work-note]').inputValue(),'Unsaved audio return note');assert((await p.locator('[data-work-bound]').textContent()).includes('Bound audio chapter'));assert.equal(await p.locator('[data-work-start] select').count(),0); + await p.setViewportSize({width:390,height:844});await p.locator('.writer3-layout-tools button').first().click();assert(await p.locator('[data-authoring-references]').isVisible());await p.keyboard.press('Escape');assert(await p.locator('.writer3-reference').isHidden());assert(await p.locator('[data-authoring-content]').isVisible()); + await p.goto(url+'&chapterOnly=true');await p.locator('[data-key="Goals-21"]').waitFor();assert.equal(await p.locator('[data-key="Scene-31"]').count(),0);assert(await p.getByRole('button',{name:'Work on this scene'}).isVisible()); + await p.goto('http://127.0.0.1:5238/Writer/Write?projectId=7&bookId=13');assert.equal(await p.locator('[data-writer-authoring]').count(),0,'book switching cannot keep old support fields');assert.equal((await p.request.get('http://127.0.0.1:5238/WriterAuthoring/Inspect?bookId=13&chapterId=21&sceneId=31')).status(),404);assert.deepEqual(errors,[]);await c.close();} + console.log('PASS Writer3 authoring browser/simulated PWA: scene/chapter/goal editing, Cancel, escaped Unicode, unrelated dirty fields, note/reminder creation/edit, workflow validation, stale409 retention, navigation guard, chapter-only focus, scope and companion overlay.'); +}finally{await b.close()}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-focus-live.cjs b/PlotLine.Tests/Browser/writer3-focus-live.cjs new file mode 100644 index 00000000..b05ae02b --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-focus-live.cjs @@ -0,0 +1,15 @@ +// Explicit writes only to the supplied dedicated disposable Development fixture. +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +(async()=>{const w=JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY));assert(w.Database==='PlotDirector_Development'&&w.Email.endsWith('@example.invalid'));const b=await chromium.launch();try{for(const pwa of[false,true]){const c=await b.newContext({viewport:{width:1440,height:900}});await c.addInitScript(id=>localStorage.setItem('plotdirector.desktop.v1.'+id,JSON.stringify({dismissedAt:Date.now()})),w.UserID);if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));const p=await c.newPage(),base='https://dev.plotdirector.com',url=`${base}/Writer/Write?projectId=${w.project}&bookId=${w.book}`; +await p.goto(base+'/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]);const shot=async name=>{if(!pwa&&process.env.PD_WRITER3_SCREENSHOTS){fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));await p.mouse.move(0,0);await p.screenshot({path:process.env.PD_WRITER3_SCREENSHOTS+'/'+name+'.png',animations:'disabled'});}};const state=async()=>await(await p.request.get(`${base}/Writer/Work/State?bookId=${w.book}`)).json(); +await p.goto(url+'&setup=true');await p.locator('[data-focus-activity]').selectOption('Drafting');await p.locator('[data-objective-chapter]').selectOption(String(w.chapter));await p.locator('[data-objective-scene]').selectOption(String(w.scene));await shot('Write-unified-editor');await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);assert.equal((await state()).session,null,'save does not start session');assert(await p.getByRole('link',{name:'Open current scene',exact:true}).isVisible()); +await p.locator('[data-record-focus]:enabled').waitFor();await p.locator('[data-record-focus]').click();await p.locator('[data-work-current]:visible').waitFor();const active=(await state()).session;assert.equal(active.kind,'Writing');assert.equal(active.chapterID,w.chapter);await shot('Write-active-session'); +await p.goto(url+'&setup=true');await p.locator('[data-work-current]:visible').waitFor();assert(await p.locator('[data-record-focus]').isHidden());await p.locator('[data-objective-chapter]').selectOption('');await p.locator('[data-focus-activity]').selectOption('Editing');await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);await p.locator('[data-focus-session-difference]:visible').waitFor();assert((await p.locator('[data-focus-session-difference]').textContent()).includes('differs'));assert.equal((await state()).session.sessionID,active.sessionID);assert.equal((await state()).session.chapterID,w.chapter);await shot('Write-different-session-target'); +await p.locator('[data-work-note]').fill('Disposable unified workflow acceptance note');await p.locator('[data-work-end]').click();await p.locator('[data-work-current]').waitFor({state:'hidden'});assert.equal((await state()).session,null); +// Canonical endpoint rejects impossible scene/chapter combinations and unsupported objective activities. +const token=await p.locator('[data-work-start] [name=__RequestVerificationToken]').inputValue();for(const fields of[{Activity:'Editing',ChapterID:'',SceneID:String(w.scene)},{Activity:'AudioReview',ChapterID:String(w.chapter),SceneID:''}]){const response=await p.request.post(base+'/Writer/SaveObjective',{form:{__RequestVerificationToken:token,BookID:String(w.book),...fields}});assert.equal(response.status(),200);assert(response.url().includes('setup=True')||response.url().includes('setup=true'));} +await p.goto(url);assert.equal(await p.getByRole('link',{name:'Open current scene',exact:true}).count(),0,'invalid submissions preserve valid whole-book focus');assert.equal((await state()).session,null); +assert.equal((await p.request.post(base+'/Writer/SaveObjective',{form:{BookID:String(w.book),Activity:'Drafting'}})).status(),400,'antiforgery retained'); +await p.goto(url+'&setup=true');await p.locator('[data-focus-activity]').selectOption('Editing');await p.locator('[data-plan-focus]').click();await p.waitForURL('**/Writer/ScheduleSetup?*');assert.equal(new URL(p.url()).searchParams.get('bookId'),String(w.book));assert.equal(await p.locator('[name=GoalType]').inputValue(),'Revision');assert.equal((await state()).session,null); +await p.goto(url+'&setup=true');await p.locator('[data-focus-activity]').selectOption('Revising');await p.locator('[data-objective-chapter]').selectOption(String(w.chapter));await p.locator('[data-objective-scene]').selectOption(String(w.scene));await Promise.all([p.waitForURL(u=>u.pathname==='/Writer/Write'&&!u.searchParams.has('setup')),p.locator('[data-save-focus]').click()]);await c.close();} +console.log('PASS authenticated Development unified workflow: real objective create/change, explicit Writing session, active target/ID isolation, note/end, invalid scene and unsupported objective rejection, antiforgery400, optional scoped revision planning; fixture focus restored; browser/simulated PWA.');}finally{await b.close()}})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-focus.cjs b/PlotLine.Tests/Browser/writer3-focus.cjs new file mode 100644 index 00000000..3c8ed48b --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-focus.cjs @@ -0,0 +1,18 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'); +(async()=>{const b=await chromium.launch();try{for(const pwa of[false,true]){ +const c=await b.newContext({viewport:{width:1440,height:900}});await c.addInitScript(()=>localStorage.setItem('plotdirector.desktop.v1.4',JSON.stringify({dismissedAt:Date.now()})));if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true})); +let session=null,starts=[],saves=[],blockStart=null;await c.route('**/Writer/Work/**',async r=>{const action=new URL(r.request().url()).pathname.split('/').pop();if(action==='State')return r.fulfill({json:{session,defaultPauseOnEdit:true}});const d=Object.fromEntries(new URLSearchParams(r.request().postData()));assert(d.__RequestVerificationToken);if(action==='Start'){starts.push(d);if(blockStart)await blockStart;session={sessionID:d.requestId,kind:d.kind,chapterID:Number(d.chapterId)||null,chapterTitle:d.chapterId==='22'?'The harbour':'The crossing',startedUtc:new Date().toISOString(),engagedSeconds:0,playbackSeconds:0,uniqueSeconds:0,pauseOnEdit:true,live:false,sequence:0};}if(action==='End')session=null;await r.fulfill({status:200,body:''});}); +await c.route('**/Writer/SaveObjective',async r=>{saves.push(Object.fromEntries(new URLSearchParams(r.request().postData())));assert(saves.at(-1).__RequestVerificationToken);await r.fulfill({status:200,contentType:'text/html',body:'

Working focus saved by fixture

'});}); +const p=await c.newPage(),errors=[];p.on('pageerror',e=>errors.push(e.message));const url='http://127.0.0.1:5238/Writer/Write?projectId=7&bookId=12'; +await p.goto(url);await p.locator('[data-record-focus]:enabled').waitFor();for(const theme of ['modern-dark','modern-light','warm-dark','plotdirector']){await p.evaluate(t=>window.PlotDirectorApplyApplicationTheme(t),theme);await p.locator('[data-save-focus]').screenshot({animations:'disabled'});const contrast=await p.locator('[data-save-focus]').evaluate(n=>{const lum=s=>s.match(/[\d.]+/g).slice(0,3).map(Number).map(x=>{x/=255;return x<=.04045?x/12.92:((x+.055)/1.055)**2.4}).reduce((v,x,i)=>v+x*[.2126,.7152,.0722][i],0),c=getComputedStyle(n),a=lum(c.color),b=lum(c.backgroundColor);return(Math.max(a,b)+.05)/(Math.min(a,b)+.05)});assert(contrast>=4.5,'Save focus label contrast '+theme);} +assert.equal(await p.locator('select[name=ChapterID]').count(),1);assert.equal(await p.locator('[data-work-start] select').count(),0,'one chapter/activity selection');assert.equal(await p.locator('[data-focus-activity]').count(),1); +await p.locator('[data-objective-chapter]').selectOption('21');await p.locator('[data-objective-scene]').selectOption('31');await p.locator('[data-objective-chapter]').selectOption('22');assert.equal(await p.locator('[data-objective-scene]').inputValue(),'');assert(await p.locator('[data-objective-scene] option[value="31"]').evaluate(n=>n.disabled));await p.locator('[data-objective-scene]').selectOption('32'); +await Promise.all([p.waitForURL('**/Writer/SaveObjective'),p.locator('[data-focus-form]').evaluate(n=>{n.requestSubmit();n.requestSubmit();})]);assert.equal(saves.length,1,'repeated submit saves only once');assert.equal(saves[0].ChapterID,'22');assert.equal(saves[0].SceneID,'32');assert.equal(starts.length,0,'saving never starts recording'); +await p.goto(url+'&objective=true');assert.equal(await p.locator('[data-focus-form]').count(),0,'saved focus is read-only by default');assert(await p.getByRole('link',{name:'Change working focus'}).isVisible());await p.locator('[data-record-focus]:enabled').waitFor();let release;blockStart=new Promise(r=>release=r);await p.locator('[data-record-focus]').click();await p.locator('[data-record-focus]').dispatchEvent('click');release();blockStart=null;await p.locator('[data-work-current]:visible').waitFor();assert.equal(starts.length,1);assert.equal(starts[0].chapterId,'21');assert.equal(starts[0].kind,'Editing');assert.equal(saves.length,1,'recording never saves objective');assert(await p.locator('[data-record-focus]').isHidden()); +const activeId=session.sessionID;await p.goto(url+'&objective=true&setup=true');await p.locator('[data-work-current]:visible').waitFor();await p.locator('[data-objective-chapter]').selectOption('22');assert.equal(session.sessionID,activeId);assert.equal(session.chapterID,21);assert(await p.locator('[data-record-focus]').isHidden()); +session={...session,chapterID:22,chapterTitle:'The harbour',kind:'Writing'};await p.reload();await p.locator('[data-focus-session-difference]:visible').waitFor();assert((await p.locator('[data-focus-session-difference]').textContent()).includes('differs'));assert((await p.locator('[data-work-bound]').textContent()).includes('The harbour')); +session=null;await p.goto(url+'&setup=true');await p.locator('[data-record-focus]:enabled').waitFor();await p.locator('[data-focus-activity]').selectOption('Proofreading');await p.locator('[data-record-focus]').click();assert.equal(starts.length,1);assert(await p.locator('[data-record-kind-choice]').isVisible());await p.locator('[data-record-kind]').selectOption('Reading');await p.locator('[data-record-focus]').click();await p.locator('[data-work-current]:visible').waitFor();assert.equal(starts.at(-1).kind,'Reading'); +session=null;await p.goto(url+'&setup=true');await p.locator('[data-record-focus]:enabled').waitFor();await p.locator('[data-focus-activity]').selectOption('AudioReview');assert(await p.locator('[data-save-focus]').isDisabled());await p.locator('[data-record-focus]').click();assert.equal(starts.length,2,'Audio Review requires chapter');await p.locator('[data-objective-chapter]').selectOption('21');await p.locator('[data-record-focus]').click();await p.locator('[data-work-audio]:visible').waitFor();assert.equal(starts.at(-1).kind,'AudioReview'); +session=null;await p.goto(url+'&setup=true');await p.locator('[data-focus-activity]').selectOption('Editing');await p.locator('[data-plan-focus]').click();await p.waitForURL('**/Writer/ScheduleSetup?*');assert.equal(new URL(p.url()).searchParams.get('bookId'),'12');assert.equal(new URL(p.url()).searchParams.get('focusActivity'),'Editing');assert.equal(saves.length,1);assert.equal(starts.length,3); +await p.goto(url+'&setup=true');await p.locator('#appBookMenu').click();await p.locator('[data-app-book-choice="13"]').click();await p.waitForURL('**bookId=13*');assert.equal(await p.locator('[data-objective-chapter] option[value="21"]').count(),0);assert.equal(await p.locator('[data-objective-scene]').inputValue(),'');assert.deepEqual(errors,[]);await c.close();} +console.log('PASS unified current work: one selector set, save-only, explicit recording/idempotent repeat, saved display/change, active/mismatched targets, explicit proofreading choice, AudioReview chapter rule, dependent scenes, optional scoped scheduling and book-switch clearing in browser/simulated PWA.');}finally{await b.close()}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-navigation-live.cjs b/PlotLine.Tests/Browser/writer3-navigation-live.cjs new file mode 100644 index 00000000..457a2331 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-navigation-live.cjs @@ -0,0 +1,32 @@ +// Development only, normal login, dedicated disposable owner with one saved focus and a second empty book. +const {chromium}=require('playwright'),fs=require('node:fs'),assert=require('node:assert/strict'); +(async()=>{ + const w=JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY));assert(w.Database==='PlotDirector_Development'&&/^pwa-browser-.*@example\.invalid$/.test(w.Email)); + for(const key of ['project','book','chapter','scene','other'])assert(Number.isSafeInteger(w[key])&&w[key]>0); + const b=await chromium.launch(),base='https://dev.plotdirector.com',checks=[]; + try{for(const pwa of[false,true]){ + const c=await b.newContext({viewport:{width:1440,height:1000}});if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true})); + const p=await c.newPage(),errors=[];p.on('pageerror',e=>errors.push(e.message));p.setDefaultTimeout(20000); + await p.goto(base+'/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]); + for(const book of[w.book,w.other])for(const action of['Index','Write','Explore','Plan','Review','Reflect','Dashboard']){ + const response=await p.goto(`${base}/Writer/${action}?projectId=${w.project}&bookId=${book}`);assert.equal(response.status(),200); + assert.equal(await p.locator('[data-writer-destination]').getAttribute('data-writer-destination'),action==='Index'?'Home':action); + if(action==='Write'&&book===w.book)assert((await p.getByRole('link',{name:'Open current scene',exact:true}).getAttribute('href')).includes('/'+w.scene)); + if(action==='Write'&&book===w.other)assert.equal(await p.getByRole('heading',{name:'Where would you like to begin?',exact:true}).isVisible(),true); + if(action==='Review'&&book===w.other)assert.equal(await p.getByRole('heading',{name:'No chapters to read yet',exact:true}).isVisible(),true); + if(!pwa&&book===w.book&&process.env.PD_WRITER3_SCREENSHOTS){await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await p.screenshot({path:`${process.env.PD_WRITER3_SCREENSHOTS}/${action==='Index'?'Home':action}-Development.png`,fullPage:true});} + } + for(const [index,action]of[[0,'Write'],[1,'Explore'],[2,'Dashboard']]){await p.goto(`${base}/Writer?projectId=${w.project}&bookId=${w.book}`);await p.locator('.writer3-home-choices>a').nth(index).click();await p.waitForURL(`**/Writer/${action}?*`);assert.equal(new URL(p.url()).searchParams.get('bookId'),String(w.book));} + await p.goto(`${base}/Writer/Write?projectId=${w.project}&bookId=${w.book}`);await p.locator('#appBookMenu').click();await p.locator(`[data-app-book-choice="${w.other}"]`).click();await p.waitForURL(`**/Writer/Write?*bookId=${w.other}*`);assert.equal(await p.getByRole('link',{name:'Open current scene',exact:true}).count(),0); + await p.goBack();assert((await p.getByRole('link',{name:'Open current scene',exact:true}).getAttribute('href')).includes('/'+w.scene));await p.goForward();await p.reload();assert.equal(await p.getByRole('link',{name:'Open current scene',exact:true}).count(),0); + for(const action of['Overview','Journey','Workspaces','WritingPlans','SchedulePreview'])assert.equal((await p.request.get(`${base}/Writer/${action}?projectId=${w.project}&bookId=${w.book}`)).status(),200); + const setup=await p.request.get(`${base}/Writer/DisplaySetup?projectId=${w.project}&bookId=${w.book}`);assert.equal(setup.status(),200);assert(new URL(setup.url()).pathname==='/Writer/Overview'); + for(const action of['Write','Explore','Plan','Review','Reflect'])assert.equal((await p.request.get(`${base}/Writer/${action}?bookId=2147483647`)).status(),404); + await p.goto(`${base}/Writer/Review?projectId=${w.project}&bookId=${w.book}`); + if(pwa){if(await p.locator('[data-ribbon-shell]').getAttribute('data-collapsed')==='true'){await p.locator('[data-ribbon-collapse]').click();await p.waitForFunction(()=>!document.querySelector('[data-ribbon-collapse]').disabled);}await p.locator('[data-help-open="writer3.review"]:visible').click();await p.waitForFunction(()=>document.querySelector('[data-help-drawer]')?.innerText.includes('Review Your Writing'));} + else{await p.locator('[data-help-key="writer3.review"] button').click();await p.locator('.plotline-help-popover').waitFor();} + for(const key of['home','write','explore','plan','review','reflect','dashboard'])assert.equal((await p.request.get(`${base}/Help/Article/writer3.${key}`)).status(),200); + assert.deepEqual(errors,[]);checks.push(`${pwa?'Simulated PWA':'Browser'}: existing/new book7surfaces,3Home actions, five destinations, contextual scope/back/forward/reload, saved focus isolation,5legacy pages,DisplaySetup,unavailable-book404 and7Help articles pass; no author-data forms submitted.`);await c.close(); + }}finally{await b.close();} + console.log(JSON.stringify({checks,physicalWindows:false,installedPWA:false},null,2)); +})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-navigation.cjs b/PlotLine.Tests/Browser/writer3-navigation.cjs new file mode 100644 index 00000000..ca9066c5 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-navigation.cjs @@ -0,0 +1,57 @@ +// Real MVC/Razor/application-shell navigation, isolated repositories; never a live manuscript. +const {chromium}=require('playwright'); +const assert=require('node:assert/strict'); +const fs=require('node:fs'); +const base='http://127.0.0.1:5238'; +(async()=>{ + const browser=await chromium.launch();let combinations=0; + try{for(const pwa of [false,true]){ + const context=await browser.newContext({viewport:{width:1440,height:1000}}); + if(pwa)await context.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true})); + await context.route('**/signalr.min.js',route=>route.fulfill({contentType:'application/javascript',body:fs.readFileSync(require.resolve('@microsoft/signalr/dist/browser/signalr.min.js'))})); + await context.route('**/Writer/Work/State?*',route=>route.fulfill({contentType:'application/json',body:JSON.stringify({defaultPauseOnEdit:true,session:null})})); + const page=await context.newPage(),errors=[];page.on('pageerror',e=>errors.push(e.message)); + for(const theme of ['modern-dark','modern-light','warm-dark','plotdirector'])for(const width of [390,1024,1440]){ + await page.setViewportSize({width,height:1000});await page.addInitScript(theme=>localStorage.setItem('plotdirector.applicationTheme',theme),theme); + for(const destination of ['Index','Write','Explore','Plan','Review','Reflect','Dashboard']){ + await page.goto(`${base}/Writer/${destination}?projectId=7&bookId=12&objective=true&populated=true`); + await page.evaluate(t=>window.PlotDirectorApplyApplicationTheme(t),theme);await page.screenshot({animations:'disabled'}); + const kind=destination==='Index'?'Home':destination; + assert.equal(await page.locator('[data-writer-destination]').getAttribute('data-writer-destination'),kind); + const commands=page.locator('#ribbon-panel-writer [role=group]').first().locator('a'); + assert.deepEqual((await commands.locator('span:not([aria-hidden])').allTextContents()).map(x=>x.trim()),['Home','Write','Explore','Plan','Review','Reflect']); + assert((await page.locator('#ribbon-panel-writer a[aria-current=page]').allTextContents()).some(t=>t.trim()===(destination==='Index'?'Home':destination==='Dashboard'?'Writing Dashboard':destination))); + assert.equal(await page.locator('.writer3 nav').count(),0,'No duplicate destination navigation bar'); + const contrasts=await page.locator('a.writer3-cta').evaluateAll(nodes=>{const lum=s=>{const rgb=s.match(/[\d.]+/g).slice(0,3).map(Number).map(x=>{x/=255;return x<=.04045?x/12.92:((x+.055)/1.055)**2.4});return rgb[0]*.2126+rgb[1]*.7152+rgb[2]*.0722};return nodes.map(n=>{const c=getComputedStyle(n),a=lum(c.color),b=lum(c.backgroundColor);return (Math.max(a,b)+.05)/(Math.min(a,b)+.05)})});assert(contrasts.every(x=>x>=4.5),'Primary action labels must have readable contrast'); + const overflow=await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth+2);assert.equal(overflow,false,`${pwa}/${theme}/${width}/${kind} horizontal overflow`); + if(kind==='Home'){ + assert.equal(await page.locator('.writer3-home-choices>a').count(),3);assert.equal(await page.locator('[data-writer-work],.writer-help,.writer3-stat-grid').count(),0,'Home contains no stacked legacy dashboards/session controls'); + if(width>=1024){const bottom=await page.locator('.writer3-home-choices').evaluate(n=>n.getBoundingClientRect().bottom);assert(bottom<=1000,'All primary choices fit the desktop viewport');} + } + if(!pwa&&theme==='modern-dark'&&width===1440&&process.env.PD_WRITER3_SCREENSHOTS){fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await page.screenshot({path:`${process.env.PD_WRITER3_SCREENSHOTS}/${kind}.png`,fullPage:true});} + combinations++; + } + } + await page.setViewportSize({width:1440,height:1000}); + await page.goto(base+'/Writer?projectId=7&bookId=12'); + for(const [index,destination]of [[0,'Write'],[1,'Explore'],[2,'Dashboard']]){ + await page.locator('.writer3-home-choices>a').nth(index).click();await page.waitForURL(`**/Writer/${destination}?*`); + assert.equal(new URL(page.url()).searchParams.get('bookId'),'12');await page.goBack();await page.waitForURL('**/Writer?*'); + } + await page.goto(base+'/Writer/Write?projectId=7&bookId=12&objective=true'); + await page.locator('#appBookMenu').click();await page.locator('[data-app-book-choice="13"]').click();await page.waitForURL('**/Writer/Write?*bookId=13*'); + assert.equal(await page.getByRole('heading',{name:'Where would you like to begin?',exact:true}).isVisible(),true); + assert.equal(await page.getByRole('link',{name:'Open current scene',exact:true}).count(),0,'No stale focus after book switch'); + await page.reload();assert.equal(await page.locator('[data-writer-destination]').getAttribute('data-writer-destination'),'Write'); + await page.goBack();assert.equal(new URL(page.url()).searchParams.get('bookId'),'12');await page.goForward();assert.equal(new URL(page.url()).searchParams.get('bookId'),'13'); + const denied=await page.request.get(base+'/Writer/Explore?bookId=999');assert.equal(denied.status(),404); + await page.goto(base+'/Writer#display-setup');await page.waitForURL('**/Writer/Overview*#display-setup');assert(await page.locator('#display-setup').evaluate(n=>n.open)); + await page.goto(base+'/Writer/Review?projectId=7&bookId=12'); + if(pwa){await page.locator('[data-help-open="writer3.review"]:visible').click();await page.waitForFunction(()=>document.querySelector('[data-help-drawer]')?.innerText.includes('Review Your Writing'));} + else{await page.locator('[data-help-key="writer3.review"] button').click();await page.locator('.plotline-help-popover').waitFor();} + const help=await page.request.get(base+'/Help/Article/writer3.review');assert.equal(help.status(),200); + await page.goto(base+'/Writer?projectId=7&bookId=12');await page.locator('.writer3-home-choices>a').first().focus();assert(await page.locator('.writer3-home-choices>a').first().evaluate(n=>n.matches(':focus-visible')));await page.keyboard.press('Enter');await page.waitForURL('**/Writer/Write?*'); + assert.deepEqual(errors,[]);await context.close(); + }}finally{await browser.close();} + console.log(`PASS Writer3: ${combinations} destination/theme/width/browser/PWA combinations; Home actions, contextual ribbon, authorisation, book switching, reload/back/forward, keyboard focus, Help, legacy fragments and viewport fit.`); +})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-refinement.cjs b/PlotLine.Tests/Browser/writer3-refinement.cjs new file mode 100644 index 00000000..361347e2 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-refinement.cjs @@ -0,0 +1,22 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +const live=!!process.env.PD_WRITER3_IDENTITY,w=live?JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY)):null,base=live?'https://dev.plotdirector.com':'http://127.0.0.1:5238';if(live)assert(w.Database==='PlotDirector_Development'&&w.Email.endsWith('@example.invalid')); +const url=d=>`${base}/Writer/${d}?projectId=${w?.project||7}&bookId=${w?.book||12}${live?'':'&objective=true&populated=true'}`; +const settle=p=>p.evaluate(()=>new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)))); +(async()=>{const b=await chromium.launch();try{for(const pwa of[false,true]){ +const c=await b.newContext({viewport:{width:1440,height:900},reducedMotion:'reduce'});if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));await c.addInitScript(id=>localStorage.setItem('plotdirector.desktop.v1.'+id,JSON.stringify({dismissedAt:Date.now()})),w?.UserID||4);const p=await c.newPage(),errors=[];p.on('pageerror',e=>errors.push(e.message)); +if(live){await p.goto(base+'/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]);} +else await c.route('**/Writer/Work/State?*',r=>r.fulfill({json:{session:null,defaultPauseOnEdit:true}})); +for(const d of['Write','Explore','Plan','Review','Reflect']){ +await p.goto(url(d));await settle(p);assert.equal(await p.locator('.writer3-title [data-help-key="writer3.layout"]').count(),0,'heading has destination Help only');assert(await p.locator('.writer3-layout-tools [data-help-key="writer3.layout"]').isVisible()); +const sep=p.getByRole('separator',{name:'Resize contextual companion'});assert(await sep.evaluate(n=>{for(const modifier of['altKey','ctrlKey','metaKey']){const e=new KeyboardEvent('keydown',{key:'ArrowLeft',[modifier]:true,bubbles:true,cancelable:true});n.dispatchEvent(e);if(e.defaultPrevented)return false;}return true;}),'browser/OS modified shortcuts remain available'); +await p.locator('.writer3-layout-tools button').first().click();const measures=await p.locator('.writer3-main').evaluate(n=>({width:n.clientWidth,max:Math.max(...[...n.children].map(x=>x.getBoundingClientRect().width))}));assert(measures.maxns.every(n=>{const r=document.createRange();r.selectNodeContents(n);return r.getClientRects().length===1;})),'01/02/03 remain on one line'); +await p.setViewportSize({width:390,height:844});await p.goto(url('Explore'));await p.locator('.writer3-layout-tools button').first().click();await p.locator('.writer3-link-list a').last().focus();await p.keyboard.press('Tab');await settle(p);assert(await p.locator('.writer3-reference').isHidden(),'keyboard exit closes overlay without trapping navigation'); +await p.setViewportSize({width:1440,height:900});await p.goto(url('Write'));assert(await p.getByRole('heading',{name:'Work sessions & Audio Review',exact:true}).isVisible()); +if(!live){await p.setViewportSize({width:1440,height:700});const session={sessionID:'22222222-2222-2222-2222-222222222222',kind:'AudioReview',bookID:12,chapterID:21,chapterTitle:'Bound chapter',startedUtc:new Date().toISOString(),engagedSeconds:60,playbackSeconds:10,uniqueSeconds:10,pauseOnEdit:true,live:true,playbackState:'playing',capabilities:'play,pause,back15,forward15',sequence:1};await p.route('**/Writer/Work/State?*',r=>r.fulfill({json:{session}}));await p.reload();await p.locator('[data-work-audio]:visible').waitFor();await p.locator('[data-work-note]').fill('Unsaved audio note');const before=await p.locator('[data-writer-work]').elementHandle();await p.locator('.writer3-layout-tools button').first().click();await p.locator('[data-media-command="pause"]').scrollIntoViewIfNeeded();assert(await p.locator('[data-media-command="pause"]').isVisible());assert(await before.evaluate(n=>n===document.querySelector('[data-writer-work]')));assert.equal(await p.locator('[data-work-note]').inputValue(),'Unsaved audio note');assert(await p.locator('.writer3-main').evaluate(n=>n.scrollTop>0));assert.equal(await p.evaluate(()=>window.scrollY),0,'audio controls scroll within main, not document');} +assert.deepEqual(errors,[]);await c.close();} +console.log(`PASS Phase2C ${live?'authenticated Development':'isolated MVC'}: marker line wrapping, Help placement/popup, readable collapsed content, browser modifier shortcuts, reduced-motion context, overlay Tab exit, five Help articles and existing session heading${live?'':', retained active AudioReview DOM/notes and independent scroll to media controls'}.`); +}finally{await b.close()}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-visual-capture.cjs b/PlotLine.Tests/Browser/writer3-visual-capture.cjs new file mode 100644 index 00000000..5f7f81d8 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-visual-capture.cjs @@ -0,0 +1,8 @@ +// Read-only authenticated Development screenshots; requires a dedicated disposable identity. +const{chromium}=require('playwright'),fs=require('node:fs'),assert=require('node:assert/strict'); +(async()=>{const w=JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY)),out=process.env.PD_WRITER3_SCREENSHOTS;assert(w.Database==='PlotDirector_Development'&&out&&w.Email.endsWith('@example.invalid'));fs.mkdirSync(out,{recursive:true});const b=await chromium.launch();try{const p=await b.newPage({viewport:{width:1440,height:1000}});await p.goto('https://dev.plotdirector.com/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]);const records=[]; +for(const width of[1440,1024,390])for(const d of['Index','Write','Explore','Plan','Review','Reflect']){ +await p.setViewportSize({width,height:width===390?844:900});await p.goto(`https://dev.plotdirector.com/Writer/${d}?projectId=${w.project}&bookId=${w.book}`);await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));await p.evaluate(()=>{for(const k of Object.keys(localStorage).filter(k=>k.startsWith('plotdirector.writerLayout.')))localStorage.removeItem(k)});await p.reload();await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));await p.evaluate(()=>new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r))));await p.mouse.move(0,0); +await p.screenshot({path:`${out}/${d}-${width}.png`,fullPage:true,animations:"disabled"});records.push({destination:d,width,...await p.evaluate(()=>({overflowX:document.documentElement.scrollWidth-innerWidth,overflowY:document.documentElement.scrollHeight-innerHeight,heading:document.querySelector('.writer3 h1')?.textContent.trim()}))}); +if(['Write','Explore'].includes(d)){const t=p.locator('.writer3-layout-tools button').first();await t.click();await p.mouse.move(0,0);await p.screenshot({path:`${out}/${d}-${width}-${await p.locator('.writer3-reference').isHidden()?'collapsed':'companion'}.png`,fullPage:true,animations:"disabled"});} +}console.log(JSON.stringify(records,null,2));}finally{await b.close()}})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-word.cjs b/PlotLine.Tests/Browser/writer3-word.cjs new file mode 100644 index 00000000..6bdf0668 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-word.cjs @@ -0,0 +1,24 @@ +const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +(async()=>{const browser=await chromium.launch();try{for(const pwa of[false,true]){ + const c=await browser.newContext({viewport:{width:1440,height:1000}});await c.addInitScript(()=>localStorage.setItem('plotdirector.desktop.v1.4',JSON.stringify({dismissedAt:Date.now()})));if(pwa)await c.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));await c.route('**/signalr.min.js',r=>r.fulfill({contentType:'application/javascript',body:fs.readFileSync(require.resolve('@microsoft/signalr/dist/browser/signalr.min.js'))}));await c.route('**/Writer/Work/State?*',r=>r.fulfill({json:{session:{sessionID:'55555555-5555-5555-5555-555555555555',kind:'AudioReview',bookID:12,chapterID:22,chapterTitle:'Bound audio chapter',startedUtc:new Date().toISOString(),engagedSeconds:60,playbackSeconds:20,uniqueSeconds:10,pauseOnEdit:true,live:true,playbackState:'playing',capabilities:'play,pause,back15,forward15',sequence:1},defaultPauseOnEdit:true}})); + const lease={instanceId:'11111111-1111-1111-1111-111111111111',sessionId:'22222222-2222-2222-2222-222222222222',manuscriptId:'33333333-3333-3333-3333-333333333333',bookId:12,wordAvailable:true,wordSaved:true,canAcknowledgeNavigation:true,canChapterSync:true,revision:2,documentTitle:'Disposable verified manuscript',chapterId:22,chapterTitle:'Other chapter',expires:new Date(Date.now()+3600000).toISOString(),updated:new Date().toISOString(),chapterProgress:{state:'Synchronised'}}; + let packet={leases:[lease],canonical:{manuscriptID:lease.manuscriptId,revision:5,chapterAcceptedUtc:'2026-11-16T12:00:00Z'},verifiedPositions:[{instanceId:lease.instanceId,sessionId:lease.sessionId,chapterId:22,chapterTitle:'Other chapter'}]},posts=0,statusCalls=0,receipt='requested',syncs=0; + await c.route('**/native-companion/status*',r=>{statusCalls++;return r.fulfill({json:packet})});await c.route('**/WriterWord/Navigate',r=>{posts++;const body=new URLSearchParams(r.request().postData());assert.equal(body.get('chapterId'),'21');assert.equal(body.get('bookId'),'12');assert.equal(body.get('sessionId'),lease.sessionId);return r.fulfill({status:202,json:{message:'requested'}})});await c.route('**/WriterWord/Navigation?*',r=>r.fulfill({json:{state:receipt}}));await c.route('**/manuscript/paragraphs/snapshot',r=>{syncs++;assert(!new URLSearchParams(r.request().postData()).has('fullSnapshot'));return r.fulfill({json:{requestId:'request',message:'Bounded check requested'}})}); + const p=await c.newPage(),errors=[];p.on('pageerror',e=>errors.push(e.message));const url='http://127.0.0.1:5238/Writer/Write?projectId=7&bookId=12&objective=true';await p.goto(url);await p.locator('[data-word-state]').filter({hasText:'Disposable verified manuscript'}).waitFor().catch(async e=>{throw Error(`${e.message}; state=${await p.locator('[data-word-state]').textContent()}; errors=${errors.join(';')}`)});assert((await p.locator('[data-word-position]').textContent()).includes('Other chapter'));assert((await p.locator('[data-writer-focus] h2').first().textContent()).includes('Arrival'));assert((await p.locator('[data-word-freshness]').textContent()).includes('last accepted'));assert(!/up to date/i.test(await p.locator('[data-word-freshness]').textContent())); + const count=statusCalls;const resumed=p.waitForResponse(r=>r.url().includes('/native-companion/status'));await p.evaluate(()=>{window.dispatchEvent(new PageTransitionEvent('pagehide',{persisted:true}));window.dispatchEvent(new PageTransitionEvent('pageshow',{persisted:true}));});await resumed;assert(statusCalls>count,'shared status resumes after cached return'); + const update=async value=>{packet=value;await p.evaluate(v=>window.dispatchEvent(new CustomEvent('writer-word-state',{detail:v})),value)};const initial=structuredClone(packet); + await p.locator('[data-help-key="writer3.word"] button').click();await p.locator('.plotline-help-popover').waitFor();await p.locator('.plotline-help-more').click();await p.locator('[data-help-content] .help-drawer-article').waitFor();await p.locator('[data-help-close]').click(); + await p.locator('[data-work-note]').evaluate(n=>n.value='Unsaved return note');const work=await p.locator('[data-writer-work]').elementHandle();await p.locator('[data-word-navigate]').evaluate(b=>{b.click();b.click()});await p.locator('[data-word-command]').filter({hasText:'waiting for confirmation'}).waitFor();assert.equal(posts,1);assert(!(await p.locator('[data-word-command]').textContent()).includes('confirmed navigation'));receipt='completed';await p.locator('[data-word-command]').filter({hasText:'Word confirmed navigation.'}).waitFor();assert(await work.evaluate(n=>n===document.querySelector('[data-writer-work]')));assert.equal(await p.locator('[data-work-note]').inputValue(),'Unsaved return note');assert((await p.locator('[data-work-bound]').textContent()).includes('Bound audio chapter'));assert(await p.locator('[data-work-audio]').isVisible()); + receipt='timed-out';await p.locator('[data-word-navigate]').click();await p.locator('[data-word-command]').filter({hasText:'expired'}).waitFor(); + await p.getByText('Connection and update options',{exact:true}).click();await p.locator('[data-word-sync]').click();await p.locator('[data-word-command]').filter({hasText:'acceptance has not yet been confirmed'}).waitFor();assert.equal(syncs,1); + await update({...initial,leases:[{...lease,canAcknowledgeNavigation:false}]});assert(await p.locator('[data-word-navigate]').isDisabled());assert((await p.locator('[data-word-position]').textContent()).includes('Update the Word add-in')); + await update({...initial,canonical:{manuscriptID:'foreign'}});assert(await p.locator('[data-word-navigate]').isDisabled());assert((await p.locator('[data-word-state]').textContent()).includes('not been verified')); + await update({...initial,leases:[{...lease,wordSaved:false}],verifiedPositions:[]});assert(await p.locator('[data-word-navigate]').isDisabled());assert((await p.locator('[data-word-position]').textContent()).includes('unsaved')); + await update({...initial,leases:[{...lease,bookId:99}],verifiedPositions:[]});assert(await p.locator('[data-word-navigate]').isDisabled());assert((await p.locator('[data-word-state]').textContent()).includes('another book')); + await update({unavailable:true});assert((await p.locator('[data-word-state]').textContent()).includes('unavailable'));assert.equal(await p.locator('[data-work-note]').inputValue(),'Unsaved return note'); + const second={...lease,sessionId:'44444444-4444-4444-4444-444444444444',documentTitle:'Second manuscript'};await update({...initial,leases:[lease,second]});assert(await p.locator('[data-word-choose]').isVisible());assert(await p.locator('[data-word-navigate]').isDisabled());await p.locator('[data-word-document]').selectOption(lease.instanceId+'/'+lease.sessionId);assert(await p.locator('[data-word-navigate]').isEnabled()); + receipt='requested';await p.locator('[data-word-navigate]').click();await p.locator('[data-word-command]').filter({hasText:'waiting for confirmation'}).waitFor();await update({...initial,leases:[second],verifiedPositions:[]});await p.locator('[data-word-command]').filter({hasText:'not confirmed'}).waitFor(); + await p.goto(url+'&wordInstanceId='+lease.instanceId+'&wordSessionId='+lease.sessionId);packet=initial;await update(initial);await p.locator('[data-word-adopt]').waitFor().catch(async e=>{throw Error(`${e.message}; ${JSON.stringify(await p.locator('[data-writer-word]').evaluate(n=>({chapter:n.dataset.chapterId,adoptHidden:n.querySelector('[data-word-adopt]').hidden,state:n.querySelector('[data-word-state]').textContent,position:n.querySelector('[data-word-position]').textContent,asideHidden:n.closest('aside').hidden})))}`)});assert.equal(await p.locator('[data-word-adopt] [name=ChapterID]').inputValue(),'22');assert((await p.locator('[data-word-origin]').textContent()).includes('unchanged')); + if(!pwa&&process.env.PD_WRITER3_SCREENSHOTS){fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await p.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));await p.screenshot({path:process.env.PD_WRITER3_SCREENSHOTS+'/Write-verified-simulated.png',animations:'disabled'});} + await p.setViewportSize({width:390,height:844});await p.locator('.writer3-layout-tools button').first().click();await p.locator('[data-writer-word]').scrollIntoViewIfNeeded();assert(await p.locator('[data-word-navigate]').isVisible());assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2));assert(await p.locator('.writer3-reference').isVisible());await p.keyboard.press('Escape');assert(await p.locator('.writer3-reference').isHidden());assert.deepEqual(errors,[]);await c.close();} + console.log('PASS Writer Word browser/simulated PWA: exact document status, focus isolation, old/uncertain/unsaved/cross-book rejection, explicit chapter handoff, acknowledgement versus request, timeout, repeat guard, bounded check, multi-document selection, disconnect, retained notes/DOM, verified-origin adoption, Help and narrow overlay. Native events and acknowledgements simulated.');}finally{await browser.close()}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Browser/writer3-workspace.cjs b/PlotLine.Tests/Browser/writer3-workspace.cjs new file mode 100644 index 00000000..a40c9287 --- /dev/null +++ b/PlotLine.Tests/Browser/writer3-workspace.cjs @@ -0,0 +1,94 @@ +// Rendered MVC/shell qualification. Optional live mode requires a dedicated Development fixture identity. +const {chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('node:fs'); +const live=!!process.env.PD_WRITER3_IDENTITY; +const base=live?(process.env.PD_WRITER3_BASE_URL||'https://dev.plotdirector.com'):'http://127.0.0.1:5238'; +if(live)assert(['https://dev.plotdirector.com','http://127.0.0.1:5050'].includes(base),'Development endpoints only'); +const identity=live?JSON.parse(fs.readFileSync(process.env.PD_WRITER3_IDENTITY)):null; +if(live)assert(identity.Database==='PlotDirector_Development'&&identity.Email.endsWith('@example.invalid')); +const book=identity?.book||12,project=identity?.project||7; +const url=d=>`${base}/Writer/${d}?projectId=${project}&bookId=${book}${live?'':'&objective=true&populated=true'}`; +const settle=p=>p.evaluate(async()=>{await document.fonts.ready;await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(()=>requestAnimationFrame(r))));}); +const width=p=>p.locator('.writer3-reference').evaluate(n=>n.getBoundingClientRect().width); +(async()=>{const browser=await chromium.launch();let combinations=0;try{ + for(const pwa of [false,true]){ + const context=await browser.newContext({viewport:{width:1440,height:1000}}); + if(pwa)await context.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true})); + await context.route('**/signalr.min.js',r=>r.fulfill({contentType:'application/javascript',body:fs.readFileSync(require.resolve('@microsoft/signalr/dist/browser/signalr.min.js'))})); + const page=await context.newPage(),errors=[];page.on('response',r=>{if(r.status()>=400&&r.url().includes('/js/'))console.error(`Script HTTP ${r.status()}: ${new URL(r.url()).pathname}`);});page.on('requestfailed',r=>console.error(`Request failed ${new URL(r.url()).pathname}: ${r.failure()?.errorText}`));page.on('pageerror',e=>errors.push(e.message)); + if(live){await page.goto(base+'/Account/Login');await page.locator('[name=Email]').fill(identity.Email);await page.locator('[name=Password]').fill(identity.Password);await Promise.all([page.waitForURL('**/Projects'),page.locator('button[type=submit]').click()]);} + else await context.route('**/Writer/Work/State?*',r=>r.fulfill({contentType:'application/json',body:JSON.stringify({session:null,defaultPauseOnEdit:true})})); + for(const d of ['Write','Explore','Plan','Review','Reflect']){ + await page.setViewportSize({width:1440,height:1000});await page.goto(url(d));await settle(page); + const divider=page.getByRole('separator',{name:'Resize contextual companion'}),toggle=page.locator('.writer3-layout-tools button').first(); + assert(await divider.isVisible(),d+' divider'); + const initial=await width(page);assert(initial>340&&initial<600); + await divider.focus();assert(await divider.evaluate(n=>n.matches(':focus-visible'))); + await page.keyboard.press('Shift+ArrowLeft');assert((await width(page))>=initial+45); + await page.keyboard.press('Home');const min=await width(page);assert(min>=280); + await page.keyboard.press('End');const max=await width(page);assert(max>min+100); + const box=await divider.boundingBox();await page.mouse.move(box.x+box.width/2,box.y+80);await page.mouse.down();await page.mouse.move(box.x+box.width/2+120,box.y+80,{steps:12});await page.mouse.up(); + const dragged=await width(page);assert(draggedn.value='Unsaved local session note');await page.locator('.writer3-layout-tools button').first().click();await page.locator('.writer3-layout-tools button').first().click();assert.equal(await note.inputValue(),'Unsaved local session note');} + } + await page.setViewportSize({width:390,height:844});await settle(page);assert(await divider.isHidden());assert(await page.locator('.writer3-reference').isHidden()); + await page.locator('.writer3-layout-tools button').first().click();assert(await page.locator('.writer3-reference').isVisible());assert(await page.locator('.writer3-companion-close').evaluate(n=>n===document.activeElement)); + if(!pwa&&d==='Explore'&&process.env.PD_WRITER3_SCREENSHOTS){fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await page.screenshot({path:`${process.env.PD_WRITER3_SCREENSHOTS}/Explore-narrow.png`});} + await page.keyboard.press('Escape');assert(await page.locator('.writer3-reference').isHidden());assert(await page.locator('.writer3-layout-tools button').first().evaluate(n=>n===document.activeElement)); + await page.locator('.writer3-layout-tools button').first().click();await page.locator('.writer3-companion-close').click();assert(await page.locator('.writer3-reference').isHidden()); + await page.setViewportSize({width:1440,height:1000});await settle(page);assert(await page.locator('.writer3-reference').isVisible(),'temporary narrow overlay never overwrites desktop preference'); + await page.locator('.writer3-layout-tools button').first().click();await page.setViewportSize({width:390,height:844});await settle(page);await page.locator('.writer3-layout-tools button').first().click();await page.setViewportSize({width:1440,height:1000});await settle(page);assert(await page.locator('.writer3-reference').isHidden());assert(await page.locator('.writer3-layout-tools button').first().evaluate(n=>n===document.activeElement),'responsive close restores focus when desktop preference is collapsed');await page.locator('.writer3-layout-tools button').first().click(); + if(!pwa&&process.env.PD_WRITER3_SCREENSHOTS){await page.evaluate(()=>window.PlotDirectorApplyApplicationTheme('modern-dark'));fs.mkdirSync(process.env.PD_WRITER3_SCREENSHOTS,{recursive:true});await page.mouse.move(0,0);await page.screenshot({path:`${process.env.PD_WRITER3_SCREENSHOTS}/${d}.png`});} + } + if(!live){ + for(const kind of ['Writing','AudioReview']){ + const posts=[];const session={sessionID:'11111111-1111-1111-1111-111111111111',kind,bookID:12,chapterID:21,chapterTitle:'Bound chapter',startedUtc:new Date().toISOString(),engagedSeconds:60,playbackSeconds:20,uniqueSeconds:10,pauseOnEdit:true,live:true,playbackState:'playing',capabilities:'play,pause,back15,forward15',sequence:1}; + await page.route('**/Writer/Work/**',r=>{if(r.request().method()==='POST'){posts.push(new URL(r.request().url()).pathname);return r.fulfill({status:200,body:''});}return r.fulfill({json:{session,defaultPauseOnEdit:true}});}); + await page.goto(url('Write'));await page.locator('[data-work-current]:visible').waitFor();await page.locator('[data-work-note]').fill('Keep unsaved note'); + const before=await page.locator('[data-work-current]').elementHandle();await page.locator('.writer3-layout-tools button').first().click();await page.locator('.writer3-layout-tools button').first().click(); + await page.getByRole('separator',{name:'Resize contextual companion'}).focus();await page.keyboard.press('ArrowLeft'); + assert(await before.evaluate(n=>n===document.querySelector('[data-work-current]')));assert.equal(await page.locator('[data-work-note]').inputValue(),'Keep unsaved note'); + assert((await page.locator('[data-work-label]').textContent()).includes(kind));if(kind==='AudioReview'){assert(await page.locator('[data-work-audio]').isVisible());assert((await page.locator('[data-audio-chapter]').textContent()).includes('Bound chapter'));} + assert.deepEqual(posts,[],'layout never posts a session start/end/preference/media command');await page.unroute('**/Writer/Work/**'); + } + await page.goto(url('Explore'));const sep=page.getByRole('separator',{name:'Resize contextual companion'});const box=await sep.boundingBox(); + await page.mouse.move(box.x+box.width/2,box.y+60);await page.mouse.down();await page.dispatchEvent('.writer3-divider','pointercancel',{pointerId:1});await page.mouse.up();assert(!await page.locator('.writer3').evaluate(n=>n.classList.contains('writer3-dragging'))); + const cdp=await context.newCDPSession(page);const touch=await sep.boundingBox();const x=touch.x+touch.width/2,y=touch.y+100,oldWidth=await width(page); + await cdp.send('Input.dispatchTouchEvent',{type:'touchStart',touchPoints:[{x,y}]});await cdp.send('Input.dispatchTouchEvent',{type:'touchMove',touchPoints:[{x:x-70,y}]});await cdp.send('Input.dispatchTouchEvent',{type:'touchEnd',touchPoints:[]});await settle(page);assert(await width(page)>oldWidth+40,'touch pointer drag'); + const fullscreen=await page.evaluate(async()=>{try{await document.documentElement.requestFullscreen();return !!document.fullscreenElement;}catch{return false;}});assert(fullscreen,'headless Chromium fullscreen request');await settle(page);await page.evaluate(()=>document.exitFullscreen());await settle(page); + } + // Independent destination preferences, safe malformed/outdated payload and storage refusal. + await page.goto(url('Explore'));await page.getByRole('separator',{name:'Resize contextual companion'}).focus();await page.keyboard.press('End');await page.locator('.writer3-layout-tools button').first().click(); + await page.goto(url('Plan'));assert(await page.locator('.writer3-reference').isVisible());await page.goto(url('Explore'));assert(await page.locator('.writer3-reference').isHidden()); + await page.evaluate(()=>{for(const k of Object.keys(localStorage).filter(k=>k.startsWith('plotdirector.writerLayout.')))localStorage.setItem(k,'{invalid');});await page.reload();assert(await page.locator('.writer3-reference').isVisible()); + await page.evaluate(()=>{for(const k of Object.keys(localStorage).filter(k=>k.startsWith('plotdirector.writerLayout.')))localStorage.setItem(k,JSON.stringify({version:99,width:1e9,collapsed:true}));});await page.reload();assert(await page.locator('.writer3-reference').isVisible()); + await page.evaluate(()=>{for(const k of Object.keys(localStorage).filter(k=>k.startsWith('plotdirector.writerLayout.')))localStorage.setItem(k,JSON.stringify({version:1,width:1e9,collapsed:'false'}));});await page.reload();assert((await width(page))<800);assert(await page.locator('.writer3-reference').isVisible()); + await page.evaluate(()=>{for(const k of Object.keys(localStorage).filter(k=>k.startsWith('plotdirector.writerLayout.')))localStorage.removeItem(k);}); + for(const theme of ['modern-dark','modern-light','warm-dark','plotdirector'])for(const size of [{width:390,height:844},{width:1024,height:768},{width:1440,height:900},{width:1920,height:1080},{width:2560,height:1440}])for(const d of ['Write','Explore','Plan','Review','Reflect']){ + await page.setViewportSize(size);const response=await page.goto(url(d));assert.equal(response.status(),200,`workspace ${d} HTTP status at ${page.url()}`);assert.equal(await page.locator('[data-ribbon-shell]').count(),1,`application shell missing at ${page.url()}`);await page.waitForFunction(()=>typeof window.PlotDirectorApplyApplicationTheme==='function').catch(e=>{throw new Error(`Theme helper unavailable: ${d}/${theme}/${size.width} at ${page.url()}; page errors: ${errors.join('; ')}; ${e.message}`)});await page.waitForFunction(()=>document.querySelector('.writer3').classList.contains('writer3-viewport'));await page.evaluate(t=>window.PlotDirectorApplyApplicationTheme(t),theme);await settle(page); + const geometry=await page.evaluate(()=>({x:document.documentElement.scrollWidth-innerWidth,y:document.documentElement.scrollHeight-innerHeight,bottom:document.querySelector('.writer3-workspace').getBoundingClientRect().bottom,root:document.querySelector('.writer3').className,height:document.querySelector('.writer3').style.cssText})); + assert(geometry.x<=2,`${d}/${theme}/${size.width} horizontal overflow ${JSON.stringify(geometry)}`);assert(geometry.y<=3,`${d}/${theme}/${size.width} unnecessary page scroll ${JSON.stringify(geometry)}`); + assert(geometry.bottom<=size.height+2);combinations++; + } + await page.setViewportSize({width:1440,height:1000});await page.goto(url('Review'));await settle(page); + if(await page.locator('[data-ribbon-shell]').getAttribute('data-collapsed')==='true'){await page.locator('[data-ribbon-collapse]').click();await page.waitForFunction(()=>!document.querySelector('[data-ribbon-collapse]').disabled);await settle(page);} + const before=await page.locator('.writer3-split').evaluate(n=>n.clientHeight); + // Drive real shell collapse; isolate fixture appearance persistence from unrelated endpoint absence. + if(!live){const endpoint=await page.locator('[data-appearance-form]').getAttribute('data-ribbon-url');await page.route('**'+endpoint,r=>r.fulfill({status:200,body:'{}'}));} + await page.locator('[data-ribbon-collapse]').click();await page.waitForFunction(()=>!document.querySelector('[data-ribbon-collapse]').disabled);await settle(page); + const after=await page.locator('.writer3-split').evaluate(n=>n.clientHeight);assert(after>before+25,'ribbon collapse increases working height'); + await page.setViewportSize({width:1440,height:500});await page.evaluate(()=>document.documentElement.style.fontSize='200%');await settle(page);assert(await page.locator('.writer3').evaluate(n=>n.classList.contains('writer3-flow')),'high text scale uses accessible flow');await page.evaluate(()=>window.scrollTo(0,500));await page.setViewportSize({width:1440,height:1000});await page.evaluate(()=>document.documentElement.style.fontSize='');await page.waitForFunction(()=>!document.querySelector('.writer3-flow')&&document.documentElement.scrollHeight<=innerHeight+3); + await page.goto(url('Review')); + if(pwa){await page.locator('[data-help-open="writer3.layout"]:visible').click();await page.waitForFunction(()=>document.querySelector('[data-help-drawer]')?.textContent.includes('Workspace Layout'));} + else{await page.locator('[data-help-key="writer3.layout"] button').click();await page.locator('.plotline-help-popover').waitFor();} + assert.equal((await page.request.get(base+'/Help/Article/writer3.layout')).status(),200); + if(!live){const blocked=await browser.newContext({viewport:{width:1440,height:1000}});await blocked.addInitScript(()=>{Storage.prototype.getItem=()=>{throw Error('blocked')};Storage.prototype.setItem=()=>{throw Error('blocked')};});const p=await blocked.newPage();await p.goto(url('Explore'));await p.locator('.writer3-layout-tools button').first().click();assert(await p.locator('.writer3-reference').isHidden());await blocked.close();} + assert.deepEqual(errors,[]);await context.close(); + } + console.log(`PASS Writer3 workspace: ${combinations} rendered destination/theme/viewport/browser/simulated-PWA cases; pointer/keyboard limits, collapse, reload, independent preferences, invalid/stale values, storage refusal, responsive overlay/Escape/focus, ribbon height, text scaling, preserved local notes and Help. ${live?'Authenticated Development fixture.':'Isolated MVC fixture.'} Physical Windows/installed PWA/multi-monitor not tested.`); +}finally{await browser.close();}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine.Tests/Program.cs b/PlotLine.Tests/Program.cs index 1e6f9da4..3c2572a4 100644 --- a/PlotLine.Tests/Program.cs +++ b/PlotLine.Tests/Program.cs @@ -170,6 +170,10 @@ var tests = new (string Name, Action Test)[] ("Release triage and browser-only onboarding preserve author decisions", ReleaseSprintTests.Run), ("Approved native import source and confirmation remain safe", () => NativeImportTests.Run().GetAwaiter().GetResult()), ("Native installation renewal and revocation remain account/security scoped", () => NativeInstallationTests.Run().GetAwaiter().GetResult()), + ("Writer Word verified navigation and acknowledgement",()=>WriterWordTests.Run().GetAwaiter().GetResult()), + ("Writer inline authoring validation",()=>WriterAuthoringTests.Run()), + ("Writer 3 destination navigation and scope",()=>WriterNavigationTests.Run().GetAwaiter().GetResult()), + ("Writer foundation context, queue scope and planning",()=>WriterFoundationTests.Run().GetAwaiter().GetResult()), ("Writer dashboard book scope",()=>WriterDashboardTests.Run().GetAwaiter().GetResult()), ("Writing activity measurement", WritingActivityTests.Run), ("Writer intelligence and measured review", WriterIntelligenceTests.Run), @@ -2165,7 +2169,7 @@ static void WritingWorkspaceLauncherUsesProgressiveScreenPlacement() var root = Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine"); var script = File.ReadAllText(Path.Combine(root, "wwwroot/js/writing-workspace.js")); var launcher = File.ReadAllText(Path.Combine(root, "wwwroot/js/writing-workspace-launcher.js")); - var view = File.ReadAllText(Path.Combine(root, "Views/Writer/Index.cshtml")); + var view = File.ReadAllText(Path.Combine(root, "Views/Writer/Legacy.cshtml")); Assert(script.Contains("getScreenDetails", StringComparison.Ordinal), "Workspace launcher should use the Window Management API when available."); Assert(script.Contains("window-management", StringComparison.Ordinal), "Workspace launcher should check/request window-management permission."); diff --git a/PlotLine.Tests/RibbonPresentationTests.cs b/PlotLine.Tests/RibbonPresentationTests.cs index b3ad65f6..15967435 100644 --- a/PlotLine.Tests/RibbonPresentationTests.cs +++ b/PlotLine.Tests/RibbonPresentationTests.cs @@ -22,7 +22,7 @@ internal static class RibbonPresentationTests var view = Path.Combine(root.FullName, "PlotLine", "Views", command.Controller, action + ".cshtml"); if (!File.Exists(view)) continue; // Downloads and controller redirects have no page furniture. var markup = File.ReadAllText(view); - if (!markup.Contains("data-pwa-") && !markup.Contains("_StoryCalendarSurface")) throw new Exception($"Navigation destination has no contextual classification: {command.Controller}/{action}"); + if (!markup.Contains("data-pwa-") && !markup.Contains("_StoryCalendarSurface") && !markup.Contains("_Writer3Header")) throw new Exception($"Navigation destination has no contextual classification: {command.Controller}/{action}"); } if (RibbonPresentation.Icons.Select(icon => icon.Key).Distinct().Count() != RibbonPresentation.Icons.Count()) throw new Exception("Icon catalog keys must be unique."); } diff --git a/PlotLine.Tests/Sql/WriterAuthoring.sql b/PlotLine.Tests/Sql/WriterAuthoring.sql new file mode 100644 index 00000000..76ed7a5f --- /dev/null +++ b/PlotLine.Tests/Sql/WriterAuthoring.sql @@ -0,0 +1,46 @@ +-- Substitute {{UserID}}, {{BookID}}, {{ChapterID}}, {{SceneID}} from a guarded disposable Development fixture. +IF DB_NAME()<>N'PlotDirector_Development' THROW 51000,'Wrong database',1; +DECLARE @u int={{UserID}},@b int={{BookID}},@c int={{ChapterID}},@s int={{SceneID}}; +IF NOT EXISTS(SELECT 1 FROM dbo.AppUser WHERE UserID=@u AND Email LIKE N'pwa-browser-%@example.invalid') THROW 51000,'Not a disposable fixture',1; +DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max),Version varchar(64)); +DECLARE @originalStatus int=(SELECT RevisionStatusID FROM dbo.Scenes WHERE SceneID=@s),@originalNotes int=(SELECT COUNT(*) FROM dbo.SceneNotes WHERE SceneID=@s),@v varchar(64),@old varchar(64),@id int,@json nvarchar(max),@conflict bit=0; +IF EXISTS(SELECT 1 FROM dbo.SceneWorkflow WHERE SceneID=@s) OR @originalNotes<>0 OR EXISTS(SELECT 1 FROM dbo.SceneChecklistItems WHERE SceneID=@s) OR EXISTS(SELECT 1 FROM dbo.ChapterGoals WHERE ChapterID=@c) THROW 51000,'Fixture must start empty',1; +INSERT @r EXEC dbo.WriterAuthoring_Sections @u,@b,@c,@s; +IF EXISTS(SELECT 1 FROM dbo.SceneWorkflow WHERE SceneID=@s) OR EXISTS(SELECT 1 FROM dbo.ChapterGoals WHERE ChapterID=@c) OR EXISTS(SELECT 1 FROM dbo.SceneChecklistItems WHERE SceneID=@s) THROW 51000,'Inspection seeded records',1; +BEGIN TRANSACTION; +SELECT @v=Version,@old=Version FROM @r WHERE Kind='Scene'; +SET @json=N'{"ScenePurposeNotes":"'+REPLICATE(CONVERT(nvarchar(max),N'界'),4500)+N'","SceneOutcomeNotes":"An explicitly entered outcome"}'; +EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Scene',@s,@v,@json; +IF (SELECT LEN(ScenePurposeNotes) FROM dbo.Scenes WHERE SceneID=@s)<>4500 THROW 51000,'Long Unicode text was truncated',1; +SELECT @v=Version FROM @r WHERE Kind='Goals';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Goals',@c,@v,N'{"GoalSummary":"Optional intention","MustInclude":"Remember this"}'; +SELECT @v=Version FROM @r WHERE Kind='Chapter';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Chapter',@c,@v,N'{"Summary":"Explicit chapter summary","ChapterPurposeID":""}'; +SELECT @v=Version FROM @r WHERE Kind='Workflow';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Workflow',@s,@v,N'{"Priority":"2","IsBlocked":"true","BlockedReason":"Author supplied blocker"}'; +IF EXISTS(SELECT 1 FROM dbo.SceneChecklistItems WHERE SceneID=@s) THROW 51000,'Workflow save seeded default checklist',1; +DECLARE @t int=(SELECT TOP(1) SceneNoteTypeID FROM dbo.SceneNoteTypes WHERE IsActive=1 ORDER BY SortOrder); +SELECT @v=Version FROM @r WHERE Kind='AddNote';SET @json=N'{"SceneNoteTypeID":"'+CONVERT(nvarchar(20),@t)+N'","NoteText":"An explicit scene note","IsPinned":"true"}';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'AddNote',0,@v,@json; +SELECT @v=Version FROM @r WHERE Kind='AddChecklist';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'AddChecklist',0,@v,N'{"ItemText":"Check this detail","IsCompleted":"false"}'; +DELETE @r;INSERT @r EXEC dbo.WriterAuthoring_Sections @u,@b,@c,@s; +SELECT @id=EntityID,@v=Version FROM @r WHERE Kind='Note';SET @json=N'{"SceneNoteTypeID":"'+CONVERT(nvarchar(20),@t)+N'","NoteText":"Edited scene note","IsResolved":"true"}';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Note',@id,@v,@json; +SELECT @id=EntityID,@v=Version FROM @r WHERE Kind='Checklist';EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Checklist',@id,@v,N'{"ItemText":"Check this detail","IsCompleted":"true"}'; +IF (SELECT RevisionStatusID FROM dbo.Scenes WHERE SceneID=@s)<>@originalStatus THROW 51000,'Supporting saves changed canonical scene state',1; +IF (SELECT COUNT(*) FROM dbo.SceneNotes WHERE SceneID=@s)<>1 OR (SELECT COUNT(*) FROM dbo.SceneChecklistItems WHERE SceneID=@s)<>1 THROW 51000,'Unexpected support records',1; +BEGIN TRY EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'Scene',@s,@old,N'{"ScenePurposeNotes":"Stale overwrite"}';END TRY BEGIN CATCH IF ERROR_NUMBER()<>51002 THROW;SET @conflict=1;END CATCH; +-- Conflict rolls back the entire outer test transaction: no fixture edits persist. +IF @@TRANCOUNT>0 ROLLBACK; +IF @conflict<>1 THROW 51000,'Stale overwrite was accepted',1; +IF EXISTS(SELECT 1 FROM dbo.SceneNotes WHERE SceneID=@s) OR EXISTS(SELECT 1 FROM dbo.SceneWorkflow WHERE SceneID=@s) OR EXISTS(SELECT 1 FROM dbo.ChapterGoals WHERE ChapterID=@c) THROW 51000,'Transactional fixture leaked',1; +DECLARE @denied bit=0; +BEGIN TRY DELETE @r;INSERT @r EXEC dbo.WriterAuthoring_Sections -1,@b,@c,@s;END TRY BEGIN CATCH IF ERROR_NUMBER()<>51000 THROW;SET @denied=1;END CATCH; +IF @denied<>1 THROW 51000,'Unauthorised read was accepted',1; +SET @denied=0;BEGIN TRY DELETE @r;INSERT @r EXEC dbo.WriterAuthoring_Sections @u,@b,@c,2147483647;END TRY BEGIN CATCH IF ERROR_NUMBER()<>51000 THROW;SET @denied=1;END CATCH; +IF @denied<>1 THROW 51000,'Cross-scope scene was accepted',1; +SELECT N'PASS transactional inline authoring: pure reads, scoped writes, long Unicode, canonical stores, no default checklist, independent status, stale rejection, rollback and access boundaries' Result; +-- A repeated create uses the original collection fingerprint and must not create a duplicate. +DELETE @r;INSERT @r EXEC dbo.WriterAuthoring_Sections @u,@b,@c,@s;SELECT @v=Version FROM @r WHERE Kind='AddNote'; +BEGIN TRANSACTION; +SET @json=N'{"SceneNoteTypeID":"'+CONVERT(nvarchar(20),@t)+N'","NoteText":"One explicit note"}'; +EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'AddNote',0,@v,@json; +SET @conflict=0;BEGIN TRY EXEC dbo.WriterAuthoring_Save @u,@b,@c,@s,'AddNote',0,@v,@json;END TRY BEGIN CATCH IF ERROR_NUMBER()<>51002 THROW;SET @conflict=1;END CATCH; +IF @@TRANCOUNT>0 ROLLBACK; +IF @conflict<>1 OR EXISTS(SELECT 1 FROM dbo.SceneNotes WHERE SceneID=@s) THROW 51000,'Duplicate-create guard failed or leaked fixture',1; +SELECT N'PASS repeated create rejects stale collection token and rolls back cleanly' Result; diff --git a/PlotLine.Tests/Sql/WriterFoundation.sql b/PlotLine.Tests/Sql/WriterFoundation.sql new file mode 100644 index 00000000..037309d8 --- /dev/null +++ b/PlotLine.Tests/Sql/WriterFoundation.sql @@ -0,0 +1,49 @@ +-- Development-only transactional fixture; migration264 must already be applied. +-- No real book, author or manuscript is changed. All inserts roll back on success or failure. +SET NOCOUNT ON; +SET XACT_ABORT ON; +IF DB_NAME() <> N'PlotDirector_Development' THROW 51000, 'Development only', 1; +BEGIN TRANSACTION; +BEGIN TRY + DECLARE @p int,@a int,@b int,@ca int,@cb int,@target int,@rev int,@time int,@confidence int; + SELECT @rev=RevisionStatusID FROM dbo.RevisionStatuses WHERE StatusName=N'Outlined'; + SELECT TOP(1) @time=TimeModeID FROM dbo.TimeModes ORDER BY SortOrder; + SELECT TOP(1) @confidence=TimeConfidenceID FROM dbo.TimeConfidences ORDER BY SortOrder; + INSERT dbo.Projects(ProjectName) VALUES(N'Writer foundation transactional regression');SET @p=SCOPE_IDENTITY(); + INSERT dbo.Books(ProjectID,BookTitle,BookNumber,SortOrder) VALUES(@p,N'Other book',1,1);SET @a=SCOPE_IDENTITY(); + INSERT dbo.Books(ProjectID,BookTitle,BookNumber,SortOrder) VALUES(@p,N'Selected book',2,2);SET @b=SCOPE_IDENTITY(); + INSERT dbo.Chapters(BookID,ChapterTitle,ChapterNumber,SortOrder,RevisionStatusID) VALUES(@a,N'Other chapter',1,1,@rev);SET @ca=SCOPE_IDENTITY(); + INSERT dbo.Chapters(BookID,ChapterTitle,ChapterNumber,SortOrder,RevisionStatusID) VALUES(@b,N'Selected chapter',1,1,@rev);SET @cb=SCOPE_IDENTITY(); + DECLARE @i int=1; + WHILE @i<=45 BEGIN + INSERT dbo.Scenes(ChapterID,SceneTitle,SceneNumber,SortOrder,RevisionStatusID,TimeModeID,TimeConfidenceID) + VALUES(@ca,N'Other outlined scene',@i,@i,@rev,@time,@confidence); SET @i+=1; + END; + INSERT dbo.Scenes(ChapterID,SceneTitle,SceneNumber,SortOrder,RevisionStatusID,TimeModeID,TimeConfidenceID) + VALUES(@cb,N'Selected target',1,1,@rev,@time,@confidence);SET @target=SCOPE_IDENTITY(); + -- Capture the procedure's complete result contract, including BookSubtitle retained for consumers. + CREATE TABLE #queue(ProjectID int,ProjectName nvarchar(200),BookID int,BookTitle nvarchar(200),BookSubtitle nvarchar(200),ChapterID int,ChapterNumber decimal(10,2),ChapterTitle nvarchar(200),SceneID int,SceneNumber decimal(10,2),SceneTitle nvarchar(200),Summary nvarchar(max),RevisionStatusID int,RevisionStatusName nvarchar(100),DraftStatus nvarchar(100),Priority int,IsBlocked bit,BlockedReason nvarchar(max),WarningCount int,RemainingChecklistCount int,UnresolvedNoteCount int,ImportantThreads nvarchar(max),PinnedNotes nvarchar(max)); + INSERT #queue EXEC dbo.WriterDashboard_Scenes @ProjectID=@p,@Queue=N'WriteNext',@BookID=@b; + IF (SELECT COUNT(*) FROM #queue)<>1 OR NOT EXISTS(SELECT 1 FROM #queue WHERE SceneID=@target AND BookID=@b) THROW 51000,'Book must filter before cap',1; + TRUNCATE TABLE #queue; + INSERT #queue EXEC dbo.WriterDashboard_Scenes @ProjectID=@p,@Queue=N'WriteNext',@BookID=@a; + IF (SELECT COUNT(*) FROM #queue)<>40 THROW 51000,'Per-book cap must remain bounded',1; + DECLARE @q nvarchar(50),@status nvarchar(50); + DECLARE queues CURSOR LOCAL FAST_FORWARD FOR SELECT * FROM(VALUES(N'ContinueWriting',N'Drafted'),(N'RevisionQueue',N'Needs Work'),(N'PolishingQueue',N'Revised')) x(q,s); + OPEN queues;FETCH NEXT FROM queues INTO @q,@status; + WHILE @@FETCH_STATUS=0 BEGIN + UPDATE dbo.Scenes SET RevisionStatusID=(SELECT RevisionStatusID FROM dbo.RevisionStatuses WHERE StatusName=@status) WHERE SceneID=@target; + TRUNCATE TABLE #queue;INSERT #queue EXEC dbo.WriterDashboard_Scenes @ProjectID=@p,@Queue=@q,@BookID=@b; + IF NOT EXISTS(SELECT 1 FROM #queue WHERE SceneID=@target AND RevisionStatusName=@status) THROW 51000,'Canonical queue status mismatch',1; + FETCH NEXT FROM queues INTO @q,@status; + END;CLOSE queues;DEALLOCATE queues; + INSERT dbo.SceneWorkflow(SceneID,IsBlocked) VALUES(@target,1); + TRUNCATE TABLE #queue;INSERT #queue EXEC dbo.WriterDashboard_Scenes @ProjectID=@p,@Queue=N'Blocked',@BookID=@b; + IF NOT EXISTS(SELECT 1 FROM #queue WHERE SceneID=@target) THROW 51000,'Legacy blocked queue must remain available',1; + ROLLBACK; + SELECT N'PASS scoped cap, four canonical queues and legacy blocked compatibility; fixture rolled back' Result; +END TRY +BEGIN CATCH + IF @@TRANCOUNT>0 ROLLBACK; + THROW; +END CATCH; diff --git a/PlotLine.Tests/ToolbarBrowserHost.cs b/PlotLine.Tests/ToolbarBrowserHost.cs index d96628af..7186a99d 100644 --- a/PlotLine.Tests/ToolbarBrowserHost.cs +++ b/PlotLine.Tests/ToolbarBrowserHost.cs @@ -92,6 +92,20 @@ internal static class ToolbarBrowserHost WriteNext = [new() { ProjectID = 7, BookID = 12, BookTitle = "A Distant Shore", ChapterID = 21, ChapterNumber = 1, SceneID = 101, SceneNumber = 1, SceneTitle = "The crossing", RevisionStatusName = "Outlined", Summary = "A synthetic writing task." }] }; + private static WriterDashboardViewModel Writer3Fixture(HttpContext context) + { + var model = WriterFixture(); + var book = int.TryParse(context.Request.Query["bookId"], out var requested) ? requested : 12; + model.BookID = book; + model.Book = new(){BookID=book,ProjectID=7,BookTitle=book==12?"A Distant Shore":"The Return",ChapterCount=book==12?2:0,SceneCount=book==12?2:0,CurrentWordCount=book==12?12400:0}; + if(book==12){ + model.ObjectiveChoices=[new(){ChapterID=21,ChapterTitle="The crossing",SceneID=31,SceneTitle="Arrival"},new(){ChapterID=22,ChapterTitle="The harbour",SceneID=32,SceneTitle="Departure"}]; + if(context.Request.Query["objective"]=="true")model.Objective=new(){BookID=12,ChapterID=21,SceneID=context.Request.Query["chapterOnly"]=="true"?null:31,Activity="Revising",ChapterTitle="The crossing",SceneTitle="Arrival"}; + if(context.Request.Query["populated"]=="true")model.Activity=new(){BookID=12,Totals=new(){Added=120,Removed=30,HasAcceptedEvidence=true,RecordedEvents=2}}; + }else model.WriteNext=[]; + return model; + } + private static async Task RenderFullAsync(HttpContext context, string controller, string actionName, object model) { context.Request.RouteValues["controller"] = controller; @@ -130,8 +144,15 @@ internal static class ToolbarBrowserHost FixtureProxy((name, args) => name == "ListByProjectAsync" ? Task.FromResult>([new() { BookID = 12, ProjectID = 7, BookTitle = "A Distant Shore" }, new() { BookID = 13, ProjectID = 7, BookTitle = "The Return" }]) : throw new NotSupportedException(name)), services.GetRequiredService())); + builder.Services.AddSingleton(FixtureProxy((name,args)=>name switch { + "ListByProjectAsync" => Task.FromResult>([new(){BookID=12,ProjectID=7,BookTitle="A Distant Shore"},new(){BookID=13,ProjectID=7,BookTitle="The Return"}]), + "GetAsync" => Task.FromResult((int)args![0]! is 12 or 13 ? new(){BookID=(int)args[0]!,ProjectID=7,BookTitle=(int)args[0]! == 12?"A Distant Shore":"The Return"} : null), + _ => throw new NotSupportedException(name) + })); + builder.Services.AddSingleton(FixtureProxy((name,args)=>Task.FromResult(name=="CanAccessProjectAsync"?(int)args![0]! == 7:(int)args![1]! is 12 or 13 or 21 or 22 or 31 or 32))); + builder.Services.AddSingleton(); builder.Services.AddScoped(services => FixtureProxy((name, args) => name switch { - "GetDashboardAsync" => Task.FromResult(WriterFixture()), + "GetDashboardAsync" => Task.FromResult(Writer3Fixture(services.GetRequiredService().HttpContext!)), "GetChapterWorkflowAsync" => Task.FromResult(new() { Project = new() { ProjectID = 7, ProjectName = "The Glass Harbour" }, Book = new() { BookID = 12, ProjectID = 7, BookTitle = "A Distant Shore" }, @@ -186,7 +207,7 @@ internal static class ToolbarBrowserHost model.Work=new(){BookID=12,Year=2026,Month=11,Days=[new(){Day=new(2026,11,14),Added=2000,Removed=2000,Changes=4,Editing=1,EngagedSeconds=300},new(){Day=new(2026,11,15),AudioReview=1,PlaybackSeconds=600}]}; } model.Workspace=context.Request.Query["workspace"].ToString() is "Revision"?"Revision":"WriteNext"; - await RenderFullAsync(context,"Writer","Index",model); + await RenderFullAsync(context,"Writer","Legacy",model); }); app.Urls.Add(Environment.GetEnvironmentVariable("PD_BROWSER_FIXTURE_URL") ?? "http://127.0.0.1:5238"); app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(Path.GetFullPath("PlotLine/wwwroot")) }); @@ -327,7 +348,7 @@ internal static class ToolbarBrowserHost { if (context.Request.Query["page"] == "writer" && context.Request.Query["layout"] == "full") { - await RenderFullAsync(context, "Writer", "Index", WriterFixture()); + await RenderFullAsync(context, "Writer", "Legacy", WriterFixture()); return; } var model = new ApplicationNavigationViewModel { ActiveSection = "Calendar", ShowCompanionPresence = true }; @@ -375,7 +396,7 @@ internal static class ToolbarBrowserHost await scripts(); } - if (name == "Writer/Index" && view.View is Microsoft.AspNetCore.Mvc.Razor.RazorView writerView + if (name == "Writer/Legacy" && view.View is Microsoft.AspNetCore.Mvc.Razor.RazorView writerView && writerView.RazorPage.SectionWriters.TryGetValue("Scripts", out var writerSection)) { using var scriptWriter = new StringWriter(); @@ -580,7 +601,7 @@ internal static class ToolbarBrowserHost }); } if (context.Request.Query["page"] == "writer") - surface = await Render("Writer/Index", WriterFixture()); + surface = await Render("Writer/Legacy", WriterFixture()); if (fullLayout) { if (fullView is null || fullModel is null) throw new InvalidOperationException("Full-layout fixture requires a page model."); diff --git a/PlotLine.Tests/WriterAuthoringFixture.cs b/PlotLine.Tests/WriterAuthoringFixture.cs new file mode 100644 index 00000000..e466d899 --- /dev/null +++ b/PlotLine.Tests/WriterAuthoringFixture.cs @@ -0,0 +1,10 @@ +using System.Text.Json; +using PlotLine.Models; +using PlotLine.Services.Writer; +internal sealed class WriterAuthoringFixture:IWriterAuthoringService +{ + private readonly object gate=new();private readonly Dictionary rows=new();private int next=100; + public WriterAuthoringFixture(){foreach(var kind in new[]{"Chapter","Goals","Scene","Workflow","AddNote","AddChecklist"}){var id=kind.StartsWith("Add")?0:kind is "Chapter" or "Goals"?21:31;rows[$"{kind}-{id}"]=new(){Kind=kind,EntityID=id,Data=kind=="Scene"?"{\"ScenePurposeNotes\":\"A recorded scene intention\",\"SceneOutcomeNotes\":\"A recorded outcome\"}":kind=="Goals"?"{\"GoalSummary\":\"A recorded chapter intention\"}":"{}",Version=Guid.NewGuid().ToString("N")};}} + public Task Read(int actor,int book,int chapter,int? scene){lock(gate){if(book!=12||chapter!=21||scene is not(null or 31))throw new KeyNotFoundException();return Task.FromResult(new WriterAuthoringPage{BookID=12,ChapterID=21,SceneID=scene,Chapter=new(){BookID=12,ChapterID=21,ChapterTitle="The crossing",RevisionStatusName="Outlined"},Scene=scene.HasValue?new(){BookID=12,ChapterID=21,SceneID=31,SceneTitle="Arrival",RevisionStatusName="Outlined",PrimaryLocationName="Recorded harbour"}:null,Scenes=[new(){SceneID=31,ChapterID=21,BookID=12,SceneTitle="Arrival",RevisionStatusName="Outlined"}],Characters=scene.HasValue?[new(){CharacterName="Fixture character"}]:[],Sections=rows.Values.Where(s=>scene.HasValue||s.Kind is "Chapter" or "Goals").Select(s=>new AuthoringSection{BookID=12,ChapterID=21,SceneID=scene,Kind=s.Kind,EntityID=s.EntityID,Data=s.Data,Version=s.Version,Purposes=[("1","Introduce a change")],NoteTypes=[("1","Drafting note")]}).ToArray()});}} + public Task Save(int actor,int book,int chapter,int? scene,string kind,int entity,string version,IReadOnlyDictionary values){lock(gate){if(book!=12||chapter!=21||scene is not(null or 31))throw new KeyNotFoundException();var error=AuthoringSchema.Validate(kind,values);if(error!=null)throw new ArgumentException(error);var key=$"{kind}-{entity}";if(!rows.TryGetValue(key,out var row))throw new KeyNotFoundException();if(row.Version!=version)throw new AuthoringConflictException("Recorded information changed; your text is retained.");if(kind.StartsWith("Add")){var k=kind=="AddNote"?"Note":"Checklist";var id=next++;rows[$"{k}-{id}"]=new(){Kind=k,EntityID=id,Data=JsonSerializer.Serialize(values),Version=Guid.NewGuid().ToString("N")};row.Version=Guid.NewGuid().ToString("N");}else{row.Data=JsonSerializer.Serialize(values);row.Version=Guid.NewGuid().ToString("N");}return Task.CompletedTask;}} +} diff --git a/PlotLine.Tests/WriterAuthoringTests.cs b/PlotLine.Tests/WriterAuthoringTests.cs new file mode 100644 index 00000000..271a05af --- /dev/null +++ b/PlotLine.Tests/WriterAuthoringTests.cs @@ -0,0 +1,16 @@ +using PlotLine.Models; +internal static class WriterAuthoringTests +{ + public static void Run(){void Check(bool ok,string name){if(!ok)throw new Exception(name);Console.WriteLine("PASS Writer authoring "+name);} + Check(AuthoringSchema.Validate("Note",new Dictionary{{"SceneNoteTypeID","1"},{"NoteText",""}})!=null,"blank notes are rejected"); + Check(AuthoringSchema.Validate("Checklist",new Dictionary{{"ItemText",new string('x',301)}})!=null,"reminder length is bounded"); + Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"Priority","11"}})!=null,"priority range is enforced"); + Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"DraftedDate","2026-02-30"}})!=null,"invalid calendar dates are rejected"); + Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"EstimatedWordCount","-2"}})!=null,"negative counts are rejected"); + Check(AuthoringSchema.Validate("Scene",new Dictionary{{"ScenePurposeNotes"," — Unicode"}})==null,"ordinary author text remains text, not generated markup"); + Check(AuthoringSchema.Validate("Goals",new Dictionary())==null,"chapter intentions remain optional"); + Check(new AuthoringSection{Kind="Goals",Data="[]"}.Value("GoalSummary")=="","missing optional records render as empty values"); + Check(AuthoringSchema.Validate("Scene",new Dictionary{{"ScenePurposeNotes",new string('界',25000)}})==null,"canonical unbounded supporting text is not arbitrarily truncated"); + Check(AuthoringSchema.Validate("Unknown",new Dictionary())!=null,"unknown editor types are rejected"); + } +} diff --git a/PlotLine.Tests/WriterDashboardTests.cs b/PlotLine.Tests/WriterDashboardTests.cs index 67cbd618..86024ce0 100644 --- a/PlotLine.Tests/WriterDashboardTests.cs +++ b/PlotLine.Tests/WriterDashboardTests.cs @@ -25,7 +25,7 @@ internal static class WriterDashboardTests Check(await controller.ScheduleSetup(99, 3) is NotFoundResult, "plan setup refuses conflicting project and book"); allowed=false;Check(await controller.Index(null,3) is NotFoundResult,"book-only deep link checks access before metadata"); Check(controller.LegacyWrite(1,3) is RedirectToActionResult redirect&&(int?)redirect.RouteValues!["bookId"]==3,"legacy Write redirect preserves book scope"); - var ribbon=ApplicationRibbon.Categories.Single(c=>c.Key=="writer");Check(ribbon.Groups.SelectMany(g=>g.Commands).Any(c=>c.Action=="Workspaces")&&ribbon.Groups.SelectMany(g=>g.Commands).Any(c=>c.Controller=="WritingActivity"),"Writer contextual commands target implemented workspaces and evidence"); + var commands=WriterNavigation.RibbonGroups("Reflect").SelectMany(g=>g.Commands);Check(commands.Any(c=>c.Action=="Workspaces")&&commands.Any(c=>c.Controller=="WritingActivity"),"Writer contextual commands target implemented workspaces and evidence"); } private static T Proxy(Func action)where T:class {var value=DispatchProxy.Create();((WriterProxy)(object)value).Action=action;return value;} public class WriterProxy:DispatchProxy diff --git a/PlotLine.Tests/WriterFoundationTests.cs b/PlotLine.Tests/WriterFoundationTests.cs new file mode 100644 index 00000000..0423a80a --- /dev/null +++ b/PlotLine.Tests/WriterFoundationTests.cs @@ -0,0 +1,89 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewFeatures; +using PlotLine.Controllers; +using PlotLine.Data; +using PlotLine.Models; +using PlotLine.Services; +using PlotLine.Services.Writer; +using PlotLine.ViewModels; + +internal static class WriterFoundationTests +{ + public static async Task Run() + { + void Check(bool ok, string text) { if (!ok) throw new Exception(text); Console.WriteLine("PASS Writer foundation " + text); } + var working = new WriterSelection(1, 2, 10, 20); + var context = new WriterContext(1, 2).Select(WriterFocusRole.Working, working) + .Select(WriterFocusRole.SavedObjective, working) + .Select(WriterFocusRole.Exploration, new(1, 2, 11, 21)) + .Select(WriterFocusRole.PinnedReference, new(1, 2, 12, 22)) + .Select(WriterFocusRole.Reader, new(1, 2, 13)) + .Select(WriterFocusRole.Session, new(1, 2, 14)); + context = context.WithVerifiedWord(new(new(1, 2, 15, 25), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), 4, 3)); + Check(context.Working == working && context.SavedObjective == working && context.Reader!.ChapterID == 13 && context.Session!.ChapterID == 14 && context.VerifiedWord!.Selection.SceneID == 25, + "reference, Reader, session and verified Word selections never overwrite working focus"); + var refused = false; + try { context.Select(WriterFocusRole.Exploration, new(1, 3, 11)); } catch (ArgumentException) { refused = true; } + Check(refused, "cross-book selections require a separate authorised context"); + refused = false; try { _ = new WriterSelection(1, 2, null, 20); } catch (ArgumentException) { refused = true; } + Check(refused, "a scene cannot be projected without its chapter"); + refused = false; try { context.WithVerifiedWord(new(working, Guid.Empty, Guid.NewGuid(), Guid.NewGuid(), 4, 3)); } catch (ArgumentException) { refused = true; } + Check(refused, "incomplete native identity cannot be projected as verified"); + + T Proxy(Func f) where T : class => NativeWorkflowTests.Proxy(f); + var user = Proxy((n,a) => n == "get_UserId" ? (int?)7 : throw new Exception(n)); + var projects = Proxy((n,a) => n == "ListForUserAsync" ? Task.FromResult>([new(){ProjectID=1}]) : throw new Exception(n)); + var books = Proxy((n,a) => throw new Exception(n)); + var chapters = Proxy((n,a) => throw new Exception(n)); + var scopes = new List(); + var repository = Proxy((n,a) => n switch + { + "GetWriterDashboardScenesAsync" => Queue(a), + "GetWriterDashboardRemindersAsync" => Task.FromResult>([]), + _ => throw new Exception(n) + }); + Task> Queue(object?[]? args) + { + scopes.Add((int?)args![2]); + return Task.FromResult>([new(){BookID=3, SceneID=99}]); + } + await new WriterWorkspaceService(projects, books, chapters, repository, user).GetDashboardAsync(1, 3); + Check(scopes.Count == 4 && scopes.All(x => x == 3), "selected book reaches every queue repository before any result limit"); + scopes.Clear(); + await new WriterWorkspaceService(projects, books, chapters, repository, user).GetDashboardAsync(999, 3); + Check(scopes.Count == 0, "inaccessible project never reaches a queue repository"); + + var missingStory = Proxy((n,a) => Task.FromResult(null)); + var references = new WritingController(missingStory, null!, null!, Proxy((n,a)=>throw new Exception(n)), Microsoft.Extensions.Logging.Abstractions.NullLogger.Instance); + var missing = (ViewResult)await references.Context(1,2,null,999,null,pinned:true); + Check(((WritingContextPageViewModel)missing.Model!).WorkingContext == null, "unresolved route scene never becomes a pinned authorised selection"); + + var plans = new WritingPlanSummary[] { new(){WritingPlanID=1,ProjectID=1,BookID=2}, new(){WritingPlanID=2,ProjectID=1,BookID=3}, new(){WritingPlanID=3,ProjectID=1,BookID=null}, new(){WritingPlanID=4,ProjectID=9,BookID=99} }; + var scheduleRepo = Proxy((n,a) => n switch + { + "GetWritingPlanSummariesByUserAsync" => Task.FromResult>(plans), + "GetPlansRequiringRebalanceAsync" => Task.FromResult>([]), + "GetSchedulePreviewItemsAsync" => Task.FromResult>([]), + _ => throw new Exception(n) + }); + var service = new WritingScheduleService(scheduleRepo, projects, books, user); + var preview = await service.GetSchedulePreviewAsync(null, 1, 3); + Check(preview.SelectedWritingPlanID == 2 && preview.Plans.Select(x=>x.WritingPlanID).SequenceEqual([2,3]) && preview.BookID == 3, + "Preview chooses within the selected book and preserves All Books plans"); + Check((await service.GetSchedulePreviewAsync(1, 1, 3)).SelectedPlan == null, "explicit out-of-scope plan cannot silently select another book"); + Check((await service.GetSchedulePreviewAsync(null, 1, 88)).Plans.Single().WritingPlanID == 3, "new book may still use its project-wide plan"); + + var schedule = Proxy((n,a) => n == "RegenerateScheduleAsync" ? Task.FromResult>([]) : Task.CompletedTask); + var controller = new WriterController(Proxy((n,a)=>throw new Exception(n)), schedule) + { TempData = new TempDataDictionary(new DefaultHttpContext(), new MemoryTempData()) }; + foreach (var response in new[] { await controller.ActivateWritingPlan(2,1,3), await controller.DeactivateWritingPlan(2,1,3), await controller.DeleteWritingPlan(2,1,3), await controller.RegenerateWritingPlanSchedule(2,1,3) }) + Check(response is RedirectToActionResult redirect && (int?)redirect.RouteValues!["bookId"] == 3 && (int?)redirect.RouteValues["projectId"] == 1, + "plan management action retains the requesting list scope"); + } + private sealed class MemoryTempData : ITempDataProvider + { + public IDictionary LoadTempData(HttpContext context) => new Dictionary(); + public void SaveTempData(HttpContext context, IDictionary values) { } + } +} diff --git a/PlotLine.Tests/WriterNavigationTests.cs b/PlotLine.Tests/WriterNavigationTests.cs new file mode 100644 index 00000000..3de8145e --- /dev/null +++ b/PlotLine.Tests/WriterNavigationTests.cs @@ -0,0 +1,57 @@ +using Microsoft.AspNetCore.Mvc; +using PlotLine.Controllers; +using PlotLine.Data; +using PlotLine.Models; +using PlotLine.Services; +using PlotLine.ViewModels; + +internal static class WriterNavigationTests +{ + public static async Task Run() + { + void Check(bool ok,string why){if(!ok)throw new Exception(why);Console.WriteLine("PASS Writer navigation "+why);} + Check(PlotLine.Services.Writer.WriterFocusActivities.SessionKind("Drafting")=="Writing" && PlotLine.Services.Writer.WriterFocusActivities.SessionKind("Researching")=="Planning" && PlotLine.Services.Writer.WriterFocusActivities.SessionKind("Revising")=="Editing", "objective activity mappings use supported session types"); + Check(PlotLine.Services.Writer.WriterFocusActivities.SessionKind("Proofreading")==null && PlotLine.Services.Writer.WriterFocusActivities.SessionKind("Unknown")==null, "ambiguous or unsupported recording activity requires explicit compatible choice"); + Check(!PlotLine.Services.Writer.WriterFocusActivities.ObjectiveKinds.Contains("AudioReview") && PlotLine.Services.Writer.WriterFocusActivities.SessionKind("AudioReview")=="AudioReview", "session-only activities never become objective types"); + var allowed=true;int reads=0; + var workspace=NativeWorkflowTests.Proxy((n,a)=> + { + if(n!="GetDashboardAsync")throw new Exception("Navigation attempted a write or workflow initialisation: "+n); + reads++; + return Task.FromResult(new WriterDashboardViewModel{ProjectID=7,Objective=(int?)a![1]==12?new(){BookID=12,ChapterID=21,SceneID=31,SceneTitle="Saved scene",Activity="Revising"}:null}); + }); + var books=NativeWorkflowTests.Proxy((n,a)=>n switch{ + "ListByProjectAsync"=>Task.FromResult>([new(){BookID=12,ProjectID=7,BookTitle="First"},new(){BookID=13,ProjectID=7,BookTitle="Second"}]), + "GetAsync"=>Task.FromResult((int)a![0]! is 12 or 13?new(){BookID=(int)a[0]!,ProjectID=7}:null), + _=>throw new Exception(n)}); + var schedules=NativeWorkflowTests.Proxy((n,a)=>n=="GetTodayDashboardAsync"?Task.FromResult(new WritingScheduleDashboardViewModel()):throw new Exception("Navigation attempted schedule mutation "+n)); + var access=NativeWorkflowTests.Proxy((n,a)=>Task.FromResult(allowed)); + var controller=new WriterController(workspace,schedules,books,access); + var routes=new Dictionary>>{ + ["Home"]=b=>controller.Index(7,b),["Write"]=b=>controller.Write(7,b),["Explore"]=b=>controller.Explore(7,b), + ["Plan"]=b=>controller.Plan(7,b),["Review"]=b=>controller.Review(7,b),["Reflect"]=b=>controller.Reflect(7,b),["Dashboard"]=b=>controller.Dashboard(7,b)}; + foreach(var (destination,load) in routes){ + var first=(ViewResult)await load(12);var model=(WriterDashboardViewModel)first.Model!; + Check(model.Destination==destination&&model.BookID==12&&model.WorkingContext?.Working?.SceneID==31,"destination "+destination+" preserves authorised book and saved working focus"); + var second=(ViewResult)await load(13);model=(WriterDashboardViewModel)second.Model!; + Check(model.BookID==13&&model.Objective==null&&model.WorkingContext?.Working==null,"destination "+destination+" never carries a focus into another book"); + Check(await load(999) is NotFoundResult,"destination "+destination+" refuses unavailable book"); + } + Check(((ViewResult)await controller.Index(7,12,workspace:"Revision")).ViewName=="Legacy"&&((ViewResult)await controller.Index(7,12,journey:true)).ViewName=="Legacy","legacy query routes still reach their actual workspaces/calendar"); + Check(((WriterDashboardViewModel)((ViewResult)await controller.Index(7,12,setup:true)).Model!).Destination=="Write","old objective setup URL reaches Write"); + Check(((ViewResult)await controller.Workspaces(7,12)).ViewName=="Legacy"&&((ViewResult)await controller.Journey(7,12)).ViewName=="Legacy"&&((ViewResult)await controller.Overview(7,12)).ViewName=="Legacy","full legacy desk, Journey and Workspaces remain rendered, not retired"); + allowed=false;Check(await controller.Write(null,12) is NotFoundResult&&await controller.Explore(null,12) is NotFoundResult,"book-only new route checks access before metadata"); + foreach(var destination in WriterNavigation.Destinations){ + Check(WriterNavigation.BookSwitchAction(destination)==destination,"book switching retains "+destination+" without chapter parameters"); + var groups=WriterNavigation.RibbonGroups(destination); + Check(groups[0].Commands.Select(x=>x.Action).SequenceEqual(new[]{"Index","Write","Explore","Plan","Review","Reflect"}),"single existing ribbon exposes all destinations on "+destination); + } + Check(WriterNavigation.BookSwitchAction("write")=="Write" && WriterNavigation.DestinationForAction("schedulepreview")=="Plan","case-insensitive bookmarked routes retain destination context"); + Check(WriterNavigation.BookSwitchAction("SaveObjective")=="Index","book menu never navigates to a mutation action"); + var noBooks=NativeWorkflowTests.Proxy((n,a)=>n=="GetDashboardAsync"?Task.FromResult(new WriterDashboardViewModel()):throw new Exception("Empty-book navigation attempted a write")); + var empty=new WriterController(noBooks,schedules); + Check(((WriterDashboardViewModel)((ViewResult)await empty.Index(null)).Model!).BookID==null,"new author Home has no fabricated book selection"); + Check(((WriterDashboardViewModel)((ViewResult)await empty.Explore(null)).Model!).Destination=="Explore","exploration does not require scenes, plans, project or Word"); + Check(reads>0,"real read paths exercised without calling author-data writes"); + } +} diff --git a/PlotLine.Tests/WriterWordTests.cs b/PlotLine.Tests/WriterWordTests.cs new file mode 100644 index 00000000..766cb9bf --- /dev/null +++ b/PlotLine.Tests/WriterWordTests.cs @@ -0,0 +1,36 @@ +using PlotDirector.Companion.Protocol; +using PlotLine.Data; +using PlotLine.Models; +using PlotLine.Services.Writer; +using PlotLine.Services.NativeCompanion; +internal static class WriterWordTests +{ + private sealed class Clock:TimeProvider{public DateTimeOffset Now=DateTimeOffset.UtcNow;public override DateTimeOffset GetUtcNow()=>Now;} + public static async Task Run() + { + void Check(bool value,string message){if(!value)throw new Exception(message);} + var clock=new Clock();var store=new NativePresenceStore(clock);var instance=Guid.NewGuid();var session=Guid.NewGuid();var manuscript=Guid.NewGuid();long sequence=0; + NativePresence State(bool capable=true,long revision=2)=>new(){BookId=12,ManuscriptId=manuscript,Revision=revision,Sequence=++sequence,WordSaved=true,WordAvailable=true,CanAcknowledgeNavigation=capable,DocumentTitle="Disposable document"}; + void Put(NativePresence p)=>Check(store.Put(7,"grant",clock.Now.AddHours(1),instance,session,p),"heartbeat"); + Put(State(false));var id=Guid.NewGuid();Check(!store.Navigate(7,12,instance,session,manuscript,2,100,true,id,true),"old clients cannot promise confirmed navigation"); + Put(State());Check(store.Navigate(7,12,instance,session,manuscript,2,100,true,id,true),"exact capable saved document accepts explicit navigation");Check(store.NavigationState(7,12,instance,session,id)=="requested","queued is not completed");Check(!store.Navigate(7,12,instance,session,manuscript,2,200,true,Guid.NewGuid(),true),"another window cannot replace pending navigation"); + var command=store.TakeNavigation(7,"grant",instance,session)!;Check(command.Id==id&&command.ManuscriptId==manuscript&&command.BookId==12,"wire command carries exact identity and expiry");Check(NavigationPolicy.Current(command,session,2,manuscript,clock.Now.UtcDateTime,true)&&!NavigationPolicy.Current(command,session,2,Guid.NewGuid(),clock.Now.UtcDateTime,true)&&!NavigationPolicy.Current(command,session,2,manuscript,clock.Now.UtcDateTime,false),"adapter rejects replaced or unsaved document");Check(!NavigationPolicy.Current(command,session,3,manuscript,clock.Now.UtcDateTime,true)&&!NavigationPolicy.Current(command,Guid.NewGuid(),2,manuscript,clock.Now.UtcDateTime,true),"adapter rejects revision and session changes"); + var wrong=State();wrong.NavigationAcknowledgedId=Guid.NewGuid();wrong.NavigationResult="completed";Put(wrong);Check(store.NavigationState(7,12,instance,session,id)=="requested","uncorrelated ack ignored");var ack=State();ack.NavigationAcknowledgedId=id;ack.NavigationResult="completed";Put(ack);Check(store.NavigationState(7,12,instance,session,id)=="completed","only matching authenticated native ack completes");Check(store.NavigationState(8,12,instance,session,id)==null&&store.NavigationState(7,13,instance,session,id)==null,"receipt author/book isolation"); + id=Guid.NewGuid();Check(store.Navigate(7,12,instance,session,manuscript,2,100,true,id,true),"next explicit request");clock.Now=clock.Now.AddSeconds(26);Check(store.TakeNavigation(7,"grant",instance,session)==null&&store.NavigationState(7,12,instance,session,id)=="timed-out","expired queue cannot execute later");Check(!NavigationPolicy.Current(command,session,2,manuscript,clock.Now.UtcDateTime,true),"UI queue expiry enforced");Put(State());id=Guid.NewGuid();Check(store.Navigate(7,12,instance,session,manuscript,2,100,true,id,true),"reconnect request");Put(State(revision:3));Check(store.TakeNavigation(7,"grant",instance,session)==null&&store.NavigationState(7,12,instance,session,id)=="invalidated","changed revision invalidates old queue and receipt"); + // Exercise actual authorised chapter/scene resolver with procedure proxies: any unexpected call fails. + store.Remove(7,"grant",instance,session);Put(State());var heading=Guid.NewGuid();var scene=Guid.NewGuid();var snapshot=new ParagraphManuscript{BookId=12,ManuscriptId=manuscript,SessionId=session,WordRevision=2,Revision=5,Chapters=[new(){CanonicalId=21,HeadingId=heading}],Scenes=[new(){Id=scene,CanonicalId=31,ChapterId=21}],Paragraphs=[new(){PositionVerified=true,Occurrence=new(){Id=heading,Start=0}},new(){PositionVerified=true,Story=true,SceneId=scene,Occurrence=new(){Id=Guid.NewGuid(),Start=100,Ordinal=1}}]}; + var access=NativeWorkflowTests.Proxy((n,a)=>n=="GetBookStructureAsync"?Task.FromResult(new(){BookId=12,Chapters=[new(){ChapterId=21,Scenes=[new(){SceneId=31}]}]}):throw new Exception(n)); + var repo=NativeWorkflowTests.Proxy((n,a)=>n switch{"Get"=>Task.FromResult(snapshot),"Position"=>Task.FromResult(new(){HasSnapshot=true,Revision=5,ChapterID=21,SceneID=(int)a![5]! ==100?31:null}),_=>throw new Exception(n)}); + var checkpoints=NativeWorkflowTests.Proxy((n,a)=>throw new Exception("unexpected checkpoint operation "+n));var service=new WriterWordService(null!,access,repo,checkpoints,store); + Check(!await service.Navigate(7,12,99,null,instance,session,manuscript,2,Guid.NewGuid()),"foreign chapter rejected before native queue");Check(!await service.Navigate(7,12,21,999,instance,session,manuscript,2,Guid.NewGuid()),"foreign scene rejected");Check(await service.Navigate(7,12,21,null,instance,session,manuscript,2,Guid.NewGuid()),"authorised exact canonical chapter heading navigates without scene guesses"); + var queued=store.TakeNavigation(7,"grant",instance,session)!;var completed=State();completed.NavigationAcknowledgedId=queued.Id;completed.NavigationResult="completed";Put(completed); + var sceneRequest=Guid.NewGuid();Check(await service.Navigate(7,12,21,31,instance,session,manuscript,2,sceneRequest),"verified canonical scene start navigates without title matching");store.TakeNavigation(7,"grant",instance,session);completed=State();completed.NavigationAcknowledgedId=sceneRequest;completed.NavigationResult="completed";Put(completed); + var modern=State();modern.CanChapterSync=true;Put(modern);bool currentCheckpoint=false; + var liveCheckpoints=NativeWorkflowTests.Proxy((n,a)=>n switch{ + "List"=>Task.FromResult>([new(){ChapterID=21,SessionID=session,WordRevision=2,StartPosition=200}]), + "Position"=>Task.FromResult(new(){HasSnapshot=true,Revision=currentCheckpoint?5:4,ChapterID=21}),_=>throw new Exception(n)}); + service=new WriterWordService(null!,access,repo,liveCheckpoints,store);Check(!await service.Navigate(7,12,21,null,instance,session,manuscript,2,Guid.NewGuid()),"list row alone cannot navigate with stale accepted checkpoint hashes");currentCheckpoint=true;Check(await service.Navigate(7,12,21,null,instance,session,manuscript,2,Guid.NewGuid()),"reopened chapter uses checked live position rather than old absolute heading offset"); + var watch=System.Diagnostics.Stopwatch.StartNew();for(int i=0;i<10000;i++)Check(NavigationPolicy.Current(command,session,2,manuscript,command.ExpiresUtc.AddSeconds(-1),true),"navigation fence");watch.Stop();Console.WriteLine($"MEASURE 10000 navigation execution gates: {watch.Elapsed.TotalMilliseconds:F2}ms; pure managed checks, no Word/COM benchmark."); + + } +} diff --git a/PlotLine.Tests/WritingIntegrationTests.cs b/PlotLine.Tests/WritingIntegrationTests.cs index a01b78c6..828f1aad 100644 --- a/PlotLine.Tests/WritingIntegrationTests.cs +++ b/PlotLine.Tests/WritingIntegrationTests.cs @@ -107,6 +107,7 @@ internal static class WritingIntegrationTests {ControllerContext=new(){HttpContext=new DefaultHttpContext{User=new ClaimsPrincipal(new ClaimsIdentity([new Claim(ClaimTypes.NameIdentifier,"7")],"fixture"))}}}; Beat(); var page=(WritingContextPageViewModel)((ViewResult)await controller.Context(1,2,null,null,null,instanceId:instance,sessionId:session)).Model!; + Check(page.WorkingContext?.VerifiedWord?.Selection.SceneID==20 && page.WorkingContext.Working==null,"Verified native projection leaves working focus independent"); Check(page.SceneID==20&&page.Display!.HasScene&&page.Display.FollowStatus=="Following Word","Native launch opens its exact verified scene rather than the book's first scene"); var before=JsonSerializer.Serialize(new{scene.ScenePurposeNotes,scene.SceneOutcomeNotes,goal}); var intent=(WritingIntentPageViewModel)((ViewResult)await controller.Intent(1,2,null,null,null,instanceId:instance,sessionId:session)).Model!; diff --git a/PlotLine/Controllers/ManuscriptReaderController.cs b/PlotLine/Controllers/ManuscriptReaderController.cs index b756ec0b..c7309c6a 100644 --- a/PlotLine/Controllers/ManuscriptReaderController.cs +++ b/PlotLine/Controllers/ManuscriptReaderController.cs @@ -40,7 +40,7 @@ public sealed class ManuscriptReaderController(ManuscriptReaderService reader, I { if (bookId <= 0 || chapterId <= 0 || knownVersion is null || knownVersion.Length != 64) return NotFound(); var change = await reader.Check(user, bookId, chapterId, knownRevision, knownVersion); - return change is null ? NotFound() : Json(new { revision = change.Revision.ToString(System.Globalization.CultureInfo.InvariantCulture), changed = change.Changed, version = change.Version }); + return change is null ? NotFound() : Json(new { revision = change.Revision.ToString(System.Globalization.CultureInfo.InvariantCulture), changed = change.Changed, version = change.Version,lastSuccessfulSyncUtc=change.LastSuccessfulSyncUtc?.ToString("yyyy-MM-ddTHH:mm:ssZ"),snapshotCapturedUtc=change.SnapshotCapturedUtc?.ToString("yyyy-MM-ddTHH:mm:ssZ") }); }); [HttpGet("chapter")] diff --git a/PlotLine/Controllers/NativePresenceController.cs b/PlotLine/Controllers/NativePresenceController.cs index 5ed72a74..9a17015d 100644 --- a/PlotLine/Controllers/NativePresenceController.cs +++ b/PlotLine/Controllers/NativePresenceController.cs @@ -37,7 +37,7 @@ public sealed class NativePresenceController(NativePresenceStore presence,IWordC if(!presence.Put(Author,Grant,Expires,instance,session,input))return Conflict(new{message="Stale, revoked or invalid native session."}); if(before==null||before.Position.ChapterId!=input.ChapterId||before.Position.SceneId!=input.SceneId||before.Position.WordSaved!=input.WordSaved||before.Position.Revision!=input.Revision) logger?.LogInformation("Native cursor observation User={User} Book={Book} Instance={Instance} Session={Session} Sequence={Sequence} Manuscript={Manuscript} WordRevision={WordRevision} Saved={Saved} Cursor={Cursor} Chapter={Chapter} Scene={Scene} ParagraphSnapshot={HasSnapshot} ParagraphRevision={ParagraphRevision}; observation does not request navigation",Author,input.BookId,instance,session,input.Sequence,input.ManuscriptId,input.Revision,input.WordSaved,input.CursorStart,input.ChapterId,input.SceneId,paragraphPosition?.HasSnapshot,paragraphPosition?.Revision); - if(live!=null&&(before==null||before.Position.BookId!=input.BookId||before.Position.ManuscriptId!=input.ManuscriptId||before.Position.Revision!=input.Revision||before.Position.ChapterId!=input.ChapterId||before.Position.SceneId!=input.SceneId||before.Position.Active!=input.Active||before.Position.WordAvailable!=input.WordAvailable||before.Position.WordRunning!=input.WordRunning||before.Position.WordSaved!=input.WordSaved||before.Position.CaptureRequestId!=input.CaptureRequestId||before.Position.CaptureProgress/5!=input.CaptureProgress/5))await live.Clients.Group(NativeCompanionPresenceHub.UserGroup(Author)).SendAsync("NativePresenceChanged",new{bookId=input.BookId},HttpContext.RequestAborted); + if(live!=null&&(before==null||before.Position.NavigationAcknowledgedId!=input.NavigationAcknowledgedId||before.Position.ParagraphRevision!=input.ParagraphRevision||before.Position.BookId!=input.BookId||before.Position.ManuscriptId!=input.ManuscriptId||before.Position.Revision!=input.Revision||before.Position.ChapterId!=input.ChapterId||before.Position.SceneId!=input.SceneId||before.Position.Active!=input.Active||before.Position.WordAvailable!=input.WordAvailable||before.Position.WordRunning!=input.WordRunning||before.Position.WordSaved!=input.WordSaved||before.Position.CaptureRequestId!=input.CaptureRequestId||before.Position.CaptureProgress/5!=input.CaptureProgress/5))await live.Clients.Group(NativeCompanionPresenceHub.UserGroup(Author)).SendAsync("NativePresenceChanged",new{bookId=input.BookId},HttpContext.RequestAborted); if(input.CaptureRequestId.HasValue&&capture!=null&&wizard!=null){var progress=await capture.Progress(Author,Grant,input.CaptureRequestId.Value,input.CaptureProgress,instance,session,input.ManuscriptId,input.Revision);if(progress!=null)await wizard.Clients.Group(WordCompanionFollowHub.PresenceGroup(Author)).SendAsync("OnboardingScanProgress",progress,HttpContext.RequestAborted);} if(input.CanParagraphSync&&!input.CanChapterSync&&capture!=null){var lease=presence.Read(Author,input.BookId).FirstOrDefault(l=>l.Instance==instance&&l.Session==session);if(lease!=null)await capture.ObserveParagraphSave(Author,lease);} if(input.CanChapterSync&&input.ChapterIssue=="needs_review"){ diff --git a/PlotLine/Controllers/NativeWorkspaceController.cs b/PlotLine/Controllers/NativeWorkspaceController.cs index c965a004..6971be19 100644 --- a/PlotLine/Controllers/NativeWorkspaceController.cs +++ b/PlotLine/Controllers/NativeWorkspaceController.cs @@ -31,19 +31,38 @@ public sealed class NativeWorkspaceController(IWordCompanionRepository access,IB public async Task ImportCommit(string confirmation,bool confirm,[FromServices] NativeImportService importer) {if(!confirm)return BadRequest("Explicit import confirmation is required.");try{return View(await importer.Commit(Author,confirmation));}catch(UnauthorizedAccessException){return Forbid();}catch(ArgumentException e){return Conflict(e.Message);}catch(Microsoft.Data.SqlClient.SqlException){return Conflict("Import could not commit. Review decisions are preserved. Preview again; existing story data has not been replaced.");}} [HttpGet("status")] - public async Task Status([FromServices] IParagraphManuscriptRepository? paragraphs=null,[FromServices] NativeManuscriptCapture? capture=null) + public async Task Status([FromServices] IParagraphManuscriptRepository? paragraphs=null,[FromServices] NativeManuscriptCapture? capture=null,int? writerBookId=null,int? writerChapterId=null,[FromServices] PlotLine.Services.Writer.WriterWordService? writerWords=null) { Response.Headers.CacheControl="no-store";var leases=presence.Read(Author,0);var allowed=new HashSet{0}; foreach(var book in leases.Select(l=>l.Position.BookId).Where(b=>b>0).Distinct())if(await access.GetBookStructureAsync(book,Author)!=null)allowed.Add(book); var snapshots=new Dictionary(); if(paragraphs!=null)foreach(var book in leases.Where(l=>l.Position.WordAvailable&&allowed.Contains(l.Position.BookId)&&l.Position.BookId>0).Select(l=>l.Position.BookId).Distinct())snapshots[book]=await paragraphs.Status(Author,book); - return Json(leases.Where(l=>allowed.Contains(l.Position.BookId)).Select(l=>new{instanceId=l.Instance,sessionId=l.Session,l.Position.BookId,l.Position.DocumentTitle,l.Position.Revision,l.Position.ManuscriptId,l.Position.ChapterId,l.Position.SceneId,l.Position.Active,l.Position.WordAvailable,l.Position.WordRunning,l.Position.WordSaved,l.Position.CanCapture,l.Position.ChapterIssue,l.Position.CanChapterSync,chapterProgress=presence.ChapterProgress(Author,l.Position.BookId,l.Instance,l.Session,l.Position.Revision),l.Position.CanParagraphSync,l.Position.CaptureRequestId,l.Position.CaptureProgress, + var result=leases.Where(l=>allowed.Contains(l.Position.BookId)).Select(l=>new{l.Position.CanAcknowledgeNavigation,chapterTitle=l.Position.ChapterTitle,sceneTitle=l.Position.SceneTitle,instanceId=l.Instance,sessionId=l.Session,l.Position.BookId,l.Position.DocumentTitle,l.Position.Revision,l.Position.ManuscriptId,l.Position.ChapterId,l.Position.SceneId,l.Position.Active,l.Position.WordAvailable,l.Position.WordRunning,l.Position.WordSaved,l.Position.CanCapture,l.Position.ChapterIssue,l.Position.CanChapterSync,chapterProgress=presence.ChapterProgress(Author,l.Position.BookId,l.Instance,l.Session,l.Position.Revision),l.Position.CanParagraphSync,l.Position.CaptureRequestId,l.Position.CaptureProgress, paragraphTransfer=capture?.ParagraphTransferStatus(Author,l.Position.BookId,l.Instance,l.Session), positionVerified=l.Position.WordSaved==true&&(!(l.Position.CanChapterSync||l.Position.CanParagraphSync)||l.Position.ParagraphRevision>0)&&l.Position.ChapterId.HasValue, snapshotRevision=snapshots.GetValueOrDefault(l.Position.BookId)?.Revision, mappingCurrent=snapshots.GetValueOrDefault(l.Position.BookId) is {} saved&&saved.ManuscriptId==l.Position.ManuscriptId&&saved.SessionId==l.Session&&saved.WordRevision==l.Position.Revision, positionMessage=l.Position.WordSaved==false?"Save Word before verifying its scene mapping":l.Position.SceneId.HasValue?null:l.Position.CanChapterSync?(l.Position.ChapterIssue=="needs_review"?"Chapter reading needs review or retry; accepted mappings are preserved":l.Position.ChapterId.HasValue?"Current paragraph is checked but has no scene assignment; move into scene prose":"Checking the current chapter for this Word session; saved scenes remain available"):snapshots.GetValueOrDefault(l.Position.BookId) is {} snapshot?(snapshot.ManuscriptId!=l.Position.ManuscriptId?"This Word document does not match the book's saved manuscript identity":snapshot.SessionId!=l.Session||snapshot.WordRevision!=l.Position.Revision?"Word reopened or changed; synchronise from Word to verify this session's paragraph positions":snapshot.Paused?"Scene mapping is unresolved; synchronisation is paused while existing book processing finishes":"Current paragraph has no verified scene assignment") : "Synchronise from Word to establish a verified paragraph mapping", - updated=l.Updated,expires=l.Updated.AddSeconds(45)})); + updated=l.Updated,expires=l.Updated.AddSeconds(45)}).ToArray(); + if(writerBookId.HasValue) + { + if(writerBookId<=0||writerChapterId is <=0||writerWords==null)return NotFound(); + var writerStructure=await access.GetBookStructureAsync(writerBookId.Value,Author); + if(writerStructure==null||writerChapterId.HasValue&&!writerStructure.Chapters.Any(c=>c.ChapterId==writerChapterId))return NotFound(); + var metadata=await writerWords.Metadata(Author,writerBookId.Value,writerChapterId); + var verified=new List(); + foreach(var lease in leases.Where(l=>l.Position.BookId==writerBookId)) + { + var position=await writerWords.Position(Author,lease,metadata); + if(position?.ChapterID is not int chapter)continue; + var selected=writerStructure.Chapters.FirstOrDefault(c=>c.ChapterId==chapter); + if(selected==null)continue; + verified.Add(new{instanceId=lease.Instance,sessionId=lease.Session,chapterId=chapter,sceneId=position.SceneID, + chapterTitle=selected.Title,sceneTitle=selected.Scenes.FirstOrDefault(s=>s.SceneId==position.SceneID)?.Title}); + } + return Json(new{leases=result,bookId=writerBookId,chapterId=writerChapterId,canonical=metadata==null?null:new{metadata.ManuscriptID,revision=metadata.Revision.ToString(System.Globalization.CultureInfo.InvariantCulture),snapshotUtc=metadata.SnapshotUtc?.ToString("yyyy-MM-ddTHH:mm:ssZ"),chapterAcceptedUtc=metadata.ChapterAcceptedUtc?.ToString("yyyy-MM-ddTHH:mm:ssZ")},verifiedPositions=verified}); + } + return Json(result); } [HttpGet("reviews/{id:guid}")] public async Task Review(Guid id) diff --git a/PlotLine/Controllers/WriterAuthoringController.cs b/PlotLine/Controllers/WriterAuthoringController.cs new file mode 100644 index 00000000..475245af --- /dev/null +++ b/PlotLine/Controllers/WriterAuthoringController.cs @@ -0,0 +1,22 @@ +using System.Security.Claims; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Data.SqlClient; +using PlotLine.Models; +using PlotLine.Services.Writer; +namespace PlotLine.Controllers; +[Authorize] +public sealed class WriterAuthoringController(IWriterAuthoringService authoring):Controller +{ + private int Actor=>int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!); + [HttpGet] public async Task Inspect(int bookId,int chapterId,int? sceneId){Response.Headers.CacheControl="no-store";try{return PartialView("~/Views/Writer/_WriterAuthoring.cshtml",await authoring.Read(Actor,bookId,chapterId,sceneId));}catch(SqlException e)when(e.Number==51000){return NotFound();}catch(KeyNotFoundException){return NotFound();}} + [HttpPost,ValidateAntiForgeryToken] + public async Task Save(int bookId,int chapterId,int? sceneId,string kind,int entityId,string version){ + var values=AuthoringSchema.Fields(kind).ToDictionary(f=>f.Name,f=>(string?)Request.Form[f.Name].ToString()); + try{await authoring.Save(Actor,bookId,chapterId,sceneId,kind,entityId,version,values);return Json(new{success=true});} + catch(AuthoringConflictException e){return Conflict(new{message=e.Message});} + catch(KeyNotFoundException){return NotFound();} + catch(ArgumentException e){return BadRequest(new{message=e.Message});} + catch(SqlException e)when(e.Number is 51000 or 51002 or 51003){return StatusCode(e.Number==51000?404:e.Number==51002?409:400,new{message=e.Message});} + } +} diff --git a/PlotLine/Controllers/WriterController.cs b/PlotLine/Controllers/WriterController.cs index 2b33247a..92ae8df6 100644 --- a/PlotLine/Controllers/WriterController.cs +++ b/PlotLine/Controllers/WriterController.cs @@ -14,22 +14,41 @@ public sealed class WriterController( IWritingScheduleService writingSchedule, IBookRepository? bookRepository=null, IProjectAccessService? access=null, WritingActivityRepository? activity=null, WriterObjectiveRepository? objectives=null, WriterWorkRepository? work=null, PlotLine.Services.Writer.IWriterSuggestionProvider? suggestions=null, WriterPlanningRepository? planning=null) : Controller { - public async Task Index(int? projectId,int? bookId=null,string? workspace=null,bool journey=false,int? year=null,int? month=null,DateTime? day=null) + public Task Index(int? projectId, int? bookId = null, string? workspace = null, bool journey = false, int? year = null, int? month = null, DateTime? day = null, bool setup = false) + => LoadDestination(setup ? "Write" : journey || workspace != null ? "Legacy" : "Home", projectId, bookId, workspace, journey, year, month, day); + public Task Write(int? projectId, int? bookId = null) => LoadDestination("Write", projectId, bookId); + public Task Explore(int? projectId, int? bookId = null) => LoadDestination("Explore", projectId, bookId); + public Task Plan(int? projectId, int? bookId = null) => LoadDestination("Plan", projectId, bookId); + public Task Review(int? projectId, int? bookId = null) => LoadDestination("Review", projectId, bookId); + public Task Reflect(int? projectId, int? bookId = null) => LoadDestination("Reflect", projectId, bookId); + public Task Dashboard(int? projectId, int? bookId = null) => LoadDestination("Dashboard", projectId, bookId); + public Task Overview(int? projectId, int? bookId = null) => LoadDestination("Legacy", projectId, bookId); + + private async Task LoadDestination(string destination, int? projectId, int? bookId = null, string? workspace = null, bool journey = false, int? year = null, int? month = null, DateTime? day = null) { if(bookId.HasValue&&!projectId.HasValue&&bookRepository!=null) { if(access!=null&&!await access.CanAccessEntityAsync("Book",bookId.Value))return NotFound(); var selected=await bookRepository.GetAsync(bookId.Value);if(selected==null||selected.IsArchived)return NotFound();projectId=selected.ProjectID; } - var model = await writerWorkspace.GetDashboardAsync(projectId); + var model = await writerWorkspace.GetDashboardAsync(projectId, bookId); if(!projectId.HasValue && int.TryParse(model.ProjectOptions.FirstOrDefault()?.Value,out var firstProject)) - { projectId=firstProject;model=await writerWorkspace.GetDashboardAsync(projectId); } + { projectId=firstProject;model=await writerWorkspace.GetDashboardAsync(projectId, bookId); } if(bookRepository!=null && projectId.HasValue) { var available=(await bookRepository.ListByProjectAsync(projectId.Value)).Where(b=>!b.IsArchived).ToArray(); model.Book=bookId.HasValue?available.SingleOrDefault(b=>b.BookID==bookId):available.FirstOrDefault(); if(bookId.HasValue&&model.Book==null)return NotFound(); model.BookID=model.Book?.BookID; + // Resolve a default book before the database applies its per-queue limit. + if (!bookId.HasValue && model.BookID.HasValue) + { + var scoped = await writerWorkspace.GetDashboardAsync(projectId, model.BookID); + model.WriteNext = scoped.WriteNext; + model.ContinueWriting = scoped.ContinueWriting; + model.RevisionQueue = scoped.RevisionQueue; + model.PolishingQueue = scoped.PolishingQueue; + } } else model.BookID=bookId; if(model.BookID.HasValue) @@ -63,12 +82,23 @@ public sealed class WriterController( model.Work = new(){BookID=model.BookID.Value,Year=selectedYear,Month=month is >=1 and <=12 ? month.Value : DateTime.UtcNow.Month,Day=day,Sessions=sessions,Current=sessions.FirstOrDefault(x=>x.EndedUtc==null),Days=calendar}; } if(planning!=null&&model.BookID.HasValue&&int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier),out var planner)) model.PlannedActivities=await planning.Upcoming(planner,model.BookID.Value); + if (model.ProjectID is > 0 && model.BookID is > 0) + { + model.WorkingContext = new PlotLine.Services.Writer.WriterContext(model.ProjectID.Value, model.BookID.Value); + if (model.Objective is {} focus) + { + var selected = new PlotLine.Services.Writer.WriterSelection(model.ProjectID.Value, model.BookID.Value, focus.ChapterID, focus.SceneID); + model.WorkingContext = model.WorkingContext.Select(PlotLine.Services.Writer.WriterFocusRole.SavedObjective, selected) + .Select(PlotLine.Services.Writer.WriterFocusRole.Working, selected); + } + } model.Suggestions = (suggestions ?? new PlotLine.Services.Writer.WriterSuggestionProvider()).Suggest(model); - return View("Index",model); + model.Destination = destination; + return View(destination == "Home" ? "Index" : destination == "Legacy" ? "Legacy" : "Destination", model); } - public Task Workspaces(int? projectId,int? bookId,string? workspace=null)=>Index(projectId,bookId,workspace); - public Task Journey(int? projectId,int? bookId,int? year=null,int? month=null,DateTime? day=null)=>Index(projectId,bookId,journey:true,year:year,month:month,day:day); - public IActionResult DisplaySetup(int? projectId,int? bookId)=>Redirect(Url.Action(nameof(Index),new{projectId,bookId})+"#display-setup"); + public Task Workspaces(int? projectId,int? bookId,string? workspace=null)=>LoadDestination("Legacy",projectId,bookId,workspace); + public Task Journey(int? projectId,int? bookId,int? year=null,int? month=null,DateTime? day=null)=>LoadDestination("Legacy",projectId,bookId,journey:true,year:year,month:month,day:day); + public IActionResult DisplaySetup(int? projectId,int? bookId)=>Redirect(Url.Action(nameof(Overview),new{projectId,bookId})+"#display-setup"); [HttpGet("Write"),HttpGet("Write/Index")] public IActionResult LegacyWrite(int? projectId,int? bookId)=>RedirectToAction(nameof(Index),new{projectId,bookId}); @@ -77,11 +107,11 @@ public sealed class WriterController( { if (access == null || !await access.CanAccessEntityAsync("Book", model.BookID)) return NotFound(); if (!ModelState.IsValid || objectives == null || !int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier), out var author)) - { TempData["WriterWorkspaceError"] = "Choose a working activity and a place in this book."; return RedirectToAction(nameof(Index), new { bookId = model.BookID, setup = true }); } + { TempData["WriterWorkspaceError"] = "Choose a working activity and a place in this book."; return RedirectToAction(nameof(Write), new { bookId = model.BookID, setup = true }); } try { await objectives.Save(author, model); } catch (SqlException e) when (e.Number == 51000) - { TempData["WriterWorkspaceError"] = "That chapter or scene is no longer available. Choose a place in this book."; return RedirectToAction(nameof(Index), new { bookId = model.BookID, setup = true }); } - return scheduleNow ? RedirectToAction(nameof(ScheduleSetup), new { bookId = model.BookID }) : RedirectToAction(nameof(Index), new { bookId = model.BookID }); + { TempData["WriterWorkspaceError"] = "That chapter or scene is no longer available. Choose a place in this book."; return RedirectToAction(nameof(Write), new { bookId = model.BookID, setup = true }); } + return scheduleNow ? RedirectToAction(nameof(ScheduleSetup), new { bookId = model.BookID }) : RedirectToAction(nameof(Write), new { bookId = model.BookID }); } public async Task Chapter(int id) @@ -90,9 +120,18 @@ public sealed class WriterController( return model is null ? NotFound() : View(model); } - public async Task SchedulePreview(int? writingPlanId) + public async Task SchedulePreview(int? writingPlanId, int? projectId = null, int? bookId = null) { - var model = await writingSchedule.GetSchedulePreviewAsync(writingPlanId); + if (projectId.HasValue && access != null && !await access.CanAccessProjectAsync(projectId.Value)) return NotFound(); + if (bookId.HasValue && bookRepository != null) + { + if (access != null && !await access.CanAccessEntityAsync("Book", bookId.Value)) return NotFound(); + var book = await bookRepository.GetAsync(bookId.Value); + if (book == null || book.IsArchived || (projectId.HasValue && projectId != book.ProjectID)) return NotFound(); + projectId = book.ProjectID; + } + var model = await writingSchedule.GetSchedulePreviewAsync(writingPlanId, projectId, bookId); + if (writingPlanId.HasValue && model.SelectedPlan == null) return NotFound(); if(planning!=null&&model.SelectedPlan!=null)model.DerivedActivities=await planning.Read(int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!),model.SelectedPlan.WritingPlanID); return View(model); } @@ -164,7 +203,8 @@ public sealed class WriterController( public async Task PreviewRebalance(int writingPlanId) { - var model = await writingSchedule.GetSchedulePreviewAsync(writingPlanId); + var preview = await SchedulePreview(writingPlanId); + if (preview is not ViewResult page || page.Model is not WritingSchedulePreviewViewModel model) return preview; try { model.RebalancePreview = await writingSchedule.PreviewRebalanceAsync(writingPlanId); @@ -178,7 +218,7 @@ public sealed class WriterController( return View(nameof(SchedulePreview), model); } - public async Task ScheduleSetup(int? projectId, int? bookId = null) + public async Task ScheduleSetup(int? projectId, int? bookId = null, string? focusActivity = null) { if (bookId.HasValue && bookRepository != null) { @@ -190,6 +230,8 @@ public sealed class WriterController( var model = await writingSchedule.GetScheduleSetupAsync(projectId); model.BookID = bookId; if(objectives!=null&&bookId.HasValue&&int.TryParse(User.FindFirstValue(ClaimTypes.NameIdentifier),out var author)){var objective=(await objectives.Read(author,bookId.Value)).Objective;if(objective?.Activity is "Revising" or "Editing" or "Proofreading")model.GoalType="Revision";} + if (PlotLine.Services.Writer.WriterFocusActivities.ObjectiveKinds.Contains(focusActivity)) + model.GoalType = focusActivity is "Revising" or "Editing" or "Proofreading" ? "Revision" : "FirstDraft"; await writingSchedule.PopulateScheduleSetupOptionsAsync(model); return View(model); } @@ -296,7 +338,7 @@ public sealed class WriterController( [HttpPost] [ValidateAntiForgeryToken] - public async Task ActivateWritingPlan(int writingPlanId) + public async Task ActivateWritingPlan(int writingPlanId, int? projectId = null, int? bookId = null) { try { @@ -308,12 +350,12 @@ public sealed class WriterController( TempData["WritingPlansError"] = ex.Message; } - return RedirectToAction(nameof(WritingPlans)); + return RedirectToAction(nameof(WritingPlans), new { projectId, bookId }); } [HttpPost] [ValidateAntiForgeryToken] - public async Task DeactivateWritingPlan(int writingPlanId) + public async Task DeactivateWritingPlan(int writingPlanId, int? projectId = null, int? bookId = null) { try { @@ -325,12 +367,12 @@ public sealed class WriterController( TempData["WritingPlansError"] = ex.Message; } - return RedirectToAction(nameof(WritingPlans)); + return RedirectToAction(nameof(WritingPlans), new { projectId, bookId }); } [HttpPost] [ValidateAntiForgeryToken] - public async Task DeleteWritingPlan(int writingPlanId) + public async Task DeleteWritingPlan(int writingPlanId, int? projectId = null, int? bookId = null) { try { @@ -342,12 +384,12 @@ public sealed class WriterController( TempData["WritingPlansError"] = ex.Message; } - return RedirectToAction(nameof(WritingPlans)); + return RedirectToAction(nameof(WritingPlans), new { projectId, bookId }); } [HttpPost] [ValidateAntiForgeryToken] - public async Task RegenerateWritingPlanSchedule(int writingPlanId) + public async Task RegenerateWritingPlanSchedule(int writingPlanId, int? projectId = null, int? bookId = null) { try{if(planning!=null&&(await planning.Read(int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!),writingPlanId)).Count>0)return RedirectToAction("Index","WriterPlanning",new{writingPlanId});}catch(SqlException e)when(e.Number==51000){return NotFound();} try @@ -360,7 +402,7 @@ public sealed class WriterController( TempData["WritingPlansError"] = ex.Message; } - return RedirectToAction(nameof(WritingPlans)); + return RedirectToAction(nameof(WritingPlans), new { projectId, bookId }); } [HttpPost] diff --git a/PlotLine/Controllers/WriterWordController.cs b/PlotLine/Controllers/WriterWordController.cs new file mode 100644 index 00000000..28bb7ecc --- /dev/null +++ b/PlotLine/Controllers/WriterWordController.cs @@ -0,0 +1,28 @@ +using System.Security.Claims; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using PlotLine.Data; +using PlotLine.Services.Writer; +using PlotLine.Services.NativeCompanion; +namespace PlotLine.Controllers; +[Authorize] +public sealed class WriterWordController(WriterWordService words,IWordCompanionRepository access,NativePresenceStore presence):Controller +{ + private int Author=>int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!); + [HttpPost,ValidateAntiForgeryToken] + public async Task Navigate(int bookId,int chapterId,int? sceneId,Guid instanceId,Guid sessionId,Guid manuscriptId,long revision,Guid navigationId) + { + Response.Headers.CacheControl="no-store"; + if(!ModelState.IsValid||bookId<=0||chapterId<=0||sceneId is <=0||instanceId==Guid.Empty||sessionId==Guid.Empty||manuscriptId==Guid.Empty||navigationId==Guid.Empty||revision<0)return BadRequest(); + if(await access.GetBookStructureAsync(bookId,Author)==null)return NotFound(); + try { return await words.Navigate(Author,bookId,chapterId,sceneId,instanceId,sessionId,manuscriptId,revision,navigationId)?Accepted(new{navigationId,message="Requested in Word; waiting for confirmation."}):Conflict(new{message="This Word document or chapter position is not currently verified, or Word is busy. Check Companion and try again. Nothing was moved."}); } + catch(UnauthorizedAccessException){return NotFound();} + catch(Microsoft.Data.SqlClient.SqlException e) when(e.Number==51000){return NotFound();} + catch(Exception e) when(e is Microsoft.Data.SqlClient.SqlException or TimeoutException){return StatusCode(503,new{message="Word navigation is temporarily unavailable. Your saved work is retained."});} + } + [HttpGet] + public async Task Navigation(int bookId,Guid instanceId,Guid sessionId,Guid navigationId) + { + Response.Headers.CacheControl="no-store";if(await access.GetBookStructureAsync(bookId,Author)==null)return NotFound();var state=presence.NavigationState(Author,bookId,instanceId,sessionId,navigationId);return state==null?NotFound():Json(new{state}); + } +} diff --git a/PlotLine/Controllers/WritingController.cs b/PlotLine/Controllers/WritingController.cs index 92eb3e01..f44c6b97 100644 --- a/PlotLine/Controllers/WritingController.cs +++ b/PlotLine/Controllers/WritingController.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc.Rendering; using PlotLine.Models; using PlotLine.Services; using PlotLine.ViewModels; +using PlotLine.Services.Writer; namespace PlotLine.Controllers; @@ -56,7 +57,7 @@ public sealed class WritingController( if(nativeLaunch&&!SameNativeTarget(target,await NativeTarget(bookId,instanceId,sessionId))) { - sceneId=null;chapterId=null; + sceneId=null;chapterId=null;target=null; display=WaitingContextDisplay(projectId,bookId,documentGuid); } if(nativeLaunch&&display!=null)display.FollowStatus=target!=null&&sceneId.HasValue?"Following Word":"Word mapping pending · choose a saved scene to browse manually"; @@ -71,6 +72,9 @@ public sealed class WritingController( Display = display ?? MissingContextDisplay(projectId, bookId, sceneId) }; + model.WorkingContext = ReferenceContext(model.ProjectID, model.BookID, + model.Display?.Context?.Position.ChapterId, + model.Display?.Context?.Position.SceneId, pinned, nativeLaunch ? target : null); return View(model); } @@ -111,7 +115,7 @@ public sealed class WritingController( if(nativeLaunch&&!SameNativeTarget(target,await NativeTarget(bookId,instanceId,sessionId))) { - sceneId=null;chapterId=null; + sceneId=null;chapterId=null;target=null; display=WaitingIntentDisplay(projectId,bookId,documentGuid); } if(nativeLaunch&&display!=null)display.FollowStatus=target!=null&&(sceneId.HasValue||chapterId.HasValue)?"Following Word":"Word mapping pending · choose a saved scene to browse manually"; @@ -126,6 +130,9 @@ public sealed class WritingController( Display = display ?? MissingIntentDisplay(projectId, bookId, chapterId, sceneId) }; + model.WorkingContext = ReferenceContext(model.ProjectID, model.BookID, + model.Display?.Context?.Position.ChapterId ?? model.Display?.ChapterWorkflow?.Chapter.ChapterID, + model.Display?.Context?.Position.SceneId, pinned, nativeLaunch ? target : null); return View(model); } @@ -177,6 +184,20 @@ public sealed class WritingController( return PartialView("~/Views/Writing/_WritingIntentContent.cshtml", MissingIntentDisplay(projectId, bookId, chapterId, sceneId)); } + private static WriterContext? ReferenceContext(int? project, int? book, int? chapter, int? scene, bool pinned, NativeWritingTarget? native) + { + if (project is not > 0 || book is not > 0 || (!chapter.HasValue && !scene.HasValue)) return null; + var context = new WriterContext(project.Value, book.Value); + if (chapter.HasValue || scene.HasValue) + { + var selection = new WriterSelection(project.Value, book.Value, chapter, scene); + context = context.Select(pinned ? WriterFocusRole.PinnedReference : WriterFocusRole.Exploration, selection); + if (!pinned && native != null) + context = context.WithVerifiedWord(new(selection, native.Instance, native.Session, native.Manuscript, native.Revision, native.AcceptedRevision)); + } + return context; + } + private int WritingUser=>int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!); private sealed record NativeWritingTarget(Guid Instance,Guid Session,Guid Manuscript,long Revision,int? ChapterId,int? SceneId,long AcceptedRevision); private static bool InvalidNativeSelection(Guid? instance,Guid? session)=>instance.HasValue!=session.HasValue||instance==Guid.Empty||session==Guid.Empty; @@ -416,6 +437,8 @@ public sealed class WritingController( private static string MissingScopeMessage(int? projectId, int? bookId, Guid? documentGuid, string screen) { + if (bookId.HasValue) + return "No saved scene is available for this book yet, or Word has not reported a verified scene. Add or select a chapter and scene in PlotDirector, or synchronise the linked manuscript. This reference window does not change your working objective."; if (!projectId.HasValue || !bookId.HasValue) { return $"{screen} did not receive a project/book from Word Companion. Reopen it from a linked manuscript, or choose a scene manually."; diff --git a/PlotLine/Data/Repositories.cs b/PlotLine/Data/Repositories.cs index 0c7618ab..71f7b5db 100644 --- a/PlotLine/Data/Repositories.cs +++ b/PlotLine/Data/Repositories.cs @@ -383,7 +383,7 @@ public interface IWriterWorkspaceRepository Task GetChapterGoalAsync(int chapterId); Task SaveChapterGoalAsync(ChapterGoal goal); Task> GetChapterWorkflowAsync(int chapterId); - Task> GetWriterDashboardScenesAsync(int? projectId, string queue); + Task> GetWriterDashboardScenesAsync(int? projectId, string queue, int? bookId = null); Task> GetWriterDashboardRemindersAsync(int? projectId); } @@ -1340,10 +1340,10 @@ public sealed class WriterWorkspaceRepository(ISqlConnectionFactory connectionFa return rows.ToList(); } - public async Task> GetWriterDashboardScenesAsync(int? projectId, string queue) + public async Task> GetWriterDashboardScenesAsync(int? projectId, string queue, int? bookId = null) { using var connection = connectionFactory.CreateConnection(); - var rows = await connection.QueryAsync("dbo.WriterDashboard_Scenes", new { ProjectID = projectId, Queue = queue }, commandType: CommandType.StoredProcedure); + var rows = await connection.QueryAsync("dbo.WriterDashboard_Scenes", new { ProjectID = projectId, Queue = queue, BookID = bookId }, commandType: CommandType.StoredProcedure); return rows.ToList(); } diff --git a/PlotLine/Help/Articles/Workspace/ChapterGoals.md b/PlotLine/Help/Articles/Workspace/ChapterGoals.md index 03fce01f..711ed115 100644 --- a/PlotLine/Help/Articles/Workspace/ChapterGoals.md +++ b/PlotLine/Help/Articles/Workspace/ChapterGoals.md @@ -50,3 +50,7 @@ If the chapter feels crowded, compare each scene against the goal and ask whethe - [Chapter Workflow](/Help/Article/workspace.chapterWorkflow) - [Chapters](/Help/Article/chapters.overview) - [Revision Queue](/Help/Article/workspace.revisionQueue) + +# Plans, workflow and evidence + +Chapter goals are your saved intentions. The scene’s Revision Status is its workflow stage. Checklist completion, planned-task completion, AI evidence decisions and session records are separate; none silently overwrites the others. See [Your working context](/Help/Article/workspace.workingContext). diff --git a/PlotLine/Help/Articles/Workspace/Overview.md b/PlotLine/Help/Articles/Workspace/Overview.md index 0e3e6b13..5997262b 100644 --- a/PlotLine/Help/Articles/Workspace/Overview.md +++ b/PlotLine/Help/Articles/Workspace/Overview.md @@ -1,61 +1,46 @@ --- title: Writer Workspace category: Workspace -tags: workspace, drafting, revision, polishing, reminders +tags: writer, context, workflow, planning contextKey: workspace.overview -micro: See what to draft, revise, polish or resolve next. -quickTitle: What is the Writer Workspace? -quickSummary: The Writer Workspace gathers practical next actions so you can move from planning into drafting and revision with less friction. +micro: Choose your next task in the selected book. +quickTitle: Writer Workspace +quickSummary: Writer gathers your saved focus, writing plans, scene queues and recent activity. screenshot: --- # Overview -The Writer Workspace is a practical working view. It helps you decide what to do next without reopening every book, chapter and scene. Instead of showing the whole structure, it gathers scenes and reminders into useful queues: continue writing, needs attention, revision, polishing and story health reminders. +Writer now opens on [Writer Home](/Help/Article/writer3.home). The existing full desk described here is available through **Writing desk** and **Workspaces** in the Writer ribbon. Its features and saved data remain available. -This is where PlotDirector becomes less like a filing cabinet and more like a desk. The timeline is for seeing story shape. The workspace is for choosing the next piece of work. +Writer gathers your saved focus, writing plans, scene queues and recent activity. -The queues are based on the information already recorded in your scenes and project. A scene that is planned may belong in a drafting queue. A scene with structural uncertainty may need attention. A nearly finished scene may belong in polishing. Reminders point you back to continuity, research or story health issues that should not be forgotten. +Choose a project and book in the application bar. Your saved working objective is a return target; it does not change merely because you browse a reference or read a different chapter. -# When Should I Use This? +# Scene queues -Use the Writer Workspace at the start of a writing session, revision session or planning review. It is especially helpful when a project has grown large enough that "what should I work on next?" becomes a real question. +| Queue | Scene Revision Status | +|---|---| +| Write Next | Outlined | +| In Progress | Drafted | +| Revision | Needs Work | +| Final Pass | Revised | -It is also useful when returning after time away. Instead of trying to remember the entire state of the book, you can scan the workspace for scenes that are ready, blocked, or waiting for a final pass. +Each queue shows up to 40 scenes from the selected book, ordered by priority and manuscript order. Open the scene to change Revision Status. Planned, Polished, Locked and Cut Candidate scenes are not in these four queues. Chapter and scene workspaces can be expanded on Overview, or opened through Workspaces. -# How To Use It +# What the reminders mean -Choose a project focus if needed. Then review the sections from top to bottom. "Continue Writing" is usually the best place to find scenes that can move forward. "Needs Attention" highlights practical blockers. "Revision Queue" points to scenes needing structural or content changes. "Polishing Queue" is for language, rhythm, clarity and final presentation. +Story Health in Writer lists missing chapter goal summaries and selected unresolved writing notes. It is not a complete diagnosis of your story. Help Me offers up to four actions based on saved focus, plans and recorded information; it does not read your novel to diagnose it. -Use reminders as notes from the system and from your earlier planning. They may point to missing continuity details, unresolved warnings, research follow-up or scenes that deserve another look. +# Plans and activity -# Example +Plans describe intended work. Sessions record declared activity and qualified observations. Accepted manuscript changes are separate evidence. None automatically changes a scene's Revision Status. -You open the workspace and see: +# Related guides -- A planned scene ready to draft. -- A scene needing location details for a character. -- Two revised scenes ready for polish. -- A reminder that an important clue has not been paid off. - -That gives you a clear session menu instead of a vague sense that the manuscript needs "work". - -# Writer Tip - -Use the workspace to protect momentum. If you have low energy, pick a polishing task. If you have creative energy, draft a ready scene. If you have analytical energy, clear a blocker. - -# Common Mistakes - -- Treating every queue as urgent. -- Ignoring reminders until they become revision problems. -- Polishing scenes that still have structural uncertainty. -- Staying in planning mode when a scene is ready to draft. - -# Related Guides - -- [Scenes](/Help/Article/scenes.overview) -- [Chapters](/Help/Article/chapters.overview) -- [Project Settings](/Help/Article/projectSettings.overview) +- [Working context](/Help/Article/workspace.workingContext) +- [Writing plans](/Help/Article/workspace.writingPlans) +- [Chapter goals](/Help/Article/workspace.chapterGoals) # Installed desktop app diff --git a/PlotLine/Help/Articles/Workspace/PolishingQueue.md b/PlotLine/Help/Articles/Workspace/PolishingQueue.md index 2d92c341..6ae5bff8 100644 --- a/PlotLine/Help/Articles/Workspace/PolishingQueue.md +++ b/PlotLine/Help/Articles/Workspace/PolishingQueue.md @@ -1,17 +1,17 @@ --- -title: Polishing Queue +title: Final Pass category: Workspace tags: workspace, polish, prose, pacing contextKey: workspace.polishingQueue micro: Find scenes ready for a final clarity and wording pass. -quickTitle: Polishing Queue -quickSummary: Polishing Queue is for scenes whose structure is settled enough for wording, clarity and rhythm work. +quickTitle: Final Pass +quickSummary: Final Pass is for scenes whose structure is settled enough for wording, clarity and rhythm work. screenshot: --- # Overview -Polishing Queue is for scenes that are close enough to finished that language-level work makes sense. This includes clarity, rhythm, pacing, transitions and final presentation. +Final Pass is for scenes that are close enough to finished that language-level work makes sense. This includes clarity, rhythm, pacing, transitions and final presentation. # When Should I Use This? @@ -40,3 +40,7 @@ Polishing is best when the scene has already earned its place. - [Writer Workspace](/Help/Article/workspace.overview) - [Revision Queue](/Help/Article/workspace.revisionQueue) - [Scenes](/Help/Article/scenes.overview) + +# Queue membership + +This queue uses the scene Revision Status **Revised**, not a separate draft-status field. Only scenes in the selected book are considered, with up to 40 shown in priority and manuscript order. diff --git a/PlotLine/Help/Articles/Workspace/RevisionQueue.md b/PlotLine/Help/Articles/Workspace/RevisionQueue.md index 0bfdb109..19461a3a 100644 --- a/PlotLine/Help/Articles/Workspace/RevisionQueue.md +++ b/PlotLine/Help/Articles/Workspace/RevisionQueue.md @@ -40,3 +40,7 @@ Revise before polishing. A beautiful paragraph is still expensive if the scene l - [Writer Workspace](/Help/Article/workspace.overview) - [Chapter Workflow](/Help/Article/workspace.chapterWorkflow) - [Scenes](/Help/Article/scenes.overview) + +# Queue membership + +Scenes appear when Revision Status is **Needs Work**. This is an author-assigned workflow stage, not a new diagnosis. Each queue shows up to 40 scenes from the selected book. diff --git a/PlotLine/Help/Articles/Workspace/WorkflowSummary.md b/PlotLine/Help/Articles/Workspace/WorkflowSummary.md index 08b0b2cf..08c99339 100644 --- a/PlotLine/Help/Articles/Workspace/WorkflowSummary.md +++ b/PlotLine/Help/Articles/Workspace/WorkflowSummary.md @@ -40,3 +40,7 @@ Use the summary to separate creative drafting from practical cleanup. Both matte - [Chapter Workflow](/Help/Article/workspace.chapterWorkflow) - [Writer Workspace](/Help/Article/workspace.overview) - [Scenes](/Help/Article/scenes.overview) + +# Plans, workflow and evidence + +Chapter goals are your saved intentions. The scene’s Revision Status is its workflow stage. Checklist completion, planned-task completion, AI evidence decisions and session records are separate; none silently overwrites the others. See [Your working context](/Help/Article/workspace.workingContext). diff --git a/PlotLine/Help/Articles/Workspace/WorkingContext.md b/PlotLine/Help/Articles/Workspace/WorkingContext.md new file mode 100644 index 00000000..a403cc17 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/WorkingContext.md @@ -0,0 +1,39 @@ +--- +title: Your working context +category: Workspace +tags: writer, context, workflow, planning +contextKey: workspace.workingContext +micro: Keep writing focus separate from references, Reader and sessions. +quickTitle: Your working context +quickSummary: Your selected book, saved objective, reference selection, Reader chapter and active session have different purposes. +screenshot: +--- + +# Overview + +Your selected book, saved objective, reference selection, Reader chapter and active session have different purposes. + +# Understanding the selections + +| Selection | What it means | +|---|---| +| Selected project and book | The authorised book shown in the application bar. Writer queues and book-scoped plans use it. | +| Saved working objective | Your chosen activity and optional chapter or scene. Change objective updates this saved return target. | +| Working focus | The task you are writing now; initially your saved objective. | +| Exploring | A temporary scene, plot, map or metric you are inspecting. Browsing does not save a new objective. | +| Pinned reference | A saved-data view intentionally held on screen rather than following Word. | +| Verified Word position | The connected document's accepted, mapped position. Unverified positions are not guessed. | +| Reader chapter | The chapter selected in the read-only Reader. Changing it does not retarget an existing session. | +| Work or Audio Review session | The book and chapter chosen when you start tracking. End it and start another to change the tracked target. | + +# Working across displays + +Standalone Context and Intent remain available through Display Setup and Word. Open Context or Intent, choose target displays and allow browser placement permission when offered. Named windows can be reused. Browser and Windows limits may prevent exact placement. Exploring a pinned reference does not move Word; live views retain explicit navigation controls. + +# Status and completion + +Revision Status is the scene's workflow stage. Completing a checklist objective, acknowledging AI evidence, marking a planned task complete and ending a session are separate actions. Legacy saved draft fields are retained; they do not override Revision Status. + +# Audio Review + +Choose the intended chapter before starting. Live controls require compatible Windows Companion and a supported media source. End review stops tracking. Use Pause first if you also want external playback to stop. Resume is always explicit. diff --git a/PlotLine/Help/Articles/Workspace/WriteNext.md b/PlotLine/Help/Articles/Workspace/WriteNext.md index 6181be41..943f9cc7 100644 --- a/PlotLine/Help/Articles/Workspace/WriteNext.md +++ b/PlotLine/Help/Articles/Workspace/WriteNext.md @@ -1,17 +1,17 @@ --- -title: Continue Writing +title: Write Next category: Workspace tags: workspace, drafting, scenes, write next contextKey: workspace.writeNext micro: Find scenes that are ready to move forward in drafting. -quickTitle: Continue Writing -quickSummary: Continue Writing gathers scenes that look ready for your next drafting session. +quickTitle: Write Next +quickSummary: Write Next gathers scenes that look ready for your next drafting session. screenshot: --- # Overview -Continue Writing is the workspace queue for scenes that can move forward now. It helps turn a large project into a smaller set of practical next choices. +Write Next is the workspace queue for scenes that can move forward now. It helps turn a large project into a smaller set of practical next choices. # When Should I Use This? @@ -40,3 +40,7 @@ Momentum often comes from choosing the next workable scene, not the most importa - [Writer Workspace](/Help/Article/workspace.overview) - [Scenes](/Help/Article/scenes.overview) - [Chapters](/Help/Article/chapters.overview) + +# Queue membership + +This queue uses the scene Revision Status **Outlined**, not a separate draft-status field. Only scenes in the selected book are considered, with up to 40 shown in priority and manuscript order. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-authoring.md b/PlotLine/Help/Articles/Workspace/Writer3-authoring.md new file mode 100644 index 00000000..15d42bfd --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-authoring.md @@ -0,0 +1,38 @@ +--- +title: Write Intentions and Reminders +category: Workspace +tags: writer, chapter, scene, intentions, notes, checklist, workflow +contextKey: writer3.authoring +micro: Develop your saved chapter or scene without leaving Write; manuscript prose stays in Word. +quickTitle: Intentions and reminders +quickSummary: Edit recorded intentions, notes or reminders, then Save or Cancel. Each section saves independently; opening Write creates no supporting records. +screenshot: +--- + +# Begin with your working focus + +Choose and save an activity, chapter and optional scene through Current Work. A saved chapter opens its existing goals and summary; a saved scene opens its purpose and intended outcome. Whole-manuscript focus remains valid without metadata. Work on this scene explicitly changes your saved focus; it does not move Word or retarget an active session. + +# Natural inline editing + +Use Edit to record what you want a chapter to accomplish, what needs to happen in a scene, and what should change by its end. Chapter summary and additional intentions are available in the details section. Everything is optional. Nothing is generated or saved to fill an empty panel. Manuscript prose belongs in Word. + +Save updates only that section in its canonical record. Cancel restores its recorded values without saving. Saving one editor does not replace text in other open editors. A failed save keeps your text. If someone changed the same fields, the stale save is rejected; copy anything you need before choosing Reload recorded version. Closing a details section cannot hide dirty edits. Navigation and book changes ask before leaving unsaved text; keep the page open if a save is still pending. + +# Notes and reminders + +Scene notes stay with their scene and retain their note type, pin and resolved flags. Reminders use the existing scene checklist; Done does not change scene revision state or complete a work session. Add note and Add something to remember create records only when explicitly saved. Existing notes can be edited or marked resolved; deleting notes and managing complex dependencies remain in the full scene editor. + +At chapter level, Things to include or remember and Concerns to revisit are existing chapter-goal fields. They do not create a separate chapter notebook. Session return notes remain attached to their recorded session. + +# Working details and attachments + +Priority, estimates, recorded working counts, dates and blockers use the existing scene-workflow record. Opening the panel does not seed workflow or default checklist items. Saving it explicitly creates or updates only the requested workflow record. These counts remain separate from accepted manuscript statistics. The canonical scene revision state and legacy readiness flags are preserved. + +Purpose categories, revision state, file upload/deletion and other dependent story information remain in the labelled full chapter/scene editors. Attachments listed here are existing records; Write does not bypass storage permissions or upload validation. + +# Companion and other selections + +The companion shows saved scene appearances, setting, thread events, verified relationship events and chapter feeling intention when available. Missing records are stated plainly; these are not inferred facts or new manuscript analysis. Open the existing specialist editor or standalone Context/Intent for full references, recorded metrics, display placement and pinned/Word-follow behavior. + +Working focus, active session, exploration, pinned reference, Reader and verified Word position remain independent. Inline saves do not navigate Word, synchronise manuscript text, change Reader selection or rebind recordings. Active session controls remain above the authoring sections. Both panels scroll independently; use existing resize, collapse and narrow-overlay controls. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-dashboard.md b/PlotLine/Help/Articles/Workspace/Writer3-dashboard.md new file mode 100644 index 00000000..30dab5a0 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-dashboard.md @@ -0,0 +1,16 @@ +--- +title: Writing Dashboard +category: Workspace +tags: writer, navigation, dashboard +contextKey: writer3.dashboard +micro: See recorded progress and planned work together. +quickTitle: Writing Dashboard +quickSummary: See recorded progress and planned work together. +screenshot: +--- + +# Overview + +Writing Dashboard is a compact overview within Plan and Reflect. Your manuscript shows actual retained accepted changes where available and labelled catalogue/snapshot word counts. Your next writing time shows saved planned activities or existing workflow tasks; it does not claim work has happened. + +Open Plan to create/manage availability and activities. Open Reflect to inspect recorded changes, Journey and reports. For a new book or disabled/private evidence, empty states explain what is unavailable without inventing progress or insights. Home and all five destinations remain directly available through the Writer ribbon. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-explore.md b/PlotLine/Help/Articles/Workspace/Writer3-explore.md new file mode 100644 index 00000000..e90b7a13 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-explore.md @@ -0,0 +1,22 @@ +--- +title: Explore Your Story +category: Workspace +tags: writer, navigation, explore +contextKey: writer3.explore +micro: Start with a concern or inspect your saved story references. +quickTitle: Explore Your Story +quickSummary: Start with a concern or inspect your saved story references. +screenshot: +--- + +# Overview + +Explore offers real entry points to the existing Problem Solver questionnaire, its browsable guidance and the story Timeline. It does not generate a new creative analysis merely by opening this page. + +You can use the Problem Solver before you have a project or scenes. Its questions and editorial guidance are separate from manuscript-aware evidence assessment. Saved character, relationship, plot, map, floor-plan and metric tools are linked directly when a project is selected. Some of those tools are project-wide and may include other books. + +The full specialist workspaces retain their existing editing, permissions and source records. No suggested interpretation silently updates a story fact. Guided idea capture and richer manuscript-aware journeys are later work, not simulated controls here. + +# Arrange your workspace + +Drag the divider or focus it and use Left/Right arrow keys to resize the contextual companion. Hide companion gives your main task the full width; Show companion restores it. Each destination remembers its width and desktop visibility on this browser. In narrow windows the companion opens as an overlay; use Back to workspace or Escape to return. Workspace Layout Help beside Show/Hide companion explains keyboard controls, storage and the independent standalone Context/Intent windows. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-home.md b/PlotLine/Help/Articles/Workspace/Writer3-home.md new file mode 100644 index 00000000..20994e94 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-home.md @@ -0,0 +1,24 @@ +--- +title: Writer Home +category: Workspace +tags: writer, navigation, home +contextKey: writer3.home +micro: Choose Write, Explore or your Writing Dashboard. +quickTitle: Writer Home +quickSummary: Choose Write, Explore or your Writing Dashboard. +screenshot: +--- + +# Overview + +Writer Home is a starting point for the selected book. The three main actions are equal choices: Continue Writing opens Write with your saved chapter or scene where available; Explore Your Story opens guidance and existing story references; Writing Dashboard brings together recorded progress and planned work. + +# Getting started + +Choose your book in the application bar. Without a saved objective, Write lets you choose an activity and optional chapter/scene. Explore does not require scenes, a plan or Word. A new book has honest empty states rather than invented activity. + +# Navigation and existing tools + +The Writer ribbon takes you directly to Home, Write, Explore, Plan, Review and Reflect. Writing Dashboard is a Plan/Reflect overview. Utilities retains Workspaces and Display Setup; Writing desk opens the previous full desk with its Help Me suggestions, activity and planning controls. Writing Journey, writing plans and reports retain their existing routes. + +Changing books within a destination reloads that destination with the new book’s own saved objective. No chapter, scene or Word selection is copied across books. Context and Intent remain separate reference windows. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-layout.md b/PlotLine/Help/Articles/Workspace/Writer3-layout.md new file mode 100644 index 00000000..5b4c73e5 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-layout.md @@ -0,0 +1,38 @@ +--- +title: Writer Workspace Layout +category: Workspace +tags: writer, layout, resize, companion, accessibility +contextKey: writer3.layout +micro: Resize or hide the contextual companion without changing your writing focus. +quickTitle: Workspace layout +quickSummary: Drag the divider or use its arrow keys. Each destination remembers its own companion width and visibility on this browser. +screenshot: +--- + +# Make room for your work + +Write, Explore, Plan, Review and Reflect fill the available space below the application ribbon. The main workspace and contextual companion scroll independently. Collapse the ribbon to gain more room. At very high text scaling or in a very short window, the page uses normal scrolling so nothing is clipped. Home keeps its three simple choices. + +# Resize with a pointer or keyboard + +Drag the handle between the panels with a mouse or touch pointer. Panel widths stay within usable limits. Tab to “Resize contextual companion” and use Left arrow to widen the companion or Right arrow to narrow it. Hold Shift for larger steps. Ctrl, Alt and Meta combinations keep their browser or operating-system meaning; for example, Alt+Left remains browser Back. Home selects the narrowest width; End selects the widest. The separator announces its width to assistive technology. + +# Hide and restore + +Use Hide companion to give the main task the full width, then Show companion to restore it. Hiding keeps the existing content in place; it does not reload the page, save a story record, end a session or close standalone reference windows. + +# Narrow windows + +When two usable columns do not fit, Show companion opens the same contextual content over the workspace. Back to workspace or Escape returns you to the main task and restores focus to Show companion. This is a non-modal overlay: the application ribbon and Help remain accessible. Moving keyboard focus outside the companion closes the overlay. Its temporary open state is separate from your desktop collapse preference. + +# Remembered preferences + +Width and desktop visibility are stored independently for each destination and signed-in author on this browser/device. They survive navigation and reload but do not synchronise between devices. Missing or invalid preferences fall back safely; a saved width is constrained to fit the current window. Blocking browser storage leaves all controls usable but prevents persistence. These panels do not currently have selectable sections; later section preferences must remain layout-only. + +# Separate reference windows + +The contextual companion currently contains existing tool links and summaries. Open Context and Open Intent still launch the independent reference windows, with their own pinned selections, Word following and Display Setup. Resizing or hiding this panel does not change working focus, Reader selection, verified Word position or active session binding. Full integrated Context and Intent editing is a later phase. + +# Find layout Help + +Layout Help and its adjacent question-mark icon sit with Show/Hide companion. The icon provides the existing tooltip and quick popup; Layout Help opens the full drawer. The question mark beside the destination title explains that destination. On PWA, Page Help remains in the contextual ribbon; expand the ribbon when it is collapsed. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-plan.md b/PlotLine/Help/Articles/Workspace/Writer3-plan.md new file mode 100644 index 00000000..d38c1db4 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-plan.md @@ -0,0 +1,24 @@ +--- +title: Plan Your Writing +category: Workspace +tags: writer, navigation, plan +contextKey: writer3.plan +micro: Create or manage the existing scoped writing plans and schedules. +quickTitle: Plan Your Writing +quickSummary: Create or manage the existing scoped writing plans and schedules. +screenshot: +--- + +# Overview + +Plan opens existing schedule setup, Writing Plans and scoped Schedule Preview. Work ahead shows up to three saved reviewed activities, or existing workflow tasks when no reviewed activities are listed. Planned minutes are budgets, not measured writing time. + +Create a writing plan saves availability first, then asks you to review actual chapter/scene candidates and confirm budgets. Estimates are optional. Both older workflow tasks and reviewed allocations remain available; completion is author-declared and does not change scene readiness or checklist completion. + +Preview and manage links preserve the book and include project-wide All Books plans. The visual scheduling engine, editable calendar and richer adjustments are later work. Current adjustment controls remain in the existing Edit Plan and review screens. + +[Writing plans and recorded work](/Help/Article/workspace.writingPlans) + +# Arrange your workspace + +Drag the divider or focus it and use Left/Right arrow keys to resize the contextual companion. Hide companion gives your main task the full width; Show companion restores it. Each destination remembers its width and desktop visibility on this browser. In narrow windows the companion opens as an overlay; use Back to workspace or Escape to return. Workspace Layout Help beside Show/Hide companion explains keyboard controls, storage and the independent standalone Context/Intent windows. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-reflect.md b/PlotLine/Help/Articles/Workspace/Writer3-reflect.md new file mode 100644 index 00000000..703c8a7c --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-reflect.md @@ -0,0 +1,22 @@ +--- +title: Reflect on Your Writing +category: Workspace +tags: writer, navigation, reflect +contextKey: writer3.reflect +micro: Inspect recorded progress, Journey, sessions and reports. +quickTitle: Reflect on Your Writing +quickSummary: Inspect recorded progress, Journey, sessions and reports. +screenshot: +--- + +# Overview + +Reflect displays retained accepted additions, removals and net change for the last30days, where available. Counts are evidence of accepted changes, not writing quality or continuous concentration. Catalogue word counts are labelled separately from accepted snapshots. + +Writing Journey opens the existing month/year/day calendar, work sessions and return notes. Reports, privacy & exports opens owner-private evidence and existing recording/retention/erasure controls. Collaborators do not gain private report access through this page. + +No retained evidence does not mean no writing took place. A baseline starts from accepted manuscript content; prior activity is not reconstructed. Writing Process and reflective insights are forthcoming; no writing style is inferred or presented as a result in this release. + +# Arrange your workspace + +Drag the divider or focus it and use Left/Right arrow keys to resize the contextual companion. Hide companion gives your main task the full width; Show companion restores it. Each destination remembers its width and desktop visibility on this browser. In narrow windows the companion opens as an overlay; use Back to workspace or Escape to return. Workspace Layout Help beside Show/Hide companion explains keyboard controls, storage and the independent standalone Context/Intent windows. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-review.md b/PlotLine/Help/Articles/Workspace/Writer3-review.md new file mode 100644 index 00000000..6f36e61c --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-review.md @@ -0,0 +1,26 @@ +--- +title: Review Your Writing +category: Workspace +tags: writer, navigation, review +contextKey: writer3.review +micro: Read accepted text, revisit intentions and choose revision work. +quickTitle: Review Your Writing +quickSummary: Read accepted text, revisit intentions and choose revision work. +screenshot: +--- + +# Overview + +Review opens the read-only Manuscript Reader and Focused reading, using your saved focus chapter or the first available chapter. The Reader shows accepted server text, not unsynchronised Word edits. Empty/new chapters explain the need to save and synchronise; no source text is invented. + +# Audio Review + +Open the Reader and expand Reading & Audio Review. Select/start the activity explicitly. Playback requires compatible Windows Companion and a supported player. Opening Review or Reader does not play audio. Pause stops external playback when supported; End review stops tracking and saves your note. + +# Intent and evidence + +Open Intent uses the existing standalone reference window. Its Evidence tab loads saved evidence or explicitly assesses saved scene prose and saved intentions when permitted. Intentions, AI interpretation and author-confirmed checklist completion remain separate. Scenes marked for revision opens the existing Revision workspace. No synchronisation or evidence contract is replaced by this shell. + +# Arrange your workspace + +Drag the divider or focus it and use Left/Right arrow keys to resize the contextual companion. Hide companion gives your main task the full width; Show companion restores it. Each destination remembers its width and desktop visibility on this browser. In narrow windows the companion opens as an overlay; use Back to workspace or Escape to return. Workspace Layout Help beside Show/Hide companion explains keyboard controls, storage and the independent standalone Context/Intent windows. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-word.md b/PlotLine/Help/Articles/Workspace/Writer3-word.md new file mode 100644 index 00000000..35f9b15a --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-word.md @@ -0,0 +1,36 @@ +--- +title: Word and Your Writing Focus +category: Workspace +tags: writer, Word, companion, manuscript, connection, reader +contextKey: writer3.word +micro: Keep your working focus separate from Word's verified chapter; move Word only when you choose. +quickTitle: Your manuscript in Word +quickSummary: Check the correct document and verified position. Open this chapter in Word waits for Word's confirmation. Accepted Reader content may lag later edits. +screenshot: +--- + +# Connect the correct manuscript + +Open Word Companion, sign in to Development and associate the manuscript with the correct book. Writer uses the same connection information as the existing connection control. If several manuscripts for this book are open, choose one explicitly. A document name alone is not verification. Disconnected, uncertain or unsaved documents cannot receive confirmed navigation. Install the matched Word add-in and agent update to enable this feature; a web release alone does not update Windows software. + +# Your focus and Word's position + +Your saved working chapter or scene, the actual chapter in Word, your recording target and the Reader chapter can differ. This is valid. Moving Word does not save a new working focus, start or end a session, change a pinned Context reference or retarget Intent. Existing explicitly selected follow modes remain authoritative. + +# Open a chapter or scene in Word + +Choose Open this chapter in Word. PlotDirector checks your access, the exact connected document and its verified chapter start. It does not guess positions from titles or ordering. Open this scene uses a verified saved scene start when available; an unresolved scene remains available for metadata editing, but cannot be navigated safely. Synchronise or check it in Companion before retrying. + +Requested means the command was sent for the selected document. Only Word confirmed navigation means Word acknowledged the selection. Timeout, changed document, stale mapping or disconnection leaves completion unconfirmed. Inspect Word before retrying. Navigation never forces a save, opens a replacement document, imports a manuscript or changes a session. Word may select the target range in its document window; normal Windows foreground behaviour requires physical qualification. + +# Accepted content and updates + +A local save is not confirmation that PlotDirector accepted the changes. Writer shows the last reported checking state and accepted chapter/snapshot time when available. Later edits may still be pending, including unsaved edits. Check connection & updates refreshes reported information. Check saved manuscript explicitly requests the existing bounded saved-manuscript check; it does not force a save or bypass author decisions. Detailed recovery remains in Companion and the existing connection/structure tools. + +Reader contains accepted prose. Its existing update policy retains selected text, Focused Reading and paragraph anchors where possible; pause automatic updates for uninterrupted reading or apply the discreet available update. Previous/Next retain Focused Reading. Reader navigation never moves Word. + +# Return and recover + +Return to Writer in Companion opens your saved working focus through the existing authenticated launcher. A verified Word-origin chapter can be adopted only through the explicit Use Word chapter as working focus action. Merely opening a link does not change it. A stale origin is never treated as proof. + +If Word closes, the agent restarts or another document replaces it, wait for current verification. Timed-out navigation is not replayed against another manuscript. Keep your return notes and any inline text; they remain independent. Reopen the correct manuscript and use the existing Companion sign-in/check/recovery controls. Context and Intent can remain in separate windows or monitors with their own follow/pinned selections. diff --git a/PlotLine/Help/Articles/Workspace/Writer3-write.md b/PlotLine/Help/Articles/Workspace/Writer3-write.md new file mode 100644 index 00000000..83363318 --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/Writer3-write.md @@ -0,0 +1,46 @@ +--- +title: Write +category: Workspace +tags: writer, navigation, write +contextKey: writer3.write +micro: Return to your saved focus and existing chapter or scene tools. +quickTitle: Write +quickSummary: Return to your saved focus and existing chapter or scene tools. +screenshot: +--- + +# Overview + +Write shows your saved writing activity and chapter/scene, or lets you choose a first focus without a plan. Open current scene or Open current chapter leads to existing editing tools for intentions, notes, checklist, workflow and attachments. Manuscript prose is written in Word, not in this navigation shell. + +# Sessions and references + +The existing session controls are available to the book owner. Starting and ending sessions are explicit; opening Write does not start a session. The selected session chapter remains independent from Reader and reference browsing. Use Open Context and Open Intent for existing standalone windows; Display Setup retains placement and permission controls. + +# Change focus + +Change working focus opens one activity/chapter/scene editor. Saving it changes your return target, not manuscript text or scene Revision Status. A scene must belong to the selected chapter/book. You may choose the whole manuscript. Book switching loads that book’s objective rather than retaining stale IDs. + +# Arrange your workspace + +Drag the divider or focus it and use Left/Right arrow keys to resize the contextual companion. Hide companion gives your main task the full width; Show companion restores it. Each destination remembers its width and desktop visibility on this browser. In narrow windows the companion opens as an overlay; use Back to workspace or Escape to return. Workspace Layout Help beside Show/Hide companion explains keyboard controls, storage and the independent standalone Context/Intent windows. + +The activity/chapter/scene selectors appear once in the working-focus editor. The **Work sessions & Audio Review** group keeps active recording controls accessible within the main scrolling region, without a second Start form. Its chapter binding is separate from your saved objective and reference browsing; resizing or hiding the companion does not change it. + +# One selection, three optional actions + +Choose what you are doing, a chapter (or whole manuscript) and optionally a scene in that chapter. Changing chapter clears an incompatible scene. **Save working focus** saves your return target and does not start recording. **Record this session** explicitly starts the existing session for that selection without saving the objective. **Plan writing time** opens this book’s existing planner without saving or recording; a supported selected objective activity chooses the draft/revision goal category, and chapter/scene allocations are chosen in the planner. + +Drafting records as Writing; Revising/Editing as Editing; Researching as Planning. For Proofreading, explicitly choose Editing or Reading review before recording. Planning, Reading review and Audio Review are session-only activities and cannot be saved as objectives. Audio Review requires a chapter and still uses the existing Windows media support and explicit playback controls. + +A saved focus is shown on return; use Change working focus to edit it. During an active recording, the actual session activity/chapter and existing timing, note, end and audio controls remain available. No redundant Start form is shown. If the saved focus and session differ, the page says so. Saving/changing focus does not move or rebind the session, Reader or verified Word context. Existing independent recording entry points remain available on the retained Writing desk and Reader. + +# Develop your chapter or scene here + +With a saved chapter/scene focus, Write now shows existing intentions and optional inline editors for chapter purpose/summary/goals, scene purpose/outcome, scene notes, reminders and working details. Save and Cancel affect one section at a time. Failed or stale saves retain text, and navigation warns about unsaved inline edits. Opening Write does not initialise missing goals, workflow or checklists. Whole-manuscript focus remains supported. + +The companion shows concise saved references rather than inferred story facts. Full specialist tools, attachments management and standalone Context/Intent remain available. The Intentions and Reminders Help icon explains field scope, stale-update handling and the distinction between scene notes, chapter goals and session return notes. + +# Word continuity + +Your manuscript in Word distinguishes the selected working focus from the exact verified Word position. Explicit chapter/scene navigation waits for acknowledgement and never starts a session or forces a save. Check saved manuscript uses the existing bounded check; Reader retains accepted prose and may lag later edits. See Word and Your Writing Focus for document selection, disconnected recovery and returning from Companion. diff --git a/PlotLine/Help/Articles/Workspace/WritingPlans.md b/PlotLine/Help/Articles/Workspace/WritingPlans.md new file mode 100644 index 00000000..80216e1d --- /dev/null +++ b/PlotLine/Help/Articles/Workspace/WritingPlans.md @@ -0,0 +1,42 @@ +--- +title: Writing plans and recorded work +category: Workspace +tags: writer, context, workflow, planning +contextKey: workspace.writingPlans +micro: Plan time without confusing it with measured writing activity. +quickTitle: Writing plans and recorded work +quickSummary: Plans save intended capacity and tasks. Reviewed allocations and existing workflow scene tasks remain separate records. +screenshot: +--- + +# Overview + +Plans save intended capacity and tasks. Reviewed allocations and existing workflow scene tasks remain separate records. + +# Create a plan + +Choose a project and book, or All Books for the project. Set a goal, start/deadline and available days/minutes. Review activities saves these settings first; the next page lets you inspect actual chapter/scene candidates, activity kinds and working budgets before confirming the allocation. You can return without committing allocations; the saved plan remains. + +# Understanding the fields + +| Field or control | Meaning | +|---|---| +| Availability | Planned capacity, not time already worked. | +| Working budget | Adjustable minutes for the selected chapter/scene; an estimate, not a promise. | +| Include Blocked Scenes | Allows blocked scenes to be considered; does not clear their blocker. | +| All Books | A project-wide plan that also appears when viewing plans for one book. | +| Mark complete | Your declaration about that task/allocation. It does not change manuscript text, scene Revision Status or checklist completion. | + +# Existing and reviewed tasks + +Older workflow scene tasks and reviewed chapter/scene allocations both remain available. Preview labels them separately. Regenerate workflow scene tasks applies to the older mechanism; when reviewed allocations exist it takes you to review them instead. Completed reviewed allocations are preserved; create a new plan for another pass. + +Editing availability does not silently move reviewed activities. Save the settings, then choose Review and reallocate them. Reallocation requires confirmation and sufficient capacity. No time is invented to meet the deadline. + +# Scope and returns + +Opening Schedule Preview from a book-scoped plan list retains that book, including project-wide plans. Plan selection displays its project/book. Use View plans across all projects and books for the wider list. Activation and deletion return to the list you were using. + +# Sessions and evidence + +Starting a session is independent of a scheduled task. Browser-engaged time, elapsed time, observed audio and accepted additions/removals have different meanings and can overlap. Reports controls recording, retention, exports and erasure; pausing recording does not stop manuscript synchronisation. diff --git a/PlotLine/Models/WriterAuthoring.cs b/PlotLine/Models/WriterAuthoring.cs new file mode 100644 index 00000000..050d4a08 --- /dev/null +++ b/PlotLine/Models/WriterAuthoring.cs @@ -0,0 +1,34 @@ +using System.Globalization; +using System.Text.Json; +namespace PlotLine.Models; +public sealed record AuthoringField(string Name,string Label,string Type="text",bool Required=false,int Max=int.MaxValue); +public sealed class AuthoringSection +{ + public string Kind {get;set;}=""; public int EntityID {get;set;} public string Data {get;set;}="{}";public string Version {get;set;}=""; + public int BookID {get;set;} public int ChapterID {get;set;} public int? SceneID {get;set;} + public IReadOnlyList<(string Value,string Label)> Purposes {get;set;}=[]; public IReadOnlyList<(string Value,string Label)> NoteTypes {get;set;}=[]; + public IReadOnlyList Fields=>AuthoringSchema.Fields(Kind); + public string Title=>Kind switch{"Chapter"=>"Chapter purpose and summary","Goals"=>"What should this chapter accomplish?","Scene"=>"What needs to happen in this scene?","Workflow"=>"Working details and blockers","Note"=>"Scene note","AddNote"=>"Add a scene note","Checklist"=>"Reminder","AddChecklist"=>"Add something to remember",_=>Kind}; + public string Value(string key){if(Kind.StartsWith("Add",StringComparison.Ordinal))return key=="SceneNoteTypeID"?NoteTypes.FirstOrDefault().Value??"":"";using var json=JsonDocument.Parse(Data);if(json.RootElement.ValueKind!=JsonValueKind.Object||!json.RootElement.TryGetProperty(key,out var v)||v.ValueKind==JsonValueKind.Null)return "";return v.ValueKind==JsonValueKind.True?"true":v.ValueKind==JsonValueKind.False?"false":v.ToString();} + public string Key=>$"{Kind}-{EntityID}"; +} +public static class AuthoringSchema +{ + public static IReadOnlyList Fields(string kind)=>kind switch{ + "Chapter"=>[new("ChapterPurposeID","Optional chapter purpose","purpose"),new("Summary","Chapter summary","textarea")], + "Goals"=>[new("GoalSummary","What would you like this chapter to accomplish?","textarea"),new("EmotionalGoal","How should the reader feel?","textarea"),new("ReaderTakeaway","What should the reader take away?","textarea"),new("MustInclude","Things to include or remember","textarea"),new("RisksOrConcerns","Concerns to revisit","textarea")], + "Scene"=>[new("ScenePurposeNotes","What needs to happen in this scene?","textarea"),new("SceneOutcomeNotes","What should change by the end?","textarea")], + "Note" or "AddNote"=>[new("SceneNoteTypeID","Note type","noteType",true),new("NoteTitle","Optional title","text",false,200),new("NoteText","What do you need to remember?","textarea",true),new("IsPinned","Keep prominent","checkbox"),new("IsResolved","Resolved","checkbox"),new("SortOrder","Optional order","number")], + "Checklist" or "AddChecklist"=>[new("ItemText","Something to remember","text",true,300),new("IsCompleted","Done","checkbox"),new("SortOrder","Optional order","number")], + "Workflow"=>[new("Priority","Priority (1 to 10)","number"),new("EstimatedWordCount","Estimated words","number"),new("ActualWordCount","Recorded working word count","number"),new("DraftedDate","Drafted on","date"),new("LastWorkedOn","Last worked on","date"),new("IsBlocked","Something is blocking this scene","checkbox"),new("BlockedReason","What is in the way?","textarea")],_=>[]}; + public static string? Validate(string kind,IReadOnlyDictionary values){var fields=Fields(kind);if(fields.Count==0)return "This editor is unavailable.";foreach(var f in fields){var v=values.GetValueOrDefault(f.Name)??"";if(f.Required&&string.IsNullOrWhiteSpace(v))return $"Enter {f.Label.ToLowerInvariant()}.";if(v.Length>f.Max)return $"{f.Label} allows up to {f.Max} characters.";if(v.Length>0&&f.Type is "number" or "purpose" or "noteType"&&!int.TryParse(v,NumberStyles.Integer,CultureInfo.InvariantCulture,out _))return $"Choose a valid value for {f.Label.ToLowerInvariant()}.";if(v.Length>0&&f.Type=="date"&&!DateOnly.TryParseExact(v,"yyyy-MM-dd",CultureInfo.InvariantCulture,DateTimeStyles.None,out _))return "Use a valid calendar date.";if(v.Length>0&&f.Type=="checkbox"&&v is not("true" or "false"))return "Choose a valid checkbox value.";} + if(kind=="Workflow"){foreach(var name in new[]{"EstimatedWordCount","ActualWordCount"})if(int.TryParse(values.GetValueOrDefault(name),out var n)&&n<0)return "Word counts must be non-negative.";if(int.TryParse(values.GetValueOrDefault("Priority"),out var priority)&&(priority<1||priority>10))return "Priority must be 1 to 10.";}return null;} +} +public sealed class WriterAuthoringPage +{ + public int BookID {get;set;} public int ChapterID {get;set;} public int? SceneID {get;set;} + public Chapter Chapter {get;set;}=new();public Scene? Scene {get;set;} + public IReadOnlyList Scenes {get;set;}=[];public IReadOnlyList Sections {get;set;}=[]; + public IReadOnlyList Characters {get;set;}=[];public IReadOnlyList Threads {get;set;}=[];public IReadOnlyList Relationships {get;set;}=[]; + public IReadOnlyList Attachments {get;set;}=[]; +} diff --git a/PlotLine/Models/WriterWork.cs b/PlotLine/Models/WriterWork.cs index d50cbcee..6d668dd2 100644 --- a/PlotLine/Models/WriterWork.cs +++ b/PlotLine/Models/WriterWork.cs @@ -69,4 +69,4 @@ public sealed class WriterWorkPage public IReadOnlyList Sessions { get; set; } = []; public IReadOnlyList Days { get; set; } = []; } -public sealed record WriterWorkToolbar(int BookID,int? ChapterID,string? ChapterTitle,IReadOnlyList? Choices=null,string DefaultKind="Writing"); +public sealed record WriterWorkToolbar(int BookID,int? ChapterID,string? ChapterTitle,IReadOnlyList? Choices=null,string DefaultKind="Writing",bool Unified=false); diff --git a/PlotLine/Program.cs b/PlotLine/Program.cs index 2f376847..636a707b 100644 --- a/PlotLine/Program.cs +++ b/PlotLine/Program.cs @@ -199,6 +199,8 @@ public class Program builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); + builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); diff --git a/PlotLine/Services/ApplicationNavigation.cs b/PlotLine/Services/ApplicationNavigation.cs index 264f0dbf..b09d86be 100644 --- a/PlotLine/Services/ApplicationNavigation.cs +++ b/PlotLine/Services/ApplicationNavigation.cs @@ -24,6 +24,9 @@ public sealed class ApplicationNavigation(IProjectRepository projects, IBookRepo "ContinuityExplorer" => "Continuity Explorer", "Analytics" or "Dynamics" => "Health", "Archives" => "Archive", _ => controller } }; + var writerDestination = Property(model, "Destination") as string; + result.WriterDestination = controller == "WritingActivity" ? "Reflect" : controller == "WriterPlanning" ? "Plan" + : writerDestination is null or "Legacy" ? WriterNavigation.DestinationForAction(request.RouteValues["action"]?.ToString()) : writerDestination; if (currentUser.UserId is not int userId) return result; var project = Project ?? Property(model, "Project") as Project ?? model as Project; diff --git a/PlotLine/Services/ApplicationRibbon.cs b/PlotLine/Services/ApplicationRibbon.cs index c393fdd8..0d2354d5 100644 --- a/PlotLine/Services/ApplicationRibbon.cs +++ b/PlotLine/Services/ApplicationRibbon.cs @@ -4,11 +4,11 @@ namespace PlotLine.Services; public sealed record RibbonCommand(string Label, string IconKey, string Controller, string Action, string Scope = "project", bool OwnerOnly = false, string? ToolbarKey = null, bool Post = false) { - public bool Available(ApplicationNavigationViewModel model) => (Scope == "global" || model.Project is not null) + public bool Available(ApplicationNavigationViewModel model) => (Scope is "global" or "writerNavigation" || model.Project is not null) && (Scope != "book" && Scope != "chapter" && Scope != "writerBook" || model.Book is not null) && (!OwnerOnly || model.Project?.IsOwner == true); public object Values(ApplicationNavigationViewModel model) => Scope switch { - "writerBook" => new { projectId=model.Project?.ProjectID,bookId=model.Book?.BookID }, + "writerBook" or "writerNavigation" => new { projectId=model.Project?.ProjectID,bookId=model.Book?.BookID }, "global" => new { }, "id" => new { id = model.Project?.ProjectID }, "book" => new { id = model.Book?.BookID }, "chapter" => new { bookId = model.Book?.BookID }, _ => new { projectId = model.Project?.ProjectID } @@ -32,10 +32,7 @@ public static class ApplicationRibbon new("book", "Book", new("Selected book", new("Book overview", "bible", "Books", "Details", "book"), new("Edit book", "writer", "Books", "Edit", "book"), new("Add chapter", "threads", "Chapters", "Create", "chapter")), new("Manuscript review", S("review")), new("Library", S("overview"), new("Add book", "bible", "Books", "Create"))), - new("writer", "Writer", - new("Writing", new("Overview","writer","Writer","Index","writerBook"),new("Writing Journey","calendar","Writer","Journey","writerBook"),new("Writing Plan","calendar","Writer","WritingPlans","writerBook")), - new("Work",new("Workspaces","threads","Writer","Workspaces","writerBook"),new("Reports","metrics","WritingActivity","Index","writerBook",OwnerOnly:true)), - new("Workspace setup",new RibbonCommand("Display Setup","maps","Writer","DisplaySetup","writerBook"))), + new("writer", "Writer", WriterNavigation.RibbonGroups("Home").ToArray()), new("story", "Story", new("Story structure", S("timeline"), S("plotlines"), S("threads"), S("calendar"), S("point")), new("Analysis & planning", S("review"), S("scenarios"), S("continuity"))), new("characters", "Characters", new("Cast", S("characters"), S("names")), new("Connections", S("relationships"))), new("world", "World", new("Setting", S("locations"), S("maps"), S("floorplans")), new("Story world", S("assets"))), diff --git a/PlotLine/Services/CoreServices.cs b/PlotLine/Services/CoreServices.cs index 9b83c682..7e853c49 100644 --- a/PlotLine/Services/CoreServices.cs +++ b/PlotLine/Services/CoreServices.cs @@ -577,7 +577,7 @@ public interface IRelationshipMapService public interface IWriterWorkspaceService { - Task GetDashboardAsync(int? projectId); + Task GetDashboardAsync(int? projectId, int? bookId = null); Task GetChapterWorkflowAsync(int chapterId); Task SaveChapterGoalAsync(ChapterGoalEditViewModel model); Task SaveSceneWorkflowAsync(SceneWorkflowEditViewModel model); @@ -604,7 +604,7 @@ public interface IWritingScheduleService Task DeleteScheduleItemAsync(int writingScheduleItemId); Task UpdateScheduleItemStatusAsync(int writingScheduleItemId, string scheduleStatus, DateTime? completedDateUtc); Task> GenerateSchedule(int writingPlanId); - Task GetSchedulePreviewAsync(int? writingPlanId); + Task GetSchedulePreviewAsync(int? writingPlanId, int? projectId = null, int? bookId = null); Task DeleteScheduleAsync(int writingPlanId); Task GetWritingPlansForManagementAsync(); Task GetWritingPlanSettingsAsync(int writingPlanId); @@ -6144,7 +6144,7 @@ public sealed class WriterWorkspaceService( IWriterWorkspaceRepository writerWorkspace, ICurrentUserService currentUser) : IWriterWorkspaceService { - public async Task GetDashboardAsync(int? projectId) + public async Task GetDashboardAsync(int? projectId, int? bookId = null) { var projectRows = currentUser.UserId.HasValue ? await projects.ListForUserAsync(currentUser.UserId.Value) @@ -6157,20 +6157,20 @@ public sealed class WriterWorkspaceService( { ProjectID = projectId, ProjectOptions = projectRows.Select(x => new SelectListItem(x.ProjectName, x.ProjectID.ToString(), x.ProjectID == projectId)).ToList(), - WriteNext = await GetDashboardScenesAsync(projectIds, "WriteNext"), - ContinueWriting = await GetDashboardScenesAsync(projectIds, "ContinueWriting"), - RevisionQueue = await GetDashboardScenesAsync(projectIds, "RevisionQueue"), - PolishingQueue = await GetDashboardScenesAsync(projectIds, "PolishingQueue"), + WriteNext = await GetDashboardScenesAsync(projectIds, "WriteNext", bookId), + ContinueWriting = await GetDashboardScenesAsync(projectIds, "ContinueWriting", bookId), + RevisionQueue = await GetDashboardScenesAsync(projectIds, "RevisionQueue", bookId), + PolishingQueue = await GetDashboardScenesAsync(projectIds, "PolishingQueue", bookId), StoryHealthReminders = await GetDashboardRemindersAsync(projectIds) }; } - private async Task> GetDashboardScenesAsync(IReadOnlyList projectIds, string queue) + private async Task> GetDashboardScenesAsync(IReadOnlyList projectIds, string queue, int? bookId) { var rows = new List(); foreach (var accessibleProjectId in projectIds) { - rows.AddRange(await writerWorkspace.GetWriterDashboardScenesAsync(accessibleProjectId, queue)); + rows.AddRange(await writerWorkspace.GetWriterDashboardScenesAsync(accessibleProjectId, queue, bookId)); } return rows; @@ -6405,14 +6405,15 @@ public sealed class WritingScheduleService( return savedItems.Select(ToViewModel).ToList(); } - public async Task GetSchedulePreviewAsync(int? writingPlanId) + public async Task GetSchedulePreviewAsync(int? writingPlanId, int? projectId = null, int? bookId = null) { if (!currentUser.UserId.HasValue) { return new WritingSchedulePreviewViewModel(); } - var plans = await writingSchedule.GetWritingPlanSummariesByUserAsync(currentUser.UserId.Value); + var plans = (await writingSchedule.GetWritingPlanSummariesByUserAsync(currentUser.UserId.Value)) + .Where(p => (!projectId.HasValue || p.ProjectID == projectId) && (!bookId.HasValue || p.BookID == null || p.BookID == bookId)).ToArray(); var plansRequiringRebalance = await writingSchedule.GetPlansRequiringRebalanceAsync(currentUser.UserId.Value, DateTime.Today); var selectedPlan = writingPlanId.HasValue ? plans.FirstOrDefault(x => x.WritingPlanID == writingPlanId.Value) @@ -6423,6 +6424,8 @@ public sealed class WritingScheduleService( return new WritingSchedulePreviewViewModel { + ScopeProjectID = projectId, + ScopeBookID = bookId, SelectedWritingPlanID = selectedPlan?.WritingPlanID, Plans = plans, PlansRequiringRebalance = plansRequiringRebalance, diff --git a/PlotLine/Services/Manuscript/ManuscriptReaderService.cs b/PlotLine/Services/Manuscript/ManuscriptReaderService.cs index 71f1793b..fa731191 100644 --- a/PlotLine/Services/Manuscript/ManuscriptReaderService.cs +++ b/PlotLine/Services/Manuscript/ManuscriptReaderService.cs @@ -8,6 +8,8 @@ namespace PlotLine.Services.Manuscript; public sealed record ReaderParagraph(Guid Id, string Text, bool IsHeading); public sealed class ManuscriptReaderModel { + public PlotLine.Services.Writer.WriterContext WorkingContext => new PlotLine.Services.Writer.WriterContext(Book.ProjectID, Book.BookID) + .Select(PlotLine.Services.Writer.WriterFocusRole.Reader, new(Book.ProjectID, Book.BookID, Chapter?.ChapterID)); public long Revision { get; init; } = -1; public bool FocusReading { get; set; } public string ContentVersion => Fingerprint(Paragraphs); @@ -40,7 +42,7 @@ public sealed class ManuscriptReaderModel // Read only: deliberately bypasses the manuscript workspace, which may bootstrap tracking. public sealed class ManuscriptReaderService( - IParagraphManuscriptRepository manuscripts, IBookRepository books, IChapterRepository chapters) + IParagraphManuscriptRepository manuscripts, IBookRepository books, IChapterRepository chapters, PlotLine.Services.Writer.WriterWordService? wordMetadata=null) { public async Task Read(int user, int bookId, int? chapterId) { @@ -64,9 +66,9 @@ public sealed class ManuscriptReaderService( var chapter = await chapters.GetAsync(chapterId); if (book is null || book.IsArchived || chapter is null || chapter.IsArchived || chapter.BookID != bookId) return null; var revision = status?.Revision ?? -1; - if (revision == knownRevision) return new(revision, false, knownVersion); + if (revision == knownRevision) { var metadata=wordMetadata==null?null:await wordMetadata.Metadata(user,bookId,chapterId);return new(revision,false,knownVersion,metadata?.ChapterAcceptedUtc,metadata?.SnapshotUtc); } var model = await Read(user, bookId, chapterId); - return model is null ? null : new(model.Revision, model.ContentVersion != knownVersion, model.ContentVersion); + return model is null ? null : new(model.Revision, model.ContentVersion != knownVersion, model.ContentVersion,model.LastSuccessfulSyncUtc,model.SnapshotCapturedUtc); } public static ManuscriptReaderModel Project(Book book, IReadOnlyList ordered, Chapter? selected, ParagraphManuscript? state) @@ -109,4 +111,4 @@ public sealed class ManuscriptReaderService( } } -public sealed record ReaderChange(long Revision, bool Changed, string Version); +public sealed record ReaderChange(long Revision, bool Changed, string Version,DateTime? LastSuccessfulSyncUtc=null,DateTime? SnapshotCapturedUtc=null); diff --git a/PlotLine/Services/NativeCompanion/NativePresenceStore.cs b/PlotLine/Services/NativeCompanion/NativePresenceStore.cs index 44f60823..5adae4d2 100644 --- a/PlotLine/Services/NativeCompanion/NativePresenceStore.cs +++ b/PlotLine/Services/NativeCompanion/NativePresenceStore.cs @@ -9,8 +9,10 @@ public sealed class NativePresenceStore(TimeProvider clock) public void BooksChanged(int user){lock(gate){if(catalogs.Count>=4096)catalogs.Clear();catalogs[user]=Guid.NewGuid();}} private readonly Dictionary<(int,Guid,Guid),AdapterCommand> navigation=[]; private readonly Dictionary<(int,Guid,Guid,Guid),(DateTimeOffset Expires,long Revision,int Start)> navigationReceipts=[]; + private readonly Dictionary<(int,Guid,Guid,Guid),NavigationOutcome> outcomes=[]; + public sealed record NavigationOutcome(int Book,Guid Manuscript,long Revision,string Grant,DateTimeOffset Expires,string State); private readonly object gate=new();private readonly Dictionary<(int,Guid,Guid),NativeLease> leases=[];private readonly Dictionary revoked=[]; - private void Prune(){var now=clock.GetUtcNow();foreach(var receipt in navigationReceipts.Where(p=>p.Value.Expires<=now).Select(p=>p.Key).ToArray())navigationReceipts.Remove(receipt);foreach(var key in leases.Where(p=>now-p.Value.Updated>=TimeSpan.FromSeconds(45)||p.Value.GrantExpires<=now).Select(p=>p.Key).ToArray()){leases.Remove(key);navigation.Remove(key);}foreach(var key in revoked.Where(p=>p.Value<=now).Select(p=>p.Key).ToArray())revoked.Remove(key);} + private void Prune(){var now=clock.GetUtcNow();foreach(var key in outcomes.Where(p=>p.Value.Expires.AddMinutes(2)p.Key).ToArray())outcomes.Remove(key);foreach(var receipt in navigationReceipts.Where(p=>p.Value.Expires<=now).Select(p=>p.Key).ToArray())navigationReceipts.Remove(receipt);foreach(var key in leases.Where(p=>now-p.Value.Updated>=TimeSpan.FromSeconds(45)||p.Value.GrantExpires<=now).Select(p=>p.Key).ToArray()){leases.Remove(key);navigation.Remove(key);}foreach(var key in revoked.Where(p=>p.Value<=now).Select(p=>p.Key).ToArray())revoked.Remove(key);} private readonly Dictionary<(int User,int Book,Guid Manuscript,Guid Session,long Revision),(int End,(int Start,int Chapter,int? Scene)[] Items)> mappings=[]; public void Map(int user,int book,Guid manuscript,Guid session,long revision,int end,(int Start,int Chapter,int? Scene)[] items){lock(gate){if(items.Length>8192)return;foreach(var key in mappings.Keys.Where(k=>k.User==user&&k.Session==session).ToArray())mappings.Remove(key);if(mappings.Count>=64)mappings.Remove(mappings.Keys.First());mappings[(user,book,manuscript,session,revision)]=(end,items);}} public (int Chapter,int? Scene)? Resolve(int user,NativePresence position,Guid session){lock(gate){if(position.WordSaved!=true||!position.CursorStart.HasValue||!mappings.TryGetValue((user,position.BookId,position.ManuscriptId,session,position.Revision),out var map)||position.CursorStart<0||position.CursorStart>=map.End)return null;var boundary=map.Items.LastOrDefault(i=>i.Start<=position.CursorStart);return boundary.Chapter>0?(boundary.Chapter,boundary.Scene):null;}} @@ -19,11 +21,14 @@ public sealed class NativePresenceStore(TimeProvider clock) lock(gate){Prune();var key=(user,instance,session);if(instance==Guid.Empty||session==Guid.Empty||(value.WordAvailable&&value.ManuscriptId==Guid.Empty)||(value.ChapterIssue is not ("" or "needs_review"))||value.Revision<0||value.Sequence<=0||value.BookId<0||value.DocumentTitle==null||value.DocumentTitle.Length>260||value.DocumentTitle.IndexOfAny(['\\','/'])>=0||expires<=clock.GetUtcNow()||revoked.ContainsKey(grant))return false; if(leases.TryGetValue(key,out var prior)){if(prior.Grant!=grant||value.Sequence<=prior.Position.Sequence||value.Revision=4096||leases.Values.Count(p=>p.User==user)>=64)return false; - leases[key]=new(user,grant,expires,instance,session,new NativePresence{ChapterIssue=value.ChapterIssue,ChapterTitle=value.ChapterTitle,SceneTitle=value.SceneTitle,CanChapterSync=value.CanChapterSync,CaptureRequestId=value.CaptureRequestId,CaptureProgress=value.CaptureProgress,ParagraphRevision=value.ParagraphRevision,CanCapture=value.CanCapture,CanParagraphSync=value.CanParagraphSync,WordSaved=value.WordSaved,CursorStart=value.CursorStart,ManuscriptId=value.ManuscriptId,BookId=value.BookId,Revision=value.Revision,Sequence=value.Sequence,ChapterId=value.ChapterId,SceneId=value.SceneId,Active=value.Active,WordRunning=value.WordRunning,WordAvailable=value.WordAvailable,DocumentTitle=value.DocumentTitle},clock.GetUtcNow());return true;} + foreach(var pending in outcomes.Where(p=>p.Key.Item1==user&&p.Key.Item2==instance&&p.Key.Item3==session&&p.Value.State=="requested"&&(p.Value.Revision!=value.Revision||p.Value.Book!=value.BookId||p.Value.Manuscript!=value.ManuscriptId)).ToArray())outcomes[pending.Key]=pending.Value with{State="invalidated"}; + leases[key]=new(user,grant,expires,instance,session,new NativePresence{CanAcknowledgeNavigation=value.CanAcknowledgeNavigation,NavigationAcknowledgedId=value.NavigationAcknowledgedId,NavigationResult=value.NavigationResult,ChapterIssue=value.ChapterIssue,ChapterTitle=value.ChapterTitle,SceneTitle=value.SceneTitle,CanChapterSync=value.CanChapterSync,CaptureRequestId=value.CaptureRequestId,CaptureProgress=value.CaptureProgress,ParagraphRevision=value.ParagraphRevision,CanCapture=value.CanCapture,CanParagraphSync=value.CanParagraphSync,WordSaved=value.WordSaved,CursorStart=value.CursorStart,ManuscriptId=value.ManuscriptId,BookId=value.BookId,Revision=value.Revision,Sequence=value.Sequence,ChapterId=value.ChapterId,SceneId=value.SceneId,Active=value.Active,WordRunning=value.WordRunning,WordAvailable=value.WordAvailable,DocumentTitle=value.DocumentTitle},clock.GetUtcNow()); + if(value.NavigationAcknowledgedId is Guid ack&&outcomes.TryGetValue((user,instance,session,ack),out var op)&&op.Grant==grant&&op.Book==value.BookId&&op.Manuscript==value.ManuscriptId&&op.Revision==value.Revision&&op.Expires>clock.GetUtcNow()&&op.State=="requested"&&value.NavigationResult is "completed" or "failed")outcomes[(user,instance,session,ack)]=op with{State=value.NavigationResult}; + return true;} } public NativeLease[] Read(int user,int book){lock(gate){Prune();return leases.Values.Where(p=>p.User==user&&(book==0||p.Position.BookId==book)).OrderByDescending(p=>p.Updated).ToArray();}} - public bool Navigate(int user,int book,Guid instance,Guid session,Guid manuscript,long revision,int start,bool requireSaved=false,Guid? navigationId=null) - {lock(gate){Prune();var key=(user,instance,session);if(!leases.TryGetValue(key,out var lease)||!lease.Position.WordAvailable||lease.Position.BookId!=book||lease.Position.ManuscriptId!=manuscript||lease.Position.Revision!=revision||(requireSaved&&lease.Position.WordSaved!=true)||start<0||(navigation.TryGetValue(key,out var queued)&&queued.Kind!="navigate"))return false;var id=navigationId??Guid.NewGuid();if(id==Guid.Empty)return false;var receipt=(user,instance,session,id);if(navigationReceipts.TryGetValue(receipt,out var prior))return prior.Revision==revision&&prior.Start==start;if(navigationReceipts.Count>=8192)return false;navigationReceipts[receipt]=(clock.GetUtcNow().AddMinutes(15),revision,start);navigation[key]=new(){Id=id,Kind="navigate",SessionId=session,Revision=revision,Chapter=new(){Start=start}};return true;}} + public bool Navigate(int user,int book,Guid instance,Guid session,Guid manuscript,long revision,int start,bool requireSaved=false,Guid? navigationId=null,bool requireAcknowledgement=false) + {lock(gate){Prune();var key=(user,instance,session);if(!leases.TryGetValue(key,out var lease)||!lease.Position.WordAvailable||lease.Position.BookId!=book||lease.Position.ManuscriptId!=manuscript||lease.Position.Revision!=revision||(requireSaved&&lease.Position.WordSaved!=true)||start<0||(requireAcknowledgement&&!lease.Position.CanAcknowledgeNavigation)||(outcomes.Any(p=>p.Key.Item1==user&&p.Key.Item2==instance&&p.Key.Item3==session&&p.Key.Item4!=navigationId&&p.Value.State=="requested"&&p.Value.Expires>clock.GetUtcNow()))||(navigation.TryGetValue(key,out var queued)&&queued.Kind!="navigate"))return false;var id=navigationId??Guid.NewGuid();if(id==Guid.Empty)return false;var receipt=(user,instance,session,id);if(navigationReceipts.TryGetValue(receipt,out var prior))return prior.Revision==revision&&prior.Start==start;if(navigationReceipts.Count>=8192)return false;navigationReceipts[receipt]=(clock.GetUtcNow().AddMinutes(15),revision,start);if(requireAcknowledgement){if(outcomes.Count>=8192)return false;outcomes[receipt]=new(book,manuscript,revision,lease.Grant,clock.GetUtcNow().AddSeconds(25),"requested");}navigation[key]=new(){Id=id,BookId=book,ManuscriptId=manuscript,ExpiresUtc=clock.GetUtcNow().AddSeconds(25).UtcDateTime,Kind="navigate",SessionId=session,Revision=revision,Chapter=new(){Start=start}};return true;}} public void RequestCancellation(int user,NativeLease selected){lock(gate){var key=(user,selected.Instance,selected.Session);if(leases.TryGetValue(key,out var current)&¤t.Grant==selected.Grant&¤t.Position.Revision==selected.Position.Revision)navigation[key]=new(){Kind="cancel",SessionId=selected.Session,Revision=selected.Position.Revision};}} private readonly Dictionary chapterRepairs=[];private readonly HashSet cancelledChapterRepairs=[]; private readonly Dictionary<(int User,int Book,Guid Instance,Guid Session,long Revision),PlotDirector.Companion.Protocol.Manuscript.ChapterSyncProgress> chapterProgress=[]; @@ -41,7 +46,8 @@ public sealed class NativePresenceStore(TimeProvider clock) public bool RequestCapture(int user,NativeLease selected,Guid request,int book=0,bool paragraphs=false,bool synchronise=false,long baseRevision=0,string baseHash="") {lock(gate){Prune();var key=(user,selected.Instance,selected.Session);if(!leases.TryGetValue(key,out var lease)||lease.Grant!=selected.Grant||lease.Position.Revision!=selected.Position.Revision||lease.Position.ManuscriptId!=selected.Position.ManuscriptId||(book>0&&lease.Position.BookId!=0&&lease.Position.BookId!=book)||!lease.Position.CanCapture||navigation.ContainsKey(key))return false;navigation[key]=new(){Id=request,BaseRevision=baseRevision,BaseSnapshotHash=baseHash,BookId=book,ParagraphTracking=paragraphs,Kind=synchronise?"paragraph-snapshot":"wizard-capture",SessionId=lease.Session,Revision=lease.Position.Revision};return true;}} public AdapterCommand? TakeNavigation(int user,string grant,Guid instance,Guid session) - {lock(gate){Prune();var key=(user,instance,session);return leases.TryGetValue(key,out var lease)&&lease.Grant==grant&&navigation.Remove(key,out var command)?command:null;}} + {lock(gate){Prune();var key=(user,instance,session);return leases.TryGetValue(key,out var lease)&&lease.Grant==grant&&navigation.Remove(key,out var command)&&command.SessionId==session&&command.Revision==lease.Position.Revision&&(command.Kind!="navigate"||command.BookId==0||command.BookId==lease.Position.BookId)&&(command.Kind!="navigate"||command.ManuscriptId==Guid.Empty||command.ManuscriptId==lease.Position.ManuscriptId)&&(command.ExpiresUtc==default||command.ExpiresUtc>clock.GetUtcNow().UtcDateTime)?command:null;}} + public string? NavigationState(int user,int book,Guid instance,Guid session,Guid id){lock(gate){Prune();if(!outcomes.TryGetValue((user,instance,session,id),out var op)||op.Book!=book)return null;var lease=leases.GetValueOrDefault((user,instance,session));if(lease==null||lease.Grant!=op.Grant||lease.Position.BookId!=book||lease.Position.ManuscriptId!=op.Manuscript||lease.Position.Revision!=op.Revision)return "invalidated";return op.State=="requested"&&op.Expires<=clock.GetUtcNow()?"timed-out":op.State;}} public void Remove(int user,string grant,Guid instance,Guid session,long? throughSequence=null){lock(gate)if(leases.TryGetValue((user,instance,session),out var prior)&&prior.Grant==grant&&(!throughSequence.HasValue||prior.Position.Sequence<=throughSequence.Value)){leases.Remove((user,instance,session));navigation.Remove((user,instance,session));}} public void DisconnectGrant(int user,string grant){lock(gate)foreach(var key in leases.Where(p=>p.Value.User==user&&p.Value.Grant==grant).Select(p=>p.Key).ToArray()){leases.Remove(key);navigation.Remove(key);}} public void Revoke(int user,string grant,DateTimeOffset expiry){lock(gate){Prune();if(revoked.Count<8192)revoked[grant]=expiry;foreach(var key in leases.Where(p=>p.Value.User==user&&p.Value.Grant==grant).Select(p=>p.Key).ToArray())leases.Remove(key);}} diff --git a/PlotLine/Services/ProjectAccessFilter.cs b/PlotLine/Services/ProjectAccessFilter.cs index 5d4b81e3..b897c4e1 100644 --- a/PlotLine/Services/ProjectAccessFilter.cs +++ b/PlotLine/Services/ProjectAccessFilter.cs @@ -85,6 +85,8 @@ public sealed class ProjectAccessFilter(IProjectAccessService access, ICurrentUs ["Scenarios"] = new(StringComparer.OrdinalIgnoreCase) { ["id"] = "Scenario", ["scenarioId"] = "Scenario", ["projectId"] = "Project", ["bookId"] = "Book", ["sceneId"] = "Scene", ["anchorSceneId"] = "Scene", ["targetChapterId"] = "Chapter" }, ["StoryAssets"] = new(StringComparer.OrdinalIgnoreCase) { ["id"] = "StoryAsset", ["returnAssetId"] = "StoryAsset", ["projectId"] = "Project" }, ["Timeline"] = new(StringComparer.OrdinalIgnoreCase) { ["id"] = "TimelineViewPreset", ["projectId"] = "Project", ["bookId"] = "Book" }, + ["WriterWord"] = new(StringComparer.OrdinalIgnoreCase) { ["bookId"] = "Book", ["chapterId"] = "Chapter", ["sceneId"] = "Scene" }, + ["WriterAuthoring"] = new(StringComparer.OrdinalIgnoreCase) { ["bookId"] = "Book", ["chapterId"] = "Chapter", ["sceneId"] = "Scene" }, ["Writer"] = new(StringComparer.OrdinalIgnoreCase) { ["id"] = "Chapter", ["projectId"] = "Project" }, ["Warnings"] = new(StringComparer.OrdinalIgnoreCase) { ["id"] = "ContinuityWarning", ["projectId"] = "Project", ["bookId"] = "Book", ["sceneId"] = "Scene" }, ["Analytics"] = new(StringComparer.OrdinalIgnoreCase) { ["projectId"] = "Project", ["bookId"] = "Book" }, diff --git a/PlotLine/Services/Writer/WriterAuthoringService.cs b/PlotLine/Services/Writer/WriterAuthoringService.cs new file mode 100644 index 00000000..00e25f39 --- /dev/null +++ b/PlotLine/Services/Writer/WriterAuthoringService.cs @@ -0,0 +1,30 @@ +using System.Data; +using Microsoft.Data.SqlClient; +using System.Text.Json; +using Dapper; +using PlotLine.Data; +using PlotLine.Models; +namespace PlotLine.Services.Writer; +public sealed class AuthoringConflictException(string message,Exception? inner=null):Exception(message,inner); +public interface IWriterAuthoringService +{ + Task Read(int actor,int book,int chapter,int? scene); + Task Save(int actor,int book,int chapter,int? scene,string kind,int entity,string version,IReadOnlyDictionary values); +} +public sealed class WriterAuthoringService(ISqlConnectionFactory factory,IChapterRepository chapters,ISceneRepository scenes,ILookupRepository lookups,IWriterWorkspaceRepository workspace,ICharacterRepository characters,IPlotRepository plots,IBookRepository books,ILocationRepository locations,IProjectActivityService activity):IWriterAuthoringService +{ + public async Task Read(int actor,int book,int chapter,int? scene){ + using var db=factory.CreateConnection();var sections=(await db.QueryAsync("dbo.WriterAuthoring_Sections",new{UserID=actor,BookID=book,ChapterID=chapter,SceneID=scene},commandType:CommandType.StoredProcedure)).ToArray(); + var lookup=await lookups.GetAllAsync();var noteTypes=await workspace.ListNoteTypesAsync(); + foreach(var s in sections){s.BookID=book;s.ChapterID=chapter;s.SceneID=scene;s.Purposes=lookup.ChapterPurposeTypes.Where(x=>!x.IsArchived).Select(x=>(x.ChapterPurposeID.ToString(),x.PurposeName)).ToArray();s.NoteTypes=noteTypes.Where(x=>x.IsActive).Select(x=>(x.SceneNoteTypeID.ToString(),x.TypeName)).ToArray();} + var page=new WriterAuthoringPage{BookID=book,ChapterID=chapter,SceneID=scene,Chapter=await chapters.GetAsync(chapter)??throw new KeyNotFoundException(),Scenes=await scenes.ListByChapterAsync(chapter),Sections=sections}; + if(scene.HasValue){page.Scene=page.Scenes.FirstOrDefault(x=>x.SceneID==scene.Value);if(page.Scene==null)throw new KeyNotFoundException();page.Scene.BookID=book;if(page.Scene.PrimaryLocationID.HasValue){var place=await locations.GetAsync(page.Scene.PrimaryLocationID.Value);var selectedBook=await books.GetAsync(book);if(place!=null&&!place.IsArchived&&place.ProjectID==selectedBook?.ProjectID)page.Scene.PrimaryLocationName=place.LocationName;}page.Characters=await characters.ListSceneCharactersAsync(scene.Value);page.Threads=await plots.ListThreadEventsBySceneAsync(scene.Value);page.Relationships=(await characters.ListRelationshipEventsBySceneAsync(scene.Value)).Where(x=>x.EvidenceState=="Verified").ToArray();page.Attachments=await workspace.ListAttachmentsAsync(scene.Value);} + return page; + } + public async Task Save(int actor,int book,int chapter,int? scene,string kind,int entity,string version,IReadOnlyDictionary values){ + var error=AuthoringSchema.Validate(kind,values);if(error!=null)throw new ArgumentException(error); + var payload=AuthoringSchema.Fields(kind).ToDictionary(f=>f.Name,f=>values.GetValueOrDefault(f.Name)); + using var db=factory.CreateConnection();try{await db.ExecuteAsync("dbo.WriterAuthoring_Save",new{UserID=actor,BookID=book,ChapterID=chapter,SceneID=scene,Kind=kind,EntityID=entity,Version=version,Data=JsonSerializer.Serialize(payload)},commandType:CommandType.StoredProcedure);}catch(SqlException e)when(e.Number==51002){throw new AuthoringConflictException(e.Message,e);} + if(kind is "Chapter" or "Scene"){var selectedBook=await books.GetAsync(book);var title=kind=="Chapter"?(await chapters.GetAsync(chapter))?.ChapterTitle:(await scenes.ListByChapterAsync(chapter)).FirstOrDefault(x=>x.SceneID==scene)?.SceneTitle;if(selectedBook!=null&&title!=null)await activity.RecordAsync(selectedBook.ProjectID,"Updated",kind,entity,title);} + } +} diff --git a/PlotLine/Services/Writer/WriterContext.cs b/PlotLine/Services/Writer/WriterContext.cs new file mode 100644 index 00000000..8aa9fdaa --- /dev/null +++ b/PlotLine/Services/Writer/WriterContext.cs @@ -0,0 +1,66 @@ +namespace PlotLine.Services.Writer; + +// A projection of already-authorised selections, never an authorisation or Word navigation command. +// Each surface owns its slot; selecting a reference must not replace the author's working focus. +public sealed record WriterSelection +{ + public int ProjectID { get; } + public int BookID { get; } + public int? ChapterID { get; } + public int? SceneID { get; } + public WriterSelection(int projectID, int bookID, int? chapterID = null, int? sceneID = null) + { + if (projectID <= 0 || bookID <= 0 || chapterID is <= 0 || sceneID is <= 0 || (sceneID.HasValue && !chapterID.HasValue)) + throw new ArgumentException("A scene selection requires a chapter in a positive project/book scope."); + ProjectID = projectID; BookID = bookID; ChapterID = chapterID; SceneID = sceneID; + } +} + +public enum WriterFocusRole { Working, SavedObjective, Exploration, PinnedReference, Reader, Session } + +public sealed record WriterNativePosition(WriterSelection Selection, Guid Instance, Guid DocumentSession, + Guid Manuscript, long ObservedRevision, long AcceptedRevision); + +public sealed record WriterContext +{ + public WriterSelection Scope { get; } + public WriterSelection? Working { get; private init; } + public WriterSelection? SavedObjective { get; private init; } + public WriterSelection? Exploration { get; private init; } + public WriterSelection? PinnedReference { get; private init; } + public WriterSelection? Reader { get; private init; } + public WriterSelection? Session { get; private init; } + public WriterNativePosition? VerifiedWord { get; private init; } + public WriterContext(int projectID, int bookID) => Scope = new(projectID, bookID); + + public WriterContext Select(WriterFocusRole role, WriterSelection selection) + { + CheckScope(selection); + return role switch + { + WriterFocusRole.Working => this with { Working = selection }, + WriterFocusRole.SavedObjective => this with { SavedObjective = selection }, + WriterFocusRole.Exploration => this with { Exploration = selection }, + WriterFocusRole.PinnedReference => this with { PinnedReference = selection }, + WriterFocusRole.Reader => this with { Reader = selection }, + WriterFocusRole.Session => this with { Session = selection }, + _ => throw new ArgumentOutOfRangeException(nameof(role)) + }; + } + + // Called only after the existing native lease, saved-document, accepted-position and race checks. + public WriterContext WithVerifiedWord(WriterNativePosition position) + { + CheckScope(position.Selection); + if (position.Instance == Guid.Empty || position.DocumentSession == Guid.Empty || position.Manuscript == Guid.Empty || + position.ObservedRevision < 0 || position.AcceptedRevision <= 0) + throw new ArgumentException("Verified native position requires complete document and accepted revision identity."); + return this with { VerifiedWord = position }; + } + + private void CheckScope(WriterSelection selection) + { + if (selection.ProjectID != Scope.ProjectID || selection.BookID != Scope.BookID) + throw new ArgumentException("Selections from different books require a new context."); + } +} diff --git a/PlotLine/Services/Writer/WriterFocusActivities.cs b/PlotLine/Services/Writer/WriterFocusActivities.cs new file mode 100644 index 00000000..687dbb0b --- /dev/null +++ b/PlotLine/Services/Writer/WriterFocusActivities.cs @@ -0,0 +1,13 @@ +namespace PlotLine.Services.Writer; + +// Presentation mapping only; objective and session storage retain their own allowed types. +public static class WriterFocusActivities +{ + public static readonly string[] ObjectiveKinds = ["Drafting", "Revising", "Editing", "Researching", "Proofreading"]; + public static string? SessionKind(string? activity) => activity switch + { + "Drafting" => "Writing", "Revising" or "Editing" => "Editing", "Researching" => "Planning", + "Reading" or "AudioReview" or "Planning" => activity, + _ => null // Proofreading requires an explicit compatible recording choice. + }; +} diff --git a/PlotLine/Services/Writer/WriterSuggestions.cs b/PlotLine/Services/Writer/WriterSuggestions.cs index 18598044..b025bb22 100644 --- a/PlotLine/Services/Writer/WriterSuggestions.cs +++ b/PlotLine/Services/Writer/WriterSuggestions.cs @@ -8,7 +8,7 @@ public sealed class WriterSuggestionProvider:IWriterSuggestionProvider public IReadOnlyList Suggest(WriterDashboardViewModel model) { var result=new List(); - if(model.Objective is {} objective)result.Add(new("focus",$"Your saved activity is {objective.Activity.ToLowerInvariant()}.","Return to your current focus",objective.SceneID.HasValue?"Scenes":"Writer",objective.SceneID.HasValue?"Edit":objective.ChapterID.HasValue?"Chapter":"Index",objective.SceneID??objective.ChapterID)); + if(model.Objective is {} objective)result.Add(new("focus",$"Your saved activity is {objective.Activity.ToLowerInvariant()}.","Return to your current focus",objective.SceneID.HasValue?"Scenes":"Writer",objective.SceneID.HasValue?"Edit":objective.ChapterID.HasValue?"Chapter":"Write",objective.SceneID??objective.ChapterID)); if(model.PlannedActivities.FirstOrDefault() is {} reviewed)result.Add(new("reviewed",$"Your reviewed plan includes {reviewed.Title} on {reviewed.ScheduledDate:d MMM}.","Open your next planned activity",reviewed.SceneID.HasValue?"Scenes":"Writer",reviewed.SceneID.HasValue?"Edit":"Chapter",reviewed.SceneID??reviewed.ChapterID)); var planned=model.WritingSchedule.TodayTasks.Concat(model.WritingSchedule.UpcomingTasks).FirstOrDefault(); if(planned!=null)result.Add(new("planned",$"Your plan includes {planned.SceneTitle} on {planned.ScheduledDate:d MMM}.","Open this planned scene","Scenes","Edit",planned.SceneID)); diff --git a/PlotLine/Services/Writer/WriterWordService.cs b/PlotLine/Services/Writer/WriterWordService.cs new file mode 100644 index 00000000..679e967a --- /dev/null +++ b/PlotLine/Services/Writer/WriterWordService.cs @@ -0,0 +1,37 @@ +using System.Data; +using Dapper; +using PlotLine.Data; +using PlotLine.Models; +using PlotLine.Services.NativeCompanion; +namespace PlotLine.Services.Writer; +public sealed class WriterWordMetadata +{ + public Guid ManuscriptID{get;set;}public long Revision{get;set;}public DateTime? SnapshotUtc{get;set;}public DateTime? ChapterAcceptedUtc{get;set;} +} +public sealed class WriterWordService(ISqlConnectionFactory factory,IWordCompanionRepository access,IParagraphManuscriptRepository paragraphs,IChapterSyncRepository chapters,NativePresenceStore presence) +{ + private static T? One(IEnumerable rows) where T:class {var candidates=rows.Take(2).ToArray();return candidates.Length==1?candidates[0]:null;} + public async Task Metadata(int user,int book,int? chapter){using var db=factory.CreateConnection();return await db.QuerySingleOrDefaultAsync("dbo.WriterWord_Status",new{UserID=user,BookID=book,ChapterID=chapter},commandType:CommandType.StoredProcedure);} + public async Task Position(int user,NativeLease lease,WriterWordMetadata? metadata){var p=lease.Position;if(p.WordSaved!=true||!p.WordAvailable||!p.CursorStart.HasValue||metadata?.ManuscriptID!=p.ManuscriptId)return null;var position=p.CanChapterSync?await chapters.Position(user,p.BookId,p.ManuscriptId,lease.Session,p.Revision,p.CursorStart.Value):await paragraphs.Position(user,p.BookId,p.ManuscriptId,lease.Session,p.Revision,p.CursorStart.Value);return position?.HasSnapshot==true&&position.Revision==metadata.Revision?position:null;} + public async Task Navigate(int user,int book,int chapter,int? scene,Guid instance,Guid session,Guid manuscript,long revision,Guid id) + { + var structure=await access.GetBookStructureAsync(book,user);var target=structure==null?null:One(structure.Chapters.Where(c=>c.ChapterId==chapter));if(target==null||scene.HasValue&&!target.Scenes.Any(s=>s.SceneId==scene))return false; + var lease=One(presence.Read(user,book).Where(l=>l.Instance==instance&&l.Session==session&&l.Position.ManuscriptId==manuscript&&l.Position.Revision==revision&&l.Position.WordAvailable&&l.Position.WordSaved==true&&l.Position.CanAcknowledgeNavigation)); + if(lease==null)return false; + var state=await paragraphs.Get(user,book);if(state==null||state.ManuscriptId!=manuscript)return false; + int? start=null; + if(scene.HasValue){ + var saved=One(state.Scenes.Where(s=>!s.Retired&&s.CanonicalId==scene&&s.ChapterId==chapter));var first=saved==null?null:state.Paragraphs.Where(p=>p.Story&&p.SceneId==saved.Id).OrderBy(p=>p.Occurrence.Ordinal).FirstOrDefault(); + if(first?.PositionVerified!=true)return false; + if(lease.Position.CanChapterSync){var anchor=await chapters.SceneStart(user,book,scene.Value,first.Occurrence.Id,manuscript,session,revision);if(anchor?.Revision==state.Revision&&anchor.ChapterID==chapter&&anchor.SceneID==scene)start=anchor.StartPosition;} + else if(state.SessionId==session&&state.WordRevision==revision)start=first.Occurrence.Start; + }else if(lease.Position.CanChapterSync){ + var live=One((await chapters.List(user,book,session,revision)).Where(c=>c.ChapterID==chapter&&c.SessionID==session&&c.WordRevision==revision));if(live!=null)start=live.StartPosition; + }else if(state.SessionId==session&&state.WordRevision==revision){var heading=One(state.Chapters.Where(c=>c.CanonicalId==chapter))?.HeadingId;start=One(state.Paragraphs.Where(p=>p.Occurrence.Id==heading&&p.PositionVerified))?.Occurrence.Start;} + if(!start.HasValue||start<0)return false; + // The live lookup joins current accepted checkpoint hashes and manuscript identity. A stale list is never proof. + var position=lease.Position.CanChapterSync?await chapters.Position(user,book,manuscript,session,revision,start.Value):await paragraphs.Position(user,book,manuscript,session,revision,start.Value); + if(position?.HasSnapshot!=true||position.Revision!=state.Revision||position.ChapterID!=chapter||scene.HasValue&&position.SceneID!=scene)return false; + return presence.Navigate(user,book,instance,session,manuscript,revision,start.Value,requireSaved:true,navigationId:id,requireAcknowledgement:true); + } +} diff --git a/PlotLine/Services/WriterNavigation.cs b/PlotLine/Services/WriterNavigation.cs new file mode 100644 index 00000000..77cd9546 --- /dev/null +++ b/PlotLine/Services/WriterNavigation.cs @@ -0,0 +1,49 @@ +namespace PlotLine.Services; + +// Route/presentation metadata only. No persisted global focus or author-data mutation. +public static class WriterNavigation +{ + public static IReadOnlyList Destinations { get; } = Array.AsReadOnly(new[] { "Write", "Explore", "Plan", "Review", "Reflect" }); + private static readonly string[] BookSwitchActions = ["Write", "Explore", "Plan", "Review", "Reflect", "Dashboard", "Overview"]; + public static string BookSwitchAction(string? action) => BookSwitchActions.FirstOrDefault(x => string.Equals(x, action, StringComparison.OrdinalIgnoreCase)) ?? "Index"; + public static string DestinationForAction(string? action) => action?.ToLowerInvariant() switch + { + "write" => "Write", "explore" => "Explore", "plan" => "Plan", "review" => "Review", "reflect" => "Reflect", "dashboard" => "Dashboard", + "writingplans" or "schedulesetup" or "schedulepreview" or "editwritingplan" => "Plan", + "journey" => "Reflect", "workspaces" or "overview" or "legacy" or "chapter" => "Write", _ => "Home" + }; + public static string Purpose(string destination) => destination switch + { + "Write" => "Choose your focus and return to the chapter or scene you are working on.", + "Explore" => "Develop an idea, find a way forward, or look more closely at your story.", + "Plan" => "Decide what you want to work on and make room for it.", + "Review" => "Read accepted manuscript text, revisit intentions and decide what to improve.", + "Reflect" => "See recorded progress and revisit your writing journey.", + "Dashboard" => "Your plans, manuscript and recorded progress at a glance.", + _ => "Choose where you would like to begin today." + }; + public static IReadOnlyList RibbonGroups(string destination) + { + var groups = new List + { + new("Writer", new("Home","overview","Writer","Index","writerNavigation"), + new("Write","writer","Writer","Write","writerNavigation"), + new("Explore","point","Writer","Explore","writerNavigation"), + new("Plan","calendar","Writer","Plan","writerNavigation"), + new("Review","review","Writer","Review","writerNavigation"), + new("Reflect","metrics","Writer","Reflect","writerNavigation")) + }; + var context = destination switch + { + "Write" => new RibbonGroup("Current work", new("Chapters","bible","Books","Details","book"), new("Writing desk","writer","Writer","Overview","writerBook"), new("Writing Plan","calendar","Writer","WritingPlans","writerBook")), + "Explore" => new RibbonGroup("Story exploration", new("Problem Solver","point","WritingProblems","Index","global"), new("Story overview","timeline","Timeline","Index","writerBook")), + "Plan" => new RibbonGroup("Writing plans", new("Writing Plan","calendar","Writer","WritingPlans","writerBook"), new("Schedule Preview","calendar","Writer","SchedulePreview","writerBook")), + "Review" => new RibbonGroup("Reading & review", new("Manuscript Reader","bible","ManuscriptReader","Index","writerBook"), new("Writing desk","writer","Writer","Overview","writerBook")), + "Reflect" => new RibbonGroup("Writing history", new("Writing Journey","calendar","Writer","Journey","writerBook"), new("Reports","metrics","WritingActivity","Index","writerBook",OwnerOnly:true)), + _ => new RibbonGroup("Your writing", new("Writing Dashboard","metrics","Writer","Dashboard","writerBook"), new("Writing desk","writer","Writer","Overview","writerBook")) + }; + groups.Add(context); + groups.Add(new("Utilities", new("Workspaces","threads","Writer","Workspaces","writerBook"), new("Display Setup","maps","Writer","DisplaySetup","writerBook"))); + return groups; + } +} diff --git a/PlotLine/Sql/264_WriterFoundationQueues.sql b/PlotLine/Sql/264_WriterFoundationQueues.sql new file mode 100644 index 00000000..6c1259e2 --- /dev/null +++ b/PlotLine/Sql/264_WriterFoundationQueues.sql @@ -0,0 +1,99 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- Forward-only live/source reconciliation. Book filtering precedes TOP (40). +CREATE OR ALTER PROCEDURE dbo.WriterDashboard_Scenes + @ProjectID int = NULL, + @Queue nvarchar(50), + @BookID int = NULL +AS +BEGIN + SET NOCOUNT ON; + + WITH SceneBase AS + ( + SELECT p.ProjectID, p.ProjectName, b.BookID, b.BookTitle, b.Subtitle AS BookSubtitle, c.ChapterID, c.ChapterNumber, c.ChapterTitle, + s.SceneID, s.SceneNumber, s.SceneTitle, s.Summary, + s.RevisionStatusID, + rs.StatusName AS RevisionStatusName, + COALESCE(sw.DraftStatus, rs.StatusName, N'Planned') AS DraftStatus, + sw.Priority, + COALESCE(sw.IsBlocked, 0) AS IsBlocked, + sw.BlockedReason, + COALESCE(sw.ReadyForDraft, 0) AS ReadyForDraft, + COALESCE(sw.ReadyForRevision, 0) AS ReadyForRevision, + COALESCE(sw.ReadyForPolish, 0) AS ReadyForPolish, + b.SortOrder AS BookSortOrder, + c.SortOrder AS ChapterSortOrder, + s.SortOrder AS SceneSortOrder + FROM dbo.Projects p + INNER JOIN dbo.Books b ON b.ProjectID = p.ProjectID AND b.IsArchived = 0 + INNER JOIN dbo.Chapters c ON c.BookID = b.BookID AND c.IsArchived = 0 + INNER JOIN dbo.Scenes s ON s.ChapterID = c.ChapterID AND s.IsArchived = 0 + INNER JOIN dbo.RevisionStatuses rs ON rs.RevisionStatusID = s.RevisionStatusID + LEFT JOIN dbo.SceneWorkflow sw ON sw.SceneID = s.SceneID + WHERE p.IsArchived = 0 AND (@ProjectID IS NULL OR p.ProjectID = @ProjectID) + AND (@BookID IS NULL OR b.BookID = @BookID) + ) + SELECT TOP (40) sb.ProjectID, sb.ProjectName, sb.BookID, sb.BookTitle, sb.BookSubtitle, sb.ChapterID, sb.ChapterNumber, sb.ChapterTitle, + sb.SceneID, sb.SceneNumber, sb.SceneTitle, sb.Summary, sb.RevisionStatusID, sb.RevisionStatusName, + sb.DraftStatus, sb.Priority, sb.IsBlocked, sb.BlockedReason, + ISNULL(warnings.WarningCount, 0) AS WarningCount, + ISNULL(checklist.RemainingChecklistCount, 0) AS RemainingChecklistCount, + ISNULL(notes.UnresolvedNoteCount, 0) AS UnresolvedNoteCount, + threads.ImportantThreads, + pinned.PinnedNotes + FROM SceneBase sb + OUTER APPLY + ( + SELECT COUNT(*) AS WarningCount + FROM dbo.ContinuityWarnings cw + WHERE cw.SceneID = sb.SceneID AND cw.IsDismissed = 0 + ) warnings + OUTER APPLY + ( + SELECT COUNT(*) AS RemainingChecklistCount + FROM dbo.SceneChecklistItems sci + WHERE sci.SceneID = sb.SceneID AND sci.IsCompleted = 0 + ) checklist + OUTER APPLY + ( + SELECT COUNT(*) AS UnresolvedNoteCount + FROM dbo.SceneNotes sn + INNER JOIN dbo.SceneNoteTypes snt ON snt.SceneNoteTypeID = sn.SceneNoteTypeID + WHERE sn.SceneID = sb.SceneID AND sn.IsResolved = 0 + AND (@Queue <> N'NeedsAttention' OR snt.TypeName IN (N'TODO', N'Continuity Note')) + ) notes + OUTER APPLY + ( + SELECT STRING_AGG(CONVERT(nvarchar(max), pt.ThreadTitle), N', ') AS ImportantThreads + FROM + ( + SELECT DISTINCT TOP (5) pt.ThreadTitle, pt.Importance + FROM dbo.ThreadEvents te + INNER JOIN dbo.PlotThreads pt ON pt.PlotThreadID = te.PlotThreadID + WHERE te.SceneID = sb.SceneID + ORDER BY pt.Importance DESC, pt.ThreadTitle + ) pt + ) threads + OUTER APPLY + ( + SELECT STRING_AGG(CONVERT(nvarchar(max), COALESCE(sn.NoteTitle, sn.NoteText)), N' | ') AS PinnedNotes + FROM dbo.SceneNotes sn + WHERE sn.SceneID = sb.SceneID AND sn.IsPinned = 1 AND sn.IsResolved = 0 + ) pinned + WHERE + (@Queue = N'WriteNext' AND sb.RevisionStatusName = N'Outlined') + OR (@Queue = N'ContinueWriting' AND sb.RevisionStatusName = N'Drafted') + OR (@Queue = N'NeedsAttention' AND (sb.IsBlocked = 1 OR ISNULL(warnings.WarningCount, 0) > 0 OR ISNULL(notes.UnresolvedNoteCount, 0) > 0)) + OR (@Queue = N'RevisionQueue' AND sb.RevisionStatusName = N'Needs Work') + OR (@Queue = N'PolishingQueue' AND sb.RevisionStatusName = N'Revised') + -- Older consumers retain their original explicit readiness semantics. + OR (@Queue = N'Blocked' AND sb.IsBlocked = 1) + OR (@Queue = N'ReadyForDraft' AND sb.ReadyForDraft = 1) + OR (@Queue = N'ReadyForRevision' AND sb.ReadyForRevision = 1) + OR (@Queue = N'ReadyForPolish' AND sb.ReadyForPolish = 1) + OR (@Queue = N'Warnings' AND ISNULL(warnings.WarningCount, 0) > 0) + ORDER BY ISNULL(sb.Priority, 0) DESC, sb.BookSortOrder, sb.ChapterSortOrder, sb.SceneSortOrder, sb.SceneID; +END; +GO diff --git a/PlotLine/Sql/265_WriterInlineAuthoring.sql b/PlotLine/Sql/265_WriterInlineAuthoring.sql new file mode 100644 index 00000000..7c863b66 --- /dev/null +++ b/PlotLine/Sql/265_WriterInlineAuthoring.sql @@ -0,0 +1,76 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- No new tables. Inspection never invokes legacy getters that seed goals/workflow/checklists. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Sections + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL +AS +BEGIN + SET NOCOUNT ON; + IF NOT EXISTS(SELECT 1 FROM dbo.Books b JOIN dbo.ProjectUserAccess a ON a.ProjectID=b.ProjectID + JOIN dbo.Chapters c ON c.BookID=b.BookID WHERE b.BookID=@BookID AND c.ChapterID=@ChapterID AND b.IsArchived=0 AND c.IsArchived=0 AND a.UserID=@UserID AND a.IsActive=1) + THROW 51000,'Working selection unavailable',1; + IF @SceneID IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.Scenes WHERE SceneID=@SceneID AND ChapterID=@ChapterID AND IsArchived=0) THROW 51000,'Scene unavailable in this chapter',1; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max)); + INSERT @r SELECT 'Chapter',@ChapterID,(SELECT Summary,ChapterPurposeID,UpdatedDate FROM dbo.Chapters WITH(UPDLOCK,HOLDLOCK) WHERE ChapterID=@ChapterID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Goals',@ChapterID,(SELECT g.GoalSummary,g.EmotionalGoal,g.ReaderTakeaway,g.MustInclude,g.RisksOrConcerns,g.UpdatedDate FROM (SELECT @ChapterID ID) c LEFT JOIN dbo.ChapterGoals g WITH(UPDLOCK,HOLDLOCK) ON g.ChapterID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + IF @SceneID IS NOT NULL BEGIN + INSERT @r SELECT 'Scene',@SceneID,(SELECT ScenePurposeNotes,SceneOutcomeNotes,UpdatedDate FROM dbo.Scenes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Workflow',@SceneID,(SELECT w.Priority,w.EstimatedWordCount,w.ActualWordCount,w.DraftedDate,w.LastWorkedOn,w.IsBlocked,w.BlockedReason,w.UpdatedDate FROM(SELECT @SceneID ID)c LEFT JOIN dbo.SceneWorkflow w WITH(UPDLOCK,HOLDLOCK) ON w.SceneID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Note',n.SceneNoteID,(SELECT n.SceneNoteTypeID,n.NoteTitle,n.NoteText,n.SortOrder,n.IsPinned,n.IsResolved,n.UpdatedDate FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneNotes n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + INSERT @r SELECT 'Checklist',n.SceneChecklistItemID,(SELECT n.ItemText,n.IsCompleted,n.SortOrder,n.UpdatedDate FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneChecklistItems n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + -- Collection fingerprints make a repeated create with its old token conflict instead of duplicating a row. + INSERT @r SELECT 'AddNote',0,(SELECT * FROM dbo.SceneNotes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneNoteID FOR JSON PATH,INCLUDE_NULL_VALUES); + INSERT @r SELECT 'AddChecklist',0,(SELECT * FROM dbo.SceneChecklistItems WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneChecklistItemID FOR JSON PATH,INCLUDE_NULL_VALUES); + END; + SELECT Kind,EntityID,Data,CONVERT(varchar(64),HASHBYTES('SHA2_256',Data),2) Version FROM @r; +END; +GO +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Save + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL,@Kind varchar(20),@EntityID int,@Version varchar(64),@Data nvarchar(max) +AS +BEGIN + SET NOCOUNT ON; SET XACT_ABORT ON; + IF ISJSON(@Data)<>1 THROW 51003,'Invalid form data',1; + BEGIN TRY + BEGIN TRANSACTION; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max),Version varchar(64)); + INSERT @r EXEC dbo.WriterAuthoring_Sections @UserID,@BookID,@ChapterID,@SceneID; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID) THROW 51000,'Editor unavailable in this selection',1; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID AND Version=ISNULL(@Version,'')) THROW 51002,'This information changed. Your text is retained; reload the editor to compare before saving again.',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE LEN(CONVERT(nvarchar(max),value))>20000) THROW 51003,'Keep each text field within 20000 characters',1; + DECLARE @summary nvarchar(max)=JSON_VALUE(@Data,'$.Summary'),@purpose int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.ChapterPurposeID')), + @goal nvarchar(max),@emotion nvarchar(max),@takeaway nvarchar(max),@include nvarchar(max),@risk nvarchar(max), + @noteType int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.SceneNoteTypeID')),@title nvarchar(200)=JSON_VALUE(@Data,'$.NoteTitle'),@text nvarchar(max)=JSON_VALUE(@Data,'$.NoteText'), + @sort int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.SortOrder')),@pinned bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsPinned')),0),@resolved bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsResolved')),0), + @item nvarchar(300)=JSON_VALUE(@Data,'$.ItemText'),@done bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsCompleted')),0); + -- OPENJSON WITH nvarchar(max) avoids JSON_VALUE's 4000-character limit on author prose. + SELECT @summary=Summary,@goal=GoalSummary,@emotion=EmotionalGoal,@takeaway=ReaderTakeaway,@include=MustInclude,@risk=RisksOrConcerns,@text=NoteText FROM OPENJSON(@Data) WITH(Summary nvarchar(max),GoalSummary nvarchar(max),EmotionalGoal nvarchar(max),ReaderTakeaway nvarchar(max),MustInclude nvarchar(max),RisksOrConcerns nvarchar(max),NoteText nvarchar(max)); + IF @Kind='Chapter' BEGIN + IF @purpose IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.ChapterPurposeTypes WHERE ChapterPurposeID=@purpose AND IsArchived=0) THROW 51003,'Choose an available chapter purpose',1; + UPDATE dbo.Chapters SET Summary=@summary,ChapterPurposeID=@purpose,UpdatedDate=SYSUTCDATETIME() WHERE ChapterID=@ChapterID; + END ELSE IF @Kind='Goals' EXEC dbo.ChapterGoal_Save @ChapterID,@goal,@emotion,@takeaway,@include,@risk; + ELSE IF @Kind='Scene' BEGIN + DECLARE @sp nvarchar(max),@out nvarchar(max); + SELECT @sp=ScenePurposeNotes,@out=SceneOutcomeNotes FROM OPENJSON(@Data) WITH(ScenePurposeNotes nvarchar(max),SceneOutcomeNotes nvarchar(max)); + UPDATE dbo.Scenes SET ScenePurposeNotes=@sp,SceneOutcomeNotes=@out,UpdatedDate=SYSUTCDATETIME() WHERE SceneID=@SceneID; + END ELSE IF @Kind IN('Note','AddNote') BEGIN + IF LEN(ISNULL(@text,''))=0 OR NOT EXISTS(SELECT 1 FROM dbo.SceneNoteTypes WHERE SceneNoteTypeID=@noteType AND IsActive=1) THROW 51003,'Choose a note type and enter note text',1; + IF LEN(ISNULL(JSON_VALUE(@Data,'$.NoteTitle'),''))>200 THROW 51003,'Note titles may contain up to 200 characters',1; + EXEC dbo.SceneNote_Save @EntityID,@SceneID,@noteType,@title,@text,@sort,@pinned,@resolved; + END ELSE IF @Kind IN('Checklist','AddChecklist') BEGIN + IF LEN(ISNULL(JSON_VALUE(@Data,'$.ItemText'),''))=0 OR LEN(JSON_VALUE(@Data,'$.ItemText'))>300 THROW 51003,'Enter a reminder of 1 to 300 characters',1; + EXEC dbo.SceneChecklist_Save @EntityID,@SceneID,@item,@done,@sort; + END ELSE IF @Kind='Workflow' BEGIN + DECLARE @priority int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.Priority')),@estimated int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.EstimatedWordCount')),@actual int=TRY_CONVERT(int,JSON_VALUE(@Data,'$.ActualWordCount')), + @drafted date=TRY_CONVERT(date,JSON_VALUE(@Data,'$.DraftedDate')),@worked date=TRY_CONVERT(date,JSON_VALUE(@Data,'$.LastWorkedOn')),@blocked bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsBlocked')),0),@reason nvarchar(max), + @status nvarchar(50)='Planned',@readyDraft bit=0,@readyRevision bit=0,@readyPolish bit=0; + SELECT @reason=BlockedReason FROM OPENJSON(@Data) WITH(BlockedReason nvarchar(max)); + IF @priority IS NOT NULL AND @priority NOT BETWEEN 1 AND 10 OR @estimated<0 OR @actual<0 THROW 51003,'Priority must be 1 to 10 and word estimates non-negative',1; + SELECT @status=DraftStatus,@readyDraft=ReadyForDraft,@readyRevision=ReadyForRevision,@readyPolish=ReadyForPolish FROM dbo.SceneWorkflow WHERE SceneID=@SceneID; + EXEC dbo.SceneWorkflow_Save @SceneID,@status,@estimated,@actual,@drafted,@worked,@readyDraft,@readyRevision,@readyPolish,@blocked,@reason,@priority; + END; + COMMIT; + END TRY BEGIN CATCH IF @@TRANCOUNT>0 ROLLBACK;THROW;END CATCH; +END; +GO diff --git a/PlotLine/Sql/266_WriterInlineOptionalValues.sql b/PlotLine/Sql/266_WriterInlineOptionalValues.sql new file mode 100644 index 00000000..18774b1f --- /dev/null +++ b/PlotLine/Sql/266_WriterInlineOptionalValues.sql @@ -0,0 +1,54 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- Forward-only correction: SQL converts empty strings to zero/1900 dates; optional controls must stay NULL. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Save + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL,@Kind varchar(20),@EntityID int,@Version varchar(64),@Data nvarchar(max) +AS +BEGIN + SET NOCOUNT ON; SET XACT_ABORT ON; + IF ISJSON(@Data)<>1 THROW 51003,'Invalid form data',1; + BEGIN TRY + BEGIN TRANSACTION; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max),Version varchar(64)); + INSERT @r EXEC dbo.WriterAuthoring_Sections @UserID,@BookID,@ChapterID,@SceneID; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID) THROW 51000,'Editor unavailable in this selection',1; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID AND Version=ISNULL(@Version,'')) THROW 51002,'This information changed. Your text is retained; reload the editor to compare before saving again.',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE LEN(CONVERT(nvarchar(max),value))>20000) THROW 51003,'Keep each text field within 20000 characters',1; + DECLARE @summary nvarchar(max)=JSON_VALUE(@Data,'$.Summary'),@purpose int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ChapterPurposeID'),'')), + @goal nvarchar(max),@emotion nvarchar(max),@takeaway nvarchar(max),@include nvarchar(max),@risk nvarchar(max), + @noteType int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SceneNoteTypeID'),'')),@title nvarchar(200)=JSON_VALUE(@Data,'$.NoteTitle'),@text nvarchar(max)=JSON_VALUE(@Data,'$.NoteText'), + @sort int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SortOrder'),'')),@pinned bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsPinned')),0),@resolved bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsResolved')),0), + @item nvarchar(300)=JSON_VALUE(@Data,'$.ItemText'),@done bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsCompleted')),0); + -- OPENJSON WITH nvarchar(max) avoids JSON_VALUE's 4000-character limit on author prose. + SELECT @summary=Summary,@goal=GoalSummary,@emotion=EmotionalGoal,@takeaway=ReaderTakeaway,@include=MustInclude,@risk=RisksOrConcerns,@text=NoteText FROM OPENJSON(@Data) WITH(Summary nvarchar(max),GoalSummary nvarchar(max),EmotionalGoal nvarchar(max),ReaderTakeaway nvarchar(max),MustInclude nvarchar(max),RisksOrConcerns nvarchar(max),NoteText nvarchar(max)); + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('Priority','EstimatedWordCount','ActualWordCount','SortOrder','ChapterPurposeID','SceneNoteTypeID') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(int,value) IS NULL) THROW 51003,'Use valid whole numbers',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('DraftedDate','LastWorkedOn') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(date,value) IS NULL) THROW 51003,'Use valid dates',1; + IF @Kind='Chapter' BEGIN + IF @purpose IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.ChapterPurposeTypes WHERE ChapterPurposeID=@purpose AND IsArchived=0) THROW 51003,'Choose an available chapter purpose',1; + UPDATE dbo.Chapters SET Summary=@summary,ChapterPurposeID=@purpose,UpdatedDate=SYSUTCDATETIME() WHERE ChapterID=@ChapterID; + END ELSE IF @Kind='Goals' EXEC dbo.ChapterGoal_Save @ChapterID,@goal,@emotion,@takeaway,@include,@risk; + ELSE IF @Kind='Scene' BEGIN + DECLARE @sp nvarchar(max),@out nvarchar(max); + SELECT @sp=ScenePurposeNotes,@out=SceneOutcomeNotes FROM OPENJSON(@Data) WITH(ScenePurposeNotes nvarchar(max),SceneOutcomeNotes nvarchar(max)); + UPDATE dbo.Scenes SET ScenePurposeNotes=@sp,SceneOutcomeNotes=@out,UpdatedDate=SYSUTCDATETIME() WHERE SceneID=@SceneID; + END ELSE IF @Kind IN('Note','AddNote') BEGIN + IF LEN(ISNULL(@text,''))=0 OR NOT EXISTS(SELECT 1 FROM dbo.SceneNoteTypes WHERE SceneNoteTypeID=@noteType AND IsActive=1) THROW 51003,'Choose a note type and enter note text',1; + IF LEN(ISNULL(JSON_VALUE(@Data,'$.NoteTitle'),''))>200 THROW 51003,'Note titles may contain up to 200 characters',1; + EXEC dbo.SceneNote_Save @EntityID,@SceneID,@noteType,@title,@text,@sort,@pinned,@resolved; + END ELSE IF @Kind IN('Checklist','AddChecklist') BEGIN + IF LEN(ISNULL(JSON_VALUE(@Data,'$.ItemText'),''))=0 OR LEN(JSON_VALUE(@Data,'$.ItemText'))>300 THROW 51003,'Enter a reminder of 1 to 300 characters',1; + EXEC dbo.SceneChecklist_Save @EntityID,@SceneID,@item,@done,@sort; + END ELSE IF @Kind='Workflow' BEGIN + DECLARE @priority int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.Priority'),'')),@estimated int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.EstimatedWordCount'),'')),@actual int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ActualWordCount'),'')), + @drafted date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.DraftedDate'),'')),@worked date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.LastWorkedOn'),'')),@blocked bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsBlocked')),0),@reason nvarchar(max), + @status nvarchar(50)='Planned',@readyDraft bit=0,@readyRevision bit=0,@readyPolish bit=0; + SELECT @reason=BlockedReason FROM OPENJSON(@Data) WITH(BlockedReason nvarchar(max)); + IF @priority IS NOT NULL AND @priority NOT BETWEEN 1 AND 10 OR @estimated<0 OR @actual<0 THROW 51003,'Priority must be 1 to 10 and word estimates non-negative',1; + SELECT @status=DraftStatus,@readyDraft=ReadyForDraft,@readyRevision=ReadyForRevision,@readyPolish=ReadyForPolish FROM dbo.SceneWorkflow WHERE SceneID=@SceneID; + EXEC dbo.SceneWorkflow_Save @SceneID,@status,@estimated,@actual,@drafted,@worked,@readyDraft,@readyRevision,@readyPolish,@blocked,@reason,@priority; + END; + COMMIT; + END TRY BEGIN CATCH IF @@TRANCOUNT>0 ROLLBACK;THROW;END CATCH; +END; +GO diff --git a/PlotLine/Sql/267_WriterInlineLongTextValidation.sql b/PlotLine/Sql/267_WriterInlineLongTextValidation.sql new file mode 100644 index 00000000..17cd0e23 --- /dev/null +++ b/PlotLine/Sql/267_WriterInlineLongTextValidation.sql @@ -0,0 +1,54 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- TRY_CONVERT on nvarchar(max) over 4000 chars can fail before key predicates are applied. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Save + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL,@Kind varchar(20),@EntityID int,@Version varchar(64),@Data nvarchar(max) +AS +BEGIN + SET NOCOUNT ON; SET XACT_ABORT ON; + IF ISJSON(@Data)<>1 THROW 51003,'Invalid form data',1; + BEGIN TRY + BEGIN TRANSACTION; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max),Version varchar(64)); + INSERT @r EXEC dbo.WriterAuthoring_Sections @UserID,@BookID,@ChapterID,@SceneID; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID) THROW 51000,'Editor unavailable in this selection',1; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID AND Version=ISNULL(@Version,'')) THROW 51002,'This information changed. Your text is retained; reload the editor to compare before saving again.',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE LEN(CONVERT(nvarchar(max),value))>20000) THROW 51003,'Keep each text field within 20000 characters',1; + DECLARE @summary nvarchar(max)=JSON_VALUE(@Data,'$.Summary'),@purpose int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ChapterPurposeID'),'')), + @goal nvarchar(max),@emotion nvarchar(max),@takeaway nvarchar(max),@include nvarchar(max),@risk nvarchar(max), + @noteType int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SceneNoteTypeID'),'')),@title nvarchar(200)=JSON_VALUE(@Data,'$.NoteTitle'),@text nvarchar(max)=JSON_VALUE(@Data,'$.NoteText'), + @sort int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SortOrder'),'')),@pinned bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsPinned')),0),@resolved bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsResolved')),0), + @item nvarchar(300)=JSON_VALUE(@Data,'$.ItemText'),@done bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsCompleted')),0); + -- OPENJSON WITH nvarchar(max) avoids JSON_VALUE's 4000-character limit on author prose. + SELECT @summary=Summary,@goal=GoalSummary,@emotion=EmotionalGoal,@takeaway=ReaderTakeaway,@include=MustInclude,@risk=RisksOrConcerns,@text=NoteText FROM OPENJSON(@Data) WITH(Summary nvarchar(max),GoalSummary nvarchar(max),EmotionalGoal nvarchar(max),ReaderTakeaway nvarchar(max),MustInclude nvarchar(max),RisksOrConcerns nvarchar(max),NoteText nvarchar(max)); + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('Priority','EstimatedWordCount','ActualWordCount','SortOrder','ChapterPurposeID','SceneNoteTypeID') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(int,CONVERT(nvarchar(4000),value)) IS NULL) THROW 51003,'Use valid whole numbers',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('DraftedDate','LastWorkedOn') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(date,CONVERT(nvarchar(4000),value)) IS NULL) THROW 51003,'Use valid dates',1; + IF @Kind='Chapter' BEGIN + IF @purpose IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.ChapterPurposeTypes WHERE ChapterPurposeID=@purpose AND IsArchived=0) THROW 51003,'Choose an available chapter purpose',1; + UPDATE dbo.Chapters SET Summary=@summary,ChapterPurposeID=@purpose,UpdatedDate=SYSUTCDATETIME() WHERE ChapterID=@ChapterID; + END ELSE IF @Kind='Goals' EXEC dbo.ChapterGoal_Save @ChapterID,@goal,@emotion,@takeaway,@include,@risk; + ELSE IF @Kind='Scene' BEGIN + DECLARE @sp nvarchar(max),@out nvarchar(max); + SELECT @sp=ScenePurposeNotes,@out=SceneOutcomeNotes FROM OPENJSON(@Data) WITH(ScenePurposeNotes nvarchar(max),SceneOutcomeNotes nvarchar(max)); + UPDATE dbo.Scenes SET ScenePurposeNotes=@sp,SceneOutcomeNotes=@out,UpdatedDate=SYSUTCDATETIME() WHERE SceneID=@SceneID; + END ELSE IF @Kind IN('Note','AddNote') BEGIN + IF LEN(ISNULL(@text,''))=0 OR NOT EXISTS(SELECT 1 FROM dbo.SceneNoteTypes WHERE SceneNoteTypeID=@noteType AND IsActive=1) THROW 51003,'Choose a note type and enter note text',1; + IF LEN(ISNULL(JSON_VALUE(@Data,'$.NoteTitle'),''))>200 THROW 51003,'Note titles may contain up to 200 characters',1; + EXEC dbo.SceneNote_Save @EntityID,@SceneID,@noteType,@title,@text,@sort,@pinned,@resolved; + END ELSE IF @Kind IN('Checklist','AddChecklist') BEGIN + IF LEN(ISNULL(JSON_VALUE(@Data,'$.ItemText'),''))=0 OR LEN(JSON_VALUE(@Data,'$.ItemText'))>300 THROW 51003,'Enter a reminder of 1 to 300 characters',1; + EXEC dbo.SceneChecklist_Save @EntityID,@SceneID,@item,@done,@sort; + END ELSE IF @Kind='Workflow' BEGIN + DECLARE @priority int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.Priority'),'')),@estimated int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.EstimatedWordCount'),'')),@actual int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ActualWordCount'),'')), + @drafted date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.DraftedDate'),'')),@worked date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.LastWorkedOn'),'')),@blocked bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsBlocked')),0),@reason nvarchar(max), + @status nvarchar(50)='Planned',@readyDraft bit=0,@readyRevision bit=0,@readyPolish bit=0; + SELECT @reason=BlockedReason FROM OPENJSON(@Data) WITH(BlockedReason nvarchar(max)); + IF @priority IS NOT NULL AND @priority NOT BETWEEN 1 AND 10 OR @estimated<0 OR @actual<0 THROW 51003,'Priority must be 1 to 10 and word estimates non-negative',1; + SELECT @status=DraftStatus,@readyDraft=ReadyForDraft,@readyRevision=ReadyForRevision,@readyPolish=ReadyForPolish FROM dbo.SceneWorkflow WHERE SceneID=@SceneID; + EXEC dbo.SceneWorkflow_Save @SceneID,@status,@estimated,@actual,@drafted,@worked,@readyDraft,@readyRevision,@readyPolish,@blocked,@reason,@priority; + END; + COMMIT; + END TRY BEGIN CATCH IF @@TRANCOUNT>0 ROLLBACK;THROW;END CATCH; +END; +GO diff --git a/PlotLine/Sql/268_WriterAuthoringFieldConcurrency.sql b/PlotLine/Sql/268_WriterAuthoringFieldConcurrency.sql new file mode 100644 index 00000000..434030c1 --- /dev/null +++ b/PlotLine/Sql/268_WriterAuthoringFieldConcurrency.sql @@ -0,0 +1,28 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- Fingerprint only fields this editor owns. Parent/audit timestamps change on unrelated saves. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Sections + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL +AS +BEGIN + SET NOCOUNT ON; + IF NOT EXISTS(SELECT 1 FROM dbo.Books b JOIN dbo.ProjectUserAccess a ON a.ProjectID=b.ProjectID + JOIN dbo.Chapters c ON c.BookID=b.BookID WHERE b.BookID=@BookID AND c.ChapterID=@ChapterID AND b.IsArchived=0 AND c.IsArchived=0 AND a.UserID=@UserID AND a.IsActive=1) + THROW 51000,'Working selection unavailable',1; + IF @SceneID IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.Scenes WHERE SceneID=@SceneID AND ChapterID=@ChapterID AND IsArchived=0) THROW 51000,'Scene unavailable in this chapter',1; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max)); + INSERT @r SELECT 'Chapter',@ChapterID,(SELECT Summary,ChapterPurposeID FROM dbo.Chapters WITH(UPDLOCK,HOLDLOCK) WHERE ChapterID=@ChapterID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Goals',@ChapterID,(SELECT g.GoalSummary,g.EmotionalGoal,g.ReaderTakeaway,g.MustInclude,g.RisksOrConcerns FROM (SELECT @ChapterID ID) c LEFT JOIN dbo.ChapterGoals g WITH(UPDLOCK,HOLDLOCK) ON g.ChapterID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + IF @SceneID IS NOT NULL BEGIN + INSERT @r SELECT 'Scene',@SceneID,(SELECT ScenePurposeNotes,SceneOutcomeNotes FROM dbo.Scenes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Workflow',@SceneID,(SELECT w.Priority,w.EstimatedWordCount,w.ActualWordCount,w.DraftedDate,w.LastWorkedOn,w.IsBlocked,w.BlockedReason FROM(SELECT @SceneID ID)c LEFT JOIN dbo.SceneWorkflow w WITH(UPDLOCK,HOLDLOCK) ON w.SceneID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Note',n.SceneNoteID,(SELECT n.SceneNoteTypeID,n.NoteTitle,n.NoteText,n.SortOrder,n.IsPinned,n.IsResolved FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneNotes n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + INSERT @r SELECT 'Checklist',n.SceneChecklistItemID,(SELECT n.ItemText,n.IsCompleted,n.SortOrder FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneChecklistItems n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + -- Collection fingerprints make a repeated create with its old token conflict instead of duplicating a row. + INSERT @r SELECT 'AddNote',0,(SELECT * FROM dbo.SceneNotes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneNoteID FOR JSON PATH,INCLUDE_NULL_VALUES); + INSERT @r SELECT 'AddChecklist',0,(SELECT * FROM dbo.SceneChecklistItems WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneChecklistItemID FOR JSON PATH,INCLUDE_NULL_VALUES); + END; + SELECT Kind,EntityID,Data,CONVERT(varchar(64),HASHBYTES('SHA2_256',Data),2) Version FROM @r; +END; +GO diff --git a/PlotLine/Sql/269_WriterAuthoringEmptyCollectionTokens.sql b/PlotLine/Sql/269_WriterAuthoringEmptyCollectionTokens.sql new file mode 100644 index 00000000..d700d015 --- /dev/null +++ b/PlotLine/Sql/269_WriterAuthoringEmptyCollectionTokens.sql @@ -0,0 +1,28 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- Empty scalar JSON collections may yield NULL; every creatable section needs a stable non-null token. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Sections + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL +AS +BEGIN + SET NOCOUNT ON; + IF NOT EXISTS(SELECT 1 FROM dbo.Books b JOIN dbo.ProjectUserAccess a ON a.ProjectID=b.ProjectID + JOIN dbo.Chapters c ON c.BookID=b.BookID WHERE b.BookID=@BookID AND c.ChapterID=@ChapterID AND b.IsArchived=0 AND c.IsArchived=0 AND a.UserID=@UserID AND a.IsActive=1) + THROW 51000,'Working selection unavailable',1; + IF @SceneID IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.Scenes WHERE SceneID=@SceneID AND ChapterID=@ChapterID AND IsArchived=0) THROW 51000,'Scene unavailable in this chapter',1; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max)); + INSERT @r SELECT 'Chapter',@ChapterID,(SELECT Summary,ChapterPurposeID FROM dbo.Chapters WITH(UPDLOCK,HOLDLOCK) WHERE ChapterID=@ChapterID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Goals',@ChapterID,(SELECT g.GoalSummary,g.EmotionalGoal,g.ReaderTakeaway,g.MustInclude,g.RisksOrConcerns FROM (SELECT @ChapterID ID) c LEFT JOIN dbo.ChapterGoals g WITH(UPDLOCK,HOLDLOCK) ON g.ChapterID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + IF @SceneID IS NOT NULL BEGIN + INSERT @r SELECT 'Scene',@SceneID,(SELECT ScenePurposeNotes,SceneOutcomeNotes FROM dbo.Scenes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Workflow',@SceneID,(SELECT w.Priority,w.EstimatedWordCount,w.ActualWordCount,w.DraftedDate,w.LastWorkedOn,w.IsBlocked,w.BlockedReason FROM(SELECT @SceneID ID)c LEFT JOIN dbo.SceneWorkflow w WITH(UPDLOCK,HOLDLOCK) ON w.SceneID=c.ID FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER); + INSERT @r SELECT 'Note',n.SceneNoteID,(SELECT n.SceneNoteTypeID,n.NoteTitle,n.NoteText,n.SortOrder,n.IsPinned,n.IsResolved FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneNotes n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + INSERT @r SELECT 'Checklist',n.SceneChecklistItemID,(SELECT n.ItemText,n.IsCompleted,n.SortOrder FOR JSON PATH,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER) FROM dbo.SceneChecklistItems n WITH(UPDLOCK,HOLDLOCK) WHERE n.SceneID=@SceneID; + -- Collection fingerprints make a repeated create with its old token conflict instead of duplicating a row. + INSERT @r SELECT 'AddNote',0,(SELECT * FROM dbo.SceneNotes WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneNoteID FOR JSON PATH,INCLUDE_NULL_VALUES); + INSERT @r SELECT 'AddChecklist',0,(SELECT * FROM dbo.SceneChecklistItems WITH(UPDLOCK,HOLDLOCK) WHERE SceneID=@SceneID ORDER BY SceneChecklistItemID FOR JSON PATH,INCLUDE_NULL_VALUES); + END; + SELECT Kind,EntityID,ISNULL(Data,N'[]') Data,CONVERT(varchar(64),HASHBYTES('SHA2_256',ISNULL(Data,N'[]')),2) Version FROM @r; +END; +GO diff --git a/PlotLine/Sql/270_WriterAuthoringCanonicalTextLengths.sql b/PlotLine/Sql/270_WriterAuthoringCanonicalTextLengths.sql new file mode 100644 index 00000000..1ef5e372 --- /dev/null +++ b/PlotLine/Sql/270_WriterAuthoringCanonicalTextLengths.sql @@ -0,0 +1,53 @@ +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +-- Match canonical nvarchar(max) fields; retain existing bounded title/reminder and HTTP form limits. +CREATE OR ALTER PROCEDURE dbo.WriterAuthoring_Save + @UserID int,@BookID int,@ChapterID int,@SceneID int=NULL,@Kind varchar(20),@EntityID int,@Version varchar(64),@Data nvarchar(max) +AS +BEGIN + SET NOCOUNT ON; SET XACT_ABORT ON; + IF ISJSON(@Data)<>1 THROW 51003,'Invalid form data',1; + BEGIN TRY + BEGIN TRANSACTION; + DECLARE @r table(Kind varchar(20),EntityID int,Data nvarchar(max),Version varchar(64)); + INSERT @r EXEC dbo.WriterAuthoring_Sections @UserID,@BookID,@ChapterID,@SceneID; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID) THROW 51000,'Editor unavailable in this selection',1; + IF NOT EXISTS(SELECT 1 FROM @r WHERE Kind=@Kind AND EntityID=@EntityID AND Version=ISNULL(@Version,'')) THROW 51002,'This information changed. Your text is retained; reload the editor to compare before saving again.',1; + DECLARE @summary nvarchar(max)=JSON_VALUE(@Data,'$.Summary'),@purpose int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ChapterPurposeID'),'')), + @goal nvarchar(max),@emotion nvarchar(max),@takeaway nvarchar(max),@include nvarchar(max),@risk nvarchar(max), + @noteType int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SceneNoteTypeID'),'')),@title nvarchar(200)=JSON_VALUE(@Data,'$.NoteTitle'),@text nvarchar(max)=JSON_VALUE(@Data,'$.NoteText'), + @sort int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.SortOrder'),'')),@pinned bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsPinned')),0),@resolved bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsResolved')),0), + @item nvarchar(300)=JSON_VALUE(@Data,'$.ItemText'),@done bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsCompleted')),0); + -- OPENJSON WITH nvarchar(max) avoids JSON_VALUE's 4000-character limit on author prose. + SELECT @summary=Summary,@goal=GoalSummary,@emotion=EmotionalGoal,@takeaway=ReaderTakeaway,@include=MustInclude,@risk=RisksOrConcerns,@text=NoteText FROM OPENJSON(@Data) WITH(Summary nvarchar(max),GoalSummary nvarchar(max),EmotionalGoal nvarchar(max),ReaderTakeaway nvarchar(max),MustInclude nvarchar(max),RisksOrConcerns nvarchar(max),NoteText nvarchar(max)); + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('Priority','EstimatedWordCount','ActualWordCount','SortOrder','ChapterPurposeID','SceneNoteTypeID') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(int,CONVERT(nvarchar(4000),value)) IS NULL) THROW 51003,'Use valid whole numbers',1; + IF EXISTS(SELECT 1 FROM OPENJSON(@Data) WHERE [key] IN('DraftedDate','LastWorkedOn') AND NULLIF(CONVERT(nvarchar(max),value),'') IS NOT NULL AND TRY_CONVERT(date,CONVERT(nvarchar(4000),value)) IS NULL) THROW 51003,'Use valid dates',1; + IF @Kind='Chapter' BEGIN + IF @purpose IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.ChapterPurposeTypes WHERE ChapterPurposeID=@purpose AND IsArchived=0) THROW 51003,'Choose an available chapter purpose',1; + UPDATE dbo.Chapters SET Summary=@summary,ChapterPurposeID=@purpose,UpdatedDate=SYSUTCDATETIME() WHERE ChapterID=@ChapterID; + END ELSE IF @Kind='Goals' EXEC dbo.ChapterGoal_Save @ChapterID,@goal,@emotion,@takeaway,@include,@risk; + ELSE IF @Kind='Scene' BEGIN + DECLARE @sp nvarchar(max),@out nvarchar(max); + SELECT @sp=ScenePurposeNotes,@out=SceneOutcomeNotes FROM OPENJSON(@Data) WITH(ScenePurposeNotes nvarchar(max),SceneOutcomeNotes nvarchar(max)); + UPDATE dbo.Scenes SET ScenePurposeNotes=@sp,SceneOutcomeNotes=@out,UpdatedDate=SYSUTCDATETIME() WHERE SceneID=@SceneID; + END ELSE IF @Kind IN('Note','AddNote') BEGIN + IF LEN(ISNULL(@text,''))=0 OR NOT EXISTS(SELECT 1 FROM dbo.SceneNoteTypes WHERE SceneNoteTypeID=@noteType AND IsActive=1) THROW 51003,'Choose a note type and enter note text',1; + IF LEN(ISNULL(JSON_VALUE(@Data,'$.NoteTitle'),''))>200 THROW 51003,'Note titles may contain up to 200 characters',1; + EXEC dbo.SceneNote_Save @EntityID,@SceneID,@noteType,@title,@text,@sort,@pinned,@resolved; + END ELSE IF @Kind IN('Checklist','AddChecklist') BEGIN + IF LEN(ISNULL(JSON_VALUE(@Data,'$.ItemText'),''))=0 OR LEN(JSON_VALUE(@Data,'$.ItemText'))>300 THROW 51003,'Enter a reminder of 1 to 300 characters',1; + EXEC dbo.SceneChecklist_Save @EntityID,@SceneID,@item,@done,@sort; + END ELSE IF @Kind='Workflow' BEGIN + DECLARE @priority int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.Priority'),'')),@estimated int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.EstimatedWordCount'),'')),@actual int=TRY_CONVERT(int,NULLIF(JSON_VALUE(@Data,'$.ActualWordCount'),'')), + @drafted date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.DraftedDate'),'')),@worked date=TRY_CONVERT(date,NULLIF(JSON_VALUE(@Data,'$.LastWorkedOn'),'')),@blocked bit=COALESCE(TRY_CONVERT(bit,JSON_VALUE(@Data,'$.IsBlocked')),0),@reason nvarchar(max), + @status nvarchar(50)='Planned',@readyDraft bit=0,@readyRevision bit=0,@readyPolish bit=0; + SELECT @reason=BlockedReason FROM OPENJSON(@Data) WITH(BlockedReason nvarchar(max)); + IF @priority IS NOT NULL AND @priority NOT BETWEEN 1 AND 10 OR @estimated<0 OR @actual<0 THROW 51003,'Priority must be 1 to 10 and word estimates non-negative',1; + SELECT @status=DraftStatus,@readyDraft=ReadyForDraft,@readyRevision=ReadyForRevision,@readyPolish=ReadyForPolish FROM dbo.SceneWorkflow WHERE SceneID=@SceneID; + EXEC dbo.SceneWorkflow_Save @SceneID,@status,@estimated,@actual,@drafted,@worked,@readyDraft,@readyRevision,@readyPolish,@blocked,@reason,@priority; + END; + COMMIT; + END TRY BEGIN CATCH IF @@TRANCOUNT>0 ROLLBACK;THROW;END CATCH; +END; +GO diff --git a/PlotLine/Sql/271_WriterWordStatus.sql b/PlotLine/Sql/271_WriterWordStatus.sql new file mode 100644 index 00000000..57e46470 --- /dev/null +++ b/PlotLine/Sql/271_WriterWordStatus.sql @@ -0,0 +1,14 @@ +-- Read-only metadata projection; no paragraph payload or initialisation. +SET ANSI_NULLS ON; +SET QUOTED_IDENTIFIER ON; +GO +CREATE OR ALTER PROCEDURE dbo.WriterWord_Status @UserID int,@BookID int,@ChapterID int=NULL +AS +BEGIN + SET NOCOUNT ON; + IF NOT EXISTS(SELECT 1 FROM dbo.Books b JOIN dbo.ProjectUserAccess a ON a.ProjectID=b.ProjectID AND a.UserID=@UserID AND a.IsActive=1 WHERE b.BookID=@BookID AND b.IsArchived=0) THROW 51000,'Book access denied',1; + IF @ChapterID IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.Chapters WHERE ChapterID=@ChapterID AND BookID=@BookID AND IsArchived=0) THROW 51000,'Chapter access denied',1; + SELECT m.ManuscriptID,m.Revision,m.UpdatedUtc AS SnapshotUtc,c.LastSuccessfulSyncUtc AS ChapterAcceptedUtc + FROM dbo.BookParagraphManuscripts m OUTER APPLY(SELECT TOP(1) LastSuccessfulSyncUtc FROM OPENJSON(m.Payload,'$.ChapterCheckpoints') WITH(ChapterID int '$.ChapterId',LastSuccessfulSyncUtc datetime2) WHERE ChapterID=@ChapterID) c + WHERE m.BookID=@BookID; +END; diff --git a/PlotLine/ViewModels/ApplicationNavigationViewModel.cs b/PlotLine/ViewModels/ApplicationNavigationViewModel.cs index 6370fbc8..d0e62a06 100644 --- a/PlotLine/ViewModels/ApplicationNavigationViewModel.cs +++ b/PlotLine/ViewModels/ApplicationNavigationViewModel.cs @@ -11,5 +11,6 @@ public sealed class ApplicationNavigationViewModel public Project? Project { get; set; } public Book? Book { get; set; } public IReadOnlyList Books { get; set; } = []; + public string WriterDestination { get; set; } = "Home"; public string ActiveSection { get; set; } = string.Empty; } diff --git a/PlotLine/ViewModels/CoreViewModels.cs b/PlotLine/ViewModels/CoreViewModels.cs index 3bb29dfb..9f353cb7 100644 --- a/PlotLine/ViewModels/CoreViewModels.cs +++ b/PlotLine/ViewModels/CoreViewModels.cs @@ -467,6 +467,7 @@ public sealed class SceneEditViewModel public sealed class WritingContextPageViewModel { + public PlotLine.Services.Writer.WriterContext? WorkingContext { get; set; } public int? ProjectID { get; set; } public int? BookID { get; set; } public int? ChapterID { get; set; } @@ -492,6 +493,7 @@ public sealed class WritingContextDisplayViewModel public sealed class WritingIntentPageViewModel { + public PlotLine.Services.Writer.WriterContext? WorkingContext { get; set; } public int? ProjectID { get; set; } public int? BookID { get; set; } public int? ChapterID { get; set; } @@ -925,6 +927,8 @@ public sealed class ChapterWorkflowViewModel public sealed class WriterDashboardViewModel { + public string Destination { get; set; } = "Legacy"; + public PlotLine.Services.Writer.WriterContext? WorkingContext { get; set; } public IReadOnlyList PlannedActivities { get; set; } = []; public WriterWorkPage? Work { get; set; } public IReadOnlyList Suggestions { get; set; } = []; @@ -1055,6 +1059,10 @@ public sealed class WritingScheduleItemViewModel public sealed class WritingSchedulePreviewViewModel { + public int? ScopeProjectID { get; set; } + public int? ScopeBookID { get; set; } + public int? ProjectID => ScopeProjectID ?? SelectedPlan?.ProjectID; + public int? BookID => ScopeBookID ?? SelectedPlan?.BookID; public IReadOnlyList DerivedActivities { get; set; } = []; public int? SelectedWritingPlanID { get; set; } public IReadOnlyList Plans { get; set; } = []; diff --git a/PlotLine/Views/NativeWorkspace/Workspace.cshtml b/PlotLine/Views/NativeWorkspace/Workspace.cshtml index c9aa4173..515e9163 100644 --- a/PlotLine/Views/NativeWorkspace/Workspace.cshtml +++ b/PlotLine/Views/NativeWorkspace/Workspace.cshtml @@ -7,7 +7,7 @@

Checking Companion presence…

Connection diagnostics only. Open Context or Intent to follow the manuscript and navigate saved scenes.

- + @if(Model.Mode=="book"){

AI chapter suggestions

Generated by PlotDirector’s existing chapter-analysis service. Review titles and summaries before any import. Successful chapters remain available for 30 days.

diff --git a/PlotLine/Views/Shared/_ApplicationNavigation.cshtml b/PlotLine/Views/Shared/_ApplicationNavigation.cshtml index b1747faf..0c70477d 100644 --- a/PlotLine/Views/Shared/_ApplicationNavigation.cshtml +++ b/PlotLine/Views/Shared/_ApplicationNavigation.cshtml @@ -64,7 +64,7 @@
  • @foreach (var choice in Model.Books) { -
  • Book @choice.BookNumber: @choice.BookDisplayTitle
  • +
  • Book @choice.BookNumber: @choice.BookDisplayTitle
  • } @if (Model.Books.Count == 0) { diff --git a/PlotLine/Views/Shared/_ApplicationShell.cshtml b/PlotLine/Views/Shared/_ApplicationShell.cshtml index 32cab431..0bd6a915 100644 --- a/PlotLine/Views/Shared/_ApplicationShell.cshtml +++ b/PlotLine/Views/Shared/_ApplicationShell.cshtml @@ -59,7 +59,7 @@
  • @foreach (var choice in Model.Books) { -
  • Book @choice.BookNumber: @choice.BookDisplayTitle
  • +
  • Book @choice.BookNumber: @choice.BookDisplayTitle
  • } @if (Model.Books.Count == 0) { @@ -130,7 +130,7 @@ @foreach (var category in ApplicationRibbon.Categories) {