mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7795] [Issue]: Onboarding character-question variables stay behind after the character leaves the chat #4303
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#4303
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 @ylli-selmani on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7795
Originally assigned to: @SpicyMarinara, @ylli-selmani on GitHub.
Summary
In the Roleplay setup wizard, adding a character card that declares character questions (interactive onboarding) immediately writes each question's default into the chat's variables. Removing that character again leaves the variables behind in Chat Settings → Chat Variables, where no card reads them any more. Follow-up to #7439.
Expected behavior
When a character leaves a chat, the chat variables its onboarding questions own are removed, unless another character still in the chat declares the same variable name. Both an untouched first-option default and a real answer belong to that card, so both go.
Actual behavior
The character is removed from
characterIds, but the names its card declares stay inmetadata.macroVariablesforever. Only a manual delete in Chat Variables clears them.Steps to reproduce
relationshipToUser.Environment
staging@b4392bf1dextensions.onboarding.cardVariablesthat has options.Notes
The write comes from
PATCH /chats/:id(buildNewChatCardVariableDefaults→seedNewChatCardVariables), which seeds defaults for newly added characters. The seeding is deliberate: chats created without the wizard (Quick Start, start-from-card, the conversation wizard) must not send a literal{{relationshipToUser}}to the model. The missing half is the removal.The fix belongs in the same route, so every roster change is covered instead of only the wizard and the drawer. Rules worth keeping: a removed card whose onboarding is switched off owns nothing (nothing was seeded for it), while a remaining card's declaration protects a shared name even when that block is switched off, because its card fields can still read the value. A remaining card that only reads a name without declaring a question for it does not protect the value; that is a separate, cross-card authoring case.