[GH-ISSUE #1798] Restore shared mode parity for summaries, memory import, and gallery illustrate state #879

Closed
opened 2026-10-21 05:22:52 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1798

Originally assigned to: @cha1latte on GitHub.

Summary

Static parity audit of src/features/modes/shared against the legacy shared chat UI found three shared-mode regressions worth restoring.

Current behavior

1. Chat summary popover no longer manages structured rolling summaries

Current contracts still include ChatMetadata.summaryEntries, summaryPromptTemplates, and activeSummaryPromptTemplateId in src/engine/contracts/types/chat.ts, and summary generation still appends structured entries in src/features/catalog/chats/hooks/use-chats.ts.

However, src/features/modes/shared/chat-ui/components/SummaryPopover.tsx only receives the compiled summary string, and src/features/modes/roleplay/components/ChatRoleplaySurface.tsx no longer passes entries or prompt templates to it.

The legacy packages/client/src/components/chat/SummaryPopover.tsx supported:

  • showing enabled and disabled summary entries
  • creating, editing, deleting, and toggling summary entries
  • token estimate and warning display
  • selecting and editing chat-scoped summary prompt templates

Impact: structured rolling summaries can exist, but users cannot manage them from the shared popover. The visible UI has effectively fallen back to a single compiled summary string.

2. Memory Recall import lost client-side validation

Current src/features/catalog/chats/hooks/use-chats.ts reads and parses the selected file, then sends the raw payload to chatCommandApi.memoriesImport. Current ChatSettingsDrawer.tsx accepts only application/json,.json.

The legacy ChatSettingsDrawer.tsx validated the export envelope (type: "marinara_memory_recall", version: 1, data.chunks), capped imports at 25 MB, and accepted .json,.marinara.

Impact: large files can stall the UI, wrong-file errors are less clear, and exported .marinara files may not be selectable from the picker.

Current src/features/modes/shared/chat-ui/components/ChatGallery.tsx tracks manual illustration progress with local illustratePending state, while src/shared/stores/gallery.store.ts only tracks pinned images.

The legacy gallery store tracked illustratingChatIds, and ChatGallery read that shared state when disabling the Illustrate button and showing the running notice.

Impact: closing and reopening the drawer, remounting the component, or switching chats can lose the running indicator and may allow duplicate manual illustration requests while the first request is still active.

Expected behavior

  • Summary popover should expose and manage structured rolling summary entries and chat-scoped summary prompt templates when those metadata fields exist.
  • Memory Recall import should reject invalid envelopes before invoking the import command, cap file size client-side, and allow .marinara files in the picker.
  • Manual gallery illustration progress should be tracked per chat outside the drawer component so the running state survives remounts.

Suggested fix order

  1. Restore the summary entry/template UI path in the shared summary popover and pass metadata through the mode surface.
  2. Re-add Memory Recall import size, envelope, and .marinara picker guards.
  3. Re-add store-backed gallery illustrate in-flight tracking, or wire the UI to an existing durable generation task state if one now exists.

Verification notes

This is from static parity inspection only. No runtime app proof has been run yet.

Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1798 Originally assigned to: @cha1latte on GitHub. ## Summary Static parity audit of `src/features/modes/shared` against the legacy shared chat UI found three shared-mode regressions worth restoring. ## Current behavior ### 1. Chat summary popover no longer manages structured rolling summaries Current contracts still include `ChatMetadata.summaryEntries`, `summaryPromptTemplates`, and `activeSummaryPromptTemplateId` in `src/engine/contracts/types/chat.ts`, and summary generation still appends structured entries in `src/features/catalog/chats/hooks/use-chats.ts`. However, `src/features/modes/shared/chat-ui/components/SummaryPopover.tsx` only receives the compiled `summary` string, and `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` no longer passes entries or prompt templates to it. The legacy `packages/client/src/components/chat/SummaryPopover.tsx` supported: - showing enabled and disabled summary entries - creating, editing, deleting, and toggling summary entries - token estimate and warning display - selecting and editing chat-scoped summary prompt templates Impact: structured rolling summaries can exist, but users cannot manage them from the shared popover. The visible UI has effectively fallen back to a single compiled summary string. ### 2. Memory Recall import lost client-side validation Current `src/features/catalog/chats/hooks/use-chats.ts` reads and parses the selected file, then sends the raw payload to `chatCommandApi.memoriesImport`. Current `ChatSettingsDrawer.tsx` accepts only `application/json,.json`. The legacy `ChatSettingsDrawer.tsx` validated the export envelope (`type: "marinara_memory_recall"`, `version: 1`, `data.chunks`), capped imports at 25 MB, and accepted `.json,.marinara`. Impact: large files can stall the UI, wrong-file errors are less clear, and exported `.marinara` files may not be selectable from the picker. ### 3. Gallery illustrate in-flight state is local only Current `src/features/modes/shared/chat-ui/components/ChatGallery.tsx` tracks manual illustration progress with local `illustratePending` state, while `src/shared/stores/gallery.store.ts` only tracks pinned images. The legacy gallery store tracked `illustratingChatIds`, and `ChatGallery` read that shared state when disabling the Illustrate button and showing the running notice. Impact: closing and reopening the drawer, remounting the component, or switching chats can lose the running indicator and may allow duplicate manual illustration requests while the first request is still active. ## Expected behavior - Summary popover should expose and manage structured rolling summary entries and chat-scoped summary prompt templates when those metadata fields exist. - Memory Recall import should reject invalid envelopes before invoking the import command, cap file size client-side, and allow `.marinara` files in the picker. - Manual gallery illustration progress should be tracked per chat outside the drawer component so the running state survives remounts. ## Suggested fix order 1. Restore the summary entry/template UI path in the shared summary popover and pass metadata through the mode surface. 2. Re-add Memory Recall import size, envelope, and `.marinara` picker guards. 3. Re-add store-backed gallery illustrate in-flight tracking, or wire the UI to an existing durable generation task state if one now exists. ## Verification notes This is from static parity inspection only. No runtime app proof has been run yet.
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

Fixed in #1835

<!-- gh-comment-id:4595481076 --> @cha1latte commented on GitHub (Jun 1, 2026): Fixed in #1835
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#879
No description provided.