[PR #6841] [MERGED] fix: lorebook tools and chat colors for assigned issues #7351

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6841
Author: @SpicyMarinara
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/assigned-issues-2026-09-29


📝 Commits (4)

  • 54740f2 chore: track assigned lorebook and chat fixes
  • f3011b3 fix: lorebook link copying, chat colors, and embedding batches
  • 39e22a1 Merge remote-tracking branch 'origin/staging' into codex/assigned-issues-2026-09-29
  • 6c6171c fix: handle partial library failures and light icon contrast

📊 Changes

11 files changed (+440 additions, -11 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
➕ e2e/lorebook-link-copy.e2e.ts (+120 -0)
➕ e2e/message-marks-colors.e2e.ts (+140 -0)
📝 packages/client/src/components/chat/ChatHelpOverlay.tsx (+3 -0)
📝 packages/client/src/components/chat/MessageMarks.tsx (+10 -7)
📝 packages/client/src/components/lorebooks/LorebookEditor.tsx (+57 -0)
📝 packages/client/src/localization/locales/en.json (+9 -0)
📝 packages/client/src/stores/ui.store.ts (+5 -0)
📝 packages/client/src/styles/globals.css (+2 -2)
📝 packages/server/src/routes/lorebooks.routes.ts (+2 -2)
➕ scripts/regressions/lorebook-vectorization.regression.ts (+88 -0)

📄 Description

Linked issue

Closes #6840
Closes #6839
Closes #6837

Why this change

Linking the same characters and personas to several lorebooks requires repeating every selection. The message marks menu keeps purple theme colours instead of following Chroma, and Help does not explain it. Lorebook embedding requests still contain up to fifty entries, which can overwhelm local providers.

What changed

  • Add Copy links / Paste links beside the existing lorebook selectors. The tab-local clipboard survives editor navigation. Paste adds available links, preserves existing links, ignores duplicates and missing resources, and uses the normal Save flow. Repeating a paste explains that the links are already present without marking the book dirty.
  • Reuse chat chrome tokens for message marks, use neutral default muted text in both themes, and explain bookmarks, context pins and private notes in Conversation and Roleplay Help.
  • Reduce the existing serial embedding batch size to ten. No dependencies, storage migration or new batching framework.
  • Add focused browser and real-route/provider regression coverage, semantic English strings and Unreleased notes.

Validation

Human checklist (intentionally unchecked):

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Automated results and review:

  • pnpm install, pnpm check, pnpm regression:prompt, and the isolated lorebook-vectorization regression passed.
  • pnpm regression:ui e2e/lorebook-link-copy.e2e.ts e2e/message-marks-colors.e2e.ts --workers=1: 11 passed across desktop Chromium, mobile Chromium and mobile WebKit. Four duplicate mobile runs of the two query-failure cases are intentionally skipped; those cases run on desktop. The six colour/Help cases also passed again after adding teal, blue and white contrast checks.
  • pnpm smoke:ui: 7/7 passed.
  • Docker build passed; a disposable container served /api/health and the compiled frontend with HTTP 200.
  • Default muted text contrast is 7.97:1 dark and 5.47:1 light against the default backgrounds, also above 4.5:1 on the default card and secondary surfaces.
  • Three local CodeRabbit reviews completed. Fixed the initial no-op dirty-state finding and the follow-up feedback/accessibility/test-selector suggestions. Applied both hosted findings: unrelated resource-query failures no longer block paste, and active menu icons darken the accent in light mode. The additional local test finding is addressed by measuring the rendered panel colour, composited over the darkest possible backdrop. New negative controls failed before the fixes and pass afterwards.

Final reviewed candidate: 6c6171c57. pnpm check, the affected browser cases, shell smoke, Docker build and container health/frontend checks pass with the review fixes. The unchanged server batching path and prompt regressions passed after the staging integration at 39e22a1cf. The only merge conflict was in the changelog, and both entries were preserved.

Manual verification notes

Inspected before/after screenshots of the actual editor and chat controls, including mobile WebKit. The browser tests perform real copying, repeated pasting, saving/reloading, Chroma changes in both themes, and opening Help in both chat modes.

  • Manually verify the same interactions on a physical iPhone/iPad Home Screen installation.
  • Manually vectorize a large lorebook with the affected LCPP installation.

Proof boundary: the embedding regression exercises the real Fastify route, HTTP provider adapter and isolated file storage. A provider rejecting batches over ten fails before the fix and receives 10/10/1 afterwards; vectors remain attached to the correct entries, exclusions stay excluded, and only-missing makes no additional requests. This proves request size and persistence, not a guarantee against every provider/hardware timeout. Copy/paste coverage preserves existing links and handles stale IDs; the existing legacy-link form normalization and server Save path are reused. No storage format changes.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Unreleased notes and in-app Help updated. No guide, installation, release metadata or version changes.

UI evidence (if applicable)

Before/after screenshots: desktop and mobile, dark and light. All data is synthetic; mobile screenshots use emulation, not physical-device testing.

Summary by CodeRabbit

  • New Features
    • Copy linked characters and personas from one lorebook and paste them into another. Invalid or already-linked items are handled without creating duplicates.
    • The chat Help overlay now explains the bookmark action in conversation and roleplay modes.
  • Style
    • Updated message-mark colors and muted text for improved consistency across light and dark themes.
  • Improvements
    • Lorebook vectorization now processes entries in batches of 10.

🔄 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/6841 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/assigned-issues-2026-09-29` --- ### 📝 Commits (4) - [`54740f2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54740f2d8ae776148ac4948793b55ba85fa00600) chore: track assigned lorebook and chat fixes - [`f3011b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f3011b3d31852387488b20def3680997bc2dc6eb) fix: lorebook link copying, chat colors, and embedding batches - [`39e22a1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/39e22a1cf416e842d4de5440a03aafdab46bea9a) Merge remote-tracking branch 'origin/staging' into codex/assigned-issues-2026-09-29 - [`6c6171c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6c6171c577a1c588170007c394c9b0467f3f07fc) fix: handle partial library failures and light icon contrast ### 📊 Changes **11 files changed** (+440 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) ➕ `e2e/lorebook-link-copy.e2e.ts` (+120 -0) ➕ `e2e/message-marks-colors.e2e.ts` (+140 -0) 📝 `packages/client/src/components/chat/ChatHelpOverlay.tsx` (+3 -0) 📝 `packages/client/src/components/chat/MessageMarks.tsx` (+10 -7) 📝 `packages/client/src/components/lorebooks/LorebookEditor.tsx` (+57 -0) 📝 `packages/client/src/localization/locales/en.json` (+9 -0) 📝 `packages/client/src/stores/ui.store.ts` (+5 -0) 📝 `packages/client/src/styles/globals.css` (+2 -2) 📝 `packages/server/src/routes/lorebooks.routes.ts` (+2 -2) ➕ `scripts/regressions/lorebook-vectorization.regression.ts` (+88 -0) </details> ### 📄 Description ## Linked issue Closes #6840 Closes #6839 Closes #6837 ## Why this change Linking the same characters and personas to several lorebooks requires repeating every selection. The message marks menu keeps purple theme colours instead of following Chroma, and Help does not explain it. Lorebook embedding requests still contain up to fifty entries, which can overwhelm local providers. ## What changed - Add Copy links / Paste links beside the existing lorebook selectors. The tab-local clipboard survives editor navigation. Paste adds available links, preserves existing links, ignores duplicates and missing resources, and uses the normal Save flow. Repeating a paste explains that the links are already present without marking the book dirty. - Reuse chat chrome tokens for message marks, use neutral default muted text in both themes, and explain bookmarks, context pins and private notes in Conversation and Roleplay Help. - Reduce the existing serial embedding batch size to ten. No dependencies, storage migration or new batching framework. - Add focused browser and real-route/provider regression coverage, semantic English strings and Unreleased notes. ## Validation Human checklist (intentionally unchecked): - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Automated results and review: - `pnpm install`, `pnpm check`, `pnpm regression:prompt`, and the isolated `lorebook-vectorization` regression passed. - `pnpm regression:ui e2e/lorebook-link-copy.e2e.ts e2e/message-marks-colors.e2e.ts --workers=1`: 11 passed across desktop Chromium, mobile Chromium and mobile WebKit. Four duplicate mobile runs of the two query-failure cases are intentionally skipped; those cases run on desktop. The six colour/Help cases also passed again after adding teal, blue and white contrast checks. - `pnpm smoke:ui`: 7/7 passed. - Docker build passed; a disposable container served `/api/health` and the compiled frontend with HTTP 200. - Default muted text contrast is 7.97:1 dark and 5.47:1 light against the default backgrounds, also above 4.5:1 on the default card and secondary surfaces. - Three local CodeRabbit reviews completed. Fixed the initial no-op dirty-state finding and the follow-up feedback/accessibility/test-selector suggestions. Applied both hosted findings: unrelated resource-query failures no longer block paste, and active menu icons darken the accent in light mode. The additional local test finding is addressed by measuring the rendered panel colour, composited over the darkest possible backdrop. New negative controls failed before the fixes and pass afterwards. Final reviewed candidate: `6c6171c57`. `pnpm check`, the affected browser cases, shell smoke, Docker build and container health/frontend checks pass with the review fixes. The unchanged server batching path and prompt regressions passed after the staging integration at `39e22a1cf`. The only merge conflict was in the changelog, and both entries were preserved. ### Manual verification notes Inspected before/after screenshots of the actual editor and chat controls, including mobile WebKit. The browser tests perform real copying, repeated pasting, saving/reloading, Chroma changes in both themes, and opening Help in both chat modes. - [ ] Manually verify the same interactions on a physical iPhone/iPad Home Screen installation. - [ ] Manually vectorize a large lorebook with the affected LCPP installation. Proof boundary: the embedding regression exercises the real Fastify route, HTTP provider adapter and isolated file storage. A provider rejecting batches over ten fails before the fix and receives 10/10/1 afterwards; vectors remain attached to the correct entries, exclusions stay excluded, and only-missing makes no additional requests. This proves request size and persistence, not a guarantee against every provider/hardware timeout. Copy/paste coverage preserves existing links and handles stale IDs; the existing legacy-link form normalization and server Save path are reused. No storage format changes. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Unreleased notes and in-app Help updated. No guide, installation, release metadata or version changes. ## UI evidence (if applicable) [Before/after screenshots: desktop and mobile, dark and light](https://gist.github.com/SpicyMarinara/6339e4e88efc7ef3afde89613dea87da). All data is synthetic; mobile screenshots use emulation, not physical-device testing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Copy linked characters and personas from one lorebook and paste them into another. Invalid or already-linked items are handled without creating duplicates. * The chat Help overlay now explains the bookmark action in conversation and roleplay modes. * **Style** * Updated message-mark colors and muted text for improved consistency across light and dark themes. * **Improvements** * Lorebook vectorization now processes entries in batches of 10. <!-- 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:18:55 +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#7351
No description provided.