[PR #8561] [MERGED] feat(mari): companion docks in tighter space, editor peek count, smooth sheet snaps #8671

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

📋 Pull Request Information

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

Base: staging ← Head: feat/mari-companion-polish


📝 Commits (1)

  • 350f7e3 feat(mari): companion docks in tighter space, editor peek count, smooth sheet snaps

📊 Changes

8 files changed (+85 additions, -10 deletions)

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+1 -1)
📝 packages/client/src/components/characters/MariFieldReview.tsx (+6 -0)
📝 packages/client/src/components/chat/mari/MariOmnibarHeaderChrome.tsx (+6 -1)
📝 packages/client/src/components/layout/omnibar/use-mari-companion.tsx (+50 -3)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+1 -1)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/client/src/stores/ui.store.ts (+10 -4)
📝 packages/client/src/styles/mari.css (+9 -0)

📄 Description

Linked issue

No issue: follow-up to the Professor Mari companion (#8418).

Why this change

Three rough edges in Prof. Mari's companion. At 1440 px with both sidebars open she could not dock beside the editor and fell back to the centered window. On a phone, the peek line did not say that her change waits in the editor. Snapping the phone sheet between peek, half and full jumped.

What changed

  • Docking: panel minimum 24rem → 20rem, editor field column minimum 28rem → 24rem; the default panel width stays 24rem, so wide screens look the same.
  • Docked composer: the placeholder stays on one line and fades at the end (Chromium draws no ellipsis in a textarea). Phone and centered window are unchanged.
  • Version history row (character and persona editors): flex-wrap, so Reset and the "N saved" badge wrap in the narrower column.
  • Peek line: "1 change is / N changes are waiting in the editor" (new plural key, en.json only). It shows only when the open character editor holds waiting fields and her held change is the one thing waiting; else the old "Needs you" line.
  • The count comes from useMariFieldReview itself (open character, minus fields the user edited) through a transient store value mariFieldWaitingCount; it is not persisted or synced.
  • Sheet snaps glide (220 ms height animation from the measured height; peek is height: auto, which CSS cannot transition). No motion during a drag, on a pull-down release, with reduced motion, or when the keyboard opens; a running glide stops when the sheet shape changes or the keyboard opens.
  • Interacts with #8559 (generalizes useMariFieldReview): no textual conflict today; after it lands, the count follows whatever editor uses the hook.

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 checks (Playwright, Chromium, no model; a stored Mari answer holds a character.update for two characters):

  • Client tsc --noEmit, eslint and prettier --check on the changed files, pnpm localization:check: pass. Full pnpm check was not run.
  • Regressions omnibar-settings-sync, mobile-safe-area-inset, mari-editor-fields: pass.
  • Playwright 15/15, no console errors: 1440 with both sidebars docks, and the field, Keep and Not this one stay on screen; the "0 saved" badge stays inside the column; 1024 docks; the open editor shows "1 change is waiting in the editor" (the other character's 2 fields are not counted); with no editor open, and with a held change plus a delete card, the old "Needs you" line shows; 390 peek text; peek → half glides with no overshoot; half → full and ArrowDown full → half glide; height stays still during a drag; a pull-down release lands at once; reduced motion is instant.
  • Review (Opus): 3 medium and 5 low findings fixed, 1 accepted (older clients clamp a synced 20–23rem width to 24rem).

Not verified: software keyboard opening during a glide, an upward drag release, 768 px, light mode, Safari / a real phone.

To verify manually:

  • At 1440 px with both sidebars open, open a character and Prof. Mari: she docks beside the editor, and her tabs and composer fit.
  • On a phone, let her hold a change to the open character: the peek line says "1 change is waiting in the editor" and a tap scrolls to the field.
  • On a phone, tap and drag the sheet handle between peek, half and full: taps glide, a pull-down lands where you let go, and nothing moves with reduced motion on.
  • Open the Metadata tab beside the docked panel: the Version history row wraps instead of running past the card.

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 were taken locally (1440, 1024 and 390 px) and are not attached.


🔄 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/8561 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/mari-companion-polish` --- ### 📝 Commits (1) - [`350f7e3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/350f7e302e1be51d9b41a3d2d712deada99b47ae) feat(mari): companion docks in tighter space, editor peek count, smooth sheet snaps ### 📊 Changes **8 files changed** (+85 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+1 -1) 📝 `packages/client/src/components/characters/MariFieldReview.tsx` (+6 -0) 📝 `packages/client/src/components/chat/mari/MariOmnibarHeaderChrome.tsx` (+6 -1) 📝 `packages/client/src/components/layout/omnibar/use-mari-companion.tsx` (+50 -3) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+1 -1) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/client/src/stores/ui.store.ts` (+10 -4) 📝 `packages/client/src/styles/mari.css` (+9 -0) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> No issue: follow-up to the Professor Mari companion (#8418). ## Why this change <!-- What user problem, bug, or goal does this solve? --> Three rough edges in Prof. Mari's companion. At 1440 px with both sidebars open she could not dock beside the editor and fell back to the centered window. On a phone, the peek line did not say that her change waits in the editor. Snapping the phone sheet between peek, half and full jumped. - ## What changed <!-- List the key changes in this PR --> - Docking: panel minimum 24rem → 20rem, editor field column minimum 28rem → 24rem; the default panel width stays 24rem, so wide screens look the same. - Docked composer: the placeholder stays on one line and fades at the end (Chromium draws no ellipsis in a textarea). Phone and centered window are unchanged. - Version history row (character and persona editors): `flex-wrap`, so Reset and the "N saved" badge wrap in the narrower column. - Peek line: "1 change is / N changes are waiting in the editor" (new plural key, en.json only). It shows only when the open character editor holds waiting fields and her held change is the one thing waiting; else the old "Needs you" line. - The count comes from `useMariFieldReview` itself (open character, minus fields the user edited) through a transient store value `mariFieldWaitingCount`; it is not persisted or synced. - Sheet snaps glide (220 ms height animation from the measured height; peek is `height: auto`, which CSS cannot transition). No motion during a drag, on a pull-down release, with reduced motion, or when the keyboard opens; a running glide stops when the sheet shape changes or the keyboard opens. - Interacts with #8559 (generalizes `useMariFieldReview`): no textual conflict today; after it lands, the count follows whatever editor uses the hook. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> Agent-run checks (Playwright, Chromium, no model; a stored Mari answer holds a `character.update` for two characters): - Client `tsc --noEmit`, `eslint` and `prettier --check` on the changed files, `pnpm localization:check`: pass. Full `pnpm check` was not run. - Regressions `omnibar-settings-sync`, `mobile-safe-area-inset`, `mari-editor-fields`: pass. - Playwright 15/15, no console errors: 1440 with both sidebars docks, and the field, Keep and Not this one stay on screen; the "0 saved" badge stays inside the column; 1024 docks; the open editor shows "1 change is waiting in the editor" (the other character's 2 fields are not counted); with no editor open, and with a held change plus a delete card, the old "Needs you" line shows; 390 peek text; peek → half glides with no overshoot; half → full and ArrowDown full → half glide; height stays still during a drag; a pull-down release lands at once; reduced motion is instant. - Review (Opus): 3 medium and 5 low findings fixed, 1 accepted (older clients clamp a synced 20–23rem width to 24rem). Not verified: software keyboard opening during a glide, an upward drag release, 768 px, light mode, Safari / a real phone. To verify manually: - [ ] At 1440 px with both sidebars open, open a character and Prof. Mari: she docks beside the editor, and her tabs and composer fit. - [ ] On a phone, let her hold a change to the open character: the peek line says "1 change is waiting in the editor" and a tap scrolls to the field. - [ ] On a phone, tap and drag the sheet handle between peek, half and full: taps glide, a pull-down lands where you let go, and nothing moves with reduced motion on. - [ ] Open the Metadata tab beside the docked panel: the Version history row wraps instead of running past the card. ## 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) <!-- Add before/after screenshots or recordings for UI changes --> Screenshots were taken locally (1440, 1024 and 390 px) and are not attached. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:46:24 +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#8671
No description provided.