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#7922
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/7773
Author: @ylli-selmani
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ylli-selmani
Base:
staging← Head:feat/game-data-state-editor-b📝 Commits (10+)
4d149f0fix(game): a saved game data edit stays saved when reading it back fails (#7743)8ae96f4feat(game): edit the inventory in the Game data editor (#7743 slice 3)3c6bb4dfeat(game): edit the world's edits layer in the Game data editor (#7743 slice 4)c844aecfeat(game): save the story script, party sheet and widgets from the State Editor (#7743 slice 5)7b9dbbffeat(game): checkpoint before every State Editor save, and a Checkpoints list (#7743 slice 6)dff723bfix(game): the checkpoints list loads the restored game, one at a time (#7743)5ef8cbeMerge remote-tracking branch 'origin/staging' into feat/game-data-state-editor-b03ede02fix(game): save world edits and the story only over what the editor opened (#7743)b54c5affix(game): a stale world-edits save skips the snapshot (#7743)3b0f845fix(game): the State Editor saves HUD widgets only over what it opened (#7743)📊 Changes
22 files changed (+1434 additions, -82 deletions)
View changed files
📝
docs/game/sessions-and-saves.md(+5 -1)📝
packages/client/src/components/game/GameSurface.tsx(+12 -33)📝
packages/client/src/components/layout/ModalRenderer.tsx(+6 -0)➕
packages/client/src/components/modals/GameCheckpointsModal.tsx(+178 -0)📝
packages/client/src/components/modals/GameDataEditorModal.tsx(+271 -11)📝
packages/client/src/hooks/use-game.ts(+6 -2)📝
packages/client/src/lib/game-inventory-refusal.ts(+42 -0)📝
packages/client/src/lib/state-editor/game-data-editor-source.ts(+56 -9)➕
packages/client/src/lib/state-editor/game-data-inventory.ts(+155 -0)📝
packages/client/src/localization/locales/en.json(+43 -2)📝
packages/server/src/db/schema/checkpoints.ts(+10 -1)📝
packages/server/src/routes/game-inventory.routes.ts(+27 -1)📝
packages/server/src/routes/game.routes.ts(+67 -8)📝
packages/server/src/services/game/checkpoint.service.ts(+44 -9)📝
packages/shared/src/types/game.ts(+8 -1)📝
packages/shared/src/utils/game-inventory-ops.ts(+6 -0)📝
scripts/regressions/game-checkpoint-metadata.regression.ts(+59 -4)➕
scripts/regressions/game-data-checkpoints.regression.ts(+123 -0)➕
scripts/regressions/game-data-inventory.regression.ts(+218 -0)📝
scripts/regressions/state-editor.regression.ts(+56 -0)...and 2 more files
📄 Description
Linked issue
Closes #7743 (slices 3 to 6). Stacked on #7766 (slices 1 and 2), now merged; this diff is slices 3 to 6 alone.
Why this change
#7766 made the game's own data visible and editable in the State Editor, through a checked route. This PR covers the rest of the issue: the data that already has its own routes (inventory, world, story script, party sheet, HUD widgets), a checkpoint before every save, and a way to load a checkpoint.
What changed
POST /api/game/inventoryalready applies (set, rename, give, equip, …), matched by stack id. Fields no op changes, unknown ids and bad quantities are refused before anything is sent. The route has no stale check of its own, so the stacks an edit touches are compared with what is stored right before sending.gameWorld.edits) and saves it throughPUT /api/game/:chatId/world/edits, which checks it against the world, its towns and its story. The world itself is never written.useUpdateGameWidgets(so the HUD updates at once).state_editor_savetrigger, pruned to the newest 5 like the other automatic triggers, taken after the checks and before any write. A game too new to have a snapshot has nothing to checkpoint, and that never blocks a save.docs/game/sessions-and-saves.mdsaid there was no screen to browse or restore checkpoints; it now describes the screen.gameWorldand needs the world write path to restore safely. The section and the doc say so; tracked in #7783.Commits
8ae96f4a1slice 3: inventory through ops3c6bb4d83slice 4: the world's edits layerc844aeca9slice 5: story script, party sheet and HUD widgets7b9dbbf4fslice 6: checkpoint before save, and the Checkpoints listdff723b38review fixes (the game state store on load; one request at a time; the regression's own store)5ef8cbe3fmerge ofstagingafter #7766 landedValidation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Ran a seeded game on a local server.
startingValueand turned custom widgets on, as it does for in-game edits, and the widget appeared on the HUD under its own label without a page reload.Not covered manually: a real world's edits layer (needs a generated world; the route is covered by
world-edits.regression.ts), a real ruleset party sheet save (needs a ruleset game), and the light/SillyTavern themes.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
A game without a world or a story script doesn't show those two sections, so the editor below has neither.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.