mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7793] [MERGED] feat(state-editor): fill in empty values and add entries from the Fields view #7931
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#7931
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/7793
Author: @ylli-selmani
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ylli-selmani
Base:
staging← Head:feat/state-editor-field-add📝 Commits (9)
48e9a48feat(state-editor): fill in empty values and add entries from the Fields view83e4a9cfix(state-editor): review fixes for the Fields view03f5ce4fix(state-editor): reveal row controls by hover capability, not viewport936c579fix(state-editor): key the row shapes by the names the sections useb030cbefix(state-editor): row shape for a section that is one list, and a wider × hit area5bab059fix(state-editor): give a list name the shape its own section declaresb963ba5fix(state-editor): anchor the on/off knob to its track3de317bfix(state-editor): let entry cards grow, and give null fields a way back9036098fix(state-editor): repair a comment a backtick escape mangled📊 Changes
6 files changed (+474 additions, -32 deletions)
View changed files
📝
docs/roleplay/hud-and-trackers.md(+5 -1)📝
packages/client/src/components/ui/state-editor/StateEditor.tsx(+4 -0)📝
packages/client/src/components/ui/state-editor/StateFieldsView.tsx(+254 -28)📝
packages/client/src/lib/state-editor/state-editor-json.ts(+92 -0)📝
packages/client/src/localization/locales/en.json(+11 -3)📝
scripts/regressions/state-editor.regression.ts(+108 -0)📄 Description
Linked issue
Closes #7792
Why this change
"date": null) rendered as "No value. Set one in the JSON view." — dead text. Adding or removing an entry (a stat, a custom field, a character) meant switching to JSON and editing it by hand.What changed
"",0orfalse, so the field becomes editable. The × beside a value puts it back tonull, which is how the game stores a field the trackers didn't know — and how adatecan go back to being unknown.blankStateValueLikeclones the nearest entry with its values cleared. For an empty list there is nothing to copy, soblankStateArrayItemstarts from the shapeGameStatedeclares for that key:worldCustomFields→{ name, value, icon },stats→{ name, value, max, color }, inventory rows →{ name, qty, description, location }, inventory items →{ name, description, quantity, location }. That is why a custom field added from scratch still has its Icon row.shapeStateEntrylays the declared keys under the stored values, so an entry the agent wrote as{ "name": "Guard" }shows Value and Icon as No value. Those rows reach the draft only when one of them is edited.characterId) and active quests (questEntryId) — keep the generic Add field row rather than starting from an empty-id card. That is a follow-up, not a silent gap.docs/roleplay/hud-and-trackers.mdcovers the kind chooser, add/remove, the declared empty shapes and the half-filled rows.scripts/regressions/state-editor.regression.tspins the clearing rule, the empty-list shapes, cloning over declared shapes, andshapeStateEntry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run on this branch's own worktree (dev stack on port 6990). The boxes above are still a to-do list for a human.
pnpm check— exit 0 (format, lint, localization, type checks, full build).node ./scripts/run-regressions.mjs --filter scripts/regressions/state-editor.regression.ts— passed.date,timeandweatherarenullshows the three kind choices on those rows; picking Number writes0, and the × returns the row to No value.{ "name": "Guard" }, set through the JSON view) shows Name = Guard with Value and Icon as No value.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 half-filled entry shows what it is missing.
{ "name": "Guard" }shows Value and Icon as No value, next to the Scene's own null fields:Phone, 390×844.
Text / Number / On/offon the empty Scene values, and the per-value × visible without hover:A custom field added from an empty list starts with Name, Value and Icon:
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.