[PR #3421] [MERGED] Harden Noodle persona safety and interaction flows #5929

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

📋 Pull Request Information

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

Base: staging ← Head: agent/noodle-reply-notification-poll-fixes


📝 Commits (6)

  • 1ee9224 Fix Noodle reply, notification, and poll flows
  • 529c613 Fill liked Noodle hearts
  • a16d1cb Block generated persona activity and manage comments
  • adeda35 Continue and bump active Noodle threads
  • d4cdec7 Prioritize freshly commented Noodle threads
  • a5c3660 Address CodeRabbit Noodle review feedback

📊 Changes

9 files changed (+1137 additions, -300 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+156 -2)
📝 packages/client/src/components/noodle/NoodleView.tsx (+488 -250)
📝 packages/client/src/hooks/use-noodle.ts (+47 -0)
📝 packages/server/src/routes/noodle.routes.ts (+128 -44)
📝 packages/server/src/services/noodle/noodle-prompt.ts (+107 -1)
📝 packages/server/src/services/storage/noodle.storage.ts (+56 -0)
📝 packages/shared/src/schemas/noodle.schema.ts (+44 -3)
📝 scripts/regressions/noodle-polls.regression.ts (+42 -0)
📝 scripts/regressions/noodle-prompt.regression.ts (+69 -0)

📄 Description

Why

Noodle needed a hard persona-ownership boundary and reliable continuing interactions:

  • Timeline generation could attribute activity to the user persona. The persona must remain exclusively user-controlled.
  • Characters could not see or directly answer existing persona comments during later refreshes.
  • Posts receiving new replies stayed buried at their original creation position.
  • Persona-authored comments could not be edited or deleted.
  • Replying to a comment opened the composer above the selected comment.
  • The Notifications badge counted full history rather than unread activity.
  • Poll refreshes could fail on valid optional null placeholders.
  • Liked hearts were too subtle.

What changed

  • Mark personas as reference-target-only and reject every model-generated persona post, reply, like, repost, vote, or follow server-side.
  • Include recent 48-hour thread context in refresh prompts, prioritizing persona comments with exact replyId, author, handle, content, and parent information.
  • Allow generated replies to target a validated existing comment through parentInteractionId.
  • Sort the main and following timelines by latest reply activity so active threads rise naturally.
  • Add persona-owned comment editing and deletion with ownership checks and nested-reply/like cleanup.
  • Render reply composers directly beneath selected comments.
  • Track per-persona Notifications read timestamps while preserving history.
  • Normalize harmless generated optional nulls while retaining vote validation.
  • Fill liked post and comment hearts with Noodle blue.
  • Add regressions for persona generation policy, threaded prompt context, parent-comment validation, activity bumping, comment ownership, reply placement, unread badges, poll parsing, and liked-heart state.

Impact

The model can mention or respond to the persona but can never act as the persona. Characters can continue conversations from the user comments visible in recent or recalled Noodle history, and posts with new replies return to the top of the timeline. Users can also edit or remove their own comments without resetting the timeline.

Validation

  • pnpm check
  • pnpm regression:noodle
  • pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=desktop-chromium --grep "Noodle persona comments"
  • pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=mobile-chromium --grep "Noodle reply notifications"
  • pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=desktop-chromium --grep "liking one Noodle post"

Manual verification requested

  • Manually refresh Noodle and confirm no generated activity is authored by a persona.
  • Reply as a persona to an existing character post, refresh, and confirm a character can answer that specific comment.
  • Confirm a post with a fresh reply rises above newer inactive posts.
  • Verify persona comments can be edited and deleted while character comments expose neither control.
  • Verify comment reply placement, unread badge clearing, solid liked hearts, and generated poll votes.

No linked issue was provided; link or open one before review if required by project policy.

Summary by CodeRabbit

  • New Features

    • Notification badges now show only unread activity and clear when notifications are opened.
    • Persona-authored comments can be edited or deleted, while other authors’ comments remain protected.
    • Reply composers are more consistently positioned and connected to the selected comment.
    • Timelines better prioritize recent posts, replies, polls, and threaded conversations.
  • Bug Fixes

    • Improved reaction-state visuals and notification navigation.
    • Prevented unauthorized comment modifications and invalid generated interactions.

🔄 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/3421 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/10/2026 **Status:** ✅ Merged **Merged:** 7/10/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/noodle-reply-notification-poll-fixes` --- ### 📝 Commits (6) - [`1ee9224`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ee9224d4acf0a83ce4c76a7dd475faf4a2d49c6) Fix Noodle reply, notification, and poll flows - [`529c613`](https://github.com/Pasta-Devs/Marinara-Engine/commit/529c6132bba8c01e0e5543af102f7226738c0a86) Fill liked Noodle hearts - [`a16d1cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a16d1cbec1c94a3d54bccb2587e5ace514b9dd54) Block generated persona activity and manage comments - [`adeda35`](https://github.com/Pasta-Devs/Marinara-Engine/commit/adeda35709a9f27eca6f6616dd26ac3c9212e7a2) Continue and bump active Noodle threads - [`d4cdec7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d4cdec7c2dbf6c1a2576dbd49332aba7ab16b782) Prioritize freshly commented Noodle threads - [`a5c3660`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a5c36605d075ca7e1662324dde179ea4a1ebc657) Address CodeRabbit Noodle review feedback ### 📊 Changes **9 files changed** (+1137 additions, -300 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+156 -2) 📝 `packages/client/src/components/noodle/NoodleView.tsx` (+488 -250) 📝 `packages/client/src/hooks/use-noodle.ts` (+47 -0) 📝 `packages/server/src/routes/noodle.routes.ts` (+128 -44) 📝 `packages/server/src/services/noodle/noodle-prompt.ts` (+107 -1) 📝 `packages/server/src/services/storage/noodle.storage.ts` (+56 -0) 📝 `packages/shared/src/schemas/noodle.schema.ts` (+44 -3) 📝 `scripts/regressions/noodle-polls.regression.ts` (+42 -0) 📝 `scripts/regressions/noodle-prompt.regression.ts` (+69 -0) </details> ### 📄 Description ## Why Noodle needed a hard persona-ownership boundary and reliable continuing interactions: - Timeline generation could attribute activity to the user persona. The persona must remain exclusively user-controlled. - Characters could not see or directly answer existing persona comments during later refreshes. - Posts receiving new replies stayed buried at their original creation position. - Persona-authored comments could not be edited or deleted. - Replying to a comment opened the composer above the selected comment. - The Notifications badge counted full history rather than unread activity. - Poll refreshes could fail on valid optional `null` placeholders. - Liked hearts were too subtle. ## What changed - Mark personas as reference-target-only and reject every model-generated persona post, reply, like, repost, vote, or follow server-side. - Include recent 48-hour thread context in refresh prompts, prioritizing persona comments with exact `replyId`, author, handle, content, and parent information. - Allow generated replies to target a validated existing comment through `parentInteractionId`. - Sort the main and following timelines by latest reply activity so active threads rise naturally. - Add persona-owned comment editing and deletion with ownership checks and nested-reply/like cleanup. - Render reply composers directly beneath selected comments. - Track per-persona Notifications read timestamps while preserving history. - Normalize harmless generated optional nulls while retaining vote validation. - Fill liked post and comment hearts with Noodle blue. - Add regressions for persona generation policy, threaded prompt context, parent-comment validation, activity bumping, comment ownership, reply placement, unread badges, poll parsing, and liked-heart state. ## Impact The model can mention or respond to the persona but can never act as the persona. Characters can continue conversations from the user comments visible in recent or recalled Noodle history, and posts with new replies return to the top of the timeline. Users can also edit or remove their own comments without resetting the timeline. ## Validation - `pnpm check` - `pnpm regression:noodle` - `pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=desktop-chromium --grep "Noodle persona comments"` - `pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=mobile-chromium --grep "Noodle reply notifications"` - `pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --project=desktop-chromium --grep "liking one Noodle post"` ## Manual verification requested - Manually refresh Noodle and confirm no generated activity is authored by a persona. - Reply as a persona to an existing character post, refresh, and confirm a character can answer that specific comment. - Confirm a post with a fresh reply rises above newer inactive posts. - Verify persona comments can be edited and deleted while character comments expose neither control. - Verify comment reply placement, unread badge clearing, solid liked hearts, and generated poll votes. No linked issue was provided; link or open one before review if required by project policy. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Notification badges now show only unread activity and clear when notifications are opened. * Persona-authored comments can be edited or deleted, while other authors’ comments remain protected. * Reply composers are more consistently positioned and connected to the selected comment. * Timelines better prioritize recent posts, replies, polls, and threaded conversations. * **Bug Fixes** * Improved reaction-state visuals and notification navigation. * Prevented unauthorized comment modifications and invalid generated interactions. <!-- 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:15 +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#5929
No description provided.