[PR #7019] [MERGED] fix(presets): let Professor Mari toggle Send without wrapper, and fix its description #7430

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

📋 Pull Request Information

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

Base: staging ← Head: fix/preset-skip-wrap-followups


📝 Commits (9)

  • 0fb0503 fix(presets): let Mari toggle Send without wrapper, fix its description
  • a32e797 fix(presets): refuse skipWrap on markers instead of reporting success
  • b1072a2 fix(presets): never store a marker as sent without its wrapper
  • d8eaf75 Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups
  • f612f34 Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups
  • 9b58d06 fix(mari): honour =true and =false on preset on/off flags
  • b5ea824 Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups
  • 2a10cfc Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups
  • d65a2d4 Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups

📊 Changes

5 files changed (+484 additions, -77 deletions)

View changed files

📝 CHANGELOG.md (+3 -1)
📝 docs/prompts/presets.md (+1 -1)
📝 packages/client/src/localization/locales/en.json (+1 -1)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+56 -10)
📝 scripts/regressions/mari/preset-granular.regression.ts (+423 -64)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7014

Follow-up to #7007 (#7006), found while reviewing it.

Why this change

The new Send without wrapper switch on prompt blocks had two gaps:

  • Professor Mari couldn't change it on an existing block. preset.updateSection failed with "needs a field such as…", or reported success and left the switch as it was.
  • Its description said "Its group still wraps it." on every block, including blocks with no group. That isn't always true: blocks in a mixed-role group, and depth-injected blocks, get no group wrapper.

What changed

  • Professor Mari (mari-db.service.ts):
    • preset.updateSection and preset.addSection read skipWrap, nested or top-level. forbidOverrides had the same gap and is fixed the same way.
    • The preset.sections index shows skipWrap.
    • The CLI takes --skip-wrap / --no-skip-wrap.
    • Turning it on for a marker is refused with a clear message, because markers always keep their wrapper. Before, she reported success and nothing changed.
  • Copy:
    • The switch description is now one true sentence: "Sends this block without its own tag or heading."
    • docs/prompts/presets.md and the #7006 CHANGELOG line say a group "can still" wrap the block.
  • CHANGELOG: one entry ending (#7014).
  • Regression: block 5d in scripts/regressions/mari/preset-granular.regression.ts covers on and off, nested and top-level, add and update, the CLI flags, the index, and the marker refusal. Each part fails when its fix is removed.

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

Run by the agent:

  • pnpm check, pnpm localization:check, node ./scripts/run-regressions.mjs --filter mari (29/29) and pnpm regression:prompt pass.
  • Probes against the real Mari service show every case that failed before now works.
  • An assembler probe confirms the new wording: a same-role group wraps the bare block, while a mixed-role group or a depth-injected block does not.
  • A separate review found one minor problem (the marker case) and one nit. Both are fixed.

Still to verify by hand:

  • Ask Professor Mari to turn Send without wrapper on, then off, for a prompt block in an XML preset, and check the switch in Sections follows.
  • Expand an ungrouped prompt block in Sections and check the description reads well.

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)

docs/prompts/presets.md changes one phrase in the paragraph #7009 already tracks; that translation will use the new wording.

Summary by CodeRabbit

  • New Features
    • Professor Mari can enable or disable Send without wrapper when adding or updating prompt sections, including through preset actions and CLI flags.
  • Bug Fixes
    • A group can still wrap a prompt section when the section’s own wrapper is omitted. Markers retain their wrappers, and the setting cannot be enabled for them.
  • Documentation
    • Clarified that the setting omits a section’s own tag or heading, while a surrounding group may still wrap it.

