mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6226] [MERGED] feat: make roleplay agent summaries opt-in and cost help tappable #7094
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#7094
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6226
Author: @SpicyMarinara
Created: 9/15/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/roleplay-agent-summary-toggle📝 Commits (2)
90a0474chore: track roleplay agent summary control506e636feat: make roleplay agent summaries opt-in and cost help tappable📊 Changes
12 files changed (+278 additions, -16 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
docs/agents/agents-overview.md(+2 -1)📝
e2e/chat-sweep.e2e.ts(+133 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+23 -5)📝
packages/client/src/localization/locales/en.json(+2 -0)📝
packages/server/src/routes/generate.routes.ts(+2 -1)📝
packages/server/src/routes/generate/retry-agents-route.ts(+10 -7)📝
packages/server/src/services/generation/roleplay-summary-retrieval.ts(+5 -0)📝
packages/server/src/services/generation/tool-resolution-runtime.ts(+6 -1)📝
packages/shared/src/types/chat.ts(+2 -0)📝
scripts/regressions/agent-context-generation.regression.ts(+72 -1)📝
scripts/regressions/manual-agent-retry-resolution.regression.ts(+17 -0)📄 Description
Linked issue
Closes #6225
Closes #6228
Why this change
An agent’s recent-message limit only limits chat messages. Roleplay agent requests also attach the saved chat summary separately, which can add thousands of tokens even with a five-message window. Chat Settings → Agents now offers Attach chat summaries, off by default as requested by the maintainer, including for existing chats without a saved choice. The adjacent cost explanation also used a native hover title that could not be opened on mobile; it now uses the existing tappable help component.
What changed
Validation
pnpm checkpasses: localization, formatting, lint/types, E2E types, and production build.pnpm regression:promptpasses all three suites after the final default-off change.Existing real Fastify/provider regression passes with omitted, false, and true settings; it covers pre-generation, parallel, grouped post-processing, manual retries, the five-message window, summary storage, and the main request retaining its summary. The pre-fix run reproduced unwanted summary attachment.
Existing tool-runtime regression passes: omitted/false stays excluded through later metadata writes; true attaches it; Game and Conversation behavior is unchanged. The pre-fix run reproduced reattachment after a tool write.
Default-off browser flow passes desktop Chromium, mobile Chromium, and mobile WebKit: absent setting starts off, both choices persist after reload, control stays configurable with Enable Agents off, and Conversation/Game drawers omit it. The same case verifies tap-to-open cost help, a 44px touch target, viewport bounds, and second-tap/outside dismissal. Final combined run: 3/3 passed.
pnpm checkpasses locallyContainer (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.mdManual verification notes
Manually verify with installed agents in a real Roleplay chat containing large summaries. Compare agent input with the switch off and on, including manual retries. Manually verify tapping and dismissing the cost help in an iPhone Home Screen app. Automated payload tests use a local fixture provider; no paid model or physical iPhone testing is claimed. This setting controls shared chat-summary attachment, not all other agent instructions, character details, or explicit full-prompt access.
Docs and release impact
English Agents guide and CHANGELOG updated; #6227 tracks the matching changes for all ten downloadable documentation packs. No migration, dependency, or version changes.
UI evidence
Before/after screenshots (self-contained HTML; download to view) include desktop light and mobile WebKit dark views. The old mobile info span reproduced a tap with no visible help; the final tooltip opens and remains inside the viewport.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.