mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1502] Roleplay CYOA and context-injection outputs are not persisted to message extra #752
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#752
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 @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1502
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Roleplay CYOA choices and cached writer/context injections appear to be client-only or agent-run-only after generation, even though the Roleplay UI hydrates them from assistant
message.extraafter reload/chat switch.This came out of the Roleplay smoke/audit work for #1486.
Evidence
src/features/modes/roleplay/components/CyoaChoices.tsxhydrates choices from the last assistant message'sextra.cyoaChoicesand saves edits back to that same message extra.src/features/modes/roleplay/components/ContextInjectionPanel.tsxreads cached injections from the last assistant message'sextra.contextInjectionsand saves edits back there.src/features/runtime/generation/hooks/use-generate.tsapplies live CYOA agent results only touseAgentStoreviasetCyoaChoices(choices, chatId).src/engine/generation/start-generation.tspersists agent results toagent-runs, butsaveAssistantMessage,saveRegeneratedMessage, and the generation extra patch only write replay/snapshot/thinking/sprite/summary fields. They do not writecyoaChoicesorcontextInjectionsto assistant message extra.src/features/catalog/chats/hooks/use-chats.tstreatscyoaChoicesandcontextInjectionsas swipe-scoped message extra fields, which reinforces that these are intended to live on the message/swipe record.Expected
After a Roleplay generation with CYOA or context-injection agents:
Actual
The live client can show CYOA choices from
useAgentStore, andagent-runsare persisted, but the message extra fields that the Roleplay UI hydrates from are not populated by generation. After reload or switching away/back, the UI cannot recover those choices/injections from the message record unless the user manually edited/saved them first.Suggested Fix
Choose one source of truth and wire it end to end. The current UI suggests message/swipe extra is the intended source, so likely fix generation persistence to include:
cyoaChoicesfrom successful CYOA agent results,contextInjectionsfrom successful pre-generation injection results,If
agent-runsshould be the source instead, update the Roleplay components to hydrate fromagent-runsand remove the stale message-extra assumption.Related
invokeTauriRoleplay panel architecture issue.@SpicyMarinara commented on GitHub (May 29, 2026):
Resolved on refactor in
3e85cfca. CYOA choices and pre-generation context injections now persist to assistant message/swipe extra during normal generation, regeneration, and targeted agent retries.