[PR #164] [MERGED] fix(maps): preserve movement, edits, and world identity #835

Closed
opened 2026-10-20 17:31:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/164
Author: @thetopham
Created: 7/31/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @thetopham

Base: staging ← Head: fix/world-maps-route-sync-160


📝 Commits (10+)

  • c569f8c fix(maps): preserve queued route transitions
  • ae73b6f fix(maps): guard linked lore navigation
  • f6be1da fix(maps): clarify shared world ownership
  • dc06380 fix(maps): follow explicit user movement
  • fd61cb8 docs(maps): link the task guide from recovery flows
  • 7ea5495 Merge remote-tracking branch 'origin/staging' into fix/world-maps-editor-qol
  • c68b0ac fix(maps): harden editor recovery and cleanup
  • 029a152 fix(maps): reconcile staging and release 1.2.5
  • 43e7adc Merge remote-tracking branch 'origin/staging' into fix/world-maps-editor-qol
  • 29fd354 fix(maps): enforce shared-world rename uniqueness

📊 Changes

31 files changed (+1335 additions, -260 deletions)

View changed files

➕ artifacts/hierarchical-maps-1.2.5.zip (+0 -0)
📝 catalog/catalog.json (+11 -11)
📝 catalog/v2/catalog.json (+11 -11)
📝 catalog/v3/catalog.json (+1 -1)
📝 packages/hierarchical-maps/client.js (+54 -53)
📝 packages/hierarchical-maps/engine-boundary.json (+1 -1)
📝 packages/hierarchical-maps/manifest.json (+6 -6)
📝 packages/hierarchical-maps/server.mjs (+49 -49)
📝 packages/hierarchical-maps/src/engine/packages/client/src/components/game/GameWorldMap.tsx (+10 -8)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx (+14 -2)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx (+178 -15)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapsHome.tsx (+39 -5)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/HierarchyNavigator.tsx (+2 -3)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx (+102 -20)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialContextRuntimeBar.tsx (+16 -5)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialHierarchyProfileFields.tsx (+30 -6)
➕ packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialLocationIcon.tsx (+26 -0)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialMapAiBuilder.tsx (+3 -6)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/package-utils.ts (+3 -0)
➕ packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/shared-world-naming.ts (+24 -0)

...and 11 more files

📄 Description

Linked issues

Closes #153

Closes #155

Closes #156

Closes #157

Closes #158

Closes #159

Closes #160

Closes #161

Closes #162

Closes #163

Related: Pasta-Devs/Marinara-Engine#4367

Why this change

The World Maps beta sweep exposed a connected set of trust, recovery, and editor problems in 1.2.3: queued routes could stall, linked-lore navigation could discard a draft, shared-world copies were hard to distinguish, user-led movement depended too heavily on model phrasing, and routine map cleanup/editing was unnecessarily difficult.

What changed

  • Scope pending-transition acknowledgements to the command Engine received so a completed route hop cannot clear the next queued hop.
  • Retain the transition submitted at turn start until completion and reconcile the next route step from saved state.
  • Route linked-lore navigation through the map workspace's dirty-state confirmation.
  • Refresh shared worlds before Make shared and assign explicit case-insensitive (copy) / (copy N) names on collisions without inferring identity from a friendly name.
  • Serialize shared-world creation and renames on the server and reject concurrent case-insensitive name collisions, so two tabs cannot persist duplicate canonical worlds.
  • Rename the global surface to World library, rename Fork independent to Detach and keep copy, show the current ownership relationship in the editor, and link recovery surfaces to the canonical guide.
  • Authorize hidden movement/discovery commands from completed travel established by the latest user message while continuing to reject assistant-only narration and NPC-only movement.
  • Let profile names and location-type labels behave like normal draft text; validate and trim on Save, block an empty profile name with an inline explanation, and add Revert to defaults.
  • Limit new location icons to 16 characters, use the shared limit for legacy overflow handling, defensively contain legacy long icons, and preserve the compass fallback for linked places.
  • Add a disclosure indicator to Linked lore, group entries by collapsible lorebook, search parent lorebook names as well as entry fields, retain disabled entries as visible but unavailable, and group candidates in one pass.
  • Add guarded permanent deletion for archived locations/branches only when they are not the starting/current location, linked to a shared world, referenced by message history or Game bindings, or involved in a queued route/destination; deleted hierarchy assignments are pruned before Save.
  • Preserve merged PR #168's legacy visual_novel → Roleplay compatibility and immutable World Maps 1.2.4 artifact, then rebuild this sweep as World Maps 1.2.5.

The prompt correction reduces provider sensitivity but does not claim deterministic natural-language parsing. A direct user-input parser would require a separate Engine host contract.

Package and security impact

  • Affected package IDs: hierarchical-maps
  • Engine compatibility: unchanged; Marinara Engine 2.3.5 through below 3.0.0
  • New permissions or entrypoints: none
  • Storage or migration changes: none
  • Restart impact: normal World Maps package update to 1.2.5

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Automated checks run while preparing this PR:

  • node scripts/test-catalog-lanes.mjs
  • node scripts/validate-catalog.mjs
  • node --check packages/hierarchical-maps/client.js
  • node --check packages/hierarchical-maps/server.mjs
  • git diff --check
  • focused shared-world copy-name regression
  • exact-artifact Hierarchical Maps lifecycle regression against the recorded Engine boundary, including route/history persistence, user-led prompt authority, shared-world identity and concurrent-name enforcement, guarded permanent deletion, restart, uninstall/reinstall, backup, and restore
  • Playwright/TypeScript parse for the full spatial browser suite, including profile draft editing, defaults recovery, icon containment, lorebook grouping/search, guarded linked-lore navigation, stale hierarchy cleanup, and permanent deletion
  • focused exact-artifact route regression on mobile Chromium from the earlier draft (1 passed)
  • focused exact-artifact linked-lore navigation regression on desktop Chromium from the earlier draft (1 passed)
  • unzip -t artifacts/hierarchical-maps-1.2.5.zip
  • verified artifacts/hierarchical-maps-1.2.4.zip remains byte-identical to merged staging

Current 1.2.5 artifact SHA-256: 04037585561153e75c18dede944956a5962bc31d72b22f53c446c12b01d5bd86

Manual verification

  • Plan a two-hop route, commit the first hop, and verify the second remains queued after host acknowledgement.
  • Open linked lore with unsaved map edits and verify Cancel preserves the draft while Discard permits navigation.
  • Make a map shared, detach and keep its copy, then make it shared again; verify the new canonical record is named (copy) and the confirmation explains it is separate.
  • Verify the editor header clearly changes between Independent chat map and Linked to ....
  • Verify World library, Detach and keep copy, and Replace / start over are discoverable on desktop and mobile.
  • Verify profile draft whitespace/empty-name validation and Revert to defaults.
  • Verify lorebooks are collapsed by default, searchable by book name, and disabled entries remain visible but unavailable.
  • Archive and permanently delete an unreferenced location, then verify a historical or Game-bound location explains why deletion is unavailable.
  • With more than one language model, verify explicit user phrases such as We go to the Kitchen, We follow her into the outdoor section, and We discover a hidden room emit the expected hidden map change, while AI-only narration and NPC-only movement do not.
  • Install/update World Maps 1.2.5, restart Marinara, and verify Roleplay and Game package readiness.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

The package links to the expanded guide in Marinara Engine PR #4380. The required translation follow-up is Pasta-Devs/Marinara-Engine#4381.

Summary by CodeRabbit

  • New Features

    • Added World Maps guidance links and movement help.
    • Improved location icons and fallback display across map views.
    • Added shared-world copying with collision-safe names.
    • Added permanent deletion for eligible archived locations, with safety protections.
    • Added expandable lorebook search results and unsaved-change navigation warnings.
    • Added hierarchy profile validation and a “Revert to defaults” option.
  • Bug Fixes

    • Improved queued movement handling and arrival recognition.
    • Prevented duplicate shared-world names during simultaneous creation.
  • Updates

    • Released Hierarchical Maps version 1.2.5.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/164 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/31/2026 **Status:** ✅ Merged **Merged:** 8/1/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `fix/world-maps-route-sync-160` --- ### 📝 Commits (10+) - [`c569f8c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c569f8c066d28563cc171ea06fae8c7d6b161cec) fix(maps): preserve queued route transitions - [`ae73b6f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ae73b6f0d207a97abc0be53e1cf4e72e71cc5391) fix(maps): guard linked lore navigation - [`f6be1da`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f6be1da009958e43012483278877d284f8a3e240) fix(maps): clarify shared world ownership - [`dc06380`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dc063807fd4769f561ba095a5c8d49debe72385e) fix(maps): follow explicit user movement - [`fd61cb8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fd61cb8a64ea9fcc6ae3caf513fa7dfaeacad922) docs(maps): link the task guide from recovery flows - [`7ea5495`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7ea54957c979385500a087965cf9efbd921ae5bd) Merge remote-tracking branch 'origin/staging' into fix/world-maps-editor-qol - [`c68b0ac`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c68b0acdc3cee51a8125310b36eeb8d85dddcd2b) fix(maps): harden editor recovery and cleanup - [`029a152`](https://github.com/Pasta-Devs/Marinara-Agents/commit/029a152a586c16196dd628d3e79b51b8fa0c5498) fix(maps): reconcile staging and release 1.2.5 - [`43e7adc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/43e7adcc21fb3fec19ba7f0f667cb99ec3a69c40) Merge remote-tracking branch 'origin/staging' into fix/world-maps-editor-qol - [`29fd354`](https://github.com/Pasta-Devs/Marinara-Agents/commit/29fd3542c43b663baa2f846ab663148300db8f94) fix(maps): enforce shared-world rename uniqueness ### 📊 Changes **31 files changed** (+1335 additions, -260 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/hierarchical-maps-1.2.5.zip` (+0 -0) 📝 `catalog/catalog.json` (+11 -11) 📝 `catalog/v2/catalog.json` (+11 -11) 📝 `catalog/v3/catalog.json` (+1 -1) 📝 `packages/hierarchical-maps/client.js` (+54 -53) 📝 `packages/hierarchical-maps/engine-boundary.json` (+1 -1) 📝 `packages/hierarchical-maps/manifest.json` (+6 -6) 📝 `packages/hierarchical-maps/server.mjs` (+49 -49) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/components/game/GameWorldMap.tsx` (+10 -8) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx` (+14 -2) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx` (+178 -15) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapsHome.tsx` (+39 -5) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/HierarchyNavigator.tsx` (+2 -3) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx` (+102 -20) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialContextRuntimeBar.tsx` (+16 -5) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialHierarchyProfileFields.tsx` (+30 -6) ➕ `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialLocationIcon.tsx` (+26 -0) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialMapAiBuilder.tsx` (+3 -6) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/package-utils.ts` (+3 -0) ➕ `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/shared-world-naming.ts` (+24 -0) _...and 11 more files_ </details> ### 📄 Description ## Linked issues Closes #153 Closes #155 Closes #156 Closes #157 Closes #158 Closes #159 Closes #160 Closes #161 Closes #162 Closes #163 Related: Pasta-Devs/Marinara-Engine#4367 ## Why this change The World Maps beta sweep exposed a connected set of trust, recovery, and editor problems in 1.2.3: queued routes could stall, linked-lore navigation could discard a draft, shared-world copies were hard to distinguish, user-led movement depended too heavily on model phrasing, and routine map cleanup/editing was unnecessarily difficult. ## What changed - Scope pending-transition acknowledgements to the command Engine received so a completed route hop cannot clear the next queued hop. - Retain the transition submitted at turn start until completion and reconcile the next route step from saved state. - Route linked-lore navigation through the map workspace's dirty-state confirmation. - Refresh shared worlds before **Make shared** and assign explicit case-insensitive **(copy)** / **(copy N)** names on collisions without inferring identity from a friendly name. - Serialize shared-world creation and renames on the server and reject concurrent case-insensitive name collisions, so two tabs cannot persist duplicate canonical worlds. - Rename the global surface to **World library**, rename **Fork independent** to **Detach and keep copy**, show the current ownership relationship in the editor, and link recovery surfaces to the canonical guide. - Authorize hidden movement/discovery commands from completed travel established by the latest user message while continuing to reject assistant-only narration and NPC-only movement. - Let profile names and location-type labels behave like normal draft text; validate and trim on Save, block an empty profile name with an inline explanation, and add **Revert to defaults**. - Limit new location icons to 16 characters, use the shared limit for legacy overflow handling, defensively contain legacy long icons, and preserve the compass fallback for linked places. - Add a disclosure indicator to **Linked lore**, group entries by collapsible lorebook, search parent lorebook names as well as entry fields, retain disabled entries as visible but unavailable, and group candidates in one pass. - Add guarded permanent deletion for archived locations/branches only when they are not the starting/current location, linked to a shared world, referenced by message history or Game bindings, or involved in a queued route/destination; deleted hierarchy assignments are pruned before Save. - Preserve merged PR #168's legacy `visual_novel` → Roleplay compatibility and immutable World Maps 1.2.4 artifact, then rebuild this sweep as World Maps 1.2.5. The prompt correction reduces provider sensitivity but does not claim deterministic natural-language parsing. A direct user-input parser would require a separate Engine host contract. ## Package and security impact - Affected package IDs: `hierarchical-maps` - Engine compatibility: unchanged; Marinara Engine 2.3.5 through below 3.0.0 - New permissions or entrypoints: none - Storage or migration changes: none - Restart impact: normal World Maps package update to 1.2.5 ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Automated checks run while preparing this PR: - `node scripts/test-catalog-lanes.mjs` - `node scripts/validate-catalog.mjs` - `node --check packages/hierarchical-maps/client.js` - `node --check packages/hierarchical-maps/server.mjs` - `git diff --check` - focused shared-world copy-name regression - exact-artifact Hierarchical Maps lifecycle regression against the recorded Engine boundary, including route/history persistence, user-led prompt authority, shared-world identity and concurrent-name enforcement, guarded permanent deletion, restart, uninstall/reinstall, backup, and restore - Playwright/TypeScript parse for the full spatial browser suite, including profile draft editing, defaults recovery, icon containment, lorebook grouping/search, guarded linked-lore navigation, stale hierarchy cleanup, and permanent deletion - focused exact-artifact route regression on mobile Chromium from the earlier draft (`1 passed`) - focused exact-artifact linked-lore navigation regression on desktop Chromium from the earlier draft (`1 passed`) - `unzip -t artifacts/hierarchical-maps-1.2.5.zip` - verified `artifacts/hierarchical-maps-1.2.4.zip` remains byte-identical to merged staging Current 1.2.5 artifact SHA-256: `04037585561153e75c18dede944956a5962bc31d72b22f53c446c12b01d5bd86` ### Manual verification - [ ] Plan a two-hop route, commit the first hop, and verify the second remains queued after host acknowledgement. - [ ] Open linked lore with unsaved map edits and verify Cancel preserves the draft while Discard permits navigation. - [ ] Make a map shared, detach and keep its copy, then make it shared again; verify the new canonical record is named **(copy)** and the confirmation explains it is separate. - [ ] Verify the editor header clearly changes between **Independent chat map** and **Linked to ...**. - [ ] Verify **World library**, **Detach and keep copy**, and **Replace / start over** are discoverable on desktop and mobile. - [ ] Verify profile draft whitespace/empty-name validation and **Revert to defaults**. - [ ] Verify lorebooks are collapsed by default, searchable by book name, and disabled entries remain visible but unavailable. - [ ] Archive and permanently delete an unreferenced location, then verify a historical or Game-bound location explains why deletion is unavailable. - [ ] With more than one language model, verify explicit user phrases such as **We go to the Kitchen**, **We follow her into the outdoor section**, and **We discover a hidden room** emit the expected hidden map change, while AI-only narration and NPC-only movement do not. - [ ] Install/update World Maps 1.2.5, restart Marinara, and verify Roleplay and Game package readiness. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [x] Updated linked Marinara Engine documentation The package links to the expanded guide in Marinara Engine PR #4380. The required translation follow-up is Pasta-Devs/Marinara-Engine#4381. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added World Maps guidance links and movement help. * Improved location icons and fallback display across map views. * Added shared-world copying with collision-safe names. * Added permanent deletion for eligible archived locations, with safety protections. * Added expandable lorebook search results and unsaved-change navigation warnings. * Added hierarchy profile validation and a “Revert to defaults” option. * **Bug Fixes** * Improved queued movement handling and arrival recognition. * Prevented duplicate shared-world names during simultaneous creation. * **Updates** * Released Hierarchical Maps version 1.2.5. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:31:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#835
No description provided.