mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6327] [MERGED] feat(game): ruleset sheets on characters and personas (rulesets slice 3) #7137
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#7137
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/6327
Author: @kolacheee
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @kolacheee
Base:
staging← Head:feat/rulesets-sheets📝 Commits (2)
f5ea468feat(game): store and edit ruleset sheets on characters and personas8f3a181fix(game): refuse oversized ruleset sheet edits and report a failed ruleset read📊 Changes
24 files changed (+1042 additions, -13 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/characters/colors-and-stats.md(+16 -0)📝
docs/characters/personas.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+9 -1)📝
packages/client/src/components/characters/CharacterEditor.tsx(+6 -0)📝
packages/client/src/components/personas/PersonaEditor.tsx(+9 -0)➕
packages/client/src/components/rulesets/RulesetSheetEditor.tsx(+416 -0)➕
packages/client/src/components/rulesets/RulesetSheetsSection.tsx(+186 -0)📝
packages/client/src/hooks/use-capability-packages.ts(+11 -0)📝
packages/client/src/localization/locales/en.json(+22 -0)📝
packages/server/src/routes/capability-packages.routes.ts(+10 -1)📝
packages/server/src/services/game/ruleset-registry.service.ts(+11 -4)📝
packages/server/src/services/import/marinara.importer.ts(+21 -1)📝
packages/server/src/services/import/st-character.importer.ts(+13 -2)📝
packages/shared/src/features/rulesets/sheet-math.ts(+6 -3)📝
packages/shared/src/schemas/character.schema.ts(+3 -0)📝
packages/shared/src/schemas/persona.schema.ts(+8 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+65 -0)📝
packages/shared/src/types/character.ts(+3 -0)📝
packages/shared/src/types/persona.ts(+2 -0)...and 4 more files
📄 Description
Linked issue
Part of #6314 (slice 3 of 7; it does not close the issue). Builds on #6323 (slice 2, merged).
Why this change
What changed
rulesetSheets, keyed by ruleset id, oncharacter.data.extensionsandpersona.personaStats. The boundary checks only what holds for any ruleset (a usable key, an object, 64 KB per sheet, 32 sheets) and never the sheet's shape, because the ruleset may not be installed. Keep dormant, never drop.normalizePersonaStats.extensionsandpersonaStatswholesale, so sheets travel.RulesetSheetEditorin both Stats tabs, one collapsible entry per installed ruleset. Dormant sheets show as one line with Remove. Values are clamped when edited, never when read.abilityModFromField, which is also what the editor shows, so the two cannot disagree.GET /api/capability-packages/rulesets.scripts/regressions/game-ruleset-sheets-storage.regression.ts(boundary, cards, personas, native and SillyTavern imports against a real store), plus one row ingame-ruleset-checks.regression.tsfor the stale choice.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Commands run locally by the agent:
pnpm check(exit 0),pnpm localization:check, and the storage regression. The agent also drove a scratch server on port 7820 with the 5e package installed: the block rendered in the character Stats tab in dark mode, DEX 16 and level 5 recomputed proficiency +3 and Stealth expertise +9, Save persisted the sheet, a dormantKenhito/v20sheet was kept and shown as one line, the Compatible JSON export carried both sheets, and live geometry at 400 px showed no overflow. A test character holding an unreadable 5e sheet showed "Cannot be edited here" with Remove this sheet as the only button. Four local CodeRabbit sweeps were run before opening; the last returned no findings.Still to verify by hand:
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
CHANGELOG.md,docs/characters/colors-and-stats.md,docs/characters/personas.md, the plan. The[docs-i18n]follow-up is batched for the ruleset slices.UI evidence (if applicable)
To be added by a human: light, dark and 400 px screenshots of the Ruleset sheets block.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.