mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1728] [MERGED] [codex] Restore character version snapshots #5239
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#5239
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/1728
Author: @Xelvanis
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @Xelvanis
Base:
refactor← Head:character-legacy-parity-snapshots📝 Commits (1)
16110d0Restore character version snapshots📊 Changes
10 files changed (+580 additions, -16 deletions)
View changed files
📝
src-tauri/src/commands/storage/avatars.rs(+137 -0)📝
src-tauri/src/commands/storage/characters.rs(+394 -14)📝
src-tauri/src/commands/storage/commands/entities.rs(+4 -1)📝
src-tauri/src/http_dispatch.rs(+3 -0)📝
src/engine/contracts/types/character.ts(+2 -0)📝
src/features/catalog/characters/hooks/use-characters.test.ts(+32 -0)📝
src/features/catalog/characters/hooks/use-characters.ts(+1 -1)📝
src/features/catalog/characters/lib/character-import-model.test.ts(+1 -0)📝
src/features/catalog/characters/lib/character-import-model.ts(+2 -0)📝
src/shared/api/character-api.ts(+4 -0)📄 Description
Linked issue
Why this change
Character edits in the refactor app accepted version metadata but did not persist recoverable version snapshots, so normal editor/agent/card-update changes lost legacy rollback behavior. Avatar updates also needed snapshot-safe handling because managed avatar files are deleted after replacement.
What changed
character-versionssnapshots for data/comment/avatar changes.versionSource,versionReason, andskipVersionSnapshotthrough the shared API/hook boundary without storing those control fields on character rows.skipVersionSnapshot.Refactor impact
Primary owner:
Rust storage, shared API, catalog character hooks.
Impact areas reviewed:
storage_updatecommand dispatch forcharacters.Boundary notes:
src/features/catalog/charactersand call the focusedsrc/shared/api/character-api.tswrapper.src-tauri/src/commands/storage/characters.rs.storage_updatenow delegates character patches to the same Rust owner as embedded Tauri updates.Pressure points touched:
src-tauri/src/http_dispatch.rswas touched only to route remote character updates through the character storage owner.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Automated checks run locally by Codex:
git diff --checkpassed.pnpm test -- src/features/catalog/characters/hooks/use-characters.test.ts src/features/catalog/characters/lib/character-import-model.test.tspassed.cargo test --manifest-path src-tauri\Cargo.toml update_characterpassed.cargo test --manifest-path src-tauri\Cargo.toml restore_character_versionpassed.cargo test --manifest-path src-tauri\Cargo.toml character_avatar_update_snapshot_does_not_restore_deleted_file_metadatapassed.pnpm typecheckpassed.pnpm check:architecturepassed.cargo check --manifest-path src-tauri\Cargo.tomlpassed.pnpm checkwas attempted, butcheck:line-endingsfailed before source checks because this working tree reports repo-wide CRLF line endings in an LF-normalized tree. Those files are unrelated to this PR and were not renormalized in this change.Native Tauri QA was not run yet.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdDocs/release note assessment: no docs or changelog file was updated; this is behavior parity in existing character storage/update flows.
UI evidence
No visible UI changes; no screenshots attached.
Summary by CodeRabbit
New Features
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.