213 lines
16 KiB
Markdown
213 lines
16 KiB
Markdown
# Locations workspace delivery and acceptance
|
||
|
||
Implemented, committed, pushed and activated on **Development only** on 27 November 2026.
|
||
The final application source is **451e766777b134f5be4b0780c01ac8d56b3ec39d**. Production was untouched.
|
||
|
||
## Delivered architecture
|
||
|
||
The full-width directory has independently resizable/collapsible Attributes and Details panels,
|
||
an expandable tree and variable-height cards, search/filters/sibling sorting, selection and
|
||
bulk assignment, bidirectional attribute drag, branch/root drag moves with hover expansion,
|
||
inline rename, child creation, description Save/Cancel, and shared context menus.
|
||
The same records and commands drive both views. Traditional forms and non-hierarchical
|
||
relationship editing remain available. See [architecture and safeguards](Workspace.md).
|
||
|
||
Reused: Dapper/stored procedures, canonical location records and aliases, project ownership roles,
|
||
`workspace-surface.js`, shared context menus/ribbon icons, `PlotDirector.toast`, protected Undo
|
||
receipts, existing merge reconciliation/audit, and Context invalidation notifications.
|
||
|
||
Migration **335_LocationsWorkspace.sql** adds nullable classification (Real/Fictional/Fictionalised;
|
||
NULL is Unclassified), four compatible canonical types (Planet, District, Natural Feature, City),
|
||
and targeted workspace procedures. No existing type or classification is replaced. Quick Add and
|
||
Word Companion exclusion are existing quick switches; detection priority remains in Edit.
|
||
Migration **336_LocationSaveHierarchyIntegrity.sql** also closes the traditional full-form/import
|
||
writer’s cycle and cross-project loophole, using the same project-first lock order. Unchanged
|
||
historical parents remain intact. The project export selector and `LocationItem` retain
|
||
classification through backup/restore.
|
||
Migration **337_LocationMutationVersionIntegrity.sql** makes versions strictly advance across the
|
||
existing location writers, versions children reparented by merge, and preserves case-only and
|
||
trailing-space description differences. These changes alter procedures, without rewriting records.
|
||
The established merge now also preserves maps and conflicting descriptions, including when
|
||
opened through the traditional Details page. The workspace adds conflict review and version checks.
|
||
No AI processing or geocoding is invoked by these workspace commands.
|
||
|
||
## Verification
|
||
|
||
- `dotnet build PlotLine.slnx`: passed, zero warnings/errors.
|
||
- Executable regression harness: **889 PASS**, successful exit. Existing Characters, Names,
|
||
Relationships, Maps/topology, Floor Plans, Assets, import, Context and shared focus contracts
|
||
remain covered by the existing harness; this is not a claim of exhaustive manual workflow testing.
|
||
- Actual compiled Razor and production CSS/JavaScript: Chromium browser and a genuinely installed
|
||
Chromium PWA under Xvfb. Collections of 50/200/500/1,000 records; deep chains, wide branches,
|
||
repeated names, complete long descriptions, map/floor-plan indicators.
|
||
- Physical attribute/location dragging, hover-expand reparenting, root drops and invalid target
|
||
rejection; bulk assignment, individual-value Undo, no-op assignment, simulated save failure,
|
||
inline rename Save/Escape, child creation, right-click/keyboard/visible menus, unsaved-description
|
||
protection, local attribute updates while retaining a description draft, filters, cards, sorting,
|
||
and a delayed live-refresh race.
|
||
- Both divider pointer drags and keyboard resizing; saved widths, collapsed panels, view, attribute
|
||
groups and expanded branches survive reload. View changes retain selection and filters.
|
||
- All seven available theme choices; 390/768/1024/1280/1440/1920-pixel viewport checks without
|
||
horizontal document overflow. Native physical Windows/Edge installation was not available.
|
||
- Focused SQL regressions run only on disposable clones and roll back: ancestor/descendant bulk
|
||
safety, root moves, exact original parents on Undo, no-op versions, cycle/unavailable/cross-project
|
||
parent rejection, unauthorized/stale writes, monotonic timestamps, rejection of pre-merge child Undo,
|
||
exact case/trailing-space description handling, and targeted rename preserving scene assignment.
|
||
Merge preserves source records, descriptions, classification, children, aliases, authored
|
||
relationships, scene assignments, map feature IDs/geometry and floor-plan links.
|
||
- Real Dapper create/assignment/Undo and a reviewed merge with an exact `datetime2(7)` timestamp,
|
||
plus six directory result sets, including entry/exit-only
|
||
character scene assignments counted once. Actual typed project export and generic location JSON
|
||
restore retain a non-null classification. Restore fixture is rolled back and removed.
|
||
- Two initial 335/336 qualification clones retained all **208** other original business-table
|
||
fingerprints; existing LocationTypes rows were unchanged and only four canonical types were added.
|
||
The final 337 qualification repeated on two fresh post-335/336 clones: all **209** original
|
||
business-table fingerprints remained unchanged. DBCC integrity and constraints report zero
|
||
violations. See [initial qualification](Evidence/workspace-database-qualification.json) and
|
||
[final qualification](Evidence/database-qualification.json).
|
||
|
||
## Development delivery
|
||
|
||
Release `development-locations-451e766777b1-20261127T133501Z`, deployment
|
||
`20261127T133528Z-4f86bec8648b`, passed signed admission, verified COPY_ONLY/CHECKSUM backup,
|
||
application/binary/database checks and release-history recording. Migrations 335–337 were applied
|
||
through the Development helper; the final code release executed zero migrations. No Production
|
||
host, credentials or database was used. [Receipt](Evidence/development-deployment.json),
|
||
[health](Evidence/development-health.json), [release gates](Evidence/release-gates.json),
|
||
[code-only qualification](Evidence/code-release-qualification.json).
|
||
|
||
A disposable account/project/book was created through normal repositories/forms. The authenticated
|
||
browser exercised Directory/Create/Assign/Undo/Merge, hidden-selection menus, Enter child creation,
|
||
inline rename/description, reviewed merge, actual second-window live invalidation, server cycle and
|
||
cross-project rejection, and full Edit cycle rejection with the persisted description intact. The existing non-hierarchical
|
||
relationship form worked. Characters, Names, Relationships, Maps, Floor Plans, Assets, Writer,
|
||
Location Details and Edit returned authenticated successful pages; this is route smoke, not an
|
||
exhaustive manual audit of those workspaces. [Results](Evidence/development-smoke.json).
|
||
|
||
The genuinely installed Development Chromium PWA also passed authenticated directory/state,
|
||
context menus, full card description and same-window Details navigation.
|
||
[Installed-PWA results](Evidence/development-pwa-smoke.json),
|
||
[menu](Evidence/development-pwa-context.png), [cards](Evidence/development-pwa-cards.png).
|
||
|
||
The disposable account and its owned fixture project/book/locations were removed through the
|
||
established hard-delete account workflow after verification. Nine task-specific qualification
|
||
clones were removed; Development was never restored or reset.
|
||
|
||
Implementation commits (pushed to `codex/word-companion-native-phase1-20261104`):
|
||
|
||
- `6a90a71e`: workspace, direct commands, cards, hierarchy and merge preservation.
|
||
- `7e27aba3`: traditional writer hierarchy integrity and qualification.
|
||
- `39c34d9f`: retain description drafts during local updates.
|
||
- `2b1af493`: commands for selections hidden in collapsed branches.
|
||
- `3b89c196`: visible full-form errors and one-step workspace Undo.
|
||
- `eebbf3b6`: monotonic mutation versions, exact prose and draft navigation guards.
|
||
- `451e7667`: exact Dapper merge timestamp binding and authenticated regression protection.
|
||
|
||
## Performance
|
||
|
||
Milliseconds, single representative passes on the isolated Razor host. Browser transport/data
|
||
mutations are synthetic; these are not authenticated network benchmarks. The richer after-workspace
|
||
also renders indicators, controls and descriptions. The large after fixtures include a 100-level
|
||
chain. Search/interaction timings include deliberate settling waits; no statistical speedup is claimed.
|
||
|
||
| Locations | Old list load | New browser load | Installed PWA load | Expand all (browser) | Search (browser) | Cards (browser) |
|
||
|---:|---:|---:|---:|---:|---:|---:|
|
||
| 50 | 257 | 266 | 302 | 102 | 108 | 116 |
|
||
| 200 | 230 | 292 | 375 | 167 | 148 | 200 |
|
||
| 500 | 410 | 317 | 451 | 334 | 126 | 436 |
|
||
| 1000 | 609 | 445 | 729 | 636 | 163 | 1248 |
|
||
|
||
The first cold post-build 50-record request measured **1,424 ms**; warm 50-record passes were about
|
||
266–302 ms. At 1,000 records the measured browser bulk interaction was 858 ms, rename 123 ms,
|
||
reparent 283 ms and selected-details 103 ms in one pass; later passes vary. Card rendering at this
|
||
scale is approximately 1.2 seconds with full descriptions. There is no card virtualization.
|
||
Raw passes: [before](Evidence/before.json), [after](Evidence/after-large.json),
|
||
[cold request](Evidence/after-cold-release.json), [PWA](Evidence/pwa-performance.json).
|
||
|
||
Actual SQL/Dapper reads, on a disposable Development clone with 69 existing records in addition
|
||
to each synthetic collection: old simple list / new six-result directory = 25.5/82.1 ms (50),
|
||
41.2/18.3 ms (200), 55.9/41.2 ms (500), 71.3/68.1 ms (1,000).
|
||
The new read includes aliases, maps, floor plans, usage, types and relationship/character/asset
|
||
counts, without per-location queries. [Raw database results](Evidence/database-performance.txt).
|
||
|
||
## Acceptance matrix
|
||
|
||
“Passed” means exercised by the stated browser/SQL/harness checks, not merely compiled.
|
||
|
||
| Requirement | Status | Evidence / boundary |
|
||
|---|---|---|
|
||
| Full-width three-panel workspace; responsive layouts | Passed | Rendered browser/PWA, viewport overflow checks |
|
||
| Both pointer/keyboard dividers; independent saved widths | Passed | Native pointer checks, reload assertions |
|
||
| Collapse/restore Attributes and Details | Passed | Both modes, reload assertions |
|
||
| Tree expansion, remembered branches, ancestral paths | Passed | Tree/search/reload checks |
|
||
| Native reparenting and hover-expanded branches | Passed | Native pointer test and hover screenshot |
|
||
| Root-level drop and invalid descendant target feedback | Passed | Native drop/no-write checks; SQL rejection |
|
||
| Bulk branch preservation and exact parent Undo | Passed | Transactional SQL fixture with different original parents |
|
||
| Server ownership, active-parent and cycle validation | Passed | Unauthorized, cross-project, unavailable and cycle SQL/HTTP contracts |
|
||
| Type/classification and existing quick switches | Passed | Browser assignments and SQL/Dapper round trip |
|
||
| Bidirectional attribute drag, selection and bulk assignment | Passed | Browser/PWA drag and selection checks |
|
||
| Counts, derived filters, aliases, branch search and clear | Passed | Rendered tests; authoritative batched SQL |
|
||
| Shared toast and version-protected Undo | Passed | Browser actions and real Dapper exact-version restore |
|
||
| No-op and failed-assignment preservation | Passed | No-request and simulated conflict checks; SQL version checks |
|
||
| F2/menu rename, Enter save, Escape cancel | Passed | Native keyboard/browser checks; scene IDs preserved |
|
||
| Direct child creation and description editing | Passed | Rendered dialog/details tests; unsaved draft checks |
|
||
| Context menus, visible menu and keyboard alternative | Passed | Browser right-click, Shift+F10, installed PWA; collapsed-branch selections |
|
||
| Hierarchy/cards, complete descriptions, variable heights | Passed | DOM height checks and rendered screenshots |
|
||
| Selection/filter preservation and branch-safe sorting | Passed | View/sibling-order checks |
|
||
| Multiple map/floor-plan associations and same-window links | Passed | Directory links and SQL preservation checks |
|
||
| Merge review, reconciliation and rollback safeguards | Passed | Transactional SQL fixtures and actual reviewed Development merge |
|
||
| Backup/export/restore retains optional classification | Passed | Actual typed export and generic restore round trip |
|
||
| No new AI, no manuscript focus writes | Passed | Command paths contain no AI/geography/focus calls; existing harness |
|
||
| Existing related workspace behavior | Passed | 889-check harness; authenticated route smoke passed; not exhaustive editing |
|
||
| Live updates across actual Development windows | Passed | Actual second-window classification invalidation |
|
||
| Development deployment and authenticated mutations | Passed | Signed helper receipt, healthy exact commit/database, dedicated-account smoke |
|
||
| Every existing Context consumer with physical Word/PWA | Not verified | Existing contracts/hints preserved; physical Word unavailable |
|
||
| Windows/Edge installed-PWA behavior | Not verified | Linux Chromium browser + real installed PWA verified |
|
||
| Collections above 1,000; exhaustive keyboard/assistive-tech audit | Not verified | No claim beyond measured cases |
|
||
| New location image storage | Not implemented | No canonical location-image attribute exists; conditional scope only |
|
||
| New feature-level reveal inside Maps/Floor Plans | Not implemented | Existing routes select map/plan; their editors are unchanged |
|
||
|
||
Failed: none remaining after fixing the merge timestamp binding and full-form validation display. The last two “Not implemented” items are conditional features
|
||
without an existing canonical field/route, not replacement representations or editor redesigns.
|
||
|
||
## Rendered evidence
|
||
|
||
All screenshots use controlled synthetic data, never the author's manuscripts/locations.
|
||
|
||
| Demonstration | Screenshot |
|
||
|---|---|
|
||
| Baseline list | [Before](Evidence/before.png) |
|
||
| Authenticated deployed workspace | [Development](Evidence/development-workspace.png) |
|
||
| Complete workspace | [Browser](Evidence/workspace.png), [installed PWA](Evidence/pwa-workspace.png) |
|
||
| Populated multilevel hierarchy | [Hierarchy](Evidence/hierarchy.png) |
|
||
| Attribute assignment | [Assignment](Evidence/attribute-assignment.png) |
|
||
| Reparenting and hover expansion | [Move](Evidence/reparenting.png), [hover](Evidence/hover-reparent.png), [root drop](Evidence/root-drop.png) |
|
||
| Bulk assignment | [Bulk](Evidence/bulk-assignment.png), [bulk menu](Evidence/bulk-context-menu.png), [PWA menu](Evidence/pwa-bulk-context-menu.png) |
|
||
| Inline rename | [Rename](Evidence/inline-rename.png) |
|
||
| Context menu | [Menu](Evidence/context-menu.png) |
|
||
| Direct child creation | [Child](Evidence/create-child.png) |
|
||
| Editable Details | [Description](Evidence/details-edit.png) |
|
||
| Variable-size cards | [Cards](Evidence/cards.png), [PWA](Evidence/pwa-cards.png) |
|
||
| Search with ancestors | [Search](Evidence/search-context.png) |
|
||
| Map/floor-plan indicators | [Workspace](Evidence/workspace.png) |
|
||
| Resized panels | [Dividers](Evidence/resized-panels.png), [PWA](Evidence/pwa-resized-panels.png) |
|
||
| Representative light/dark themes | [Light](Evidence/theme-modern-light.png), [dark](Evidence/theme-modern-dark.png) |
|
||
| Large hierarchy | [1,000 locations](Evidence/large-hierarchy.png), [PWA](Evidence/pwa-large-hierarchy.png) |
|
||
|
||
Additional screenshots cover PlotDirector, warm light/dark, rose pink and baby blue themes.
|
||
|
||
## Known boundaries
|
||
|
||
Geography confirmations are not regenerated by quick edits or inherited during merge. Existing
|
||
explicit geography review remains available. Location images do not currently exist in the model.
|
||
Map/plan navigation uses current route contracts; no editor geometry or interaction is redesigned.
|
||
Description editing is explicit Save/Cancel; merge and archive have no workspace Undo. Undo rejects
|
||
stale records or unavailable original parents rather than overwriting later changes. Bulk commands
|
||
are bounded at 2,000 records, consistent with the Characters convention.
|
||
|
||
Non-hierarchical sensory/travel relationships remain on the established Details editor. Temporary
|
||
asset/scene circumstances stay separate from permanent containment; no temporal tracking system is
|
||
added. Full descriptions are preserved; very large card collections render all matches.
|
||
|
||
User help: [Locations overview](../../PlotLine/Help/Articles/Locations/Overview.md).
|