4.2 KiB
Names workspace
Recorded usage and catalogue audit
The existing Name Intelligence catalogue stores classification, ambiguous-word flags, notes, locale/era profiles, gender weights, usage/confidence, provenance and related forms. Search ranks exact matches, then usage weight and display name, with bounded pagination. These filters and ordering remain in GivenName_Search.
Previously usage decoration joined primary names and aliases through scene membership, offered Book/Project/Library scope and repeated summaries per appearance. Neither the old main page nor Context retrieved manuscript paragraphs: their usage actions retrieved recorded identity associations. Ordinary catalogue searches do not invoke AI.
Migration 325 replaces scene-dependent usage with exact canonical comparison of recorded names and aliases in the authorised current series. It excludes an alias duplicating the same character's primary name. Different characters sharing a spelling remain independent associations. Character Type, species and story importance are returned from canonical records. No manuscript word occurrence establishes assignment.
Shared presentation
_NamesWorkspace, _NamesResults, _NameDetails, NamesWorkspace and names-workspace.js implement the compact results and selected-name panel. Details use existing recognition metadata and the existing association repository only after selection. Catalogue searches retain pagination and never retrieve biographies or per-result occurrence lists.
The main page opts into the existing full-width shell. The selected panel is sticky, with bounded scrolling; narrow containers show details with Back to Results. Main-page interaction state uses session storage scoped to series. Character actions open canonical records in another window, preserving the search.
Usage icons come from the existing SVG library: primary name uses the shared Character Type icon (including Animal paw), aliases use name-alias, available uses name-available. Selected details distinguish confirmed associations from textual matches. Explicit paragraph occurrence lookup and AI verification are subsequent phases of this implementation.
Phase gates
Phase 1: Character Type migration 324 and SQL regression passed on a disposable Development clone. Build and full executable harness passed. Actual Chromium and installed Chromium PWA fixture interactions passed at 10/100/500 characters, including the new Type bulk assignment/Undo and existing interactions.
Phase 2: migration 325 and recorded-usage SQL regression passed on the disposable clone. Build and full executable harness passed. Browser/names-workspace.cjs passed normal and installed Chromium with compiled Razor, synthetic animal/alias details, all seven themes and viewport widths 390/768/1280/1920/2560/3840. Screenshots and measurements are in /tmp/pd-names-workspace. These are isolated fixture checks, not authenticated Development deployment acceptance.
No migrations have been applied to Development and no deployment has occurred during these phase gates.
Context reuse
The pre-existing Names tab now mounts the same shared workspace. Its adapter only supplies authorised Context endpoints and retains component state keyed by pane and book. Separate windows have separate JavaScript state. Book-scoped Context refresh policy ignores paragraph/scene movement; character invalidation continues through the workspace's established connection and remount lifecycle. Character links open canonical records elsewhere. No new connections or manuscript-focus commands are introduced.
Query plan stability
Authenticated Development acceptance exposed a timeout when a cached catalogue plan was reused across different prefix/default/locale/usage filters on a small cast. Forward-only migration 333 recompiles the final catalogue statement for the current parameters, without changing matching, metadata, ordering or pagination. Migration 325 remains immutable. Qualification now alternates narrow and broad searches, locale/era criteria and assigned/available filters with a two-character cast, in addition to the 500-character fixture. The benchmark restores the latest procedure after measuring historical SQL, so tests do not leave the database on an earlier definition.