[GH-ISSUE #2738] [Issue]: Chat Summary marker — misleading description + no diagnostic when a manual summary won't inject + duplicated mode-gate (UX/cleanup) #1378

Closed
opened 2026-10-21 05:32:39 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2738

Originally assigned to: @SpicyMarinara on GitHub.

Summary

A user reported their manual Chat Summary "isn't getting injected in the context" even though the side-panel shows it active (1 active · ~1.4k tokens, entry enabled) and their preset has the Chat Summary marker. Investigation against staging shows this is not a functional bug — in roleplay and visual_novel modes (the only modes where the manual Chat Summary UI is reachable), an enabled manual entry is compiled into metadata.summary and injected at the marker. But the feature has UX/clarity gaps that make a non-injecting case impossible for the user to diagnose, plus minor code drift. Filing those.

Confirmed working path (for reference)

  • Marker → ctx.chatSummary → resolveRoleplayChatSummary(chatMode, meta) reads meta.summary for roleplay/visual_novel (packages/server/src/routes/generate.routes.ts:601-603).
  • Saving/toggling a manual entry recompiles meta.summary from summaryEntries in lockstep (packages/server/src/routes/chats.routes.ts:629-630, :693-694, :730-731), so the panel (summaryEntries) and marker (summary) stay in sync.

UX / clarity gaps to fix

1. Misleading marker description

The Chat Summary marker description reads "Content is auto-generated at assembly time from your characters, lorebooks, etc." It does not mention that it also includes the user's manual Chat Summary entries — which is exactly what this user wrote and then couldn't find. The description should state that it renders the compiled Chat Summary (manual + automated entries).

2. No feedback when a summary won't inject

When the summary is empty in the prompt, the user has no signal why. The two common real causes are silent:

  • The Chat Summary section is disabled (the section's enable/eye toggle) or it sits inside a disabled group (assembler.ts skips disabled sections/groups), or
  • the chat's active preset differs from the preset being edited.

Consider surfacing a hint in the Summary panel (e.g. "Chat Summary section is disabled in the active preset" / "active preset has no Chat Summary marker") so users can self-diagnose.

Minor code cleanup (low risk, prevents future drift)

  • Duplicated mode-gate literal: chats.routes.ts:1698-1701 re-implements the roleplay || visual_novel gate as a raw ternary instead of calling the shared resolveRoleplayChatSummary helper — drift risk if the mode list changes.
  • Dry-run / retry divergence: generate/dry-run-route.ts:960,1177 and generate/retry-agents-route.ts:642 read chatMeta.summary without the mode gate. Currently harmless (the field is only populated in roleplay/visual_novel), but it's a latent inconsistency between the preview and the real send path.

Steps that reproduce the user confusion

  1. In a roleplay chat, write a manual Chat Summary entry (enabled).
  2. Disable the Chat Summary preset section (eye toggle) or have the chat on a different active preset.
  3. Observe: the panel still shows "1 active · ~1.4k tokens", but the marker injects nothing, with no explanation.

Suggested fix

  1. Update the Chat Summary marker description to mention manual + automated compiled summary.
  2. Add a panel hint when the summary won't reach the prompt (section/group disabled, or no Chat Summary marker in the active preset).
  3. Replace the duplicated gate at chats.routes.ts:1698-1701 with resolveRoleplayChatSummary, and align the dry-run/retry reads behind the same gate for consistency.

Template checklist

  • pnpm check passes (TypeScript + ESLint)
  • Manually verify the marker description reflects manual summaries
  • Manually verify a disabled Chat Summary section shows a diagnostic hint in the panel
  • Manually verify the dry-run preview and real send agree on Chat Summary content

Filed from a user report ("manual Chat Summary not injected"); verified against staging — the injection works in roleplay/VN, so this tracks the UX/clarity + cleanup gaps, not a functional regression. Boxes left unchecked for human verification.

Originally created by @kolacheee on GitHub (Jun 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2738 Originally assigned to: @SpicyMarinara on GitHub. ## Summary A user reported their **manual Chat Summary** "isn't getting injected in the context" even though the side-panel shows it active (`1 active · ~1.4k tokens`, entry enabled) and their preset has the **Chat Summary** marker. Investigation against `staging` shows this is **not a functional bug** — in `roleplay` and `visual_novel` modes (the only modes where the manual Chat Summary UI is reachable), an enabled manual entry **is** compiled into `metadata.summary` and injected at the marker. But the feature has **UX/clarity gaps** that make a non-injecting case impossible for the user to diagnose, plus minor code drift. Filing those. ### Confirmed working path (for reference) - Marker → `ctx.chatSummary` → `resolveRoleplayChatSummary(chatMode, meta)` reads `meta.summary` for roleplay/visual_novel (`packages/server/src/routes/generate.routes.ts:601-603`). - Saving/toggling a manual entry recompiles `meta.summary` from `summaryEntries` in lockstep (`packages/server/src/routes/chats.routes.ts:629-630`, `:693-694`, `:730-731`), so the panel (`summaryEntries`) and marker (`summary`) stay in sync. ## UX / clarity gaps to fix ### 1. Misleading marker description The Chat Summary marker description reads *"Content is auto-generated at assembly time from your characters, lorebooks, etc."* It does **not** mention that it also includes the user's **manual** Chat Summary entries — which is exactly what this user wrote and then couldn't find. The description should state that it renders the compiled Chat Summary (manual + automated entries). ### 2. No feedback when a summary won't inject When the summary is empty in the prompt, the user has no signal why. The two common real causes are silent: - The Chat Summary **section is disabled** (the section's enable/eye toggle) or it sits inside a **disabled group** (`assembler.ts` skips disabled sections/groups), or - the chat's **active preset differs** from the preset being edited. Consider surfacing a hint in the Summary panel (e.g. "Chat Summary section is disabled in the active preset" / "active preset has no Chat Summary marker") so users can self-diagnose. ## Minor code cleanup (low risk, prevents future drift) - **Duplicated mode-gate literal:** `chats.routes.ts:1698-1701` re-implements the `roleplay || visual_novel` gate as a raw ternary instead of calling the shared `resolveRoleplayChatSummary` helper — drift risk if the mode list changes. - **Dry-run / retry divergence:** `generate/dry-run-route.ts:960,1177` and `generate/retry-agents-route.ts:642` read `chatMeta.summary` **without** the mode gate. Currently harmless (the field is only populated in roleplay/visual_novel), but it's a latent inconsistency between the preview and the real send path. ## Steps that reproduce the user confusion 1. In a roleplay chat, write a manual Chat Summary entry (enabled). 2. Disable the Chat Summary preset section (eye toggle) or have the chat on a different active preset. 3. Observe: the panel still shows "1 active · ~1.4k tokens", but the marker injects nothing, with no explanation. ## Suggested fix 1. Update the Chat Summary marker description to mention manual + automated compiled summary. 2. Add a panel hint when the summary won't reach the prompt (section/group disabled, or no Chat Summary marker in the active preset). 3. Replace the duplicated gate at `chats.routes.ts:1698-1701` with `resolveRoleplayChatSummary`, and align the dry-run/retry reads behind the same gate for consistency. ## Template checklist - [ ] `pnpm check` passes (TypeScript + ESLint) - [ ] Manually verify the marker description reflects manual summaries - [ ] Manually verify a disabled Chat Summary section shows a diagnostic hint in the panel - [ ] Manually verify the dry-run preview and real send agree on Chat Summary content --- _Filed from a user report ("manual Chat Summary not injected"); verified against `staging` — the injection works in roleplay/VN, so this tracks the UX/clarity + cleanup gaps, not a functional regression. Boxes left unchecked for human verification._
bsakaguchi 2026-10-21 05:32:39 +07:00
  • closed this issue
  • added the
    in-pr
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jun 21, 2026):

Addressed in PR #2747.

<!-- gh-comment-id:4763115732 --> @SpicyMarinara commented on GitHub (Jun 21, 2026): Addressed in PR #2747.
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#1378
No description provided.