PlotDirector/Docs/Writer/Writer3/Phase3A-Report.md

13 KiB
Raw Blame History

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

Inline scene editor and independent companion

Narrow notes/reminders · Narrow companion overlay

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. The unrelated investigation document remains untouched. No Production deployment or data changes were authorised or performed.

  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.