🔄 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/7019 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/preset-skip-wrap-followups` --- ### 📝 Commits (9) - [`0fb0503`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0fb0503aa0e1855c187cafc2d8855fd0838ea2f6) fix(presets): let Mari toggle Send without wrapper, fix its description - [`a32e797`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a32e797555f88a6604dbf699eacb97fc8c274e2f) fix(presets): refuse skipWrap on markers instead of reporting success - [`b1072a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b1072a2a8737b88aeb354d16b8d705757f4f4add) fix(presets): never store a marker as sent without its wrapper - [`d8eaf75`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d8eaf7583fccdb07f6a7cf033c58e37e76631f66) Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups - [`f612f34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f612f340d3c3ec0b5de12d1f31cbe4fb193d8bb7) Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups - [`9b58d06`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9b58d06ab514a2afc190a3605effd8222781263a) fix(mari): honour =true and =false on preset on/off flags - [`b5ea824`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5ea824fc709c5091d774223111ad21b6633f55f) Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups - [`2a10cfc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2a10cfc52c409df03cc104d6b028564f5d04caae) Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups - [`d65a2d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d65a2d48f58125c708a0dc39fbfe3c14192e6904) Merge remote-tracking branch 'origin/staging' into fix/preset-skip-wrap-followups ### 📊 Changes **5 files changed** (+484 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -1) 📝 `docs/prompts/presets.md` (+1 -1) 📝 `packages/client/src/localization/locales/en.json` (+1 -1) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+56 -10) 📝 `scripts/regressions/mari/preset-granular.regression.ts` (+423 -64) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7014 Follow-up to #7007 (#7006), found while reviewing it. ## Why this change The new **Send without wrapper** switch on prompt blocks had two gaps: - Professor Mari couldn't change it on an existing block. `preset.updateSection` failed with "needs a field such as…", or reported success and left the switch as it was. - Its description said "Its group still wraps it." on every block, including blocks with no group. That isn't always true: blocks in a mixed-role group, and depth-injected blocks, get no group wrapper. ## What changed - **Professor Mari** (`mari-db.service.ts`): - `preset.updateSection` and `preset.addSection` read `skipWrap`, nested or top-level. `forbidOverrides` had the same gap and is fixed the same way. - The `preset.sections` index shows `skipWrap`. - The CLI takes `--skip-wrap` / `--no-skip-wrap`. - Turning it on for a marker is refused with a clear message, because markers always keep their wrapper. Before, she reported success and nothing changed. - **Copy:** - The switch description is now one true sentence: "Sends this block without its own tag or heading." - `docs/prompts/presets.md` and the #7006 CHANGELOG line say a group "can still" wrap the block. - **CHANGELOG:** one entry ending (#7014). - **Regression:** block 5d in `scripts/regressions/mari/preset-granular.regression.ts` covers on and off, nested and top-level, add and update, the CLI flags, the index, and the marker refusal. Each part fails when its fix is removed. ## 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 Run by the agent: - `pnpm check`, `pnpm localization:check`, `node ./scripts/run-regressions.mjs --filter mari` (29/29) and `pnpm regression:prompt` pass. - Probes against the real Mari service show every case that failed before now works. - An assembler probe confirms the new wording: a same-role group wraps the bare block, while a mixed-role group or a depth-injected block does not. - A separate review found one minor problem (the marker case) and one nit. Both are fixed. Still to verify by hand: - Ask Professor Mari to turn **Send without wrapper** on, then off, for a prompt block in an XML preset, and check the switch in **Sections** follows. - Expand an ungrouped prompt block in **Sections** and check the description reads well. ## 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) `docs/prompts/presets.md` changes one phrase in the paragraph #7009 already tracks; that translation will use the new wording. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Professor Mari can enable or disable **Send without wrapper** when adding or updating prompt sections, including through preset actions and CLI flags. * **Bug Fixes** * A group can still wrap a prompt section when the section’s own wrapper is omitted. Markers retain their wrappers, and the setting cannot be enabled for them. * **Documentation** * Clarified that the setting omits a section’s own tag or heading, while a surrounding group may still wrap it. <!-- 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:19:41 +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#7430
No description provided.