PlotDirector/Docs/Relationships/MainWorkspaceAcceptance-20261126.md

25 KiB
Raw Blame History

Main Relationships workspace — qualification and delivery

The main Relationships workspace now supports pointer zoom/pan, persistent custom membership, pins and diagram Undo, canonical importance assignment/Undo, four useful arrangements, three connector styles, reference-aware display presets and independently remembered dividers. The existing palette/canvas/Details/Scene Explorer structure, full width, ribbon, Map/List, editor and maximise remain.

This is a main-page opt-in. Context Family, Context Story and individual Character Details relationship visualisations remain unchanged visually and functionally within the verified coverage. Production is not a release target. No author character classifications were changed for demonstration; screenshots and destructive/bulk checks use synthetic fixtures.

Architecture and data safety

The existing RelationshipMap service/editor, Dapper repository/stored procedures, canonical family predicate and pure family geometry, CharacterQuickAttributes definitions and Directory/Assign/Undo operations, application context menus, actionable PlotDirector.toast, Scene Explorer, workspace dividers and existing presence connection are reused. Family reference reads explicitly authorise the project, use recorded definitions independently of reader/POV disclosure and reuse canonical narrative ordering. Relationship saves emit the established lightweight invalidation. No new SignalR connection, database store, migration, AI processing or UI framework was introduced.

Deterministic component/community layouts, breadth-first distance rings, canonical traditional families and wrapped importance tiers use actual card dimensions and collision clearance. One worker handles layout and bounded obstacle-aware routing. Parallel paths and boundary endpoints are distinct. Geometry, interaction, storage and failure handling are described in the implementation record; author instructions are in Relationship Map help.

Preferences use author/project/book-scoped local storage. Legacy browser state is claimed and migrated once; the enhanced page cannot regenerate unscoped v1 state. Existing global divider preferences migrate once only for this opted-in workspace. Failed family reads retain exact saved preferences across reload/page exit; failed preset changes retain the prior view and pins. Restoring unavailable characters filters their IDs. Importance assignments use canonical row versions and protected, individual-prior-value Undo; diagram Undo never writes character records.

Verification

The solution build completed with zero warnings/errors. The full executable regression harness passed 889 checks. The signed clean-release build/regression results and activation receipt are recorded below when the immutable release is prepared.

Gate Result Evidence
Main server editing/history/family authorisation Passed Focused harness and full regression; unauthenticated/cross-project family reads denied; one existing-channel save invalidation
Main rendered interaction and all four arrangements Passed Chromium and actually installed Chromium PWA, including full profile close/restart/launch; browser, PWA
Scoped preferences and failure recovery Passed Different authors/projects, empty connected state/groups, centre chooser, denied family reads, exact saved-state retention
Parallel links Passed Actual straight/curved/orthogonal rendering, category colours and separate native pointer selection; pure obstacle/parallel fixtures
Context Family/Story Passed Existing lens/family interaction suites, scene/POV filtering, panes, lookup, zoom/pan, live hints, unchanged captures and source hashes
Held Context Passed Character data invalidates at held scene while shared focus changes; one connection; no held-position change
Character Details Passed Existing five-tab/relationship/edit/interaction/responsive/browser regression and unchanged capture
Directory and Names Passed Full-biography/variable-card directory tests at 10/100/500, canonical attribute/bulk/Undo/context/filter tests; Names search/details/state/themes
Ribbon, focus stability, dividers Passed Existing browser/PWA ribbon gates; six focus stability runs with 56 bounds samples each and zero PWA ribbon rebuilds; Maps/Floor Plans divider defaults retained
Themes and widths Passed Seven supported themes; browser and installed PWA at 390, 800, 1280, 1920, 2560 and 3840 pixels; no page overflow
Older Timeline-to-Writer narrative driver Not verified narrative-focus.cjs times out at its initial Timeline focus assertion before visiting Relationships: the isolated host does not register the current SQL-backed SharedManuscriptFocus service. Its log is retained. Main Scene Explorer local-only behaviour, explicit promotion wiring, no focus write requests and Held Context are independently verified. No global focus implementation was modified to bypass this driver.

