mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#6216
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/4043
Author: @SpicyMarinara
Created: 7/24/2026
Status: ✅ Merged
Merged: 7/24/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/4040-card-version-history📝 Commits (3)
4c502f0fix(cards): preserve versions on restore, keep timestamps, wrap long diffsa9b6b46fix: address CodeRabbit review on card version history18a864eMerge branch 'staging' into fix/4040-card-version-history📊 Changes
4 files changed (+108 additions, -49 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+3 -3)📝
packages/client/src/components/personas/PersonaEditor.tsx(+3 -3)📝
packages/server/src/services/storage/characters.storage.ts(+101 -43)📄 Description
Why
From #4040. The reporter raised three things about character-card version history; two the maintainer endorsed, and the reporter's EDIT narrowed the third to a concrete bug:
restoreVersionoverwrote the current card without snapshotting it, so the newer state was gone forever.now()), not with when v1 was actually saved — so v1 appeared to have been created at the moment you replaced it.whitespace-pre-wrap, which wraps on spaces but not on long unbroken tokens — creator notes full of HTML and links overflowed the modal horizontally.(The full inline word-level diff the reporter also mentioned is already covered by the existing per-field side-by-side view; the maintainer had deprioritized a fancier diff UI, so this PR keeps that view and just makes it wrap.)
What changed
Server —
characters.storage.ts(both characters and personas):restoreVersion/restorePersonaVersionsnapshot the current card to history before overwriting it (source"restore"), skipped when the current card already equals the target version. Restoring is now non-destructive.update/updatePersonastamp the pre-save snapshot with the replaced card's ownupdatedAtinstead of the new save time, so each version keeps its real date.Client:
CharacterEditor.tsx/PersonaEditor.tsx— the compare panes now usemin-w-0 break-words [overflow-wrap:anywhere], so long URLs/HTML wrap instead of overflowing; the restore confirmation now says the current card is saved to history first.Test plan
pnpm checkpasses. (Passed in the authoring session; re-verify locally.)Fixes #4040.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.