[PR #937] [CLOSED] feat: add structured chat summary metadata controls #4846

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/937
Author: @Promansis
Created: 5/17/2026
Status: ❌ Closed

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


📝 Commits (10+)

  • 1ff2c20 feat/chat-summary-source-range
  • 37b43da Add: settings button and summary source persists
  • e8e7487 Add: collapse hidden message function
  • 6b3cc2e Wired in: hide summary, collapse hidden messages and icon change.
  • cca16ff Fix: Messages don't have to be loaded to be summarised. Hidden messages no longer summarised.
  • 9c0b2fd Add: Summary prompts and UI fixes
  • 37f03e0 Slice 1:
  • 39758f0 Slice 1 fixes
  • fce61ec slice 2:
  • 25d2414 Slice 2 Bunny fixes:

📊 Changes

19 files changed (+2416 additions, -204 deletions)

View changed files

📝 docs/ROLEPLAY.md (+1 -1)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -7)
📝 packages/client/src/components/chat/ChatConversationSurface.tsx (+3 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+112 -23)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+52 -9)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+87 -3)
📝 packages/client/src/components/chat/ConversationView.tsx (+10 -0)
📝 packages/client/src/components/chat/SummaryPopover.tsx (+1404 -132)
📝 packages/client/src/hooks/use-chats.ts (+133 -2)
📝 packages/client/src/stores/ui.store.ts (+51 -1)
📝 packages/server/src/routes/chats.routes.ts (+191 -12)
📝 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 (+9 -2)
📝 packages/server/src/services/tools/tool-executor.ts (+14 -5)
📝 packages/shared/src/index.ts (+1 -0)
📝 packages/shared/src/types/chat.ts (+44 -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.

🔄 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/937 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 5/17/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `feat/summary-popover-metadata` --- ### 📝 Commits (10+) - [`1ff2c20`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ff2c2038195bfa5ced603ffb7f7f8c8aa7708a1) feat/chat-summary-source-range - [`37b43da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37b43dae855c29fec861e59353e4ea27b2465eae) Add: settings button and summary source persists - [`e8e7487`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8e7487af75af3143dd64caf2458b0f502c4e0a5) Add: collapse hidden message function - [`6b3cc2e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6b3cc2e557dcf686a2445eb8814a51b073653385) Wired in: hide summary, collapse hidden messages and icon change. - [`cca16ff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cca16ffe49ae1851283fe43420ea201c2b5fe15e) Fix: Messages don't have to be loaded to be summarised. Hidden messages no longer summarised. - [`9c0b2fd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c0b2fd4fdae294602092f567852951a3aa58c0c) Add: Summary prompts and UI fixes - [`37f03e0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37f03e0a1609aba12dabc0051f99c694977103e6) Slice 1: - [`39758f0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/39758f0433e4794a1d24de0f54c6aca0319159ab) Slice 1 fixes - [`fce61ec`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fce61eca6a53ef5fd6ebf89f6fd43e12ba7416e3) slice 2: - [`25d2414`](https://github.com/Pasta-Devs/Marinara-Engine/commit/25d241408a5022e1e242a082bde51b4a7e9ac1e0) Slice 2 Bunny fixes: ### 📊 Changes **19 files changed** (+2416 additions, -204 deletions) <details> <summary>View changed files</summary> 📝 `docs/ROLEPLAY.md` (+1 -1) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -7) 📝 `packages/client/src/components/chat/ChatConversationSurface.tsx` (+3 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+112 -23) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+52 -9) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+87 -3) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+10 -0) 📝 `packages/client/src/components/chat/SummaryPopover.tsx` (+1404 -132) 📝 `packages/client/src/hooks/use-chats.ts` (+133 -2) 📝 `packages/client/src/stores/ui.store.ts` (+51 -1) 📝 `packages/server/src/routes/chats.routes.ts` (+191 -12) 📝 `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` (+9 -2) 📝 `packages/server/src/services/tools/tool-executor.ts` (+14 -5) 📝 `packages/shared/src/index.ts` (+1 -0) 📝 `packages/shared/src/types/chat.ts` (+44 -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 - [ ] `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. --- <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#4846
No description provided.