PlotDirector/Docs/Writer/Shared-Focus-Ribbon-Refinement-20261123.md

6.2 KiB

Shared focus ribbon and navigation refinement — 23 November 2026

Development-only implementation following Windows .47 source cfcd40b5b9175f26ca1ab1de0d1fdfbcfe4147f5 and handover de083c5d87ce251405c6f16d8730f0d245695a90.

Audit and implementation

Reused the shared manuscript focus controller, existing SignalR transport, canonical positions, navigation adapters, Hold/Resume implementation and persisted user/book recent-focus history. No database migration, competing controller or history service was needed.

The main Focus group now contains Previous | Hold/Resume | Next | History, with the established ribbon separator. Previous/Next retain narrative ordering, chapter boundaries and endpoint disabling. Hold uses pause; Resume uses play. One fixed-size button retains the existing availability gate. The main Go to Focus control and its presentation wiring were removed; reusable navigation and Context's separate controls remain available.

The header selector now displays ordered, expandable chapters and their scenes, including genuine chapter-only targets. Search and the old scene/recent selectors were removed. Current selection, arrow/Home/End navigation, Escape, successful-selection dismissal and focus restoration are supported. Both menus are scroll bounded and viewport constrained. Essential Focus controls remain visible in the existing compact ribbon system.

History reuses the existing server-backed 20-position store. Meaningful published visits from all clients reorder/deduplicate by chapter/scene; refreshing and reconnecting do not publish visits. Current and invalid targets are excluded. History selection uses existing navigation, independently of Previous/Next. Scope stays within the authorised current book.

A bounded held-history snapshot/local-visit overlay is saved inside the existing per-window shared-focus session record. It freezes incoming visits while held, records accepted local navigation, survives refresh and preserves those local visits after Resume. Subsequent published visits lead that retained list. Resume itself retains established catch-up semantics and does not publish a new focus. Canonical persisted history survives reopening; per-window held history survives where Chromium restores the existing session. No new storage key/table or polling loop was introduced. Restored held header presentation now uses the actual local position even when the shared controller starts before the header presenter.

Open in Word audit

All three Chapter, Scene and Paragraph actions are retained under Word caret. The explicit Writer Word navigation path queues native navigation whose Word implementation selects the target range (range.Select()). Shared-focus navigation scrolls using Window.ScrollIntoView, preserving the caret. These remain distinct useful actions; labels/tooltips clarify their purpose. Windows/VSTO/installer source is unchanged.

Removed the persistent Chapter verified ribbon label and its presentation update. Verification, connection handling, actionable warnings and body diagnostics remain operational. No status text was added beside Hold/Resume.

Verification before deployment

  • Solution build: zero warnings/errors.
  • Full executable regression harness: 797 passing checks.
  • Existing shared-focus reliability browser checks: pass, including unavailable/disconnected gates and genuine disabled states.
  • Existing real shared-focus multi-window browser suite: pass, including Review/Context propagation, independent Hold, reconnect/refresh and live relationship/graph data updates while held.
  • New PlotLine.Tests/Browser/focus-ribbon-refinement.cjs: pass in normal Chromium and installed Chromium standalone PWA. Covers navigation/history ordering, chapter-only targets, current exclusion, deduplication, invalid targets, refresh/reconnect, held local history and Resume, mouse/keyboard/Escape/focus restoration, 200-chapter menus, dark theme, widths 1500/1000/650/390, bounded dropdowns and stable Hold dimensions.
  • Existing reliability runner defaults to bundled Chromium, with optional PD_BROWSER_CHANNEL, allowing execution on Atlas without a system Google Chrome installation.

Tests use a disposable authorised Development fixture; no real manuscript is edited. Physical Microsoft Word is unavailable on Linux. Supported shared-focus fixtures cover the protocol; manual Windows .47 acceptance remains required: Word-originated focus, explicit caret movement at chapter/scene/paragraph, shared scroll preserving caret, independent Hold/Resume and catch-up across Word/Review/Context.

Release evidence

  • Implementation commit: b10db726167e5923a3a6a7e34d6ae026803f0100.
  • Pushed successfully to origin/codex/word-companion-native-phase1-20261104 on the configured git.catherinelynwood.com remote.
  • Development installed UTC: 2026-11-23T21:41:04.998362+00:00.
  • Release archive: /srv/apps/plotdirector-dev/releases/shared-focus-ribbon-b10db72-20261123T214057Z.
  • Preserved previous installation: /srv/apps/plotdirector-dev/current-before-shared-focus-ribbon-b10db72-20261123T214057Z.
  • Active-work gate passed immediately before the service stop; effective database verified as PlotDirector_Development. No SQL migration was required or applied.
  • plotdirector-dev active; local GET http://127.0.0.1:5050/ and public GET https://dev.plotdirector.com/ returned 200 with normal TLS validation. No warning/error journal entries during restart verification.
  • Deployed assembly metadata contains the full implementation commit. Published/deployed DLL and checked assets match SHA-256; DLL: 8b43cfca217bd87f1d632facf392baf9df1e7864626f70e1f91da9e8e31de516.
  • The full new refinement browser suite passed again against public Development in both normal Chromium and an installed standalone Chromium PWA, using real authentication, SQL and SignalR.
  • Disposable shared-focus project/book/characters archived through the guarded fixture cleanup; owned isolated loopback test host stopped. Development service remains active.
  • Production, Windows installer and VSTO source untouched. Both pre-existing untracked investigation documents preserved.

This report is completed in a separate documentation commit; the deployed application build remains the implementation commit above.