[PR #136] [MERGED] feat(maps): add shared worlds and reusable artwork (requires Engine #4279) #825

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

📋 Pull Request Information

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

Base: staging ← Head: feature/world-maps-shared-gallery-129-133


📝 Commits (10+)

  • b2212ba feat(maps): share template artwork through global gallery
  • e6677a9 test(maps): prove shared artwork reuse
  • dc85ad6 feat(maps): add durable shared worlds
  • 610c0f1 fix(maps): polish location types and artwork reminder
  • af94e72 feat(maps): finish beta editor workflows
  • 371ba9c Merge origin/staging into feature/world-maps-shared-gallery-129-133
  • 0f001ef fix(maps): compact mobile editor notices
  • dbee11a fix(maps): compact editor chrome and improve selection
  • be91741 fix(maps): contain overlay interactions
  • 56717dc test(maps): strengthen shared state and selection proof

📊 Changes

28 files changed (+4563 additions, -869 deletions)

View changed files

📝 README.md (+1 -1)
➕ artifacts/hierarchical-maps-1.2.1.zip (+0 -0)
📝 catalog/catalog.json (+12 -12)
📝 catalog/v2/catalog.json (+12 -12)
📝 catalog/v3/catalog.json (+1 -1)
📝 packages/hierarchical-maps/agents.json (+1 -1)
📝 packages/hierarchical-maps/client.js (+154 -53)
📝 packages/hierarchical-maps/manifest.json (+8 -8)
📝 packages/hierarchical-maps/server.mjs (+54 -54)
📝 packages/hierarchical-maps/src/engine/packages/client/src/components/game/GameWorldMap.tsx (+18 -5)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx (+568 -47)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx (+1152 -344)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/HierarchyNavigator.tsx (+7 -1)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocalMapCanvas.tsx (+2 -1)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx (+188 -48)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialHierarchyProfileFields.tsx (+42 -21)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialMapAiBuilder.tsx (+60 -25)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/use-spatial-resources.ts (+111 -0)
📝 packages/hierarchical-maps/src/engine/packages/client/src/hooks/use-spatial-context.ts (+222 -45)
📝 packages/hierarchical-maps/src/engine/packages/maps-shared/src/maps-model.ts (+146 -14)

...and 8 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #129
Closes #130
Closes #131
Closes #132
Closes #133
Closes #134
Closes #135
Closes #137

Companion Engine support: Pasta-Devs/Marinara-Engine#4279 (closes Pasta-Devs/Marinara-Engine#4278). Translation follow-up: Pasta-Devs/Marinara-Engine#4280.

Why this change

World Maps were copied into each chat, illustrated templates lost or duplicated chat-owned artwork, and several beta editor workflows made correcting or replacing a map unnecessarily difficult. Users building durable worlds across Roleplay and Game chats need reusable definitions and artwork without sharing private campaign state, plus clear recovery controls when setup is wrong.

What changed

  • #129 and #137 — reusable artwork: promote chat artwork to Global Gallery when saving a template or shared world, deduplicate exact content, reuse namespaced references across chats, preserve legacy chat Gallery references, and keep portable .world-map.json export/import self-contained with base64 artwork and import-time reconnection.
  • #130 — editor workflow gaps: distinguish starting location from current story location, add confirmed non-narrated current-location correction, clear incompatible queued travel, add direct location-reference and child-map-background upload, and use companion Engine #4279 for the Roleplay Agent Menus shortcut.
  • #131 — custom type labels: resolve map-specific type labels consistently instead of exposing only semantic base kinds.
  • #132 — type ordering: add accessible Move up and Move down controls in both location-type editors while preserving stable type IDs, assignments, export/import order, templates, and AI prompt order.
  • #133 — shared worlds: add account-owned canonical worlds; linked, forked, and independent chat modes; private per-chat location/history/Game state; private definition drafts; reviewed publish/discard/relink flows; optimistic revisions and conflict handling; linked-world deletion/location-removal protection; portable import/export; and shared Global Gallery artwork.
  • #134 — artwork reminder: move passive artwork status into the responsive editor action area and show the full review panel only when requested or while generation is active.
  • #135 — replace/start over: replace the destructive shortcut with a preservation-first hub for saving a template, exporting a backup, importing another map, using AI, or starting a history-safe blank map.
  • Keep the Maps editor header to one row across desktop, tablet, and mobile; isolate Maps overlays from controls underneath; and render selected locations with an opaque surface and distinct active border over map artwork.
  • Rebuild World Maps 1.2.1 source payloads, generated client/server bundles, manifest, artifact, checksums, and every compatible catalog lane.
  • Expand exact-artifact and browser regression coverage for shared artwork/worlds, per-chat runtime isolation, current-state correction, custom types, responsive/touch actions, selection contrast, and replacement flows.

Dependency gate

  • Engine PR Pasta-Devs/Marinara-Engine#4279 must merge to Engine staging before this PR leaves draft or merges.
  • This branch is current with Agents staging at 876f37f and preserves its Long-Term Memory changes and full catalog union.
  • The lifecycle fixture now creates real Global Gallery records, matching #4279's atomic reference/deletion contract instead of relying on synthetic dangling ids.

Package and security impact

  • Affected package IDs: hierarchical-maps
  • Engine compatibility impact: requires companion Engine PR Pasta-Devs/Marinara-Engine#4279 for Global Gallery spatial-reference resolution, atomic reference-aware deletion, and the Roleplay Agent Menus shortcut
  • New or changed permissions/entrypoints: none; the package uses existing authenticated capability-document, chat Gallery, Global Gallery, and spatial-context hosts
  • Restart, storage, update, or uninstall impact: package update and restart required; canonical world definitions use account capability documents, shared art uses Global Gallery, chat runtime state remains chat-local, and uninstall/reinstall preserves persisted definitions and state

Shared worlds never copy chat history, provider credentials, or unrelated chat data.

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 evidence at pushed head f667dd48b

  • node scripts/test-catalog-lanes.mjs passed.
  • node scripts/validate-catalog.mjs passed: 31 packages, v2=31, v3=6, legacy=v2.
  • node scripts/hierarchical-maps-boundary.mjs returned an empty private-import inventory.
  • git diff --check passed.
  • The exact World Maps 1.2.1 artifact lifecycle regression passed against Engine #4279 head e115a731a, covering update, real Global Gallery artwork, canonical worlds, per-chat runtime isolation, private drafts, publish/conflict/fork protection, restart, uninstall/reinstall, backup, and restore.
  • The World Maps browser suite compiles and discovers all 48 desktop/mobile Chromium cases, including the corrected imported-template artwork round trip.
  • A local World Maps 1.2.1 install/restart previously passed with /api/health ready and the installed client hash matching the artifact.
  • Focused Chromium checks previously passed at 360 px and 390 px: More opened Map actions, Expand with AI kept the workspace active, Presets stayed closed, and the selected marker was opaque over real map artwork.
  • Both prior inline CodeRabbit findings and both latest review-body findings are fixed; the current head has no unresolved review threads.

Manual verification still required before merge

  • Manually link two chats, move only one, publish a definition edit, and verify the other receives the definition but not the first chat's current location/history.
  • Manually verify discard, stale conflict, fork, relink protection, and independent copy in the browser.
  • Manually verify template promotion/import deduplicates artwork in Global Gallery.
  • Manually verify direct uploads, current-location correction, replacement choices, custom labels/type order, responsive actions, and selected-location contrast in both Roleplay and Game.
  • Manually verify update/restart and uninstall cleanup through Agents → Download Agents.

Documentation impact

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

The README catalog description is updated here. The full Engine guide is updated by Pasta-Devs/Marinara-Engine#4279; translated packs are tracked by Pasta-Devs/Marinara-Engine#4280.

UI evidence (if applicable)

Before/after screenshots or recordings are still required during final manual verification.


🔄 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/136 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/30/2026 **Status:** ✅ Merged **Merged:** 7/30/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `feature/world-maps-shared-gallery-129-133` --- ### 📝 Commits (10+) - [`b2212ba`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b2212ba934f60b749e8b60f07cd45636c65ee309) feat(maps): share template artwork through global gallery - [`e6677a9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e6677a9cb4c196722be3d33e17f9bc72a5b7992d) test(maps): prove shared artwork reuse - [`dc85ad6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dc85ad65bcc2329e9b98d6af9f1888954a1dfa43) feat(maps): add durable shared worlds - [`610c0f1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/610c0f16aa5426f9ad14d7c278be39aa1afaf0b6) fix(maps): polish location types and artwork reminder - [`af94e72`](https://github.com/Pasta-Devs/Marinara-Agents/commit/af94e721f88ed8de5089f7da0f7808bf48689396) feat(maps): finish beta editor workflows - [`371ba9c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/371ba9c1fc11831c64125c93eaf9c46ea8bff62b) Merge origin/staging into feature/world-maps-shared-gallery-129-133 - [`0f001ef`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0f001ef49a8e0f2c0c6f12e2761a7cdbc50dacd7) fix(maps): compact mobile editor notices - [`dbee11a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dbee11a3be004efd81589d21a6d576348a2b9b01) fix(maps): compact editor chrome and improve selection - [`be91741`](https://github.com/Pasta-Devs/Marinara-Agents/commit/be91741c509f1c20d8367ab08379328877b23e7f) fix(maps): contain overlay interactions - [`56717dc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/56717dcba16a5da307e4e2a8dd2ecb6e8f020a6c) test(maps): strengthen shared state and selection proof ### 📊 Changes **28 files changed** (+4563 additions, -869 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) ➕ `artifacts/hierarchical-maps-1.2.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+12 -12) 📝 `catalog/v2/catalog.json` (+12 -12) 📝 `catalog/v3/catalog.json` (+1 -1) 📝 `packages/hierarchical-maps/agents.json` (+1 -1) 📝 `packages/hierarchical-maps/client.js` (+154 -53) 📝 `packages/hierarchical-maps/manifest.json` (+8 -8) 📝 `packages/hierarchical-maps/server.mjs` (+54 -54) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/components/game/GameWorldMap.tsx` (+18 -5) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx` (+568 -47) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx` (+1152 -344) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/HierarchyNavigator.tsx` (+7 -1) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocalMapCanvas.tsx` (+2 -1) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/LocationInspector.tsx` (+188 -48) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialHierarchyProfileFields.tsx` (+42 -21) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/components/SpatialMapAiBuilder.tsx` (+60 -25) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/use-spatial-resources.ts` (+111 -0) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/hooks/use-spatial-context.ts` (+222 -45) 📝 `packages/hierarchical-maps/src/engine/packages/maps-shared/src/maps-model.ts` (+146 -14) _...and 8 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #129 Closes #130 Closes #131 Closes #132 Closes #133 Closes #134 Closes #135 Closes #137 Companion Engine support: Pasta-Devs/Marinara-Engine#4279 (closes Pasta-Devs/Marinara-Engine#4278). Translation follow-up: Pasta-Devs/Marinara-Engine#4280. ## Why this change World Maps were copied into each chat, illustrated templates lost or duplicated chat-owned artwork, and several beta editor workflows made correcting or replacing a map unnecessarily difficult. Users building durable worlds across Roleplay and Game chats need reusable definitions and artwork without sharing private campaign state, plus clear recovery controls when setup is wrong. ## What changed - **#129 and #137 — reusable artwork:** promote chat artwork to Global Gallery when saving a template or shared world, deduplicate exact content, reuse namespaced references across chats, preserve legacy chat Gallery references, and keep portable `.world-map.json` export/import self-contained with base64 artwork and import-time reconnection. - **#130 — editor workflow gaps:** distinguish starting location from current story location, add confirmed non-narrated current-location correction, clear incompatible queued travel, add direct location-reference and child-map-background upload, and use companion Engine #4279 for the Roleplay Agent Menus shortcut. - **#131 — custom type labels:** resolve map-specific type labels consistently instead of exposing only semantic base kinds. - **#132 — type ordering:** add accessible Move up and Move down controls in both location-type editors while preserving stable type IDs, assignments, export/import order, templates, and AI prompt order. - **#133 — shared worlds:** add account-owned canonical worlds; linked, forked, and independent chat modes; private per-chat location/history/Game state; private definition drafts; reviewed publish/discard/relink flows; optimistic revisions and conflict handling; linked-world deletion/location-removal protection; portable import/export; and shared Global Gallery artwork. - **#134 — artwork reminder:** move passive artwork status into the responsive editor action area and show the full review panel only when requested or while generation is active. - **#135 — replace/start over:** replace the destructive shortcut with a preservation-first hub for saving a template, exporting a backup, importing another map, using AI, or starting a history-safe blank map. - Keep the Maps editor header to one row across desktop, tablet, and mobile; isolate Maps overlays from controls underneath; and render selected locations with an opaque surface and distinct active border over map artwork. - Rebuild World Maps 1.2.1 source payloads, generated client/server bundles, manifest, artifact, checksums, and every compatible catalog lane. - Expand exact-artifact and browser regression coverage for shared artwork/worlds, per-chat runtime isolation, current-state correction, custom types, responsive/touch actions, selection contrast, and replacement flows. ## Dependency gate - Engine PR Pasta-Devs/Marinara-Engine#4279 must merge to Engine `staging` before this PR leaves draft or merges. - This branch is current with Agents `staging` at `876f37f` and preserves its Long-Term Memory changes and full catalog union. - The lifecycle fixture now creates real Global Gallery records, matching #4279's atomic reference/deletion contract instead of relying on synthetic dangling ids. ## Package and security impact - Affected package IDs: `hierarchical-maps` - Engine compatibility impact: requires companion Engine PR Pasta-Devs/Marinara-Engine#4279 for Global Gallery spatial-reference resolution, atomic reference-aware deletion, and the Roleplay Agent Menus shortcut - New or changed permissions/entrypoints: none; the package uses existing authenticated capability-document, chat Gallery, Global Gallery, and spatial-context hosts - Restart, storage, update, or uninstall impact: package update and restart required; canonical world definitions use account capability documents, shared art uses Global Gallery, chat runtime state remains chat-local, and uninstall/reinstall preserves persisted definitions and state Shared worlds never copy chat history, provider credentials, or unrelated chat data. ## 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 evidence at pushed head `f667dd48b` - `node scripts/test-catalog-lanes.mjs` passed. - `node scripts/validate-catalog.mjs` passed: 31 packages, v2=31, v3=6, legacy=v2. - `node scripts/hierarchical-maps-boundary.mjs` returned an empty private-import inventory. - `git diff --check` passed. - The exact World Maps 1.2.1 artifact lifecycle regression passed against Engine #4279 head `e115a731a`, covering update, real Global Gallery artwork, canonical worlds, per-chat runtime isolation, private drafts, publish/conflict/fork protection, restart, uninstall/reinstall, backup, and restore. - The World Maps browser suite compiles and discovers all 48 desktop/mobile Chromium cases, including the corrected imported-template artwork round trip. - A local World Maps 1.2.1 install/restart previously passed with `/api/health` ready and the installed client hash matching the artifact. - Focused Chromium checks previously passed at 360 px and 390 px: More opened Map actions, Expand with AI kept the workspace active, Presets stayed closed, and the selected marker was opaque over real map artwork. - Both prior inline CodeRabbit findings and both latest review-body findings are fixed; the current head has no unresolved review threads. ### Manual verification still required before merge - Manually link two chats, move only one, publish a definition edit, and verify the other receives the definition but not the first chat's current location/history. - Manually verify discard, stale conflict, fork, relink protection, and independent copy in the browser. - Manually verify template promotion/import deduplicates artwork in Global Gallery. - Manually verify direct uploads, current-location correction, replacement choices, custom labels/type order, responsive actions, and selected-location contrast in both Roleplay and Game. - Manually verify update/restart and uninstall cleanup through **Agents → Download Agents**. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The README catalog description is updated here. The full Engine guide is updated by Pasta-Devs/Marinara-Engine#4279; translated packs are tracked by Pasta-Devs/Marinara-Engine#4280. ## UI evidence (if applicable) Before/after screenshots or recordings are still required during final manual verification. --- <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:19 +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#825
No description provided.