[GH-ISSUE #4490] [Issue]: World Maps portable lore does not refresh host Lorebooks cache #2440

Closed
opened 2026-10-21 05:48:13 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @thetopham on GitHub (Aug 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4490

Originally assigned to: @thetopham on GitHub.

Summary

World Maps can create and remap portable lorebook copies successfully, but the Engine Lorebooks UI keeps its pre-import React Query cache until the browser is refreshed. Manual review also found that linked-lore Open did not navigate to the restored lorebook.

Expected behavior

After World Maps imports or reuses portable lore, the restored lorebook should appear immediately in the main Lorebooks library. Opening a linked lore entry should leave the map workspace and open the correct lorebook, including after the user confirms discarding unsaved map changes.

Actual behavior

The imported lorebook and entry are persisted and the map references the new entry ID, but the main Lorebooks library remains stale until a full browser refresh. During the same manual flow, linked-lore Open did not navigate.

World Maps and the Engine app mount separate React Query clients. The package currently refreshes only its package-local hierarchical-maps/lorebooks query, while the Engine library uses the independent lorebooks query family.

Steps to reproduce

  1. Create a throwaway lorebook and link an entry to a World Map location.
  2. Export Map with linked entries, then delete the original lorebook.
  3. Import the map and choose Import separate copies.
  4. Confirm the map location shows the restored entry and save the map.
  5. Open the main Lorebooks library without refreshing the browser.
  6. From World Maps, click Open on the linked lore entry.

Environment

  • Marinara Engine version: 2.4.1 staging
  • Install type: source
  • OS + version: unknown
  • Browser or app shell: unknown

Logs, screenshots, or video

No browser console error was captured. Storage inspection confirmed that the imported lorebooks and entries exist and are visible after a browser refresh, so this is not data loss.

Additional context

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @thetopham on GitHub (Aug 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4490 Originally assigned to: @thetopham on GitHub. ## Summary World Maps can create and remap portable lorebook copies successfully, but the Engine Lorebooks UI keeps its pre-import React Query cache until the browser is refreshed. Manual review also found that linked-lore **Open** did not navigate to the restored lorebook. ## Expected behavior After World Maps imports or reuses portable lore, the restored lorebook should appear immediately in the main Lorebooks library. Opening a linked lore entry should leave the map workspace and open the correct lorebook, including after the user confirms discarding unsaved map changes. ## Actual behavior The imported lorebook and entry are persisted and the map references the new entry ID, but the main Lorebooks library remains stale until a full browser refresh. During the same manual flow, linked-lore **Open** did not navigate. World Maps and the Engine app mount separate React Query clients. The package currently refreshes only its package-local `hierarchical-maps/lorebooks` query, while the Engine library uses the independent `lorebooks` query family. ## Steps to reproduce 1. Create a throwaway lorebook and link an entry to a World Map location. 2. Export **Map with linked entries**, then delete the original lorebook. 3. Import the map and choose **Import separate copies**. 4. Confirm the map location shows the restored entry and save the map. 5. Open the main Lorebooks library without refreshing the browser. 6. From World Maps, click **Open** on the linked lore entry. ## Environment - Marinara Engine version: 2.4.1 staging - Install type: source - OS + version: unknown - Browser or app shell: unknown ## Logs, screenshots, or video No browser console error was captured. Storage inspection confirmed that the imported lorebooks and entries exist and are visible after a browser refresh, so this is not data loss. ## Additional context - Package issue: Pasta-Devs/Marinara-Agents#181 - Package draft PR: Pasta-Devs/Marinara-Agents#213 - The package PR adds an optional `onLorebooksChanged` UI callback; the Engine host should invalidate `lorebookKeys.all` when that callback runs and use the refreshed path for linked-lore navigation. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:48:13 +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-Engine#2440
No description provided.