[GH-ISSUE #7431] [Issue]: Lorebook folder counts remain incorrect after deleting lorebooks #4141

Closed
opened 2026-10-21 06:11:35 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @minikkeuen on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7431

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Deleting a lorebook does not remove its reference from library folders, causing folder counts to include lorebooks that no longer exist.

Expected behavior

  • Deleting a lorebook should remove its references from library folders.
  • Folder counts should reflect the number of existing lorebooks.
  • Previously orphaned references should not persist indefinitely.

Actual behavior

  • Deleted lorebook IDs remain in the item_ids arrays of library folders.
  • Folder badges continue counting deleted lorebooks.
  • The incorrect counts persist after refreshing the page or restarting the server.

Steps to reproduce

  1. Create a library folder in the Lorebooks panel.
  2. Create several lorebooks and add them to the folder.
  3. Delete one of the lorebooks.
  4. Observe that the folder count still includes the deleted lorebook.
  5. Refresh the page or restart the server.
  6. Observe that the incorrect count persists.

Environment

  • Marinara Engine version: 2.5.0
  • Install type: source
  • OS + version: macOS 26.6.2 (Apple Silicon)
  • Browser or app shell: Local web interface

Logs, screenshots, or video

No error message is displayed. The issue is visible through the incorrect folder badge count.

Additional context

The issue appears to be caused by stale lorebook IDs remaining in library-folder references after deletion.

It can also affect folders containing lorebooks created by extensions.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @minikkeuen on GitHub (Oct 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7431 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Deleting a lorebook does not remove its reference from library folders, causing folder counts to include lorebooks that no longer exist. ## Expected behavior - Deleting a lorebook should remove its references from library folders. - Folder counts should reflect the number of existing lorebooks. - Previously orphaned references should not persist indefinitely. ## Actual behavior - Deleted lorebook IDs remain in the `item_ids` arrays of library folders. - Folder badges continue counting deleted lorebooks. - The incorrect counts persist after refreshing the page or restarting the server. ## Steps to reproduce 1. Create a library folder in the Lorebooks panel. 2. Create several lorebooks and add them to the folder. 3. Delete one of the lorebooks. 4. Observe that the folder count still includes the deleted lorebook. 5. Refresh the page or restart the server. 6. Observe that the incorrect count persists. ## Environment - Marinara Engine version: 2.5.0 - Install type: source - OS + version: macOS 26.6.2 (Apple Silicon) - Browser or app shell: Local web interface ## Logs, screenshots, or video No error message is displayed. The issue is visible through the incorrect folder badge count. ## Additional context The issue appears to be caused by stale lorebook IDs remaining in library-folder references after deletion. It can also affect folders containing lorebooks created by extensions. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:11:35 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (Oct 12, 2026):

Fixed on staging by #7435.

<!-- gh-comment-id:6132185010 --> @SpicyMarinara commented on GitHub (Oct 12, 2026): Fixed on staging by #7435.
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#4141
No description provided.