[PR #3477] [MERGED] Improve Noodle image-aware timeline refreshes #5957

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

📋 Pull Request Information

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

Base: staging ← Head: agent/noodle-image-aware-refreshes


📝 Commits (4)

  • a2b0e6e feat(noodle): improve image-aware refreshes
  • aeb7bf8 fix(noodle): preserve older poll votes
  • 4a522c2 fix(noodle): persist settings on navigation
  • 768408c Address CodeRabbit retry backoff review

📊 Changes

21 files changed (+1022 additions, -122 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
📝 docs/development/noodle-internals.md (+5 -0)
📝 docs/noodle/overview.md (+1 -1)
📝 docs/noodle/settings.md (+5 -5)
📝 e2e/core-flows.e2e.ts (+218 -0)
📝 package.json (+1 -1)
📝 packages/client/src/components/noodle/NoodleView.tsx (+78 -19)
📝 packages/client/src/hooks/use-noodle.ts (+35 -3)
📝 packages/server/src/db/migrate.ts (+9 -0)
📝 packages/server/src/routes/noodle.routes.ts (+166 -79)
➕ packages/server/src/services/noodle/noodle-image-retry.ts (+23 -0)
📝 packages/server/src/services/noodle/noodle-prompt.ts (+79 -5)
➕ packages/server/src/services/noodle/noodle-vision.ts (+161 -0)
📝 packages/server/src/services/storage/noodle.storage.ts (+7 -4)
📝 packages/shared/src/schemas/noodle.schema.ts (+2 -2)
📝 packages/shared/src/types/noodle.ts (+1 -1)
📝 packages/shared/src/utils/noodle-polls.ts (+35 -1)
➕ scripts/regressions/noodle-image-retry.regression.ts (+32 -0)
📝 scripts/regressions/noodle-polls.regression.ts (+38 -1)
➕ scripts/regressions/noodle-settings.regression.ts (+35 -0)

...and 1 more files

📄 Description

Linked issue

Closes #3476

Why this change

Noodle refreshes previously supplied only textual image descriptions, so vision-capable models could not understand images posted by users or characters. Image generation failures could also leave prompt-only media behind, persona replies could repeatedly bump their own posts, older poll votes could disappear from a transient refresh snapshot, and numeric settings could revert when navigating away before their blur-only save completed.

What changed

  • Attach up to eight safely resolved and normalized timeline images to multimodal refresh prompts, with deterministic post/reply labels.
  • Retry without image inputs when an OpenAI-compatible or other provider explicitly rejects multimodal content.
  • Retry generated post images once, then publish a clean text-only post if the second attempt fails; clean up legacy failed prompt-only media.
  • Bump a timeline post only when another account replies directly to the active persona's comment.
  • Preserve valid stored poll votes across manual refreshes, automatic refetches, and image-confirmation refreshes without resurrecting removed polls.
  • Serialize and optimistically retain Noodle setting writes; numeric drafts now commit from the live input and on navigation/unmount.
  • Replace Images/day with Images/refresh for manual and automatic refreshes while migrating the legacy saved value.
  • Add Noodle storage, poll, settings-navigation, image retry, and multimodal regressions; update the changelog and Noodle documentation.

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

Automated validation completed:

  • pnpm check
  • pnpm regression:noodle
  • pnpm version:check
  • pnpm exec playwright test e2e/core-flows.e2e.ts --project desktop-chromium --grep "Noodle settings persist through refetch and reload"
  • pnpm exec playwright test e2e/core-flows.e2e.ts --grep "Noodle only bumps posts"
  • git diff --check

The settings browser regression changes Images/refresh and Random users, reloads the app, changes Carry items and navigates Home, then changes Refreshes/day and navigates to Notifications. It verifies the values in both the UI and API and restores the original settings afterward.

Manual verification notes

  • No real-provider walkthrough was performed in this publishing pass. Manually verify a vision-capable refresh, a provider that rejects image inputs, and image generation failure fallback 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)

Documentation and CHANGELOG.md are included; this PR does not change the application version.

UI evidence (if applicable)

No screenshot attached. UI changes are limited to the Images/refresh label/help text and reliable persistence behavior for the existing settings controls.

Risk and compatibility notes

  • Multimodal inputs are restricted to validated local gallery routes or data URLs, normalized to bounded JPEGs, and capped at eight attachments.
  • Debug prompt logs record attachment metadata but never base64 image payloads.
  • Legacy maxImagePromptsPerDay settings migrate into maxImagesPerRefresh, with regression coverage for old and mixed saved data.
  • Remote URLs and traversal paths are negative-tested; incompatible vision endpoints fall back to text-only context.
  • Cached poll votes are retained only while their post and option remain valid; a newer server vote for the same account wins.
  • Noodle settings are re-read from persistent storage before the API responds, and failed client mutations roll back their optimistic snapshot.

🔄 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/3477 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/11/2026 **Status:** ✅ Merged **Merged:** 7/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/noodle-image-aware-refreshes` --- ### 📝 Commits (4) - [`a2b0e6e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2b0e6e78ef23fc1c2e535aef6c75efe8ad64714) feat(noodle): improve image-aware refreshes - [`aeb7bf8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aeb7bf8765e4344bfe40244b59ce3f9e5dda32b5) fix(noodle): preserve older poll votes - [`4a522c2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4a522c2c75dd74a6b20e3a2732aaa9c6d085aed0) fix(noodle): persist settings on navigation - [`768408c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/768408c2e76bab75e3c4acf2d3ec127bdf5d9740) Address CodeRabbit retry backoff review ### 📊 Changes **21 files changed** (+1022 additions, -122 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) 📝 `docs/development/noodle-internals.md` (+5 -0) 📝 `docs/noodle/overview.md` (+1 -1) 📝 `docs/noodle/settings.md` (+5 -5) 📝 `e2e/core-flows.e2e.ts` (+218 -0) 📝 `package.json` (+1 -1) 📝 `packages/client/src/components/noodle/NoodleView.tsx` (+78 -19) 📝 `packages/client/src/hooks/use-noodle.ts` (+35 -3) 📝 `packages/server/src/db/migrate.ts` (+9 -0) 📝 `packages/server/src/routes/noodle.routes.ts` (+166 -79) ➕ `packages/server/src/services/noodle/noodle-image-retry.ts` (+23 -0) 📝 `packages/server/src/services/noodle/noodle-prompt.ts` (+79 -5) ➕ `packages/server/src/services/noodle/noodle-vision.ts` (+161 -0) 📝 `packages/server/src/services/storage/noodle.storage.ts` (+7 -4) 📝 `packages/shared/src/schemas/noodle.schema.ts` (+2 -2) 📝 `packages/shared/src/types/noodle.ts` (+1 -1) 📝 `packages/shared/src/utils/noodle-polls.ts` (+35 -1) ➕ `scripts/regressions/noodle-image-retry.regression.ts` (+32 -0) 📝 `scripts/regressions/noodle-polls.regression.ts` (+38 -1) ➕ `scripts/regressions/noodle-settings.regression.ts` (+35 -0) _...and 1 more files_ </details> ### 📄 Description ## Linked issue Closes #3476 ## Why this change Noodle refreshes previously supplied only textual image descriptions, so vision-capable models could not understand images posted by users or characters. Image generation failures could also leave prompt-only media behind, persona replies could repeatedly bump their own posts, older poll votes could disappear from a transient refresh snapshot, and numeric settings could revert when navigating away before their blur-only save completed. ## What changed - Attach up to eight safely resolved and normalized timeline images to multimodal refresh prompts, with deterministic post/reply labels. - Retry without image inputs when an OpenAI-compatible or other provider explicitly rejects multimodal content. - Retry generated post images once, then publish a clean text-only post if the second attempt fails; clean up legacy failed prompt-only media. - Bump a timeline post only when another account replies directly to the active persona's comment. - Preserve valid stored poll votes across manual refreshes, automatic refetches, and image-confirmation refreshes without resurrecting removed polls. - Serialize and optimistically retain Noodle setting writes; numeric drafts now commit from the live input and on navigation/unmount. - Replace `Images/day` with `Images/refresh` for manual and automatic refreshes while migrating the legacy saved value. - Add Noodle storage, poll, settings-navigation, image retry, and multimodal regressions; update the changelog and Noodle documentation. ## 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` Automated validation completed: - `pnpm check` - `pnpm regression:noodle` - `pnpm version:check` - `pnpm exec playwright test e2e/core-flows.e2e.ts --project desktop-chromium --grep "Noodle settings persist through refetch and reload"` - `pnpm exec playwright test e2e/core-flows.e2e.ts --grep "Noodle only bumps posts"` - `git diff --check` The settings browser regression changes Images/refresh and Random users, reloads the app, changes Carry items and navigates Home, then changes Refreshes/day and navigates to Notifications. It verifies the values in both the UI and API and restores the original settings afterward. ### Manual verification notes - No real-provider walkthrough was performed in this publishing pass. Manually verify a vision-capable refresh, a provider that rejects image inputs, and image generation failure fallback 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) Documentation and `CHANGELOG.md` are included; this PR does not change the application version. ## UI evidence (if applicable) No screenshot attached. UI changes are limited to the Images/refresh label/help text and reliable persistence behavior for the existing settings controls. ## Risk and compatibility notes - Multimodal inputs are restricted to validated local gallery routes or data URLs, normalized to bounded JPEGs, and capped at eight attachments. - Debug prompt logs record attachment metadata but never base64 image payloads. - Legacy `maxImagePromptsPerDay` settings migrate into `maxImagesPerRefresh`, with regression coverage for old and mixed saved data. - Remote URLs and traversal paths are negative-tested; incompatible vision endpoints fall back to text-only context. - Cached poll votes are retained only while their post and option remain valid; a newer server vote for the same account wins. - Noodle settings are re-read from persistent storage before the API responds, and failed client mutations roll back their optimistic snapshot. --- <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:36 +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#5957
No description provided.