[PR #4759] [MERGED] fix(noodle): add Restore Default to Image Instructions prompt #6489

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4759
Author: @Gunterlie
Created: 8/8/2026
Status: ✅ Merged
Merged: 8/8/2026
Merged by: @Gunterlie

Base: staging ← Head: fix/4758-image-instructions-restore-default


📝 Commits (5)

  • 34d7e3e fix(noodle): add Restore Default to Image Instructions prompt
  • 6cc6d7c fix(noodle): localize editor cancel label, close image prompt editor on save success
  • e2a3f0e fix(noodle): ignore image prompt editor close while save is in flight
  • a10a0e2 fix(noodle): disable image instructions Edit prompt while settings save is pending
  • aab19d5 fix(noodle): freeze image instructions draft while save is in flight

📊 Changes

1 file changed (+124 additions, -24 deletions)

View changed files

📝 packages/client/src/components/noodle/NoodleHome.tsx (+124 -24)

📄 Description

Linked issue

Closes #4758

Why this change

  • The Image Instructions (Sent to your LLM) prompt on the Noodle settings panel is a bare textarea. If a user edits or clears it, there is no way to recover the default and nothing indicates what belongs in the field.
  • The Timeline Base Prompt right above it already has a Restore Default control, so the inconsistency reads as a missing feature (reporter hit exactly this in #4758).

What changed

  • packages/client/src/components/noodle/NoodleHome.tsx: replaced the plain Image Instructions textarea with the same card shape used by the Timeline Base Prompt — icon, title, Default/Custom badge, 3-line preview, and Restore default + Edit prompt buttons.
  • Added an ExpandedTextarea editor modal for the field (Restore default / Cancel / Save prompt), with the default prompt as placeholder ghost text so an emptied field still shows the expected format.
  • The Default/Custom badge is derived by comparing against DEFAULT_NOODLE_SETTINGS.imageGenerationPrompt, since this setting is a plain string in noodle settings rather than a prompt-override record like the Timeline Base Prompt.
  • Reuses the existing ui.noodle.noodlehome.restoreDefault / editPrompt / savePrompt strings; no new locale keys.

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

Agent ran only tsc --noEmit and eslint on the changed file; both clean. Full pnpm check and every item below still need a human. To verify:

  • Manually open Noodle settings → Image Generation, enable Image Generation, and confirm the Image Instructions card renders like the Timeline Base Prompt card directly above it.
  • Manually confirm the badge reads "Default" on a fresh install, and flips to "Custom" after editing the prompt.
  • Manually click Edit prompt, change the text, Save, and confirm it persists across a reload.
  • Manually click Edit prompt, change the text, Cancel, and confirm the change is discarded.
  • Manually clear the field entirely in the editor and confirm the default prompt appears as placeholder ghost text.
  • Manually click Restore default (both on the card and inside the editor) and confirm the field returns to the shipped default and the badge returns to "Default".
  • Manually check light + dark mode and a mobile viewport for the new card and modal.

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 (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not captured — needs a screenshot of the new Image Instructions card next to the Timeline Base Prompt card before merge.

Summary by CodeRabbit

  • New Features

    • Added an expanded editor for Noodle image-generation instructions.
    • Added explicit Save and Cancel actions.
    • Added indicators showing whether instructions use default or customized settings.
    • Added an option to restore the default instructions.
  • Improvements

    • Added clear error handling when saving instruction changes.
    • Draft instructions remain synchronized with saved settings when the editor is closed.
    • Condensed unseen-count formatting for a cleaner display.

🔄 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/4759 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/8/2026 **Status:** ✅ Merged **Merged:** 8/8/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `fix/4758-image-instructions-restore-default` --- ### 📝 Commits (5) - [`34d7e3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/34d7e3e19a0999a9a4e6cae1d7c795e0a2fa51de) fix(noodle): add Restore Default to Image Instructions prompt - [`6cc6d7c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6cc6d7c68ed7ee91e5c12ee79cf900446a4471e4) fix(noodle): localize editor cancel label, close image prompt editor on save success - [`e2a3f0e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e2a3f0ee3a5f26e6bad7369ed5e734b919626a12) fix(noodle): ignore image prompt editor close while save is in flight - [`a10a0e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a10a0e25a9350aba3333c9a7d026f9aaf0187d1e) fix(noodle): disable image instructions Edit prompt while settings save is pending - [`aab19d5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aab19d5427d43bf9e6935a451fb9aa0dbf540588) fix(noodle): freeze image instructions draft while save is in flight ### 📊 Changes **1 file changed** (+124 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/noodle/NoodleHome.tsx` (+124 -24) </details> ### 📄 Description ## Linked issue Closes #4758 ## Why this change - The Image Instructions (Sent to your LLM) prompt on the Noodle settings panel is a bare textarea. If a user edits or clears it, there is no way to recover the default and nothing indicates what belongs in the field. - The Timeline Base Prompt right above it already has a Restore Default control, so the inconsistency reads as a missing feature (reporter hit exactly this in #4758). ## What changed - `packages/client/src/components/noodle/NoodleHome.tsx`: replaced the plain Image Instructions textarea with the same card shape used by the Timeline Base Prompt — icon, title, Default/Custom badge, 3-line preview, and Restore default + Edit prompt buttons. - Added an `ExpandedTextarea` editor modal for the field (Restore default / Cancel / Save prompt), with the default prompt as placeholder ghost text so an emptied field still shows the expected format. - The Default/Custom badge is derived by comparing against `DEFAULT_NOODLE_SETTINGS.imageGenerationPrompt`, since this setting is a plain string in noodle settings rather than a prompt-override record like the Timeline Base Prompt. - Reuses the existing `ui.noodle.noodlehome.restoreDefault` / `editPrompt` / `savePrompt` strings; no new locale keys. ## 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 Agent ran only `tsc --noEmit` and `eslint` on the changed file; both clean. Full `pnpm check` and every item below still need a human. To verify: - Manually open Noodle settings → Image Generation, enable Image Generation, and confirm the Image Instructions card renders like the Timeline Base Prompt card directly above it. - Manually confirm the badge reads "Default" on a fresh install, and flips to "Custom" after editing the prompt. - Manually click Edit prompt, change the text, Save, and confirm it persists across a reload. - Manually click Edit prompt, change the text, Cancel, and confirm the change is discarded. - Manually clear the field entirely in the editor and confirm the default prompt appears as placeholder ghost text. - Manually click Restore default (both on the card and inside the editor) and confirm the field returns to the shipped default and the badge returns to "Default". - Manually check light + dark mode and a mobile viewport for the new card and modal. ## 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 (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not captured — needs a screenshot of the new Image Instructions card next to the Timeline Base Prompt card before merge. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added an expanded editor for Noodle image-generation instructions. - Added explicit Save and Cancel actions. - Added indicators showing whether instructions use default or customized settings. - Added an option to restore the default instructions. - **Improvements** - Added clear error handling when saving instruction changes. - Draft instructions remain synchronized with saved settings when the editor is closed. - Condensed unseen-count formatting for a cleaner display. <!-- 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:10:54 +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#6489
No description provided.