[PR #213] [MERGED] fix(maps): refresh portable lore across host UI #859

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/213
Author: @thetopham
Created: 8/2/2026
Status: ✅ Merged
Merged: 8/3/2026
Merged by: @thetopham

Base: staging ← Head: agent/fix-world-map-lore-refresh


📝 Commits (8)

  • 8e94940 fix(maps): notify host of lorebook changes
  • 33408df Merge remote-tracking branch 'origin/agent/address-promotion-review' into agent/fix-world-map-lore-refresh
  • deba7ea fix(maps): release host lore refresh bridge
  • 847069d Merge remote-tracking branch 'origin/agent/address-promotion-review' into agent/fix-world-map-lore-refresh
  • 9859fa9 build(maps): refresh 1.3.0 artifact
  • 84f8585 fix(maps): refresh lorebooks from library editors
  • f495657 Merge branch 'staging' into agent/fix-world-map-lore-refresh
  • 10d756d test(maps): prove library lore refresh callbacks

📊 Changes

11 files changed (+349 additions, -98 deletions)

View changed files

➕ artifacts/hierarchical-maps-1.3.0.zip (+0 -0)
📝 catalog/catalog.json (+7 -7)
📝 catalog/v2/catalog.json (+7 -7)
📝 catalog/v3/catalog.json (+7 -7)
📝 packages/hierarchical-maps/client.js (+52 -52)
📝 packages/hierarchical-maps/manifest.json (+3 -3)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx (+5 -1)
📝 packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx (+4 -2)
📝 scripts/build-feature-packages.mjs (+3 -3)
📝 tests/hierarchical-maps-lifecycle.regression.ts (+17 -11)
📝 tests/spatial-context.e2e.ts (+244 -5)

📄 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 #181

Paired host work: Pasta-Devs/Marinara-Engine#4491

This branch is stacked on #211 so World Maps 1.3.0 retains its pending portable-lore safeguards. Merge #211 first, then update this branch from staging before taking the PR out of draft.

Why this change

Portable World Map lore persists and remaps correctly, but World Maps and Marinara Engine use separate React Query clients. After importing separate lorebook copies, the package saw the restored entries while the main Lorebooks library kept its deleted-book cache until a full browser refresh. That stale host state also made linked-lore navigation appear broken.

What changed

  • Add an optional host notification after World Maps creates or reuses portable lorebooks.
  • Refresh the package-local and host lorebook caches after both workspace and library imports.
  • Keep linked-lore Open navigation direct; the paired Engine callback invalidates host lore state while opening the requested book immediately.
  • Rebuild the complete World Maps 1.3.0 package, manifest hashes, ZIP, and all catalog lanes.
  • Extend the installed-package browser regression to prime the host cache, delete the original without reloading, import separate copies, open the new book from Lorebooks, and exercise the map's linked Open button.

Package and security impact

  • Affected package IDs: hierarchical-maps
  • Engine compatibility impact: no manifest range change; the new UI callback is optional
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: normal package update restart; no storage format or cleanup change

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:

  • node scripts/test-catalog-lanes.mjs passed.
  • node scripts/validate-catalog.mjs passed: 31 packages in each v2/v3 lane.
  • git diff --check passed.
  • tests/map-lore-portability.regression.ts passed against the paired Engine worktree.
  • tests/hierarchical-maps-lifecycle.regression.ts passed against the exact 1.3.0 ZIP, including update, offline restart, remove, reinstall, backup, and restore.
  • Desktop Chromium scenario portable map import refreshes host lorebooks and linked navigation without reload passed against an isolated Engine data directory seeded with the exact 1.3.0 ZIP.

Manual verification notes

  • Manually verify imported separate lorebook copies appear in the main Lorebooks library without reloading the app.
  • Manually verify linked-lore Open navigation from a clean saved map.
  • Manually verify linked-lore Open navigation protects unsaved map changes and opens after choosing Discard.
  • Manually verify deleting the imported map does not delete the restored lorebook.

Documentation impact

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

No user-facing copy or workflow documentation changed.

UI evidence (if applicable)

Automated installed-package Chromium coverage now proves the exact no-refresh reproduction and linked Open path. Human browser verification remains listed above.

Summary by CodeRabbit

  • New Features

    • Updated Hierarchical Maps to version 1.3.0.
    • Portable lore imports now refresh lorebook panels and navigation automatically.
    • Added improved linked-lore navigation after importing portable maps.
    • Export mapping controls now reset correctly and display details only when expanded.
  • Bug Fixes

    • Improved handling of lorebook loading and refresh errors during imports.
    • Added support for asynchronous lorebook change notifications.

🔄 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/213 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 8/2/2026 **Status:** ✅ Merged **Merged:** 8/3/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `agent/fix-world-map-lore-refresh` --- ### 📝 Commits (8) - [`8e94940`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8e9494099d4bcce4e2723ad416677756d448c409) fix(maps): notify host of lorebook changes - [`33408df`](https://github.com/Pasta-Devs/Marinara-Agents/commit/33408df79a92bf9d0eb5a6a2404328de6c243647) Merge remote-tracking branch 'origin/agent/address-promotion-review' into agent/fix-world-map-lore-refresh - [`deba7ea`](https://github.com/Pasta-Devs/Marinara-Agents/commit/deba7eabfded39e029b60abf6127c74ee2984cf0) fix(maps): release host lore refresh bridge - [`847069d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/847069dbcdc4a6654587db0a51650b0235b4f775) Merge remote-tracking branch 'origin/agent/address-promotion-review' into agent/fix-world-map-lore-refresh - [`9859fa9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9859fa9bf2a02b7cc56380f745fb8289a4f4ca87) build(maps): refresh 1.3.0 artifact - [`84f8585`](https://github.com/Pasta-Devs/Marinara-Agents/commit/84f8585cc86857756312b339195a6ceb0d55fc8a) fix(maps): refresh lorebooks from library editors - [`f495657`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f49565790ebf300c42a160786a690a8d6d11b42b) Merge branch 'staging' into agent/fix-world-map-lore-refresh - [`10d756d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/10d756d322ff1e90af54d7429458da765bea0d65) test(maps): prove library lore refresh callbacks ### 📊 Changes **11 files changed** (+349 additions, -98 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/hierarchical-maps-1.3.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+7 -7) 📝 `catalog/v2/catalog.json` (+7 -7) 📝 `catalog/v3/catalog.json` (+7 -7) 📝 `packages/hierarchical-maps/client.js` (+52 -52) 📝 `packages/hierarchical-maps/manifest.json` (+3 -3) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapLibrary.tsx` (+5 -1) 📝 `packages/hierarchical-maps/src/engine/packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx` (+4 -2) 📝 `scripts/build-feature-packages.mjs` (+3 -3) 📝 `tests/hierarchical-maps-lifecycle.regression.ts` (+17 -11) 📝 `tests/spatial-context.e2e.ts` (+244 -5) </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 #181 Paired host work: Pasta-Devs/Marinara-Engine#4491 This branch is stacked on #211 so World Maps 1.3.0 retains its pending portable-lore safeguards. Merge #211 first, then update this branch from `staging` before taking the PR out of draft. ## Why this change Portable World Map lore persists and remaps correctly, but World Maps and Marinara Engine use separate React Query clients. After importing separate lorebook copies, the package saw the restored entries while the main Lorebooks library kept its deleted-book cache until a full browser refresh. That stale host state also made linked-lore navigation appear broken. ## What changed - Add an optional host notification after World Maps creates or reuses portable lorebooks. - Refresh the package-local and host lorebook caches after both workspace and library imports. - Keep linked-lore Open navigation direct; the paired Engine callback invalidates host lore state while opening the requested book immediately. - Rebuild the complete World Maps 1.3.0 package, manifest hashes, ZIP, and all catalog lanes. - Extend the installed-package browser regression to prime the host cache, delete the original without reloading, import separate copies, open the new book from Lorebooks, and exercise the map's linked Open button. ## Package and security impact - Affected package IDs: `hierarchical-maps` - Engine compatibility impact: no manifest range change; the new UI callback is optional - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: normal package update restart; no storage format or cleanup change ## 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: - `node scripts/test-catalog-lanes.mjs` passed. - `node scripts/validate-catalog.mjs` passed: 31 packages in each v2/v3 lane. - `git diff --check` passed. - `tests/map-lore-portability.regression.ts` passed against the paired Engine worktree. - `tests/hierarchical-maps-lifecycle.regression.ts` passed against the exact 1.3.0 ZIP, including update, offline restart, remove, reinstall, backup, and restore. - Desktop Chromium scenario `portable map import refreshes host lorebooks and linked navigation without reload` passed against an isolated Engine data directory seeded with the exact 1.3.0 ZIP. ### Manual verification notes - Manually verify imported separate lorebook copies appear in the main Lorebooks library without reloading the app. - Manually verify linked-lore Open navigation from a clean saved map. - Manually verify linked-lore Open navigation protects unsaved map changes and opens after choosing Discard. - Manually verify deleting the imported map does not delete the restored lorebook. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation No user-facing copy or workflow documentation changed. ## UI evidence (if applicable) Automated installed-package Chromium coverage now proves the exact no-refresh reproduction and linked Open path. Human browser verification remains listed above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Updated Hierarchical Maps to version 1.3.0. * Portable lore imports now refresh lorebook panels and navigation automatically. * Added improved linked-lore navigation after importing portable maps. * Export mapping controls now reset correctly and display details only when expanded. * **Bug Fixes** * Improved handling of lorebook loading and refresh errors during imports. * Added support for asynchronous lorebook change notifications. <!-- 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:42 +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#859
No description provided.