PlotDirector/Docs/Writer/Character-Workspace-Refinement-20261123.md

14 KiB
Raw Blame History

Character workspace refinement — 23 November 2026

Scope and preservation

This is a focused change to the main Character Details workspace and existing dedicated Relationship Evolution route. The five tabs, profile/gallery/aliases, character-level Evolution, appearances/knowledge, canonical Family/Story engines, Context, existing main editor and Timeline remain available. No manuscript-specific production rules or automatic deduplication were introduced.

Phase 1 — ribbon

The existing Characters navigation remains in the ribbon. The redundant Characters/Timeline/Edit/Actions header controls are removed; the header retains portrait, identity, classification and analysis status. Edit Character and Actions now live in a selected-character ribbon group. Merge, Reanalyse, normal HTML character export, Markdown-format character export and Archive use their original controllers and forms. Markdown remains Exports.Character(format=markdown); it was not reinterpreted. Owner/Collaborator editing checks, anti-forgery and the established Archive confirmation are retained; Viewer has export actions only. Each full character navigation renders the canonical ID into the shared ribbon partial. The dropdown uses Bootstrap with a fixed body portal so the horizontally scrolling ribbon does not clip its menu.

Phase 2 — grouped relationships

SQL filters before grouping and orders by the other participant display name using case-insensitive Latin1_General_100_CI_AS, then canonical character ID. This is independent of A/B direction. Definition order within a group is controlled type name, then canonical definition ID. Queries page 25 character groups. Each group initially reads at most three definitions (75 total); a focused group pages all of its definitions in batches of 25. No client-side full dataset is loaded for sorting. Two identical display names remain separate canonical identities. Reciprocal flags remain one record; separately authored reverse records remain distinct.

Collapsed summaries show name, count, a few recorded types and meaningful states. Expanded groups show distinct definitions, direction/category, selected-point state, notes, initial/scene-established status and start/end links. Family filtering mirrors the existing ContextFamily_Structure / ContextRelationshipLenses.Family predicate, including canonical partnerships, and never infers family membership from participants or prose. Story filtering selects the other definitions. The graph lenses remain the existing engines. Search, paging and narrative cutoff are retained. Expanded group IDs and selected definition survive ordinary refreshes; empty groups disappear after removal.

Phase 3 — actions and safe quick editing

Each definition has Edit, History and Remove. Inspect Connection previously only selected/highlighted the diagram; clicking or keyboard-selecting the record now preserves that function, and diagram selection reveals its canonical record. One contextual link replaces repeated full-editor links. History links to the exact existing Dynamics Relationship route; Advanced Evolution and the complete in-page history have been removed.

The focused native dialog reuses the established operation partial/controller, canonical controlled types and Relationship_Save. It edits type within the existing category, reverses direction explicitly, changes safe non-Family-category reciprocal representation, permanent status, reader awareness, initial state/intensity/reader awareness, and optional notes. Category is a property of canonical type, not an independent field. The definition ID is retained: no delete/recreate or inverse-record rewriting occurs. Pair identities, narrative boundaries, book and initial/scene-established status remain unchanged.

Structural changes with dependent events, cross-category changes and Family-category reciprocity changes are rejected atomically with an inline explanation and focused route to the full editor. Those operations can reinterpret historical/family semantics and lack canonical coordinated validation here. Notes and supported initial properties remain editable. The full editor deep link selects the requested definition if established at its current point; otherwise it explains why it is unavailable there. The full editor itself was not redesigned.

Removal retains the existing versioned, authorised canonical archive/event-delete operations, explicit scope/dependency confirmation and source-provenance guards. SQL locks and the original definition/history hash protect concurrent changes. Shared toast feedback and existing lightweight Context invalidation are reused; no new SignalR connection is created.

Phase 4 — dedicated history

Diagnosis: the old graphic was a fixed-height decorative bright gradient, with an unlabelled positional strip. It rendered even with zero/one event, clipped edge markers, and substituted intensity 3 when no intensity was recorded. It did not explain axes or missing data. This was principally sparse-data/rendering/theme design, not missing canonical events.

The existing Dynamics Relationship route is retained. It shows exact names/type/direction/definition ID, canonical book/chapter/scene-ordered events, actual state and optional intensity, notes, evidence/review status, source links and retained continuity warnings. Event editing/removal uses the existing protected operation workflow on this page. Data is paged at 25. Empty/single-event cases get concise explicit presentations. Multiple verified recorded intensities get a compact labelled point plot, with no synthetic intermediate states or values for missing intensity. Narrow charts scroll internally instead of shrinking text or overflowing the page. Theme surfaces and text use existing application tokens. The source of ordering is the established canonical scene-order function; same-scene events sort by canonical event ID. The return link identifies the originating character, selected definition and narrative point, restoring selection/expansion in Relationships. Character-level Evolution remains separate.

Qualification and Development delivery

Evidence, final regression results and deployed commit are appended after verification. The two pre-existing untracked investigation documents are preserved. Tests use rollback SQL fixtures or explicitly disposable Development browser characters only; no actual manuscript relationship is corrected, merged or removed.

Database qualification

Forward-only migrations 309–313 were applied only to the verified PlotDirector_Development database. Each uses CREATE OR ALTER routines; existing applied numbered scripts remain unchanged. The backup /var/opt/mssql/backup/character-refinement-20261123T105440Z.bak completed with COPY_ONLY/CHECKSUM and passed RESTORE VERIFYONLY; no restore/reset occurred. The quick-edit procedure initially failed compilation because SQL treats parameter/local variable names case-insensitively; the unapplied procedure was corrected before successful application. No dependent application build was deployed during that failure.

