[PR #3546] [MERGED] Add opt-in tone, continuity, and lorebook settings to Noodle refreshes #5989

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

📋 Pull Request Information

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

Base: staging ← Head: noodle-features


📝 Commits (2)

  • 8fe521d Improve Noodle timeline writing quality with opt-in settings
  • 075a89a Address CodeRabbit review feedback

📊 Changes

13 files changed (+414 additions, -29 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/development/noodle-internals.md (+4 -2)
📝 docs/noodle/settings.md (+21 -1)
📝 packages/client/src/components/noodle/NoodleView.tsx (+30 -0)
📝 packages/server/src/routes/noodle.routes.ts (+125 -8)
📝 packages/server/src/services/noodle/noodle-prompt.ts (+87 -5)
📝 packages/server/src/services/prompt-overrides/index.ts (+2 -0)
📝 packages/server/src/services/prompt-overrides/registry.ts (+4 -2)
📝 packages/server/src/services/prompt-overrides/registry/noodle.ts (+17 -0)
📝 packages/shared/src/constants/defaults.ts (+9 -0)
📝 packages/shared/src/schemas/noodle.schema.ts (+4 -0)
📝 packages/shared/src/types/noodle.ts (+2 -0)
📝 scripts/regressions/noodle-prompt.regression.ts (+105 -11)

📄 Description

Linked issue

Closes #3545

Why this change

Noodle's refresh writer works well already, but there's headroom on top of it: every account
tends toward a similarly upbeat tone regardless of personality, older posts rarely get revisited
between refreshes so the timeline feels like disconnected one-off posts, and lorebook entries
that already exist for a character never surface in what they post about. This PR adds settings
for all three, each off by default so no existing timeline changes unless a user turns one on.

What changed

  • Added enableEnhancedTimelineWriting setting (off by default): grounds each account's tone in
    its own Personality/Description/Backstory instead of a default upbeat voice, encourages
    cross-account replies within a refresh, and improves older-post recall (higher chance, more
    items, weighted toward posts relevant to currently active accounts instead of pure-random).
  • Added enableLorebookContext setting (off by default): scans recent timeline text and character
    profiles for lorebook keyword matches and injects them as world/lore context, reusing the
    existing multi-character processLorebooks() system, with a Noodle-specific token budget that
    scales with active account count so a large roster can't blow up the prompt.
  • Registered "Noodle Timeline Voice & Tone" as an editable prompt override (Settings ->
    Generations -> Image Generation Prompt Overrides), scoped to tone/creative-freedom text only.
    Structured-action limits, target field rules, and other schema-critical instructions stay
    hardcoded outside the override so a rewrite can't break noodleGeneratedRefreshSchema parsing.
  • Noodle's opted-in chat context now includes a character's current Conversation-schedule
    status/activity when that chat has Allow Noodle references on and a running schedule (reuses
    the chat's already-derived status metadata, no new computation).
  • New "Timeline Writing" and "World / Lore" settings sections in the Noodle settings panel.
  • Regression coverage for both the legacy and new code paths, the lorebook token-budget math, and
    the prompt-override default/round-trip behavior.

Validation

  • 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

Manual verification notes

Automated checks run and passing on this branch (rebased onto current staging): pnpm check,
pnpm regression:noodle, pnpm regression:prompt. Not yet verified manually: a live refresh with
a real AI connection with each toggle on and off, the new prompt override rendering/saving
correctly in the Settings UI, and the two new settings sections in light/dark mode and on a
mobile viewport. Please verify these before merging.

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)

Docs were updated as part of this PR (docs/noodle/settings.md, docs/development/noodle-internals.md,
CHANGELOG.md) — leaving the checkbox above for manual confirmation rather than pre-checking it.

UI evidence

Not yet captured — no screenshots since the new settings haven't been exercised in a running app.

Summary by CodeRabbit

  • New Features
    • Added opt-in Lorebook context for richer timeline refreshes.
    • Added Enhanced tone & continuity settings for stronger personality and memory consistency.
    • Added customizable Timeline Voice & Tone prompt text.
    • Expanded chat context with active character schedule details when references are enabled.
  • Documentation
    • Updated Noodle settings and development documentation with the new options and behavior.
  • Bug Fixes
    • Improved timeline memory selection and continuity handling.

🔄 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/3546 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 7/13/2026 **Status:** ✅ Merged **Merged:** 7/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `noodle-features` --- ### 📝 Commits (2) - [`8fe521d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8fe521d59e9ad1acf3255e58dda829e3ea0e82fa) Improve Noodle timeline writing quality with opt-in settings - [`075a89a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/075a89a7949062ad86c926c7666696a690e9275d) Address CodeRabbit review feedback ### 📊 Changes **13 files changed** (+414 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/development/noodle-internals.md` (+4 -2) 📝 `docs/noodle/settings.md` (+21 -1) 📝 `packages/client/src/components/noodle/NoodleView.tsx` (+30 -0) 📝 `packages/server/src/routes/noodle.routes.ts` (+125 -8) 📝 `packages/server/src/services/noodle/noodle-prompt.ts` (+87 -5) 📝 `packages/server/src/services/prompt-overrides/index.ts` (+2 -0) 📝 `packages/server/src/services/prompt-overrides/registry.ts` (+4 -2) 📝 `packages/server/src/services/prompt-overrides/registry/noodle.ts` (+17 -0) 📝 `packages/shared/src/constants/defaults.ts` (+9 -0) 📝 `packages/shared/src/schemas/noodle.schema.ts` (+4 -0) 📝 `packages/shared/src/types/noodle.ts` (+2 -0) 📝 `scripts/regressions/noodle-prompt.regression.ts` (+105 -11) </details> ### 📄 Description <!-- Target branch: `staging`. --> ## Linked issue Closes #3545 ## Why this change Noodle's refresh writer works well already, but there's headroom on top of it: every account tends toward a similarly upbeat tone regardless of personality, older posts rarely get revisited between refreshes so the timeline feels like disconnected one-off posts, and lorebook entries that already exist for a character never surface in what they post about. This PR adds settings for all three, each off by default so no existing timeline changes unless a user turns one on. ## What changed - Added `enableEnhancedTimelineWriting` setting (off by default): grounds each account's tone in its own Personality/Description/Backstory instead of a default upbeat voice, encourages cross-account replies within a refresh, and improves older-post recall (higher chance, more items, weighted toward posts relevant to currently active accounts instead of pure-random). - Added `enableLorebookContext` setting (off by default): scans recent timeline text and character profiles for lorebook keyword matches and injects them as world/lore context, reusing the existing multi-character `processLorebooks()` system, with a Noodle-specific token budget that scales with active account count so a large roster can't blow up the prompt. - Registered "Noodle Timeline Voice & Tone" as an editable prompt override (Settings -> Generations -> Image Generation Prompt Overrides), scoped to tone/creative-freedom text only. Structured-action limits, target field rules, and other schema-critical instructions stay hardcoded outside the override so a rewrite can't break `noodleGeneratedRefreshSchema` parsing. - Noodle's opted-in chat context now includes a character's current Conversation-schedule status/activity when that chat has Allow Noodle references on and a running schedule (reuses the chat's already-derived status metadata, no new computation). - New "Timeline Writing" and "World / Lore" settings sections in the Noodle settings panel. - Regression coverage for both the legacy and new code paths, the lorebook token-budget math, and the prompt-override default/round-trip behavior. ## Validation - [ ] `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` ### Manual verification notes Automated checks run and passing on this branch (rebased onto current `staging`): `pnpm check`, `pnpm regression:noodle`, `pnpm regression:prompt`. Not yet verified manually: a live refresh with a real AI connection with each toggle on and off, the new prompt override rendering/saving correctly in the Settings UI, and the two new settings sections in light/dark mode and on a mobile viewport. Please verify these before merging. ## 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) Docs were updated as part of this PR (`docs/noodle/settings.md`, `docs/development/noodle-internals.md`, `CHANGELOG.md`) — leaving the checkbox above for manual confirmation rather than pre-checking it. ## UI evidence Not yet captured — no screenshots since the new settings haven't been exercised in a running app. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added opt-in Lorebook context for richer timeline refreshes. * Added Enhanced tone & continuity settings for stronger personality and memory consistency. * Added customizable Timeline Voice & Tone prompt text. * Expanded chat context with active character schedule details when references are enabled. * **Documentation** * Updated Noodle settings and development documentation with the new options and behavior. * **Bug Fixes** * Improved timeline memory selection and continuity handling. <!-- 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:05:56 +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#5989
No description provided.