mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7972] [MERGED] feat(cards): generate individual fields from editor drafts #8033
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#8033
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/7972
Author: @SpicyMarinara
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/7968-card-field-generation📝 Commits (10+)
f1838b2feat(cards): support seven editable fields for characters and personas1b16a81feat(cards): generate individual sections from editor drafts08ddb5cfeat(personas): include authored dialogue examples in prompt cards0b84c22fix(personas): retain dialogue in preset preview and game context3542935fix(personas): use authored summaries in library search11e8c3dfix(personas): display authored summaries in library previews7c3a9f6feat(cards): add seeded field generation to character and persona editors21b38b6docs: explain card field wands and retain editor browser coverage827a2a2fix(cards): keep new persona fields consistent across existing consumersc4a1288fix(personas): localize new summary and dialogue history labels📊 Changes
49 files changed (+2231 additions, -164 deletions)
View changed files
📝
docs/characters/creating-and-editing-characters.md(+15 -1)📝
docs/characters/personas.md(+10 -0)📝
e2e/bot-browser-download.e2e.ts(+132 -1)➕
e2e/card-field-generation.e2e.ts(+355 -0)📝
packages/client/src/components/bot-browser/BotBrowserView.tsx(+2 -0)➕
packages/client/src/components/characters/CardFieldWand.tsx(+29 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+110 -70)📝
packages/client/src/components/characters/CharacterLibraryView.tsx(+28 -14)📝
packages/client/src/components/panels/CharactersPanel.tsx(+1 -0)📝
packages/client/src/components/panels/PersonasPanel.tsx(+3 -1)📝
packages/client/src/components/personas/PersonaEditor.tsx(+119 -29)➕
packages/client/src/hooks/use-card-field-generation.ts(+97 -0)📝
packages/client/src/lib/card-library-search.ts(+2 -0)📝
packages/client/src/localization/locales/en.json(+12 -1)📝
packages/server/src/db/schema/characters.ts(+2 -0)📝
packages/server/src/routes/backup.routes.ts(+2 -0)📝
packages/server/src/routes/characters.routes.ts(+52 -0)📝
packages/server/src/routes/chats.routes.ts(+35 -0)📝
packages/server/src/routes/game.routes.ts(+30 -12)📝
packages/server/src/routes/generate.routes.ts(+3 -0)...and 29 more files
📄 Description
Linked issue
Closes #7968
Why this change
Authors should be able to expand one Character or Persona card section from a few keywords while keeping the rest of their draft as reference, without opening Professor Mari.
What changed
Hosted review
Dottore completed full examinations of the feature, including exact head
a3c7bcb13within the then-approved $3 limit. Valid findings are repaired with failing-before/passing-after proof: reference-field edits no longer discard generation; Persona dialogue is searchable and displayed; Game setup resolves its speaker macros; creator notes remain searchable beside an explicit summary; Mari accepts summary/dialogue in top-level creation and top-level/nested updates, including explicit clearing; and Peek Prompt avoids duplicating resolved dialogue from{{persona}}, including stochastic macros. Resolved-leaf observations are candidate text checked against the actual messages; fresh fallback uses the final preset variables and agent data. Disabled/unselected/false branches still receive missing dialogue.Two earlier lower-priority suggestions were investigated and rejected with evidence in their threads: 502 is the intentional invalid-upstream-response contract, and the normal dry-run/live dialogue leaves are byte-identical (the report compared a separate custom-debug mode). The optional
mesExamplealias is not part of the supported Persona input contract; canonicalmes_examplecreate/update/clear is retained and tested. Server search/detail definitions omitted from the incremental packet were checked directly and covered by real browser query controls. Raw imported field text remains deliberately unnormalized, and the independently localized seed-help sentence remains appended after each field's existing placeholder. The completed incremental examination of461e1149afound a real shared macro-budget regression, repaired in418b3b767with fresh options per root and the nested guard preserved. Complete example text already in messages is intentionally deduplicated globally, including literal quotes. Independent review reproduced and repaired a separate multiline edge: a quote of only the first line no longer hides absent later lines. Broader requests to rewrite sibling Persona fields and Character fallback concern blocks byte-identical to pre-featureba65f9047; their non-regression disposition is recorded in the threads. The completed exact-head418b3b767incremental examination verified the budget repair and repeated only the already-investigated corpus-provenance LOW. That suggestion is rejected with source and actual-API proof in the final disposition. Its test-visibility UNKNOWN is a packet limitation: both runnable regression bodies are committed and their direct proof passed. All review threads are resolved; this does not claim the reviewer reported zero findings.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated evidence
pnpm check: passed on the final source committed as418b3b767(localization, formatting, types/lint, E2E types, production client/server builds).418b3b767, with zero failures. All ten platform artifact jobs passed on their first attempt, including native Windows and all four container variants. Earlier installer timeout/replay evidence is preserved separately and is not needed for this head. Required code analysis was still running when this evidence was recorded.db-review-durability,decision-authoring) passed after the creation-default fix; retained coverage verifies both tool and CLI creation, defaults and authored-field readback.418b3b767, across XML/markdown/none. Coverage includes Persona and nested Character markers, upper/lower transforms with Unicode, disabled sections/groups, selected/unselected/unused choices, false conditionals and ordinary fallback, with resolved preset variables and exactly one complete dialogue. Complete quoted dialogue is deduplicated; a partial prefix or first-line quote cannot hide missing text. Stochastic/Unicode duplication and multiline first-line suppression have failing-before/passing-after proof. The comparison key was independently checked against JS case conversion over all Unicode scalar values; no prompt text is normalized by this comparison.{{persona}}(exactly one resolved example and no metadata summary); Mari direct-field creation and single-field top-level/nested updates, including empty/whitespace clearing and omitted/non-string preservation; and the shared search helper with independent creator-note and summary queries. Each reported defect has failing-before proof.pnpm regression:prompt: all three prompt/attachment/context-fit suites passed at418b3b767. The new assembler budget regression passes both deferral modes with independent variables, three sections exceeding 2000 aggregate tracked operations, fallback summary effects, exact observed example text, and nested runaway-limit enforcement. Final public card-field API, persisted Persona dialogue, and Game Experience regressions also passed, including actual HTTP disconnect cancellation.e2e/card-field-generation.e2e.ts: 12/12 passed across desktop Chromium, mobile Chromium and mobile WebKit. Six additional visual runs passed with 24 inspected dark/light PNGs.60f027db7across all three projects, checking independent summary, creator-note and dialogue queries with negative controls, tag-filtered panel results and Library details. Desktop shell smoke passed 7/7. The subsequent clearing/Peek-test correction does not change the client source.@smoke: 7/7 passed after the review repairs.ResolveMacroOptions.onPersonaExampleResolvedis already declared inmacro-engine.ts:139, and the full TypeScript/server build passed. No source change was needed for that claim; no substantive local finding remains unresolved.Manual verification notes
418b3b767.Docs and release impact
English guides are included in this PR; #7975 tracks every translated documentation pack. No version bump or release changelog change is part of this feature.
UI evidence (if applicable)
Retained Playwright cases exercise both editors on desktop Chromium, mobile Chromium and mobile WebKit, with dark/light screenshots. They cover seven field seeds/reference drafts, target-only updates, save/reopen, API failure, newer typing and entity navigation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.