[PR #8403] [MERGED] feat(mari): anchor Character editor fields for Prof. Mari #8576

Closed
opened 2026-11-07 16:45:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8403
Author: @Gunterlie
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Gunterlie

Base: feat/mari-companion ← Head: feat/mari-field-anchors


📝 Commits (2)

  • 5a87989 feat(mari): anchor Character editor fields for Prof. Mari
  • 075c1b8 fix(mari): review fixes for Character editor field anchors

📊 Changes

13 files changed (+492 additions, -48 deletions)

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+50 -28)
📝 packages/client/src/components/chat/MariEditEasyViewer.tsx (+27 -2)
📝 packages/client/src/components/chat/mari/use-mari-workspace-run.ts (+13 -0)
📝 packages/client/src/components/layout/GlobalOmnibar.tsx (+7 -15)
➕ packages/client/src/hooks/use-mari-editor-fields.ts (+98 -0)
📝 packages/client/src/lib/editor-leave.ts (+9 -0)
➕ packages/client/src/lib/mari-editor-fields.ts (+95 -0)
📝 packages/client/src/lib/omnibar-completion-actions.ts (+4 -2)
📝 packages/client/src/localization/locales/en.json (+3 -0)
📝 packages/client/src/stores/ui.store.ts (+18 -1)
📝 packages/client/src/styles/mari.css (+97 -0)
➕ scripts/regressions/mari-editor-fields.regression.ts (+70 -0)
📝 scripts/regressions/tsconfig.client-lanes.json (+1 -0)

📄 Description

Linked issue

