mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2129] [Issue]: Character version history lists older snapshots before newer ones #1038
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#1038
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?
Originally created by @Promansis on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2129
Originally assigned to: @cha1latte on GitHub.
Summary
Character version history on the refactor branch appears to list saved versions oldest-first, while legacy listed newest-first. This makes recent snapshots harder to find and differs from the legacy version-history route.
Expected behavior
The character version history list should show the most recent saved version first, matching legacy behavior.
Actual behavior
useCharacterVersionslistscharacter-versionswith only acharacterIdfilter. The generic storage list path sorts bycreatedAtascending unless callers passdescending: true, so the UI likely renders oldest snapshots first.Steps to reproduce
main, where/characters/:id/versionsordered snapshots by descendingcreatedAt.Impact area
Environment
refactorstatic trace on 2026-06-04Logs, screenshots, or video
No screenshots or runtime timing attached. Current evidence is from static trace:
src/features/catalog/characters/hooks/use-characters.tscallsstorageApi.list<CharacterCardVersion>("character-versions", { filters: { characterId: id } })withoutorderByordescending.src-tauri/src/commands/storage/commands/entities.rssorts generic list rows bysortOrder,order, orcreatedAt, and only reverses order whendescendingis true.packages/server/src/services/storage/characters.storage.tsusedorderBy(desc(characterCardVersions.createdAt))forlistVersions(characterId).Regression notes
Legacy
mainlisted version snapshots newest-first. The refactor version-history functionality is otherwise stronger than legacy in this slice because snapshots preserve more avatar metadata and restore snapshots current state first.Additional context
Found during target 5 parityscan row
05-CHAR-STORAGE-crud-version-history.Likely narrow fix: request
storageApi.list<CharacterCardVersion>("character-versions", { filters: { characterId: id }, orderBy: "createdAt", descending: true })inuseCharacterVersions.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: