[PR #827] [MERGED] Add Memory Recall export and import #4794

Closed
opened 2026-10-22 04:10:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/827
Author: @Xelvanis
Created: 5/14/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @SpicyMarinara

Base: main ← Head: feature/memory-recall-portability


📝 Commits (4)

  • 96acd62 Add memory recall export and import for chats
  • c814a78 Fix chat settings help button markup
  • 89a984c Address memory recall import review findings
  • d2a452a Merge branch 'main' into feature/memory-recall-portability

📊 Changes

8 files changed (+446 additions, -47 deletions)

View changed files

📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+125 -39)
📝 packages/client/src/hooks/use-chats.ts (+32 -0)
📝 packages/server/src/db/migrate.ts (+6 -0)
📝 packages/server/src/db/schema/chats.ts (+2 -0)
📝 packages/server/src/routes/chats.routes.ts (+235 -1)
📝 packages/server/src/services/memory-recall.ts (+7 -4)
📝 packages/server/src/services/storage/chats.storage.ts (+11 -3)
📝 packages/shared/src/types/export.ts (+28 -0)

📄 Description

Linked issue

No linked issue yet. This feature was requested directly; a tracking issue should be opened if maintainers want project-board tracking before merge.

Why this change

Memory Recall currently stays trapped inside the chat where it was generated. Users who want to move useful recalled context into another chat have to copy information manually or rebuild memories from scratch. This adds a portable Memory Recall file flow so users can export one chat's recall chunks and import them into another chat when desired.

What changed

  • Added a marinara_memory_recall export envelope for serialized recall chunks.
  • Added chat-scoped server routes to export and import Memory Recall files.
  • Added Memory Recall modal actions for downloading and uploading recall memory files.
  • Added imported chunk provenance so imported memories remain recallable without affecting local chunk cursors, refresh rebuilds, or message-edit invalidation.
  • Fixed Chat Settings drawer help-button markup so the Memory Recall path opens without nested-button React console errors.
  • Addressed review findings by capping client import files, labeling icon-only controls, batching server inserts, logging rejected/imported imports, and making replacement imports insert before deleting old chunks.

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

Codex validation notes

  • pnpm check passed after the Bunny follow-up fixes.
  • git diff --check completed with no whitespace errors.
  • Earlier Chromium pass verified export from a source chat, import into a target chat, duplicate-skip behavior, refresh retaining imported chunks, and no fresh console errors/warnings on reload.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No version or release metadata changes.

UI evidence (if applicable)

No screenshot attached. The UI change is contained in the existing Memories for This Chat modal: new export/import icon actions next to the existing rebuild/clear actions.

Summary by CodeRabbit

  • New Features

    • Memory Recall export/import functionality between chats with file validation and configurable file size limits
    • Toast-based notifications for export/import success and error outcomes
    • Option to replace existing memories during import operations
  • UI/UX

    • Improved collapsible section headers with refined tooltip positioning and interaction

Review Change Stack


🔄 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/827 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/14/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `feature/memory-recall-portability` --- ### 📝 Commits (4) - [`96acd62`](https://github.com/Pasta-Devs/Marinara-Engine/commit/96acd6258490ceebfe7d14399c0cb73c5c1059cf) Add memory recall export and import for chats - [`c814a78`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c814a787244ba6778fab03c1f5a8bf246426aca7) Fix chat settings help button markup - [`89a984c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/89a984c139fdc03c0ce3e0b959f31676534b5795) Address memory recall import review findings - [`d2a452a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d2a452a394397b9ecb85e0cf494f5cd40484d13d) Merge branch 'main' into feature/memory-recall-portability ### 📊 Changes **8 files changed** (+446 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+125 -39) 📝 `packages/client/src/hooks/use-chats.ts` (+32 -0) 📝 `packages/server/src/db/migrate.ts` (+6 -0) 📝 `packages/server/src/db/schema/chats.ts` (+2 -0) 📝 `packages/server/src/routes/chats.routes.ts` (+235 -1) 📝 `packages/server/src/services/memory-recall.ts` (+7 -4) 📝 `packages/server/src/services/storage/chats.storage.ts` (+11 -3) 📝 `packages/shared/src/types/export.ts` (+28 -0) </details> ### 📄 Description ## Linked issue No linked issue yet. This feature was requested directly; a tracking issue should be opened if maintainers want project-board tracking before merge. ## Why this change Memory Recall currently stays trapped inside the chat where it was generated. Users who want to move useful recalled context into another chat have to copy information manually or rebuild memories from scratch. This adds a portable Memory Recall file flow so users can export one chat's recall chunks and import them into another chat when desired. ## What changed - Added a `marinara_memory_recall` export envelope for serialized recall chunks. - Added chat-scoped server routes to export and import Memory Recall files. - Added Memory Recall modal actions for downloading and uploading recall memory files. - Added imported chunk provenance so imported memories remain recallable without affecting local chunk cursors, refresh rebuilds, or message-edit invalidation. - Fixed Chat Settings drawer help-button markup so the Memory Recall path opens without nested-button React console errors. - Addressed review findings by capping client import files, labeling icon-only controls, batching server inserts, logging rejected/imported imports, and making replacement imports insert before deleting old chunks. ## 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` ### Codex validation notes - `pnpm check` passed after the Bunny follow-up fixes. - `git diff --check` completed with no whitespace errors. - Earlier Chromium pass verified export from a source chat, import into a target chat, duplicate-skip behavior, refresh retaining imported chunks, and no fresh console errors/warnings on reload. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No version or release metadata changes. ## UI evidence (if applicable) No screenshot attached. The UI change is contained in the existing Memories for This Chat modal: new export/import icon actions next to the existing rebuild/clear actions. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Memory Recall export/import functionality between chats with file validation and configurable file size limits * Toast-based notifications for export/import success and error outcomes * Option to replace existing memories during import operations * **UI/UX** * Improved collapsible section headers with refined tooltip positioning and interaction <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/827?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:43 +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#4794
No description provided.