[PR #8418] [MERGED] feat(mari): Prof. Mari companion next to the Character editor #8589

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

📋 Pull Request Information

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

Base: staging ← Head: feat/mari-companion


📝 Commits (10+)

  • 78c64eb fix(characters): merge refetched edits into an unsaved Character editor form
  • 998bb7e fix(characters): keep the merge base until the save lands; guard the conflict action
  • 61300af Merge pull request #8401 from Pasta-Devs/fix/mari-character-form-rebase
  • 5a87989 feat(mari): anchor Character editor fields for Prof. Mari
  • 075c1b8 fix(mari): review fixes for Character editor field anchors
  • cd0941d Merge pull request #8403 from Pasta-Devs/feat/mari-field-anchors
  • 65bca12 fix(mari): header focus and Open-at-field on held character cards
  • 3215ae8 Merge pull request #8405 from Pasta-Devs/fix/mari-field-anchors-live
  • 5aa25d8 feat(mari): send the focused field's unsaved text and selection to Prof. Mari
  • f55525a feat(mari): Prof. Mari floats as a companion panel next to the Character editor

📊 Changes

33 files changed (+2725 additions, -466 deletions)

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+559 -415)
➕ packages/client/src/components/characters/MariFieldReview.tsx (+321 -0)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+93 -0)
📝 packages/client/src/components/chat/MariApprovalCards.tsx (+22 -0)
📝 packages/client/src/components/chat/MariChangeReceipt.tsx (+2 -2)
📝 packages/client/src/components/chat/MariEditEasyViewer.tsx (+44 -3)
📝 packages/client/src/components/chat/mari/MariOmnibarHeaderChrome.tsx (+5 -1)
📝 packages/client/src/components/chat/mari/mari-chat-helpers.tsx (+26 -0)
📝 packages/client/src/components/chat/mari/use-mari-workspace-run.ts (+13 -0)
📝 packages/client/src/components/layout/GlobalOmnibar.tsx (+130 -34)
📝 packages/client/src/components/layout/GlobalOmnibarHost.tsx (+3 -0)
📝 packages/client/src/components/layout/omnibar/OmnibarMariPane.tsx (+5 -1)
➕ packages/client/src/components/layout/omnibar/use-mari-companion.tsx (+336 -0)
➕ packages/client/src/hooks/use-mari-editor-fields.ts (+132 -0)
📝 packages/client/src/hooks/use-settings-sync.ts (+4 -0)
📝 packages/client/src/lib/editor-leave.ts (+9 -0)
➕ packages/client/src/lib/form-rebase.ts (+30 -0)
➕ packages/client/src/lib/mari-editor-fields.ts (+242 -0)
📝 packages/client/src/lib/omnibar-completion-actions.ts (+4 -2)
📝 packages/client/src/lib/professor-mari-command-center-context.ts (+10 -1)

...and 13 more files

📄 Description

Linked issue

No issue: planned work. Integration branch for the Professor Mari companion feature (Prof. Mari floats next to the editor and live-edits it). Each slice was reviewed and merged into feat/mari-companion on its own PR: #8401, #8403, #8405, #8406, #8407, #8411, #8417. More editors (persona, lorebook, preset/agent/tool) follow later in separate PRs.

Why this change

Prof. Mari could change a character, but she worked in a modal window away from the fields: the user could not see the field she was talking about, a Save in the open editor could overwrite her change, and her held changes could only be reviewed on her chat card. This brings her next to the Character editor and her changes into the fields.

