[PR #938] [MERGED] Feat/summary popover metadata #4848

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

📋 Pull Request Information

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

Base: staging ← Head: feat/summary-popover-metadata


📝 Commits (8)

📊 Changes

13 files changed (+1348 additions, -316 deletions)

View changed files

📝 docs/ROLEPLAY.md (+1 -1)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+18 -1)
📝 packages/client/src/components/chat/SummaryPopover.tsx (+778 -288)
📝 packages/client/src/hooks/use-chats.ts (+61 -1)
📝 packages/server/src/routes/chats.routes.ts (+126 -7)
📝 packages/server/src/routes/generate.routes.ts (+18 -4)
📝 packages/server/src/routes/generate/dry-run-route.ts (+1 -1)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+2 -1)
📝 packages/server/src/services/storage/chats.storage.ts (+15 -6)
📝 packages/server/src/services/tools/tool-executor.ts (+14 -5)
📝 packages/shared/src/index.ts (+1 -0)
📝 packages/shared/src/types/chat.ts (+31 -1)
➕ packages/shared/src/utils/chat-summary-entries.ts (+282 -0)

📄 Description

Linked issue

Closes #933

Why this change

  • Long-running chats and roleplay sessions can accumulate multiple manual, automated, imported, and legacy summaries, but the old single summary field made provenance, enablement, editing, and token awareness hard to manage.
  • This gives users structured summary controls while preserving the compiled prompt-facing summary string used by existing generation flows.

What changed

  • Added structured rolling summary entry types and shared helpers for compiling, estimating, normalizing, and managing summary metadata.
  • Updated manual, automated, and tool-driven summary paths to append summary entries while keeping metadata.summary backward compatible.
  • Added API and storage support for editing, enabling/disabling, and deleting summary entries.
  • Reworked the chat summary popover into structured entry rows with origin, status, token, edit, delete, toggle, and manual write controls.
  • Added persisted summary popover source/display settings and preserved the upstream Chibi Professor Mari persisted-store migration during the rebase.
  • Updated chat surfaces to support hiding and collapsing summarized messages.

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

Manual verification notes

  • Not run by Codex for this PR preparation pass.

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)

UI evidence (if applicable)

  • Not attached yet.

Summary by CodeRabbit

Release Notes

  • New Features

    • Summary management now supports individual rolling entries that can be enabled, disabled, edited, and deleted
    • Token estimates displayed for each summary entry
    • Enhanced summary generation with structured entry creation
  • Improvements

    • Expanded "hidden from AI" message filtering to conversation mode chats
  • Documentation

    • Updated troubleshooting guide to explain rolling summary entry compilation

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/938 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 5/17/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feat/summary-popover-metadata` --- ### 📝 Commits (8) - [`a520915`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a5209153125e86712de197e7eed4350fca7415b5) Slice 1: - [`0d8b18b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0d8b18be0be021d11c89e0d2862057922483d805) Slice 1 fixes - [`13870ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/13870ca06a423c0fdba8f992931bc2bd9a7a4d9e) slice 2: - [`5d33dc5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d33dc5104d53ea4edbb8fa0dcc2e0127cfebf03) Slice 2 Bunny fixes: - [`15078b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/15078b494edfaa36aeadd5ef9236b21a1030030d) Polish: chat summary and summary settings windows - [`25dbc0b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/25dbc0bde9330710c3a06ea239ced36ecb6d2237) Fix hidden summary review issues - [`ebb2cde`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ebb2cdedd5e0726edb27ea121278bffdfe431193) Restore summary polish type fixes - [`5705b02`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5705b0220f48111f079d9aef87bb740f29b83994) Fix summary entry review findings ### 📊 Changes **13 files changed** (+1348 additions, -316 deletions) <details> <summary>View changed files</summary> 📝 `docs/ROLEPLAY.md` (+1 -1) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+18 -1) 📝 `packages/client/src/components/chat/SummaryPopover.tsx` (+778 -288) 📝 `packages/client/src/hooks/use-chats.ts` (+61 -1) 📝 `packages/server/src/routes/chats.routes.ts` (+126 -7) 📝 `packages/server/src/routes/generate.routes.ts` (+18 -4) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+1 -1) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+2 -1) 📝 `packages/server/src/services/storage/chats.storage.ts` (+15 -6) 📝 `packages/server/src/services/tools/tool-executor.ts` (+14 -5) 📝 `packages/shared/src/index.ts` (+1 -0) 📝 `packages/shared/src/types/chat.ts` (+31 -1) ➕ `packages/shared/src/utils/chat-summary-entries.ts` (+282 -0) </details> ### 📄 Description ## Linked issue Closes #933 ## Why this change - Long-running chats and roleplay sessions can accumulate multiple manual, automated, imported, and legacy summaries, but the old single summary field made provenance, enablement, editing, and token awareness hard to manage. - This gives users structured summary controls while preserving the compiled prompt-facing summary string used by existing generation flows. ## What changed - Added structured rolling summary entry types and shared helpers for compiling, estimating, normalizing, and managing summary metadata. - Updated manual, automated, and tool-driven summary paths to append summary entries while keeping `metadata.summary` backward compatible. - Added API and storage support for editing, enabling/disabling, and deleting summary entries. - Reworked the chat summary popover into structured entry rows with origin, status, token, edit, delete, toggle, and manual write controls. - Added persisted summary popover source/display settings and preserved the upstream Chibi Professor Mari persisted-store migration during the rebase. - Updated chat surfaces to support hiding and collapsing summarized messages. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Not run by Codex for this PR preparation pass. ## Docs and release impact - [x] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [x] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not attached yet. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Summary management now supports individual rolling entries that can be enabled, disabled, edited, and deleted * Token estimates displayed for each summary entry * Enhanced summary generation with structured entry creation * **Improvements** * Expanded "hidden from AI" message filtering to conversation mode chats * **Documentation** * Updated troubleshooting guide to explain rolling summary entry compilation <!-- 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/938?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:11:09 +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#4848
No description provided.