[PR #628] [MERGED] fix: remove unsupported .returning() call in lorebook update (issue #627) #4704

Closed
opened 2026-10-22 04:09:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/628
Author: @kolacheee
Created: 5/10/2026
Status: ✅ Merged
Merged: 5/10/2026
Merged by: @Promansis

Base: main ← Head: claude/trusting-engelbart-04a618


📝 Commits (1)

  • 8ac9b9b fix: remove unsupported .returning() call in lorebook update (#627)

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 packages/server/src/services/storage/lorebooks.storage.ts (+2 -2)

📄 Description

Linked issue

Closes #627

Why this change

The file-backed store's UpdateWhereBuilder does not implement .returning(), causing a TypeError on every lorebook metadata save. The existence check was already performed earlier in the method, so the .returning() result was redundant.

What changed

  • Removed .returning({ id: lorebooks.id }) from the update chain in lorebooks.storage.ts update() method
  • Simplified the link-sync conditional to check shouldUpdateCharacterLinks || shouldUpdatePersonaLinks directly, since lorebook existence is already verified on lines 268-269

Validation

  • pnpm check passes locally
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Read and followed CONTRIBUTING.md

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Summary by CodeRabbit

  • Bug Fixes
    • Refined the synchronization of character and persona links when updating lorebooks to ensure consistent behavior.

Review Change Stack


🔄 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-Engine/pull/628 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 5/10/2026 **Status:** ✅ Merged **Merged:** 5/10/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `main` ← **Head:** `claude/trusting-engelbart-04a618` --- ### 📝 Commits (1) - [`8ac9b9b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8ac9b9b0e67a5456eb3ebd7c0f1a46cfbf0239bf) fix: remove unsupported .returning() call in lorebook update (#627) ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/storage/lorebooks.storage.ts` (+2 -2) </details> ### 📄 Description ## Linked issue Closes #627 ## Why this change The file-backed store's UpdateWhereBuilder does not implement .returning(), causing a TypeError on every lorebook metadata save. The existence check was already performed earlier in the method, so the .returning() result was redundant. ## What changed - Removed .returning({ id: lorebooks.id }) from the update chain in lorebooks.storage.ts update() method - Simplified the link-sync conditional to check shouldUpdateCharacterLinks || shouldUpdatePersonaLinks directly, since lorebook existence is already verified on lines 268-269 ## Validation - [x] `pnpm check` passes locally - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Read and followed `CONTRIBUTING.md` ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Refined the synchronization of character and persona links when updating lorebooks to ensure consistent behavior. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/628) <!-- 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-22 04:09:58 +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#4704
No description provided.