Controlled logs are in checks. No login credentials, browser storage, authentication traces or author manuscript content are included.

Before/after performance

Same Atlas Chromium fixture viewport (1920×1080), Cytoscape version and synthetic dense networks. These measure browser rendering/arrangement, not live database or internet latency. Old arrangements permitted overlapping cards; the new runs use complete cast and bounded routing. Initial readiness includes the new routing work and is slower for dense networks; this is a layout-quality/responsiveness tradeoff, not a blanket speed improvement.

Cast / recorded links Initial ready ms, old → new Arrangement ms, old → new New route batch ms Overlapping pairs, old → new
75 / 429 1051 → 1451 171 → 74 177 60 → 0
100 / 579 1183 → 1695 249 → 173 310 79 → 0
200 / 1179 2462 → 3495 853 → 948 917 196 → 0

All 16 rendered 20/75/100/200 sparse, dense, connected-subgroup and isolated fixtures passed actual node-box non-overlap checks. Pure fixtures also check determinism, subgroup detection, BFS distances, canonical family relationships, exact pins, obstacle detours and parallel paths. A separate 200-character dense native wheel/middle-pan sequence recorded 12 two-frame response samples: maximum 46.3 ms, average 30.3 ms, no data retrieval and unchanged node positions. Startup frame statistics are not steady-state FPS claims. Before metrics, after metrics, native navigation, geometry fixtures.

Protected visual comparisons

Equivalent synthetic project, focus, relationship reference point, theme, viewport and preferences were used. No new main script is loaded in either protected surface. Seven protected source hashes are unchanged. All SVG markup/geometry matches after normalising only ephemeral marker UUIDs.

Protected surface PNG comparison Before After
Context Family Exact match before after
Context Story 9 of 1,035,450 fringe pixels differ by one colour level; identical vectors before after
Character Details Relationships Exact match before after

Machine-readable comparison. Repeat captures with relationship-protected-context-capture.cjs / relationship-protected-character-capture.cjs and PD_CAPTURE_OUTPUT; run relationship-main-protected-comparison.cjs with PD_BEFORE / PD_AFTER. Baseline sources were captured before implementation.

Rendered screenshot index

These are actual rendered synthetic browser/PWA captures, not mockups. The performance captures retain the original partial-fixture header so comparison with the original baseline remains controlled; full-shell/PWA captures show the actual Characters ribbon.

Requested scenario Screenshot
1. Full-cast clusters 75 characters
2. Focused radial radial
3. Traditional family installed PWA
4. Story importance tiers and preserved pin
5. Curved connectors curved
6. Orthogonal connectors orthogonal PWA
7. Character menu native pointer menu
8. Removal/re-addition repopulated custom diagram
9. Importance drag/drop canonical assignment and Undo
10. Resized panels independent dividers
11. Sparse network sparse cast
12. Complex network 200 overview, readable region
13. Connected subgroups cluster overview
14. Pinned positions pin indicator
15. Manual custom diagram three connected characters

Also captured: 2560-pixel desktop, parallel curved links and all seven PWA themes: plotdirector, modern-light, modern-dark, warm-light, warm-dark, rose-pink, baby-blue.

Explicit section 21 acceptance matrix

Statuses: Passed, Failed, Not verified, Not implemented. Passed means exercised within the described fixtures/scope, not a claim about every possible manuscript or physical device. E = rendered browser/installed-PWA main acceptance; S = focused canonical server/full harness; G = geometry/performance/parallel fixtures; P = scoped/persistence/failure tests; C = protected Context suites/captures/Held; D = protected Character Details; R = retained ribbon/workspace/divider/focus regressions; N = Names/directory regression.

