[PR #3710] [MERGED] Fix editor history and preserve partial character updates #6064

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

📋 Pull Request Information

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

Base: staging ← Head: fix/editor-keyboard-history


📝 Commits (3)

  • 278b0c2 fix: restore editor undo and multiline indentation
  • 1d27a4b fix: preserve omitted character update fields
  • 29e0870 test: cover partial character updates end to end

📊 Changes

9 files changed (+316 additions, -90 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/core-flows.e2e.ts (+44 -4)
📝 packages/client/src/components/game-assets/FileEditorModal.tsx (+3 -13)
📝 packages/client/src/components/presets/PresetEditor.tsx (+2 -35)
📝 packages/client/src/components/ui/ExpandedTextarea.tsx (+2 -0)
📝 packages/client/src/components/ui/MacroTextarea.tsx (+15 -38)
➕ packages/client/src/lib/textarea-editing.ts (+154 -0)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+11 -0)
📝 scripts/regressions/open-issues.regression.ts (+83 -0)

📄 Description

Why

Expanded text editors lost native undo history and replaced multiline selections when indenting. Separately, partial character.update app-data actions can erase omitted Character Card fields such as greetings and example dialogue.

Fixes #3708.

What

  • restore native undo/redo-friendly edits across shared expanded text editors
  • indent and unindent every selected line with Tab and Shift+Tab
  • preserve omitted Character Card fields during partial character.update actions
  • add focused regression coverage and release notes

Test plan

  • Manually verify Cmd/Ctrl+Z restores typed and indented lorebook text.
  • Manually verify Tab and Shift+Tab indent and unindent multiline selections.
  • Manually verify a partial character.update leaves greetings and example dialogue unchanged.
  • Run the focused editor Playwright regression.
  • Run the open-issues regression.
  • Run pnpm check.

Summary by CodeRabbit

  • Bug Fixes
    • Preserved greetings, example dialogue, creator notes, system prompts, and post-history instructions when updating unrelated character fields.
    • Restored native undo/redo behavior in shared text editors.
    • Added consistent Tab indentation and Shift+Tab unindentation for selected lines.
    • Ensured manual About Me edits persist in the expanded editor.
  • Tests
    • Expanded regression and end-to-end coverage for character updates and editor keyboard behavior.

🔄 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/3710 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/editor-keyboard-history` --- ### 📝 Commits (3) - [`278b0c2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/278b0c2cbdf648ada1cca8fe11b08e022b5baacb) fix: restore editor undo and multiline indentation - [`1d27a4b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1d27a4be4d6521e85be28e6204a9ec3ea895b8f5) fix: preserve omitted character update fields - [`29e0870`](https://github.com/Pasta-Devs/Marinara-Engine/commit/29e0870babce16124cb88c2dc76fb019b7cef4f2) test: cover partial character updates end to end ### 📊 Changes **9 files changed** (+316 additions, -90 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/core-flows.e2e.ts` (+44 -4) 📝 `packages/client/src/components/game-assets/FileEditorModal.tsx` (+3 -13) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+2 -35) 📝 `packages/client/src/components/ui/ExpandedTextarea.tsx` (+2 -0) 📝 `packages/client/src/components/ui/MacroTextarea.tsx` (+15 -38) ➕ `packages/client/src/lib/textarea-editing.ts` (+154 -0) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+11 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+83 -0) </details> ### 📄 Description ## Why Expanded text editors lost native undo history and replaced multiline selections when indenting. Separately, partial `character.update` app-data actions can erase omitted Character Card fields such as greetings and example dialogue. Fixes #3708. ## What - restore native undo/redo-friendly edits across shared expanded text editors - indent and unindent every selected line with Tab and Shift+Tab - preserve omitted Character Card fields during partial `character.update` actions - add focused regression coverage and release notes ## Test plan - [ ] Manually verify Cmd/Ctrl+Z restores typed and indented lorebook text. - [ ] Manually verify Tab and Shift+Tab indent and unindent multiline selections. - [ ] Manually verify a partial `character.update` leaves greetings and example dialogue unchanged. - [ ] Run the focused editor Playwright regression. - [ ] Run the open-issues regression. - [ ] Run `pnpm check`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Preserved greetings, example dialogue, creator notes, system prompts, and post-history instructions when updating unrelated character fields. * Restored native undo/redo behavior in shared text editors. * Added consistent `Tab` indentation and `Shift+Tab` unindentation for selected lines. * Ensured manual About Me edits persist in the expanded editor. * **Tests** * Expanded regression and end-to-end coverage for character updates and editor keyboard behavior. <!-- 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:06:45 +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#6064
No description provided.