What changed

  • Save no longer overwrites her change (#8401): the Character editor merges unsaved form edits with server refetches (lib/form-rebase.ts) instead of keeping a stale form.
  • Field anchors (#8403, #8405): data-mari-field on Character fields; the focused field goes into her context; "Open at this field" on her change cards; field glow while she works.
  • Unsaved field text to her (#8406): Cmd+K / Cmd+J send the focused field's unsaved text and selection as context.fieldDraft (capped, marked as untrusted user text in the prompt; not stored for list fields).
  • Companion panel on desktop (#8407): with an editor open (≥ 1024 px) she is a non-modal floating panel at the left; the header stays full width and only the field column shifts. Resizable, toggle to the window, remembered.
  • In-field review (#8411): while her change waits, each changed field shows the diff in place with Keep / Not this one / Edit / Next (Ctrl/Cmd+Enter, Esc, Tab). Keep saves the user's unsaved text first; Undo after Keep.
  • Bottom sheet on phone and tablet (#8417): below 1024 px with an editor open she is a sheet (peek / half / full); a held change drops it to peek and scrolls to the first changed field.

Only the Character editor opts in so far. No editor open → unchanged window. No new top-bar buttons; the phone pull-down door is unchanged. No approval contract change: accept is whole-change.

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 per slice (details in each slice PR): client tsc -b and build, ESLint, Prettier, localization:check, the form-rebase, mari-editor-fields, command-center, mari-polish and Prof. Mari documentation regressions. Every slice had an Opus read-only review; all findings were fixed before merge. Playwright on throwaway instances: slice 4 38/38, slice 5 50/50, slice 6 61/61 (Chromium mobile emulation, not real iOS / Android). Slices 1–3 were live-tested with a real model (MiniMax M3 via NanoGPT); slices 4–6 were tested with a seeded held change, not with a real model. GitHub CI passed on every slice PR. staging (10 commits ahead) merges into this branch without conflicts.

To verify manually:

  1. Desktop: open a character, open Prof. Mari: she floats at the left, the editor stays usable.
  2. Ask her to change Description + Personality (Manual mode): both fields show her diff; Keep all 2, then Undo.
  3. Type in Description, then ask her again: your typed text is saved with her change and the field says so.
  4. Save in the editor after she changed a field: her change stays.
  5. Phone: same flow in the bottom sheet; the sheet drops to peek when her change arrives.
  6. Real iOS Safari and Android: typing state and the pull-down door.

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 for each slice are in the slice PRs' notes (local .tmp/mari-companion/slice4–slice6); 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/8418 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/mari-companion` --- ### 📝 Commits (10+) - [`78c64eb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78c64ebc89249cf4383ad6b480a1fbb9f247f9b1) fix(characters): merge refetched edits into an unsaved Character editor form - [`998bb7e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/998bb7e2e8145abc3905545519ef89245e0aa8d2) fix(characters): keep the merge base until the save lands; guard the conflict action - [`61300af`](https://github.com/Pasta-Devs/Marinara-Engine/commit/61300af7ca1d31bf81c065263b517cb0837be84e) Merge pull request #8401 from Pasta-Devs/fix/mari-character-form-rebase - [`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 - [`cd0941d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd0941d1e48ea2b2827378b5fa81f65ecf6391b5) Merge pull request #8403 from Pasta-Devs/feat/mari-field-anchors - [`65bca12`](https://github.com/Pasta-Devs/Marinara-Engine/commit/65bca1276aead709b9458c84d99ca90f3dee3815) fix(mari): header focus and Open-at-field on held character cards - [`3215ae8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3215ae8dfbee935751f2ea6b8c306dff24eccc9c) Merge pull request #8405 from Pasta-Devs/fix/mari-field-anchors-live - [`5aa25d8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5aa25d8afa338a25e7c2029e90632dd5b5dd1775) feat(mari): send the focused field's unsaved text and selection to Prof. Mari - [`f55525a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f55525a75672f7431a7e7f2cc0f796a24cd86f85) feat(mari): Prof. Mari floats as a companion panel next to the Character editor ### 📊 Changes **33 files changed** (+2725 additions, -466 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+559 -415) ➕ `packages/client/src/components/characters/MariFieldReview.tsx` (+321 -0) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+93 -0) 📝 `packages/client/src/components/chat/MariApprovalCards.tsx` (+22 -0) 📝 `packages/client/src/components/chat/MariChangeReceipt.tsx` (+2 -2) 📝 `packages/client/src/components/chat/MariEditEasyViewer.tsx` (+44 -3) 📝 `packages/client/src/components/chat/mari/MariOmnibarHeaderChrome.tsx` (+5 -1) 📝 `packages/client/src/components/chat/mari/mari-chat-helpers.tsx` (+26 -0) 📝 `packages/client/src/components/chat/mari/use-mari-workspace-run.ts` (+13 -0) 📝 `packages/client/src/components/layout/GlobalOmnibar.tsx` (+130 -34) 📝 `packages/client/src/components/layout/GlobalOmnibarHost.tsx` (+3 -0) 📝 `packages/client/src/components/layout/omnibar/OmnibarMariPane.tsx` (+5 -1) ➕ `packages/client/src/components/layout/omnibar/use-mari-companion.tsx` (+336 -0) ➕ `packages/client/src/hooks/use-mari-editor-fields.ts` (+132 -0) 📝 `packages/client/src/hooks/use-settings-sync.ts` (+4 -0) 📝 `packages/client/src/lib/editor-leave.ts` (+9 -0) ➕ `packages/client/src/lib/form-rebase.ts` (+30 -0) ➕ `packages/client/src/lib/mari-editor-fields.ts` (+242 -0) 📝 `packages/client/src/lib/omnibar-completion-actions.ts` (+4 -2) 📝 `packages/client/src/lib/professor-mari-command-center-context.ts` (+10 -1) _...and 13 more files_ </details> ### 📄 Description ## Linked issue No issue: planned work. Integration branch for the Professor Mari companion feature (Prof. Mari floats next to the editor and live-edits it). Each slice was reviewed and merged into `feat/mari-companion` on its own PR: #8401, #8403, #8405, #8406, #8407, #8411, #8417. More editors (persona, lorebook, preset/agent/tool) follow later in separate PRs. ## Why this change Prof. Mari could change a character, but she worked in a modal window away from the fields: the user could not see the field she was talking about, a Save in the open editor could overwrite her change, and her held changes could only be reviewed on her chat card. This brings her next to the Character editor and her changes into the fields. ## What changed - **Save no longer overwrites her change** (#8401): the Character editor merges unsaved form edits with server refetches (`lib/form-rebase.ts`) instead of keeping a stale form. - **Field anchors** (#8403, #8405): `data-mari-field` on Character fields; the focused field goes into her context; "Open at this field" on her change cards; field glow while she works. - **Unsaved field text to her** (#8406): Cmd+K / Cmd+J send the focused field's unsaved text and selection as `context.fieldDraft` (capped, marked as untrusted user text in the prompt; not stored for list fields). - **Companion panel on desktop** (#8407): with an editor open (≥ 1024 px) she is a non-modal floating panel at the left; the header stays full width and only the field column shifts. Resizable, toggle to the window, remembered. - **In-field review** (#8411): while her change waits, each changed field shows the diff in place with Keep / Not this one / Edit / Next (Ctrl/Cmd+Enter, Esc, Tab). Keep saves the user's unsaved text first; Undo after Keep. - **Bottom sheet on phone and tablet** (#8417): below 1024 px with an editor open she is a sheet (peek / half / full); a held change drops it to peek and scrolls to the first changed field. Only the Character editor opts in so far. No editor open → unchanged window. No new top-bar buttons; the phone pull-down door is unchanged. No approval contract change: accept is whole-change. ## 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 per slice (details in each slice PR): client `tsc -b` and build, ESLint, Prettier, `localization:check`, the `form-rebase`, `mari-editor-fields`, `command-center`, `mari-polish` and Prof. Mari documentation regressions. Every slice had an Opus read-only review; all findings were fixed before merge. Playwright on throwaway instances: slice 4 38/38, slice 5 50/50, slice 6 61/61 (Chromium mobile emulation, not real iOS / Android). Slices 1–3 were live-tested with a real model (MiniMax M3 via NanoGPT); slices 4–6 were tested with a seeded held change, not with a real model. GitHub CI passed on every slice PR. `staging` (10 commits ahead) merges into this branch without conflicts. To verify manually: 1. Desktop: open a character, open Prof. Mari: she floats at the left, the editor stays usable. 2. Ask her to change Description + Personality (Manual mode): both fields show her diff; Keep all 2, then Undo. 3. Type in Description, then ask her again: your typed text is saved with her change and the field says so. 4. Save in the editor after she changed a field: her change stays. 5. Phone: same flow in the bottom sheet; the sheet drops to peek when her change arrives. 6. Real iOS Safari and Android: typing state and the pull-down door. ## 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 for each slice are in the slice PRs' notes (local `.tmp/mari-companion/slice4`–`slice6`); 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:49 +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#8589
No description provided.