Criterion Required behaviour Status Evidence
21.1.1 Mouse wheel zoom works over the diagram. Passed E, R, C, D
21.1.2 Zoom is anchored to the mouse pointer. Passed E, R, C, D
21.1.3 Middle-button panning works. Passed E, R, C, D
21.1.4 Existing zoom controls remain operational. Passed E, R, C, D
21.1.5 Characters can be repositioned. Passed E, R, C, D
21.1.6 Relationships remain selectable. Passed E, R, C, D
21.1.7 Context menus work in browser and PWA mode. Passed E, R, C, D
21.1.8 New interaction handlers do not affect other workspaces. Passed E, R, C, D
21.2.1 Characters can be removed from the diagram. Passed E, P, S, C, D
21.2.2 Removed characters remain in the project. Passed E, P, S, C, D
21.2.3 Recorded relationships remain intact. Passed E, P, S, C, D
21.2.4 Characters can be dragged back onto the diagram. Passed E, P, S, C, D
21.2.5 Duplicate character nodes are prevented. Passed E, P, S, C, D
21.2.6 Clear Diagram works safely. Passed E, P, S, C, D
21.2.7 Cleared diagrams remain empty until explicitly repopulated. Passed E, P, S, C, D
21.2.8 Layout undo works. Passed E, P, S, C, D
21.2.9 Position pins behave correctly. Passed E, P, S, C, D
21.2.10 Diagram membership changes do not affect other workspaces. Passed E, P, S, C, D
21.3.1 Characters can be dragged between importance groups. Passed E, S, P, C, N
21.3.2 Actual recorded importance is updated. Passed E, S, P, C, N
21.3.3 Group counts update correctly. Passed E, S, P, C, N
21.3.4 Shared assignment functionality is reused. Passed E, S, P, C, N
21.3.5 Undo restores the previous importance. Passed E, S, P, C, N
21.3.6 Other relevant workspaces receive appropriate updates. Passed E, S, P, C, N
21.3.7 Failed assignments do not leave inconsistent visual state. Passed E, S, P, C, N
21.3.8 Empty groups remain valid drop targets. Passed E, S, P, C, N
21.3.9 Repositioning diagram nodes does not accidentally change importance. Passed E, S, P, C, N
21.4.1 Relationship clusters reflect actual recorded connections. Passed E, G, P
21.4.2 Unrelated groups are appropriately separated. Passed E, G, P
21.4.3 Meaningful subgroups within larger networks are identified where practical. Passed E, G, P
21.4.4 Focused radial arrangement reflects relationship distance. Passed E, G, P
21.4.5 Traditional family trees follow established family tree conventions. Passed E, G, P
21.4.6 Story importance arrangements are readable. Passed E, G, P
21.4.7 Character nodes do not overlap after automatic arrangement, except where conflicting author-pinned positions make this unavoidable. Passed E, G, P
21.4.8 Layouts avoid unnecessarily wide rows. Passed E, G, P
21.4.9 Layouts use available space effectively. Passed E, G, P
21.4.10 Large diagrams remain practically navigable. Passed E, G, P
21.4.11 Manual positioning remains available. Passed E, G, P
21.4.12 Automatic arrangements do not unexpectedly destroy saved manual positions. Passed E, G, P
21.5.1 Straight connectors work. Passed E, G, C, D
21.5.2 Curved connectors work. Passed E, G, C, D
21.5.3 Orthogonal connectors work. Passed E, G, C, D
21.5.4 Relationship colours and semantics are preserved. Passed E, G, C, D
21.5.5 Connectors remain selectable. Passed E, G, C, D
21.5.6 Parallel relationships remain distinguishable. Passed E, G, C, D
21.5.7 Routing avoids unrelated character cards wherever practical. Passed E, G, C, D
21.5.8 Connector labels remain readable. Passed E, G, C, D
21.5.9 Connector preferences are isolated to the main workspace. Passed E, G, C, D
21.6.1 Full Cast remains operational. Passed E, P, S
21.6.2 Connected Characters correctly reflects the selected relationship reference point. Passed E, P, S
21.6.3 Major and Supporting respects recorded importance. Passed E, P, S
21.6.4 Selected Character and Connections works correctly. Passed E, P, S
21.6.5 Family Only uses authoritative family definitions. Passed E, P, S
21.6.6 Custom Diagram preserves the author's chosen membership. Passed E, P, S
21.6.7 Removing a character does not result in its immediate automatic restoration. Passed E, P, S
21.6.8 Switching presets does not unnecessarily destroy saved custom arrangements. Passed E, P, S
21.6.9 Empty relationship states are handled appropriately. Passed E, P, S
21.7.1 Existing navigation controls remain functional. Passed E, S, R; local/no-write and explicit-setter checks
21.7.2 Initial and historical relationship states remain correct. Passed E, S, R; local/no-write and explicit-setter checks
21.7.3 Relationship changes update the diagram. Passed E, S, R; local/no-write and explicit-setter checks
21.7.4 Manual positions are preserved. Passed E, S, R; local/no-write and explicit-setter checks
21.7.5 Global manuscript focus is not changed unintentionally. Passed E, S, R; local/no-write and explicit-setter checks
21.7.6 Custom diagram membership is preserved. Passed E, S, R; local/no-write and explicit-setter checks
21.7.7 Zoom, pan and panel widths remain stable. Passed E, S, R; local/no-write and explicit-setter checks
21.8.1 Character positions are remembered. Passed E, P, R, C, D
21.8.2 Diagram membership is remembered. Passed E, P, R, C, D
21.8.3 Custom diagram membership is remembered. Passed E, P, R, C, D
21.8.4 Position pins are remembered. Passed E, P, R, C, D
21.8.5 Layout preferences are remembered. Passed E, P, R, C, D
21.8.6 Connector preferences are remembered. Passed E, P, R, C, D
21.8.7 Zoom and pan are remembered. Passed E, P, R, C, D
21.8.8 Both side panel widths are remembered independently. Passed E, P, R, C, D
21.8.9 Preferences survive navigation, refresh and application restart. Passed E, P, R, C, D
21.8.10 Project-specific state does not leak between projects. Passed E, P, R, C, D
21.8.11 Main workspace preferences do not leak into Context or Character Details. Passed E, P, R, C, D
21.9.1 Existing Map and List views remain operational. Passed E, S, R, N, C, D
21.9.2 Existing relationship creation and editing remain operational. Passed E, S, R, N, C, D
21.9.3 Existing Details panel functionality remains operational. Passed E, S, R, N, C, D
21.9.4 Existing maximise workspace functionality remains operational. Passed E, S, R, N, C, D
21.9.5 Characters directory functionality remains operational. Passed E, S, R, N, C, D
21.9.6 Names workspace functionality remains operational. Passed E, S, R, N, C, D
21.9.7 Existing manuscript focus functionality remains operational. Passed E, S, R, N, C, D
21.9.8 Existing relationship data remains unchanged except where an explicit author operation requests a change. Passed E, S, R, N, C, D
21.10.1 Context Family relationship view. Passed C, D; unchanged SVG/source hashes
21.10.2 Context Story relationship view. Passed C, D; unchanged SVG/source hashes
21.10.3 Family tree arrangements. Passed C, D; unchanged SVG/source hashes
21.10.4 Story relationship network arrangements. Passed C, D; unchanged SVG/source hashes
21.10.5 Character node rendering. Passed C, D; unchanged SVG/source hashes
21.10.6 Connector rendering. Passed C, D; unchanged SVG/source hashes
21.10.7 Existing interaction behaviour. Passed C, D; unchanged SVG/source hashes
21.10.8 Existing zoom and pan behaviour. Passed C, D; unchanged SVG/source hashes
21.10.9 Existing scene-sensitive filtering. Passed C, D; unchanged SVG/source hashes
21.10.10 Existing POV-sensitive behaviour. Passed C, D; unchanged SVG/source hashes
21.10.11 Existing manuscript focus following. Passed C, D; unchanged SVG/source hashes
21.10.12 Existing pane layout and persistence. Passed C, D; unchanged SVG/source hashes
21.10.13 Existing loading and refresh behaviour. Passed C, D; unchanged SVG/source hashes
21.10.14 Existing SignalR connection and notification handling. Passed C, D; unchanged SVG/source hashes
21.10.additional No new main controls, menus or connector/layout/preset preferences appear in Context Passed Protected capture script asserts no main asset loaded; unchanged markup, source and live suites
21.10.live Legitimate importance/relationship invalidations still refresh relevant views Passed Existing notification service test, actual existing-handler main refresh, protected Context/Held tests
21.11 Individual Character Details relationship visualisations remain visually/functionally unchanged at equivalent data/focus/reference/viewport Passed D, source hashes, exact PNG and equivalent SVG comparison