The opt-in disposable-scope SQL suite passed and rolled back every case: 28 globally ordered groups, matching/case-varied names with stable identity, direction-independent grouping, 28 definitions in a single group with 25+3 focused pages, combined search/category filters and no deduplication; same-ID family type/direction changes; one-row story reciprocity; rejection of incompatible category, family reciprocity and semantic rewrites with history; canonical archive/restore retaining dependent events and independent reverse facts; one-event editing/removal; stale-history and permission/confirmation checks; source-linked blocking; dedicated canonical history pagination at 25+3 and stable same-scene event order. The final test confirms no fixture character remains from any rollback case.

Read-only real-manuscript acceptance used the actual Dapper readers: bounded explorers, SQL/.NET ordering agreement, selected-point future-knowledge exclusion, canonical management preview mapping and a sparse single-event dedicated history. The real-project relationship checksum was identical before and after; no AI work or manuscript mutation occurred.

Regression and visual acceptance

dotnet build PlotLine.slnx -m:1 --disable-build-servers passes with zero warnings/errors. Single-process compilation avoids an initial CLR/build-server crash on this host. The full executable harness reports 786 PASS and exits successfully. The 15 focused Character workspace service checks also pass after the final form/ribbon integration adjustments.

The rendered main-workspace Playwright suite passes: lazy tabs and retained profile/gallery/navigation; sorted compact groups with two directional definitions together; Family/Story filters; controlled type modal, inline stale validation, unsaved/Escape handling and full-width controls; selection/expansion after saves and exact-history return; archive refresh; correct relocated ribbon IDs after character navigation, Markdown-format link and anti-forgery forms; unclipped Actions menu at desktop/laptop/tablet/mobile widths; actual touch pan/pinch; stable Native/SI connection counts and Viewer controls. Browser fixture pagination is complemented by actual SQL all-page ordering tests. The dedicated history suite passes empty/single/five-event cases, actual intensity omission rather than fabricated values, canonical order/source navigation, exact return identity, event modal protection and Viewer restrictions. The existing Relationships Editor browser suite passes after the minimal deep-link integration.

Widths 1366, 1024, 768 and 390 pass without page-wide horizontal overflow. The compact chart has a bounded internal scroller on narrow screens. Screenshots /tmp/character-refinement-grouped-dark.png and /tmp/relationship-evolution-dark-desktop.png were visually inspected in the actual warm-dark theme. The final scoped outline-button adjustment improves contrast without changing the shared application theme.

No additional per-tab/component SignalR connections or complete-dataset broadcasts were added. Physical device/touch and assistive-technology screen-reader acceptance remain manual recommendations; browser tests cover touch emulation, keyboard, modal focus and responsive geometry.

The final dedicated-history browser check also performs a successful event-form save, verifies that the shared success toast remains visible and that only the bounded content is fetched (no document reload), then checks protected-source removal. Main workspace saves restore focus to the selected definition and retain its group. The exact full-editor deep link is tested after saved story-position restoration, in addition to the original editor regression scenarios.

The database suite reports 26 passing checks in 16 fully rolled-back cases. Build, focused service checks, main-workspace browser, dedicated-history browser and main Relationships Editor browser all pass for the delivered refinements. Deployment evidence follows.

Verified Development release

Deployed application commit: 7fa095409cea95994bb68850b8fb4574daff5730 (7fa0954). Release archive: /srv/apps/plotdirector-dev/releases/character-refinement-qualified-7fa0954-20261123T112320Z; preserved prior installation: /srv/apps/plotdirector-dev/current-before-character-refinement-qualified-7fa0954-20261123T112320Z. The pre-stop import/SI/synthesis/enrichment guard passed. Deployment preserves live configuration, keys, uploads and logs. A verification-helper asset-prefix typo stopped the initial hash loop after installation; the paths were corrected and every intended DLL/CSS/JS hash was then verified without another installation. The service is active, normal-TLS public HTTPS GET and local GET return 200, and assembly informational version identifies this exact commit. Recent logs have only the existing HTTPS-redirection port warning, with no application failures.

Authenticated Development acceptance passed on an exclusively disposable account: Supporting creation default; current-character ribbon IDs through direct/cross-character back/forward/reload; all five tabs; canonical Parent creation; dedicated empty History and exact selected/expanded-group return; actual same-ID Child/type and explicit direction update; dirty navigation rejection; explicit removal preview; archive and Family/Story refresh; exactly one Context hint per add/edit/archive; final fixture character archive. Test-only async-modal and MVC hidden-checkbox selector errors were corrected; their isolated leftovers were safely soft-archived before rerunning. No application repair or redeployment was needed for those test errors.

A separate read-only authenticated check verifies Edit/Merge GETs, actual HTML and Markdown export responses, the correct reanalysis ID/anti-forgery form (without queuing AI work), and the relocated Archive confirmation opened and cancelled. The actual My Windows suite passes existing-main reuse for scene, character, Names and Relationships with unchanged Context scene and no Word navigation. Final SQL integrity smoke confirms no active qualification character or relationship remains in either direction, both baseline fixture characters remain active, and the final new fixture and its exact relationship are archived.

Production was untouched. Actual manuscript relationships, including those specifically protected in the brief, were never corrected, merged or removed by testing. The original two untracked investigation files remain untouched. The application release above is followed only by test/evidence updates; those do not change the deployed application.