mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1732] [MERGED] Fix preset Save & close async ordering #5243
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1732
Author: @cha1latte
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1701-preset-save-close📝 Commits (4)
45ce5d4Fix preset save and close orderingf35fec8Fix agent editor test mock3bfb2caLabel preset save error dismiss button6aec930Clean up unused exports for CI📊 Changes
29 files changed (+241 additions, -779 deletions)
View changed files
📝
src/engine/contracts/constants/agent-activation.ts(+1 -1)📝
src/engine/generation-core/llm/inline-thinking.ts(+0 -56)📝
src/engine/generation/generate-route-utils.ts(+1 -1)📝
src/engine/generation/tools-runtime.ts(+1 -1)📝
src/engine/mari/mari-history.ts(+1 -1)📝
src/engine/modes/game/assets/npc-avatar-utils.ts(+1 -1)➖
src/engine/modes/game/state/segment-edits.ts(+0 -426)📝
src/engine/shared/game-state/player-stats.ts(+1 -1)📝
src/engine/shared/scoring/skill-check-format.ts(+0 -14)📝
src/features/catalog/agents/components/AgentEditor.test.tsx(+1 -0)📝
src/features/catalog/characters/hooks/use-characters.test.ts(+1 -108)📝
src/features/catalog/characters/hooks/use-characters.ts(+0 -19)📝
src/features/catalog/characters/lib/character-import-file-classifier.ts(+1 -1)📝
src/features/catalog/characters/lib/character-search.ts(+0 -59)📝
src/features/catalog/characters/lib/characters-panel-model.ts(+1 -1)📝
src/features/catalog/chat-presets/hooks/use-chat-presets.ts(+1 -1)📝
src/features/catalog/gallery/hooks/use-gallery.ts(+4 -4)📝
src/features/catalog/personas/lib/personas-panel-model.ts(+1 -1)➕
src/features/catalog/presets/components/PresetEditor.test.tsx(+182 -0)📝
src/features/catalog/presets/components/PresetEditor.tsx(+33 -16)...and 9 more files
📄 Description
Linked issue
Closes #1701
Why this change
Save & closeaction closed the detail view immediately after starting an async save, so failed or still-pending saves could hide the user's edited content.What changed
updatePreset.mutateAsyncand return a success boolean.Save & closeclosing behind a successful save result.PresetEditorregression test for failed Save & close followed by a successful retry.Refactor impact
Primary owner:
Catalog resources
Impact areas reviewed:
Boundary notes:
src/features/catalog/presets.Pressure points touched:
Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
pnpm exec vitest run src/features/catalog/presets/components/PresetEditor.test.tsxpassed. The regression test mounts the real preset editor, verifies failed Save & close keeps the detail open with edited content and error text, then verifies a successful retry closes the detail.pnpm typecheckpassed.git diff --checkpassed.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.jsonpassed locally.pnpm checkpassed line endings, architecture, frontend typecheck, Rust check, and docs, then failed atcheck:unusedon unrelated existingknipfindings outside this PR's files.pnpm check:unusedlimitation noted above.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
Summary by CodeRabbit
Tests
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.