6.8 KiB
Windows qualification: tray Companion 1.0.0.10
This replaces the native dialogs with the existing agent's Windows tray UI. It is not Windows-accepted until the checks below pass. The source retains the 1.0.0.9 shadow-copy resolver, exact registered-DLL hash check, optional document association and installer/rollback repairs.
One update/build and explicit install
In the existing repository on codex/word-companion-native-phase1-20261104:
# Bootstrap the updated script, preserving changes and refusing divergent history:
if ((git branch --show-current).Trim() -ne 'codex/word-companion-native-phase1-20261104') { throw 'Wrong branch' }
if (git status --porcelain=v1) { throw 'Preserve your local changes first' }
git pull --ff-only
if ($LASTEXITCODE -ne 0) { throw 'Git update failed' }
& .\PlotDirector.NativeCompanion\WindowsValidation\Update-WordCompanion.ps1
Subsequent updates need only the Update command. It uses the configured tracking remote and existing Office MSBuild. It never launches Visual Studio or Installer, changes IDE configuration/workloads/PATH, unregisters the add-in, installs a runtime or runs Clean. It checks for .NET 10 Windows Desktop runtime, compiles/tests managed code, builds signed VSTO and publishes the existing agent's net10.0-windows target into the same complete package structure. Missing prerequisites stop with a diagnostic.
Preparation leaves the working installation unchanged. Close Word normally, then install the exact printed package:
& .\PlotDirector.NativeCompanion\WindowsValidation\Install-WordCompanion.ps1 -PackagePath '<printed Downloads package path>' -StopAgent
The existing explicit per-user installer, exact-product ClickOnce handling, retained files and rollback are unchanged. It stops only the authorised user's Companion agent after Word is closed. To restore the previous registration, close Word and use the same script with -Rollback -StopAgent. Do not repair Visual Studio or disable VSTO security.
Single qualification procedure
- Record source SHA/version, Office build/bitness, Windows scaling and tools. Open Word. Ribbon must have only Local Companion status and Open Companion. It must not show Analyse, book, Context, Intent, Settings, Diagnostics or review dialogs.
- Click Open Companion. Verify one tray icon/process and one modeless control centre. Click repeatedly and launch the packaged agent EXE again: existing window should activate, without duplicate processes. Close hides the window; tray Open restores it. Exit stops the agent and pauses automatic relaunch; Open Companion explicitly resumes it. Verify Word remains usable throughout.
- Enter the Development HTTPS root; Connect / Sign In opens normal browser approval. Confirm displayed server/auth/AI states, sign-out, refusal, expiry, offline/recovery and an agent restart. No passwords/API keys/doc credentials should be requested or logged.
- Open three manuscripts. Use the working-document selector or Use active Word document, select different books, and switch repeatedly. Active-in-Word and the selected working document are distinguished. Optional Remember requires confirmation, writes only the existing metadata property, never saves, and is reauthorised after sign-in/reopen. Test a read-only document and a shadow-copied VSTO installation.
- Detect Chapters explicitly. Headings must use Word's built-in Heading 1 / outline level 1; existing PD chapter markers remain recognised. Body text saying “Chapter 99” must not split prose or truncate a chapter. The tray list must show full titles and select one/several/all. Double-click a chapter to navigate without edits. Detection reads locally in bounded batches; cursor movement/typing must not trigger full prose rescans. Displayed word count is the recovery's approximate main-story snapshot count, not Word's exact statistics. Edits mark it stale until another explicit detection.
- Start with a small synthetic multi-scene chapter. Check chapters and explicitly confirm upload/costs. AI must identify narrative scenes and generate titles and summaries via the existing server service. Progress identifies each chapter. Cancel during extraction and during AI; retry only failed/unfinished chapters explicitly. Successful earlier chapters remain in the PWA even if later chapters fail. Re-detection/retry of unchanged captured text should avoid another upload while the agent cache remains; after restart server content deduplication should avoid a provider call.
- Completed batches open the correct book's PWA Companion workspace. Review each chapter's scene titles/summaries, approve/edit/reject and Save decisions. Verify antiforgery, stale-tab conflict and foreign-book denial. These are review suggestions only: nothing is imported and no canonical scene or Word prose is overwritten. Import remains the established separate workflow; decisions are not yet transferred to a core import build.
- In PWA Context/Intent choose the exact Word session and explicitly enable Follow. Verify saved markers resolve only inside the authorised book. Manual scene selection inside the workspace pauses following; it must not snap back. Unmarked prose/AI suggestions do not invent canonical scene IDs. With Word closed, saved Context/Intent still work and a signed-in tray may report Word unavailable. Kill the agent/network: presence must expire within 45 seconds (plus up to one 15-second visible-page poll). Sign-out revokes late heartbeats. Check multiple browser screens/sessions independently.
- On a fresh matching review, explicitly Locate a suggested scene in Word, choosing its exact live session. It should navigate once, with no selection-feedback loop. Older observed revisions must refuse navigation. An unchanged cached review may remain reviewable while its original revision is no longer navigable; local tray chapter navigation remains available.
- Repeat long-document trials (155k, 190k and 250k words), many short/repeated paragraphs, rapid cursor movement, continuous typing, scrolling, save/close/cancelled-close, three documents and agent termination. Measure COM/batch/tick latency, typing/scroll/save responsiveness, CPU/memory/queues using the existing measurement harness. A single COM call cannot be preempted; do not substitute portable tests for these measurements.
Outstanding boundaries
Atlas can compile the Windows Forms target but cannot execute Windows Forms, Office COM, VSTO signing/installation or tray activation. The old same-length edits in an already dirty document limitation remains; explicit Detect rereads content and invalidates prior completion choices. Counts are snapshot approximations. Native review does not yet perform canonical import/marker-write/save acknowledgement. No installer distribution, automatic updates, Production changes or laptop operations are included.