[PR #1574] [MERGED] Fix automated summary source hiding #5123

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1574
Author: @Promansis
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Promansis

Base: refactor ← Head: fix/issue-1526-auto-summary-hide


📝 Commits (2)

  • 532bb96 Fix automated summary source hiding
  • b2cdd74 Handle partial summary source hide failures

📊 Changes

6 files changed (+249 additions, -3 deletions)

View changed files

📝 src/engine/generation/agent-runner.ts (+1 -0)
📝 src/engine/generation/main-tool-loop.test.ts (+179 -0)
📝 src/engine/generation/start-generation.ts (+8 -0)
📝 src/engine/generation/tools-runtime.ts (+50 -2)
📝 src/features/modes/conversation/hooks/autonomous/use-background-autonomous.ts (+2 -0)
📝 src/features/runtime/generation/hooks/use-generate.ts (+9 -1)

📄 Description

Linked issue

Closes #1526

Why this change

Automated chat summaries appended rolling summary entries but did not mark the source messages hidden when users enabled Hide summarized messages from AI. Manual last-N and range summaries already honored that setting, so automated summaries behaved inconsistently.

What changed

  • Pass the persisted hide-summarized-messages preference into generation and agent retry paths.
  • Record visible source message IDs on automated append_chat_summary entries.
  • Hide those known source messages via hiddenFromAI / hiddenFromAi when the preference is enabled.
  • Added focused coverage for enabled and disabled hiding behavior.

Refactor impact

Primary owner:

engine generation / runtime generation

Impact areas reviewed:

  • Chat mode automated summaries
  • Roleplay mode automated summaries
  • Shared mode UI hidden-message collapse behavior
  • Engine generation tool runtime

Boundary notes:

  • UI settings are passed into the engine as plain generation input data.
  • Engine code does not import React, Zustand, Tauri APIs, feature internals, or shared API adapters.
  • No Rust, storage schema, or remote-runtime routing changes.

Pressure points touched:

  • Runtime generation hook
  • Background autonomous generation hook
  • Engine agent/tool runtime

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Ran pnpm exec vitest run src/engine/generation/main-tool-loop.test.ts.
  • Ran pnpm typecheck.
  • Ran pnpm check:architecture.
  • No browser/Tauri manual verification performed.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

No visible UI changes.

Summary by CodeRabbit

  • New Features

    • Implemented option to hide messages used as sources for automated summaries; summarized source messages can now be hidden from chat display based on user preference.
  • Tests

    • Added test coverage for automated summary source message hiding, including message visibility patching, metadata updates, and summary entry tracking.

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/1574 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/issue-1526-auto-summary-hide` --- ### 📝 Commits (2) - [`532bb96`](https://github.com/Pasta-Devs/Marinara-Engine/commit/532bb968ada9908399dde40a4579d0e31d54c279) Fix automated summary source hiding - [`b2cdd74`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b2cdd742e0b4872f58c78b24eb9e5a21bf646345) Handle partial summary source hide failures ### 📊 Changes **6 files changed** (+249 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/agent-runner.ts` (+1 -0) 📝 `src/engine/generation/main-tool-loop.test.ts` (+179 -0) 📝 `src/engine/generation/start-generation.ts` (+8 -0) 📝 `src/engine/generation/tools-runtime.ts` (+50 -2) 📝 `src/features/modes/conversation/hooks/autonomous/use-background-autonomous.ts` (+2 -0) 📝 `src/features/runtime/generation/hooks/use-generate.ts` (+9 -1) </details> ### 📄 Description ## Linked issue Closes #1526 ## Why this change Automated chat summaries appended rolling summary entries but did not mark the source messages hidden when users enabled `Hide summarized messages from AI`. Manual last-N and range summaries already honored that setting, so automated summaries behaved inconsistently. ## What changed - Pass the persisted hide-summarized-messages preference into generation and agent retry paths. - Record visible source message IDs on automated `append_chat_summary` entries. - Hide those known source messages via `hiddenFromAI` / `hiddenFromAi` when the preference is enabled. - Added focused coverage for enabled and disabled hiding behavior. ## Refactor impact Primary owner: engine generation / runtime generation Impact areas reviewed: - Chat mode automated summaries - Roleplay mode automated summaries - Shared mode UI hidden-message collapse behavior - Engine generation tool runtime Boundary notes: - UI settings are passed into the engine as plain generation input data. - Engine code does not import React, Zustand, Tauri APIs, feature internals, or shared API adapters. - No Rust, storage schema, or remote-runtime routing changes. Pressure points touched: - Runtime generation hook - Background autonomous generation hook - Engine agent/tool runtime ## Validation - [ ] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Ran `pnpm exec vitest run src/engine/generation/main-tool-loop.test.ts`. - Ran `pnpm typecheck`. - Ran `pnpm check:architecture`. - No browser/Tauri manual verification performed. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence No visible UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Implemented option to hide messages used as sources for automated summaries; summarized source messages can now be hidden from chat display based on user preference. * **Tests** * Added test coverage for automated summary source message hiding, including message visibility patching, metadata updates, and summary entry tracking. <!-- 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/1574?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:13:31 +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#5123
No description provided.