Limits and outstanding acceptance

Routing is bounded best effort: a dense graph is not guaranteed planar and can have connector/label crossings. Large networks need Fit for overview and zoom/pan for readable regions. Conflicting author pins can overlap and warn. Manual family moves retain positions but use independent orthogonal routes until a new explicit family arrangement rebuilds shared junctions. Preferences are local to this browser/profile; clearing site data removes them. Physical touch hardware and operating systems other than the available Linux Chromium installation were not manually exercised. The older Timeline-to-Writer fixture driver above is not claimed as passing; no unrelated global focus code was changed to accommodate it.

No main feature is intentionally left unimplemented. The mandatory protected-view gates passed; there was no identified unintended Context/Character Details change to waive.

Commits and Development delivery

  • 20fcbe78: investigation, isolation and scalable baseline fixtures.
  • 0189b5db: main-only implementation, shared integration and focused tests.
  • bf80f525: failure recovery, reference/focus boundaries and strengthened acceptance.
  • Subsequent recovery/evidence commit and immutable Development application commit: recorded with the activation evidence below.

Development deployment completed and authenticated acceptance passed. Production was not accessed or changed.

  • Final application commit: dc65c9b258420b225503162ee7e4e62491d0712f (empty Connected → Full cast batch-placement safeguard and regression). New members reserve their positions within the same batch before any layout is requested; existing manual positions remain unchanged.
  • Evidence commits: f3584781 and 7c705dd2; this report's final delivery update is a subsequent documentation-only commit.
  • Remote branch: codex/word-companion-native-phase1-20261104, push verified against the exact application commit before activation.
  • Signed immutable release: development-main-relationships-dc65c9b25842-20261127T002754.
  • Activation receipt: 20261127T003018Z-824d7ff5708b. The fixed helper checked idle work, verified its backup and all 333 existing migration-history rows, activated atomically and verified application/database identity. No migrations were added or applied by this change; schema fingerprint remains dc6afafb8c25fd63d98a97d016402ddda7474fdfa296a18722b3ddc2569ecb91.
  • Clean committed-checkout build: zero warnings/errors; 889 regression checks passed. Installed DLL and changed assets match their signed publication. Service is active; local health reports the intended commit, Development and PlotDirector_Development; normal public TLS login GET returns 200.
  • Authenticated normal Chromium and actual installed Development PWA: canonical importance assignment and protected Undo both returned 200 with one changed character; the receiving main window updated through the same existing presence connection. Each window retained its diagram and manuscript focus, and the fixture's original recorded attributes were restored. Exactly one active native-presence socket per window was observed; sockets from previous page navigations were excluded from the active count.
  • The checks used a new, isolated qualification author/project (9303) and characters 7283–7285, created through canonical repositories/UI. No author manuscript records or existing subscription policy/prices were changed. The disposable account uses a temporary test-only entitlement override; its credentials remain private and outside the repository.

Sanitised deployment verification, authenticated smoke results, real PWA assignment, restored fixture, Fit with three separate cards.