mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8524] [MERGED] fix(mari): her field context follows the focused editor field #8653
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#8653
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/8524
Author: @Gunterlie
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @Gunterlie
Base:
staging← Head:fix/mari-companion-field-focus📝 Commits (3)
bd72ea0fix(mari): her field context follows the focused editor field8de789efix(mari): field chip follows @ picks and record switches, sends current field text5dbcd19fix(mari): cap field draft text at the route schema limits📊 Changes
8 files changed (+135 additions, -23 deletions)
View changed files
📝
packages/client/src/components/characters/MariFieldReview.tsx(+1 -1)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+86 -10)📝
packages/client/src/components/layout/GlobalOmnibar.tsx(+1 -0)📝
packages/client/src/components/layout/omnibar/OmnibarMariPane.tsx(+3 -0)📝
packages/client/src/lib/mari-editor-fields.ts(+3 -2)📝
packages/client/src/styles/globals.css(+3 -1)📝
packages/client/src/styles/mari.css(+35 -9)📝
scripts/regressions/mari-editor-fields.regression.ts(+3 -0)📄 Description
Linked issue
No issue: follow-up to the Professor Mari companion (#8418), from maintainer testing.
Why this change
While Prof. Mari sat beside the Character editor, clicking another field did not change her field context: she kept talking about the field that had focus when she opened. Nothing in the editor showed which field she was looking at. After Keep, the "Edited by Prof. Mari · Undo" line under the field was tiny and hard to see.
What changed
HomeProfessorMariChat.tsx: in companion mode (desktop panel or phone sheet), focusing another anchored field of the open editor moves her field chip there (existingwithEditorField, now through onewithCapturedEditorFieldhelper shared with the "@" pick, so the field's unsaved text goes with it and the old field's draft is dropped). Not in the modal window, not for focus inside her panel or unanchored controls; ids are compared, so a chip the user removed stays removed when they refocus the same field.data-mari-focus(only for the open editor's record; the focused element wins when two anchors share an id, e.g. the header and Metadata Name). Cleared when the chip is removed, she closes, the mode changes or the character changes.mari.css/globals.css: the mark is a faint static 1px edge in the character type gradient (.mari-panel-gradient--characters, no new colours); it yields to the reveal pulse and does not touch the working glow.MariFieldReview.tsx+mari.css: the kept line is a calm band in the same gradient, readable text, her avatar, Undo as a real button (2.75rem on touch), 0.5rem spacing.GlobalOmnibar.tsx,OmnibarMariPane.tsx: passeditorCompanionto her chat.No new copy.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run (not manual): client build incl.
tscpasses; ESLint clean on touched files (one pre-existing warning,serverRun); Prettier clean;mari-editor-fields,omnibar-settings-sync,mobile-safe-area-insetregressions pass. Opus read-only review: 1 medium (wrong Name anchor marked) and 3 low issues, all fixed. Playwright on a throwaway instance (no model), 37/37 at 1440 (panel) and 390 (sheet): chip and mark follow Description → Personality, click in her panel changes nothing, removing the chip clears the mark and refocus does not bring it back, modal window does not follow, Metadata Name marks the right anchor, typed text goes with the moved chip, tab switch keeps the mark, kept line before/after.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 are local (
.tmp/mari-companion/focus/: 1440 dark/light, 390, kept line before/after); attach on request.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.