[GH-ISSUE #1526] [Issue]: Automated chat summaries do not honor hide-summarized-messages setting #772

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

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

Originally assigned to: @Promansis on GitHub.

Summary

The Summary Popover settings for Hide summarized messages from AI and Collapse hidden messages are wired for manual Summary Popover generation, but automated chat-summary paths do not honor the hide-summarized-messages behavior.

Manual last N and range summaries now persist the settings and hide the selected source messages after generation. Automated summary agent/tool writes append summary entries without hiding the messages that were summarized.

Expected behavior

The hide/collapse summary settings should behave consistently across summary paths:

  • Manual last N summary generation should persist settings and hide selected source messages when enabled.
  • Manual range summary generation should persist settings and hide selected source messages when enabled.
  • Automated chat-summary generation should also hide the source messages it summarized when the user has enabled the setting, or clearly explain why automated summaries are excluded.
  • Collapse hidden messages should continue to apply to all messages hidden by either manual or automated summary flows.

Actual behavior

Manual Summary Popover generation calls maybeHideSummarizedMessages(data.messageIds) on success for both range and last-N flows.

Automated chat-summary paths append summary content but do not record or hide the source message IDs:

  • append_chat_summary in tools-runtime.ts appends an automated summary entry with sourceMode: "agent", then updates chat metadata only.
  • The chat-summary agent path receives recent non-hidden messages as agent context, but the append tool result does not mark any of those messages hidden from AI.

Reported behavior: the user's hide-summarized-messages setting does not work on automated summaries.

Steps to reproduce

  1. Open a chat with the Summary Popover setting Hide summarized messages from AI enabled.
  2. Enable/run the automated Chat Summary agent or another path that uses append_chat_summary.
  3. Let the automated summary append/update the rolling chat summary.
  4. Inspect the source messages that were summarized.
  5. Observe that they remain visible to AI instead of being marked hidden, while manual Summary Popover generation hides source messages when the setting is enabled.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: origin/refactor at e79891d9
  • Run mode: code audit against refactor summary/agent path; original report came from Roleplay use
  • OS + version: not OS-specific
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: automated Chat Summary agent / append_chat_summary tool

Logs, screenshots, or video

Code paths inspected:

  • src/features/modes/shared/chat-ui/components/SummaryPopover.tsx
  • src/features/catalog/chats/hooks/use-chats.ts
  • src/engine/generation/tools-runtime.ts
  • src/engine/generation/agent-runner.ts

Relevant current behavior:

  • SummaryPopover.tsx persists sourceMode, contextSize, rangeStart, rangeEnd, hideSummarizedMessages, and collapseHiddenMessages in UI state.
  • Manual summary generation returns messageIds, and the popover hides those messages when hideSummarizedMessages is true.
  • append_chat_summary creates an automated summary entry but does not receive, store, or hide source message IDs.
  • Message rendering already uses summaryPopoverSettings.collapseHiddenMessages, so the missing piece appears to be automated source-message hiding.

Regression notes

The broader source-range and hidden-message settings work was tracked by closed #931 / #1362. This issue is the remaining automated-summary parity gap from the Roleplay audit.

Additional context

Likely fix needs a clear source-message contract for automated summaries. The summary agent/tool may need to know which recent messages it summarized, append those IDs to the summary entry, and call the same hidden-from-AI message patch path used by manual summaries when the user setting is enabled.

Be careful not to hide messages merely because an agent wrote arbitrary summary text unless the summarized source range is known.

Template check

Please uncheck 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 @Xelvanis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1526 Originally assigned to: @Promansis on GitHub. ## Summary The Summary Popover settings for `Hide summarized messages from AI` and `Collapse hidden messages` are wired for manual Summary Popover generation, but automated chat-summary paths do not honor the hide-summarized-messages behavior. Manual `last N` and `range` summaries now persist the settings and hide the selected source messages after generation. Automated summary agent/tool writes append summary entries without hiding the messages that were summarized. ## Expected behavior The hide/collapse summary settings should behave consistently across summary paths: - Manual `last N` summary generation should persist settings and hide selected source messages when enabled. - Manual `range` summary generation should persist settings and hide selected source messages when enabled. - Automated chat-summary generation should also hide the source messages it summarized when the user has enabled the setting, or clearly explain why automated summaries are excluded. - `Collapse hidden messages` should continue to apply to all messages hidden by either manual or automated summary flows. ## Actual behavior Manual Summary Popover generation calls `maybeHideSummarizedMessages(data.messageIds)` on success for both range and last-N flows. Automated chat-summary paths append summary content but do not record or hide the source message IDs: - `append_chat_summary` in `tools-runtime.ts` appends an automated summary entry with `sourceMode: "agent"`, then updates chat metadata only. - The chat-summary agent path receives recent non-hidden messages as agent context, but the append tool result does not mark any of those messages hidden from AI. Reported behavior: the user's hide-summarized-messages setting does not work on automated summaries. ## Steps to reproduce 1. Open a chat with the Summary Popover setting `Hide summarized messages from AI` enabled. 2. Enable/run the automated Chat Summary agent or another path that uses `append_chat_summary`. 3. Let the automated summary append/update the rolling chat summary. 4. Inspect the source messages that were summarized. 5. Observe that they remain visible to AI instead of being marked hidden, while manual Summary Popover generation hides source messages when the setting is enabled. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [x] Roleplay mode - [ ] Game mode - [x] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `origin/refactor` at `e79891d9` - Run mode: code audit against refactor summary/agent path; original report came from Roleplay use - OS + version: not OS-specific - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: automated Chat Summary agent / `append_chat_summary` tool ## Logs, screenshots, or video Code paths inspected: - `src/features/modes/shared/chat-ui/components/SummaryPopover.tsx` - `src/features/catalog/chats/hooks/use-chats.ts` - `src/engine/generation/tools-runtime.ts` - `src/engine/generation/agent-runner.ts` Relevant current behavior: - `SummaryPopover.tsx` persists `sourceMode`, `contextSize`, `rangeStart`, `rangeEnd`, `hideSummarizedMessages`, and `collapseHiddenMessages` in UI state. - Manual summary generation returns `messageIds`, and the popover hides those messages when `hideSummarizedMessages` is true. - `append_chat_summary` creates an automated summary entry but does not receive, store, or hide source message IDs. - Message rendering already uses `summaryPopoverSettings.collapseHiddenMessages`, so the missing piece appears to be automated source-message hiding. ## Regression notes The broader source-range and hidden-message settings work was tracked by closed #931 / #1362. This issue is the remaining automated-summary parity gap from the Roleplay audit. ## Additional context Likely fix needs a clear source-message contract for automated summaries. The summary agent/tool may need to know which recent messages it summarized, append those IDs to the summary entry, and call the same hidden-from-AI message patch path used by manual summaries when the user setting is enabled. Be careful not to hide messages merely because an agent wrote arbitrary summary text unless the summarized source range is known. ## Template check Please uncheck 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:33:12 +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#772
No description provided.