[PR #3632] [MERGED] Fix lorebook vectors, sidebar folders, and Noodle vision fallback #6022

Closed
opened 2026-10-23 04:06:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3632
Author: @SpicyMarinara
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-3627-3631-open-issues


📝 Commits (3)

  • 99b3fce Start fixes for issues 3627, 3630, and 3631
  • 17a4de0 fix: stabilize lorebook vectors, folders, and Noodle vision
  • 811d11c refactor: apply lorebook review feedback

📊 Changes

15 files changed (+242 additions, -37 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 docs/lorebooks/semantic-search.md (+3 -1)
📝 e2e/core-flows.e2e.ts (+100 -0)
📝 packages/client/src/components/lorebooks/LorebookEditor.tsx (+1 -1)
📝 packages/client/src/components/ui/SmoothFolderContent.tsx (+11 -21)
📝 packages/server/src/routes/generate.routes.ts (+6 -0)
📝 packages/server/src/routes/lorebooks.routes.ts (+3 -0)
📝 packages/server/src/services/lorebook/embeddings.ts (+62 -13)
📝 packages/server/src/services/lorebook/index.ts (+3 -0)
📝 packages/server/src/services/lorebook/keyword-scanner.ts (+8 -1)
📝 packages/server/src/services/noodle/noodle-vision.ts (+1 -0)
📝 packages/server/src/services/prompt/assembler.ts (+3 -0)
📝 packages/server/src/services/prompt/marker-expander.ts (+3 -0)
📝 scripts/regressions/noodle-vision.regression.ts (+2 -0)
📝 scripts/regressions/prompt.regression.ts (+33 -0)

📄 Description

Why

This fixes the current open issue queue affecting semantic lorebook matching, desktop sidebar folders, and Noodle image fallback behavior.

What changed

  • Calibrate semantic lorebook similarity against a neutral embedding baseline so clustered embedding models no longer make the threshold behave like all-or-nothing.
  • Keep shared folder contents mounted and animate their CSS grid rows, avoiding the conditional Framer Motion hook path that crashed Connections and Lorebooks folders.
  • Recognize the OpenRouter "No endpoints found that support image input" response and retry Noodle generation with text-only messages.
  • Add focused regression coverage and document the semantic threshold behavior.
  • Record all three fixes in the v2.3.0 changelog.

Closes #3627
Closes #3630
Closes #3631

Automated validation

  • pnpm check
  • pnpm version:check
  • pnpm regression:prompt
  • pnpm regression:noodle
  • pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep "desktop Connections and Lorebooks folders expand without a React hook error"
  • git diff --check

Maintainer verification

  • Manually compare unrelated and relevant lorebook entries using the clustered embedding provider reported in #3627.
  • Manually expand and collapse existing and new Connections and Lorebooks folders on desktop.
  • Manually refresh Noodle with a non-vision OpenRouter model while the timeline contains an image.

Summary by CodeRabbit

  • Bug Fixes

    • Improved lorebook semantic matching to reduce unrelated entries while preserving relevant results.
    • Prevented Connections and Lorebooks folder expansion crashes and improved accessibility of folder transitions.
    • Noodle timeline refreshes can retry with text-only prompts when image-capable endpoints are unavailable.
  • Documentation

    • Clarified that semantic search thresholds use calibrated similarity for more consistent results across embedding models.

🔄 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/3632 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-3627-3631-open-issues` --- ### 📝 Commits (3) - [`99b3fce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/99b3fcefdac82775ba46d4257ff6f7c036efd3e8) Start fixes for issues 3627, 3630, and 3631 - [`17a4de0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/17a4de077b0b9c64e0951b117dd2c22b3772c449) fix: stabilize lorebook vectors, folders, and Noodle vision - [`811d11c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/811d11c8cce54d0f43f391ca5d4dcc7f793bad18) refactor: apply lorebook review feedback ### 📊 Changes **15 files changed** (+242 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `docs/lorebooks/semantic-search.md` (+3 -1) 📝 `e2e/core-flows.e2e.ts` (+100 -0) 📝 `packages/client/src/components/lorebooks/LorebookEditor.tsx` (+1 -1) 📝 `packages/client/src/components/ui/SmoothFolderContent.tsx` (+11 -21) 📝 `packages/server/src/routes/generate.routes.ts` (+6 -0) 📝 `packages/server/src/routes/lorebooks.routes.ts` (+3 -0) 📝 `packages/server/src/services/lorebook/embeddings.ts` (+62 -13) 📝 `packages/server/src/services/lorebook/index.ts` (+3 -0) 📝 `packages/server/src/services/lorebook/keyword-scanner.ts` (+8 -1) 📝 `packages/server/src/services/noodle/noodle-vision.ts` (+1 -0) 📝 `packages/server/src/services/prompt/assembler.ts` (+3 -0) 📝 `packages/server/src/services/prompt/marker-expander.ts` (+3 -0) 📝 `scripts/regressions/noodle-vision.regression.ts` (+2 -0) 📝 `scripts/regressions/prompt.regression.ts` (+33 -0) </details> ### 📄 Description ## Why This fixes the current open issue queue affecting semantic lorebook matching, desktop sidebar folders, and Noodle image fallback behavior. ## What changed - Calibrate semantic lorebook similarity against a neutral embedding baseline so clustered embedding models no longer make the threshold behave like all-or-nothing. - Keep shared folder contents mounted and animate their CSS grid rows, avoiding the conditional Framer Motion hook path that crashed Connections and Lorebooks folders. - Recognize the OpenRouter "No endpoints found that support image input" response and retry Noodle generation with text-only messages. - Add focused regression coverage and document the semantic threshold behavior. - Record all three fixes in the v2.3.0 changelog. Closes #3627 Closes #3630 Closes #3631 ## Automated validation - pnpm check - pnpm version:check - pnpm regression:prompt - pnpm regression:noodle - pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep "desktop Connections and Lorebooks folders expand without a React hook error" - git diff --check ## Maintainer verification - [ ] Manually compare unrelated and relevant lorebook entries using the clustered embedding provider reported in #3627. - [ ] Manually expand and collapse existing and new Connections and Lorebooks folders on desktop. - [ ] Manually refresh Noodle with a non-vision OpenRouter model while the timeline contains an image. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved lorebook semantic matching to reduce unrelated entries while preserving relevant results. * Prevented Connections and Lorebooks folder expansion crashes and improved accessibility of folder transitions. * Noodle timeline refreshes can retry with text-only prompts when image-capable endpoints are unavailable. * **Documentation** * Clarified that semantic search thresholds use calibrated similarity for more consistent results across embedding models. <!-- 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-23 04:06: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-Engine#6022
No description provided.