No issue: planned work, slice 2 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 (slice 1: #8401).

Why this change

Prof. Mari could not point at a real field in the Character editor, and the omnibar only guessed the focused field from the open tab (Card → Description, Convo → Greeting). The companion (slice 4) and the in-field review (slice 5) need the editor and Mari to agree on real field ids: Mari must be able to show the field she talks about, and the user must see which field she is writing while she works.

What changed

  • data-mari-field anchors on 17 Character editor fields (name, creator, version, tags, creator notes, summary, description, personality, scenario, first message, alternate greetings, example messages, system prompt, post-history instructions, backstory, appearance, depth prompt). Ids are the short keys fieldLabel() already uses.
  • One focusin listener sets activeEditorField to the real field (cleared on controls without an anchor); the tab guess is removed.
  • Reveal: openCharacterDetail takes a revealField; the editor scrolls to the field (existing reduced-motion-aware scroll) and pulses it once. Used by the omnibar open-field completion action and a new "Open at this field" link on character change-card rows (only for anchored fields). A refused editor leave drops the reveal with the navigation.
  • Working glow: while a running app_data character.update step (server action aliases included) writes a field of the open character, that field gets a faint edge glow; only that step's tool_end or the run end clears it. If the field is scrolled out of view, a "Prof. Mari is here" chip button at the editor edge scrolls back to it.
  • Shared confirmEditorLeave in lib/editor-leave.ts, used by the omnibar and the change card.
  • Glow and pulse animate opacity only; static with reduced motion. Three English strings; regression scripts/regressions/mari-editor-fields.regression.ts.

Not in this PR: hovering a change-card row to pulse the field (comes with the floating companion in slice 4, while Mari is still a modal); anchors on Convo-tab and lazy sections.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Agent-run (not manual): pnpm check exit 0 (one pre-existing warning in HomeProfessorMariChat.tsx, not touched here); node ./scripts/run-regressions.mjs --filter scripts/regressions/mari-editor-fields.regression.ts passed; Playwright on a throwaway instance at 1440 and 390 px confirmed focus → field id, reveal scroll + pulse, glow and the off-screen chip (glow/chip driven by setting the store value, no model run). An Opus read-only review found 8 issues; all fixed in the second commit.

To verify manually:

  1. Focus Backstory, open the omnibar: the Mari suggestion names Backstory. Focus Title/comment: it no longer names a field.
  2. Ask Prof. Mari to change the Scenario of the open character (Manual mode). While the step runs, Scenario has a faint glow; scroll away and the "Prof. Mari is here" chip appears; click it to scroll back.
  3. On her change card, click "Open at this field" on the Scenario row: the omnibar closes, the editor scrolls to Scenario and pulses it once. Rows like avatar have no link.
  4. With unsaved edits in character A, click "Open at this field" on a change card for character B: one leave prompt only; cancelling keeps A open and nothing pulses later.
  5. Repeat 2–3 at 390 px and with reduced motion on (no animation).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Screenshots of the pulse, the glow and the off-screen chip at 1440 and 390 px were taken locally (.tmp/mari-companion/slice2/); attach on request.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8403 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `feat/mari-companion` ← **Head:** `feat/mari-field-anchors` --- ### 📝 Commits (2) - [`5a87989`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5a87989a274f114597b4e08d8cfa964623f56f9f) feat(mari): anchor Character editor fields for Prof. Mari - [`075c1b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/075c1b8520ccfea8abb90fdad7ccf501a8418561) fix(mari): review fixes for Character editor field anchors ### 📊 Changes **13 files changed** (+492 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+50 -28) 📝 `packages/client/src/components/chat/MariEditEasyViewer.tsx` (+27 -2) 📝 `packages/client/src/components/chat/mari/use-mari-workspace-run.ts` (+13 -0) 📝 `packages/client/src/components/layout/GlobalOmnibar.tsx` (+7 -15) ➕ `packages/client/src/hooks/use-mari-editor-fields.ts` (+98 -0) 📝 `packages/client/src/lib/editor-leave.ts` (+9 -0) ➕ `packages/client/src/lib/mari-editor-fields.ts` (+95 -0) 📝 `packages/client/src/lib/omnibar-completion-actions.ts` (+4 -2) 📝 `packages/client/src/localization/locales/en.json` (+3 -0) 📝 `packages/client/src/stores/ui.store.ts` (+18 -1) 📝 `packages/client/src/styles/mari.css` (+97 -0) ➕ `scripts/regressions/mari-editor-fields.regression.ts` (+70 -0) 📝 `scripts/regressions/tsconfig.client-lanes.json` (+1 -0) </details> ### 📄 Description ## Linked issue No issue: planned work, slice 2 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` (slice 1: #8401). ## Why this change Prof. Mari could not point at a real field in the Character editor, and the omnibar only guessed the focused field from the open tab (Card → Description, Convo → Greeting). The companion (slice 4) and the in-field review (slice 5) need the editor and Mari to agree on real field ids: Mari must be able to show the field she talks about, and the user must see which field she is writing while she works. ## What changed - `data-mari-field` anchors on 17 Character editor fields (name, creator, version, tags, creator notes, summary, description, personality, scenario, first message, alternate greetings, example messages, system prompt, post-history instructions, backstory, appearance, depth prompt). Ids are the short keys `fieldLabel()` already uses. - One `focusin` listener sets `activeEditorField` to the real field (cleared on controls without an anchor); the tab guess is removed. - Reveal: `openCharacterDetail` takes a `revealField`; the editor scrolls to the field (existing reduced-motion-aware scroll) and pulses it once. Used by the omnibar `open-field` completion action and a new "Open at this field" link on character change-card rows (only for anchored fields). A refused editor leave drops the reveal with the navigation. - Working glow: while a running `app_data` `character.update` step (server action aliases included) writes a field of the open character, that field gets a faint edge glow; only that step's `tool_end` or the run end clears it. If the field is scrolled out of view, a "Prof. Mari is here" chip button at the editor edge scrolls back to it. - Shared `confirmEditorLeave` in `lib/editor-leave.ts`, used by the omnibar and the change card. - Glow and pulse animate opacity only; static with reduced motion. Three English strings; regression `scripts/regressions/mari-editor-fields.regression.ts`. Not in this PR: hovering a change-card row to pulse the field (comes with the floating companion in slice 4, while Mari is still a modal); anchors on Convo-tab and lazy sections. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Agent-run (not manual): `pnpm check` exit 0 (one pre-existing warning in `HomeProfessorMariChat.tsx`, not touched here); `node ./scripts/run-regressions.mjs --filter scripts/regressions/mari-editor-fields.regression.ts` passed; Playwright on a throwaway instance at 1440 and 390 px confirmed focus → field id, reveal scroll + pulse, glow and the off-screen chip (glow/chip driven by setting the store value, no model run). An Opus read-only review found 8 issues; all fixed in the second commit. To verify manually: 1. Focus Backstory, open the omnibar: the Mari suggestion names Backstory. Focus Title/comment: it no longer names a field. 2. Ask Prof. Mari to change the Scenario of the open character (Manual mode). While the step runs, Scenario has a faint glow; scroll away and the "Prof. Mari is here" chip appears; click it to scroll back. 3. On her change card, click "Open at this field" on the Scenario row: the omnibar closes, the editor scrolls to Scenario and pulses it once. Rows like avatar have no link. 4. With unsaved edits in character A, click "Open at this field" on a change card for character B: one leave prompt only; cancelling keeps A open and nothing pulses later. 5. Repeat 2–3 at 390 px and with reduced motion on (no animation). ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Screenshots of the pulse, the glow and the off-screen chip at 1440 and 390 px were taken locally (`.tmp/mari-companion/slice2/`); attach on request. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:45:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8576
No description provided.