mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7736] [Feature]: Reusable State Editor, starting with roleplay game state #4270
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#4270
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 @ylli-selmani on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7736
Originally assigned to: @ylli-selmani on GitHub.
What problem does this solve?
Roleplay chats carry a lot of state that the tracker agents maintain: the scene (date, time, location, weather), present characters, persona stats, custom tracker fields, the Inventory Tracker, and active quests. Agents read it back every turn as
<current_game_state>.When an agent gets something wrong (a character who left is still "present", an item got duplicated, a quest is stuck), fixing it is awkward:
data/storage/tablesdoesn't work while the server runs. Tables live in memory and get flushed back over the files, so hand edits are lost.The client also has several separate hand-rolled raw-JSON editors (Agent Suite tracker slices and memory keys, the agent-run field in the RP HUD actions menu,
GameJsonRepairModal). Each one does its own parsing, validation and error display.Proposed solution
A reusable State Editor component in Marinara's own visual language, plus a first use: editing the current roleplay game state.
The component (
components/ui/state-editor/):Present Characters › Gwendolyn › mood) and its value. Tapping a result opens that section at that spot.UnifiedLineDiff(MariUnifiedDiff.tsx) that Prof Mari's edit review already uses.The first adapter: roleplay game state
AGENT_SUITE_TRACKER_SLICES(lib/agent-suite-tracker-slices.ts), which already definegetValueandbuildPatchwith validation for each tracker. No new data shapes.PATCH /chats/:id/game-statewithmanual: true, aimed at the snapshot'smessageId+swipeIndex. Because every swipe has its own snapshot, edits land on the turn being viewed, and swiping or regenerating keeps working as it does today.Planned slices. Each slice gets one or more commits, and the PR body lists the slices with their commit hashes:
chat.metadata.macroVariables), useful for game-mode setups that keep state in variables rather than relying on the LLM.Two PRs, so CI and review rounds stay reasonable:
Alternatives considered
Additional context
Feedback on the plan or the slice order is very welcome before slice 1 lands.
Template check
Ylli: okay, claude wrote that each slice would go as a small pr, but i was thinking of commits.. well, we'll see
@ylli-selmani commented on GitHub (Oct 16, 2026):
Closing as done for roleplay: #7737 shipped slices 1–3 (the editor, Agent Suite, chat variables) and #7739 shipped slice 5 (Fields view) plus docs.
Slice 4 (Game Mode) moves to its own issue, #7743, re-planned after kolacheee's review of what's safe to edit and how. Its prerequisite, checkpoints that also save the game's chat metadata, is #7742.
Generated by Claude Code