mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4408] [Feature]: Summarize messages since the latest active summary #2394
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2394
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @olegpro171 on GitHub (Aug 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4408
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Roleplay stories naturally progress through logical arcs, but automatic Chat Summary generation runs on a fixed message interval. The interval can split an ongoing arc or fail to align with the point where the user wants to begin something new.
Users can currently create a manual summary using the last N messages or an explicit message-number range. However, determining how many messages remain unsummarized and entering that value or range manually is tedious.
A quick way to summarize the current unsummarized tail would let users close an arc at a meaningful point and prepare the roleplay context for what comes next.
Proposed solution
Add two context-sensitive actions to the Roleplay Chat Summary popover.
When Summary Scope: Last is selected:
When Summary Scope: Range is selected:
Both controls should only appear for their corresponding Summary Scope.
For generated summaries, the latest reliable boundary can be derived from the exact
messageIdsalready stored on summary entries:messageIdsagainst the current ordered chat history.The boundary should be resolved server-side against the complete current history as the client may only have a paginated portion of chat loaded.
A successful manual flush should also be considered when calculating the next automatic-summary cadence. Otherwise, an automatic summary that was nearly due before the manual flush could trigger immediately after the first turn.
Alternatives considered
lastAutomaticSummaryMessageIdas the boundary. This is not reliable evidence that a summary was saved because it is a cadence marker and may advance when the model returns no durable summary or when approval is still pending.Additional context
Relevant implementation and edge-case notes:
messageIdsthey covered, so no storage migration should be necessary for current structured summaries.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@olegpro171 commented on GitHub (Aug 1, 2026):
If this request is approved, I can also proceed with implementing the feature and its regression and browser coverage.
@SpicyMarinara commented on GitHub (Aug 1, 2026):
Hey pookie, you can already choose to hide summarized messages and summarize the last X messages in each selected interval. Recently, we also added an option to summarize summaries.
@olegpro171 commented on GitHub (Aug 1, 2026):
@SpicyMarinara I know that its already a feature to summarize last X messages, I only proposed to automatically set that X to the count of unsummarized tail so manual summarize does not require to enter range manually each time and instead is is a one-click action
@SpicyMarinara commented on GitHub (Aug 1, 2026):
Doesn't Backfill already fill this role?
@olegpro171 commented on GitHub (Aug 1, 2026):
Backfill partially overlaps, but it was designed for retrospective recovery. It divides the history into fixed-sized batches, which works good for long chat history. The proposed feature however is more like a story checkpoint. It summarizes the current tail after the latest active summary entirely as one batch, provided it fits within the reasonable limits.
That distinction can affect summary quality. A single batch lets the summarizer have clearer picture of the event: its setup, development, outcome, and remaining threads together. With backfill, those elements will be split into different batches by arbitrary batch boundary. Current Backfill feature preserves continuity by providing each batch with the compiled summaries from preceding batches, but not their original messages. This can fragment or omit details compared with summarizing the complete event as one deliberately selected range.
Backfill remains preferable for hundreds of older messages. A single range is not automatically better when it becomes very large. The proposed feature is intended to be used frequently after smaller, coherent events.
Thinking again, with the similarities to the backfill in mind, it might be better to implement it as simply one button near the button for ordinary backfill to simplify the UI.