[PR #3196] [MERGED] feat: add backfill summary button to chat summary popover #5836

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3196
Author: @jake9000
Created: 7/4/2026
Status: ✅ Merged
Merged: 7/4/2026
Merged by: @SpicyMarinara

Base: staging ← Head: new-summary


📝 Commits (1)

  • 749b5ba Add backfill summary button to chat summary popover

📊 Changes

3 files changed (+295 additions, -0 deletions)

View changed files

📝 packages/client/src/components/chat/SummaryPopover.tsx (+62 -0)
📝 packages/client/src/hooks/use-chats.ts (+182 -0)
➕ packages/client/src/stores/backfill.store.ts (+51 -0)

📄 Description

Linked issue

Closes #3195

Why this change

The automatic message summaries work great if you turn them on and configure them at the very start of a session. However, when you are on message 200 and realize you haven't set it up, the process of making new summaries in the desired batch size is highly vexing.

What changed

  1. Adds the 'Backfill Summary' button as well as a stop button.
  2. Adds a progress bar to monitor the batch jobs.
  3. Adds a zustand store for the batch status so that it is not lost when closing and reopening the summary card. I noticed that batches continued even when this ui state was lost.
  4. The actual meat of the functionality just automates the from/to/generate tool that you see at the bottom of the interface. It is actually not a very exciting change overall.

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

  1. compile the app into a podman container & copy it to my server.
  2. get it online.
  3. Copy in my personal data from MAIN so I have a big chatfile to work with.
  4. Delete all the existing summaries (opportunity for a bulk deleter here lol).
  5. click button.
  6. All functionality seems to work as described.
  7. Send a message to the chat, observe that the summaries work as they always did.
  8. Press F12 -- debug messages are in the console.
  9. Flipped through light/dark on my personal theme and the default theme to make sure everything is compliant.

Docs and release impact

  • No docs changes needed
  • N/A | Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • N/A | Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

image

Summary by CodeRabbit

  • New Features
    • Added a new “Backfill Summary” action in chat summaries to generate missing automatic summaries in batches.
    • Users can now see backfill progress, including a live progress bar and a Stop button while it runs.
  • Bug Fixes
    • Improved handling of partially summarized chats by skipping entries that already have summaries and continuing from the remaining ones.
    • Added support for safely stopping an in-progress backfill without interrupting the app.

🔄 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/3196 **Author:** [@jake9000](https://github.com/jake9000) **Created:** 7/4/2026 **Status:** ✅ Merged **Merged:** 7/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `new-summary` --- ### 📝 Commits (1) - [`749b5ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/749b5ba6de95339f2b9a60822824ae3789f953d8) Add backfill summary button to chat summary popover ### 📊 Changes **3 files changed** (+295 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/SummaryPopover.tsx` (+62 -0) 📝 `packages/client/src/hooks/use-chats.ts` (+182 -0) ➕ `packages/client/src/stores/backfill.store.ts` (+51 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #3195 ## Why this change The automatic message summaries work great if you turn them on and configure them at the very start of a session. However, when you are on message 200 and realize you haven't set it up, the process of making new summaries in the desired batch size is highly vexing. - ## What changed <!-- List the key changes in this PR --> 1. Adds the 'Backfill Summary' button as well as a stop button. 2. Adds a progress bar to monitor the batch jobs. 3. Adds a zustand store for the batch status so that it is not lost when closing and reopening the summary card. I noticed that batches continued even when this ui state was lost. 4. The actual meat of the functionality just automates the from/to/generate tool that you see at the bottom of the interface. It is actually not a very exciting change overall. - ## Validation <!-- Required: include commands run and/or manual checks performed --> - [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 1. compile the app into a podman container & copy it to my server. 2. get it online. 3. Copy in my personal data from MAIN so I have a big chatfile to work with. 4. Delete all the existing summaries (opportunity for a bulk deleter here lol). 5. click button. 6. All functionality seems to work as described. 7. Send a message to the chat, observe that the summaries work as they always did. 8. Press F12 -- debug messages are in the console. 9. Flipped through light/dark on my personal theme and the default theme to make sure everything is compliant. - ## Docs and release impact - [x] No docs changes needed - [ ] N/A | Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] N/A | Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> <img width="659" height="1054" alt="image" src="https://github.com/user-attachments/assets/8640b4a3-701e-43f5-99ff-dde4b5a9f262" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new “Backfill Summary” action in chat summaries to generate missing automatic summaries in batches. * Users can now see backfill progress, including a live progress bar and a Stop button while it runs. * **Bug Fixes** * Improved handling of partially summarized chats by skipping entries that already have summaries and continuing from the remaining ones. * Added support for safely stopping an in-progress backfill without interrupting the app. <!-- 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:20:02 +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#5836
No description provided.