[GH-ISSUE #1102] [Issue]: Long-Term Memory Memory Vault unsaved-changes dialog card spans the screen (undefined max-w-72) #563

Closed
opened 2026-10-20 17:28:37 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Sep 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1102

Originally assigned to: @Promansis on GitHub.

Summary

In the Long-Term Memory Memory Vault, editing a memory and then clicking Close opens the unsaved-changes confirmation dialog, but the dialog card stretches across (almost) the whole screen instead of appearing as a small centred box. The same card class is also used by the vault's Rename-details dialog.

Affected package

long-term-memory (client UI, MemoryVault.tsx).

Expected behavior

The confirmation should render as a small centred card, like the equivalent Long-Term Memory shell dialog (LongTermMemoryDetail.tsx) which already uses a bounded width.

Actual behavior

The dialog overlay is full-viewport (fixed inset-0 … w-full), and its card is:

<section className="mari-editor-panel w-full max-w-72 space-y-3 p-3 shadow-xl">

max-w-72 is never emitted by the Engine's Tailwind build, so no max-width is applied and the card falls back to w-full.

Root cause

  • The Engine builds capability-package classes from packages/client/src/styles/capability-package-safelist.html (Engine packages/client/src/styles/globals.css:2, @source "./capability-package-safelist.html"). Package bundles are injected at runtime and are not Tailwind sources.
  • That safelist contains max-w-24, max-w-2xl, max-w-3xl, max-w-[16rem], max-w-[22rem], max-w-[calc(100vw-1.5rem)], max-w-[calc(100vw-2rem)], max-w-full, max-w-md, max-w-sm, max-w-xl, max-w-xs — but no max-w-72.
  • The built Engine stylesheet has no .max-w-72 rule, while .max-w-md is present (.max-w-md{max-width:var(--container-md)}).
  • This is a duplicated dialog implementation: the shell's unsaved-changes dialog (LongTermMemoryDetail.tsx:594-652) uses max-w-md and renders correctly, while the vault's copy (MemoryVault.tsx:3196-3246) diverged to max-w-72. Both were introduced in the same commit, bf5c7bf3 feat(long-term-memory): release 1.2.7 workstation integration (#354).

Proposed change (align the two dialogs)

Replace max-w-72 with an already-safelisted width in the vault's two dialogs so it matches the existing working shell dialog:

  • MemoryVault.tsx:3226 (unsaved-navigation dialog) — max-w-72 → max-w-md, matching LongTermMemoryDetail.tsx:624.
  • MemoryVault.tsx:3260 (rename-details dialog) — same replacement (or a smaller safelisted width such as max-w-xs).
  • Update the source assertion at tests/long-term-memory-feedback-clarity-ui.regression.mjs:297 (mari-editor-panel w-full max-w-72 space-y-3 p-3 shadow-xl) to the new class.

Alternatively, extract a single shared unsaved-changes dialog from the shell's navigationPrompt and use it in both places, removing the duplication; the class alignment above is the minimal fix.

Steps to reproduce

  1. Open Chat Settings → Agents → Long-Term Memory, and go to the Memory Vault.
  2. Open a memory for editing and make any change.
  3. Click Close in the editor header.
  4. Observe the "Unsaved changes" confirmation dialog: its card spans nearly the full screen width.

Environment

  • Marinara Engine version: not recorded (package manifest builtAgainst is 2.4.1)
  • Package version: 1.3.24
  • Install type: source
  • OS + version: not recorded
  • Browser or app shell: not recorded

Logs, screenshots, or video

Screenshot pending. Reported control: #…-workbench > section > div > header > div.flex.gap-2 > button:nth-child(3) (the editor Close button).

Additional context

Confirmed by static analysis of the package source and the local Engine checkout/build (Engine 41d5d12cd; compiled packages/client/dist/assets/index-BliRoYmI.css), not by a browser render. No test currently checks that capability-package classes exist in the Engine safelist, so the source-string regression passes while the UI is broken.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1102 Originally assigned to: @Promansis on GitHub. ## Summary In the Long-Term Memory **Memory Vault**, editing a memory and then clicking **Close** opens the unsaved-changes confirmation dialog, but the dialog card stretches across (almost) the whole screen instead of appearing as a small centred box. The same card class is also used by the vault's Rename-details dialog. ## Affected package `long-term-memory` (client UI, `MemoryVault.tsx`). ## Expected behavior The confirmation should render as a small centred card, like the equivalent Long-Term Memory shell dialog (`LongTermMemoryDetail.tsx`) which already uses a bounded width. ## Actual behavior The dialog overlay is full-viewport (`fixed inset-0 … w-full`), and its card is: ``` <section className="mari-editor-panel w-full max-w-72 space-y-3 p-3 shadow-xl"> ``` `max-w-72` is never emitted by the Engine's Tailwind build, so no `max-width` is applied and the card falls back to `w-full`. ## Root cause - The Engine builds capability-package classes from `packages/client/src/styles/capability-package-safelist.html` (Engine `packages/client/src/styles/globals.css:2`, `@source "./capability-package-safelist.html"`). Package bundles are injected at runtime and are not Tailwind sources. - That safelist contains `max-w-24`, `max-w-2xl`, `max-w-3xl`, `max-w-[16rem]`, `max-w-[22rem]`, `max-w-[calc(100vw-1.5rem)]`, `max-w-[calc(100vw-2rem)]`, `max-w-full`, `max-w-md`, `max-w-sm`, `max-w-xl`, `max-w-xs` — but **no `max-w-72`**. - The built Engine stylesheet has no `.max-w-72` rule, while `.max-w-md` is present (`.max-w-md{max-width:var(--container-md)}`). - This is a duplicated dialog implementation: the shell's unsaved-changes dialog (`LongTermMemoryDetail.tsx:594-652`) uses `max-w-md` and renders correctly, while the vault's copy (`MemoryVault.tsx:3196-3246`) diverged to `max-w-72`. Both were introduced in the same commit, `bf5c7bf3 feat(long-term-memory): release 1.2.7 workstation integration (#354)`. ## Proposed change (align the two dialogs) Replace `max-w-72` with an already-safelisted width in the vault's two dialogs so it matches the existing working shell dialog: - `MemoryVault.tsx:3226` (unsaved-navigation dialog) — `max-w-72` → `max-w-md`, matching `LongTermMemoryDetail.tsx:624`. - `MemoryVault.tsx:3260` (rename-details dialog) — same replacement (or a smaller safelisted width such as `max-w-xs`). - Update the source assertion at `tests/long-term-memory-feedback-clarity-ui.regression.mjs:297` (`mari-editor-panel w-full max-w-72 space-y-3 p-3 shadow-xl`) to the new class. Alternatively, extract a single shared unsaved-changes dialog from the shell's `navigationPrompt` and use it in both places, removing the duplication; the class alignment above is the minimal fix. ## Steps to reproduce 1. Open Chat Settings → Agents → Long-Term Memory, and go to the **Memory Vault**. 2. Open a memory for editing and make any change. 3. Click **Close** in the editor header. 4. Observe the "Unsaved changes" confirmation dialog: its card spans nearly the full screen width. ## Environment - Marinara Engine version: not recorded (package manifest `builtAgainst` is 2.4.1) - Package version: 1.3.24 - Install type: source - OS + version: not recorded - Browser or app shell: not recorded ## Logs, screenshots, or video Screenshot pending. Reported control: `#…-workbench > section > div > header > div.flex.gap-2 > button:nth-child(3)` (the editor **Close** button). ## Additional context Confirmed by static analysis of the package source and the local Engine checkout/build (Engine `41d5d12cd`; compiled `packages/client/dist/assets/index-BliRoYmI.css`), not by a browser render. No test currently checks that capability-package classes exist in the Engine safelist, so the source-string regression passes while the UI is broken. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:37 +07:00
  • closed this issue
  • added the
    bug
    label
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-Agents#563
No description provided.