mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8407] [MERGED] feat(mari): Prof. Mari floats as a companion panel next to the Character editor #8582
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#8582
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/8407
Author: @Gunterlie
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Gunterlie
Base:
feat/mari-companion← Head:feat/mari-companion-panel📝 Commits (2)
f55525afeat(mari): Prof. Mari floats as a companion panel next to the Character editora21f5c4Merge feat/mari-companion (slice 3) into the companion panel📊 Changes
13 files changed (+481 additions, -47 deletions)
View changed files
📝
packages/client/src/components/characters/CharacterEditor.tsx(+5 -2)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+19 -0)📝
packages/client/src/components/chat/MariEditEasyViewer.tsx(+17 -1)📝
packages/client/src/components/chat/mari/mari-chat-helpers.tsx(+26 -0)📝
packages/client/src/components/layout/GlobalOmnibar.tsx(+104 -22)📝
packages/client/src/components/layout/GlobalOmnibarHost.tsx(+1 -15)📝
packages/client/src/components/layout/omnibar/OmnibarMariPane.tsx(+5 -1)➕
packages/client/src/components/layout/omnibar/use-mari-companion.tsx(+174 -0)📝
packages/client/src/hooks/use-mari-editor-fields.ts(+34 -2)📝
packages/client/src/lib/professor-mari-command-center-context.ts(+1 -1)📝
packages/client/src/localization/locales/en.json(+3 -0)📝
packages/client/src/stores/ui.store.ts(+33 -3)📝
packages/client/src/styles/mari.css(+59 -0)📄 Description
Linked issue
No issue: planned work, slice 4 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–3: #8401, #8403, #8405, #8406). This branch is based onfeat/mari-companionwithout slice 3 (#8406 is still open); both touchGlobalOmnibar.tsxlightly.Why this change
Prof. Mari opened as a modal window over the editor, so the user could not see or type in the field she was talking about. The design agreed with the maintainer: on desktop she morphs into a solid floating panel at a fixed place on the left, over the blank space beside the centered editor content. It is not a sidebar: the editor header stays full width and only the field column moves right, as little as needed, so the field and its buttons stay on screen.
What changed
omnibar/use-mari-companion.tsx(new): decides companion vs. window, places the panel from the editor shell (12px below the header bar, 12px from the left and bottom), shifts the field column bymax(0, panelRight + 12 − columnLeft)via inlinemargin-inline-start(plusmax-widthwhen it would overflow), and owns the resize handle. Observes only the shell and the scroll root; the drag previews locally and persists on release. If the shell cannot fit a 24 rem panel plus a 28 rem column, she stays the normal window and the toggle hides.GlobalOmnibar.tsx: in companion mode the same element (no remount) has no backdrop, blur, focus trap or outside close;role="complementary"with a localized label; Esc closes only from inside her panel; Cmd+J keeps the companion and focuses her composer; dock toggle in her header (aria-pressed); 200 ms opacity/scale morph, none with reduced motion. Focus is restored on close only if it was inside her panel or on body; when the viewport drops below 1024 px focus moves into the now-modal window.ui.store.ts: persistedmariCompanionDocked(default on) andmariCompanionWidthRem(24–32 rem); transientmariCompanionRoot;revealMariField(..., { scroll: false }).use-mari-editor-fields.ts+CharacterEditor.tsx: an editor opts in with one line (useMariCompanion…); readiness is!isLoading && !!formData, so the panel and the focus root follow a character switch.HomeProfessorMariChat.tsx,mari-chat-helpers.tsxretargetEditorContext,OmnibarMariPane.tsx): when the character changes in companion mode, the editor chip is replaced, and the old field / command-center result is dropped. Unrelated context (a chat) and her conversation stay.MariEditEasyViewer.tsx: hovering a change-card row with an anchored field of the open character pulses it once (companion mode only, no scroll).mari.css: panel and resize-handle styles. 3 English strings.Phone and tablet (< 1024 px) are unchanged; the bottom sheet is slice 6. Only the Character editor opts in; slice 7 adds others.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run (not manual): client
tsc -bexit 0; ESLint clean on touched files (one pre-existing warning inHomeProfessorMariChat.tsx:385, not from this change); Prettier andlocalization:checkpass; client build passes. An Opus read-only review found 1 high (panel broke on switching to an uncached character), 3 medium (Esc on the page turned her into the modal window; narrow shell overflow; layout work on every resize) and 5 low issues; all fixed. Two more bugs found by the live run and fixed: the resize handle sat on the left edge, and the composer kept the previous character's context after a switch.Playwright on a throwaway instance (empty data, no model calls), 38/38 checks at 1440 / 1024 / 390 px: role and placement, header does not move, column right of the panel and on screen at max width, tabs visible at min width, typing in Description while she is open, editor click and page Esc do not close her, Esc in her panel does, toggle to window and back (survives reload), normal window with no editor, 390 px unchanged, switch to an uncached character, narrow shell falls back to the window, drag persists on release only, Cmd+J keeps the companion, intercepted send after a switch carries the new character and no old field.
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/slice4/); attach on request. They match the mockup the maintainer approved (.tmp/mari-companion/mockup/shots/1440-companion.png).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.