mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8411] [MERGED] feat(mari): review Prof. Mari's held change inside the Character editor fields #8584
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#8584
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/8411
Author: @Gunterlie
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Gunterlie
Base:
feat/mari-companion← Head:feat/mari-in-field-review📝 Commits (1)
a6e4594feat(mari): review Prof. Mari's held character change inside the fields📊 Changes
9 files changed (+1220 additions, -413 deletions)
View changed files
📝
packages/client/src/components/characters/CharacterEditor.tsx(+485 -403)➕
packages/client/src/components/characters/MariFieldReview.tsx(+321 -0)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+74 -0)📝
packages/client/src/components/chat/MariChangeReceipt.tsx(+2 -2)📝
packages/client/src/lib/mari-editor-fields.ts(+135 -6)📝
packages/client/src/localization/locales/en.json(+16 -0)📝
packages/client/src/stores/ui.store.ts(+7 -0)📝
packages/client/src/styles/mari.css(+118 -2)📝
scripts/regressions/mari-editor-fields.regression.ts(+62 -0)📄 Description
Linked issue
No issue: planned work, slice 5 of the Professor Mari companion feature (Prof. Mari floats next to real editors and live-edits them). Slices are PRed into the integration branch
feat/mari-companion(slices 1–4: #8401, #8403, #8405, #8406, #8407).Why this change
A held (waiting-for-approval) change from Prof. Mari was only visible on her card in the chat, away from the field it changes. The agreed design: while a change waits, each changed field shows her diff in place, with Keep / Not this one / Edit / Next at the field, so the user decides where they read and write.
What changed
components/characters/MariFieldReview.tsx(new): the in-field review box (struck old words, green new words, the sameTextBodyas her card), "Keep all N" (just "Keep" for one field), Not this one, Edit, Next; keyboard Ctrl/Cmd+Enter keep, Esc reject, Tab next. After Keep: "Edited by Prof. Mari · Undo" (+ "Saved your unsaved text too" when Keep saved the user's text first). A visible line says when Keep also applies changes outside this character.CharacterEditor.tsx: 8 textareas wrapped in<MariFieldReview>(the large diff is re-indent;git diff -wshows the real change). Keep saves the user's unsaved text first; fields taken over with Edit are restored as unsaved text after Keep (per character, cleared on failed save or character switch).HomeProfessorMariChat.tsx: publishes the waiting / busy / kept review from her last message (mariHeldChanges, held calls, deferred mutations) toui.store(mariFieldReview, transient). Keep sends the existing Accept chip, Not this one sends the decline chip plus "Propose the change again without the X field.", Undo uses the existinganswerAll(…, false). Actions report whether the send started, so a blocked send (no connection, busy) leaves the review in place.lib/mari-editor-fields.ts: pure helpersheldCharacterFields,keptCharacterFields,characterFieldValue,withCharacterFieldValue, sharedcharacterPatchValues; regression extended.MariChangeReceipt.tsx: exportsTextBodyandundoLabelfor reuse.mari.css: review box styles (faint static edge, 2.75rem touch buttons).en.json:mari.fieldReview.*keys.No new approval contract: accept is whole-change, as agreed.
Scope cuts (open for follow-up):
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run (not manual): client
tsc -bexit 0; client build exit 0; ESLint clean on touched files (one pre-existing warning inHomeProfessorMariChat.tsx:387); Prettier,localization:checkand themari-editor-fieldsregression pass. Two Opus read-only review passes: first found 2 high (stale Edit text restored, possibly into another character; "Not this one" state leaking across characters), 3 medium (double Keep / Keep into another thread; textarea unmounting while typing; focus lost) and low issues; second pass found a blocked send hiding the review. All fixed.Playwright on a throwaway instance (empty data, no model; the held turn is seeded through the chat API and Accept runs the real server path), 50/50 checks at 1440 / 1024 / 390 px: diff in field, Keep and Ctrl+Enter, Esc declines without closing her, Tab / Next, Edit, Undo incl. conflict, saved-unsaved message, failed save sends nothing, review waits while typing, focus return, no-connection Keep / Not this one leave the review, 390 px no horizontal scroll. Not yet run with a real model.
To verify manually:
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)
Screenshots at 1440, 1024 and 390 px are local (
.tmp/mari-companion/slice5/); attach on request. They match the approved mockup (1440-review,1440-kept,1440-not-this-one).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.