[GH-ISSUE #1638] [Issue]: Archive Undo banner caption shares the notice slot #1615

Closed
opened 2026-10-25 04:02:05 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

In the Memory Vault, the notice slot doubles as the caption of the archive Undo banner. A later notice therefore replaces the text that tells you what Undo reverses, and a save while Undo is showing reads "Memory saved." beside an Undo that no longer names its batch.

Affected package

long-term-memory (1.4.89)

Expected behavior

The archive banner keeps its own caption ("2 memories archived.") for as long as Undo is offered. Notices from other actions use the notice slot without touching that caption, and a save no longer needs to leave the standing notice uncleared while Undo is showing.

Actual behavior

setNotice is the only text slot. After an archive it holds "N memories archived." and is the Undo's caption. Saving a memory while Undo is still offered replaces it with "Memory saved." and the save skips its usual setNotice("") (if (!archiveUndo) setNotice("")) to avoid dropping the caption, so a second identical save does not re-announce.

Steps to reproduce

  1. Open the Memory Vault, tick two memories and press Archive. The banner reads "2 memories archived." with Undo.
  2. Open a different memory, edit it and Save.
  3. The banner now reads "Memory saved." beside the same Undo, which still restores the two archived memories.

Environment

  • Marinara Engine version: any (client-only change)
  • Package version: long-term-memory 1.4.89
  • Install type: source
  • OS + version: Linux
  • Browser or app shell: Chromium (Playwright browser suite)

Logs, screenshots, or video

Not applicable. Raised as a declined LOW Dottore finding on PR #1637 (thread 4366229437), pre-existing on staging.

Additional context

Follow-up to #1636 / PR #1637. Fix: keep the Undo caption in ArchiveUndoState and render it separately from the notice slot.

Minimal fix

All in packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx unless noted.

  • ArchiveUndoState gains caption: string. The archive handler (archiveCompleted block, ~2096-2127) stores the archive message there when it offers Undo and leaves the notice empty (setNotice(undoOffered ? "" : message)); with no Undo (archiveUndoNotes.length !== ids.length) the message stays the notice.
  • Banner (~2366-2380) renders the caption in its own element (data-ltm-archive-undo-caption) beside Undo, and the notice only when it is set.
  • The save (~1684-1686) clears the notice unconditionally: if (!archiveUndo) setNotice("") becomes setNotice(""), and its comment is reworded.
  • No new locale keys, no change to undoArchive's result notices ("N memories restored.").

Tests: update the static assertion at tests/long-term-memory-feedback-clarity-ui.regression.mjs ~931-940 to the unconditional clear; extend the existing Archive Undo case in tests/long-term-memory-browser.regression.ts (~6173) to assert the caption element reads "2 memories archived" with no notice, and that it is gone once Undo succeeds.

Non-goals: Undo behaviour, rollback, batch requests, other notices, locale text.

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 (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1638 Originally assigned to: @Promansis on GitHub. ## Summary In the Memory Vault, the notice slot doubles as the caption of the archive Undo banner. A later notice therefore replaces the text that tells you what Undo reverses, and a save while Undo is showing reads "Memory saved." beside an Undo that no longer names its batch. ## Affected package long-term-memory (1.4.89) ## Expected behavior The archive banner keeps its own caption ("2 memories archived.") for as long as Undo is offered. Notices from other actions use the notice slot without touching that caption, and a save no longer needs to leave the standing notice uncleared while Undo is showing. ## Actual behavior `setNotice` is the only text slot. After an archive it holds "N memories archived." and is the Undo's caption. Saving a memory while Undo is still offered replaces it with "Memory saved." and the save skips its usual `setNotice("")` (`if (!archiveUndo) setNotice("")`) to avoid dropping the caption, so a second identical save does not re-announce. ## Steps to reproduce 1. Open the Memory Vault, tick two memories and press Archive. The banner reads "2 memories archived." with Undo. 2. Open a different memory, edit it and Save. 3. The banner now reads "Memory saved." beside the same Undo, which still restores the two archived memories. ## Environment - Marinara Engine version: any (client-only change) - Package version: long-term-memory 1.4.89 - Install type: source - OS + version: Linux - Browser or app shell: Chromium (Playwright browser suite) ## Logs, screenshots, or video Not applicable. Raised as a declined LOW Dottore finding on PR #1637 (thread 4366229437), pre-existing on staging. ## Additional context Follow-up to #1636 / PR #1637. Fix: keep the Undo caption in `ArchiveUndoState` and render it separately from the notice slot. ## Minimal fix All in `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx` unless noted. - `ArchiveUndoState` gains `caption: string`. The archive handler (`archiveCompleted` block, ~2096-2127) stores the archive message there when it offers Undo and leaves the notice empty (`setNotice(undoOffered ? "" : message)`); with no Undo (`archiveUndoNotes.length !== ids.length`) the message stays the notice. - Banner (~2366-2380) renders the caption in its own element (`data-ltm-archive-undo-caption`) beside Undo, and the notice only when it is set. - The save (~1684-1686) clears the notice unconditionally: `if (!archiveUndo) setNotice("")` becomes `setNotice("")`, and its comment is reworded. - No new locale keys, no change to `undoArchive`'s result notices ("N memories restored."). Tests: update the static assertion at `tests/long-term-memory-feedback-clarity-ui.regression.mjs` ~931-940 to the unconditional clear; extend the existing Archive Undo case in `tests/long-term-memory-browser.regression.ts` (~6173) to assert the caption element reads "2 memories archived" with no notice, and that it is gone once Undo succeeds. Non-goals: Undo behaviour, rollback, batch requests, other notices, locale text. ## 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-25 04:02:05 +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-Agents#1615
No description provided.