mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4080] [Issue]: Chat Settings only remembers expanded drawer in Roleplay mode — Conversation & Game sections lack persistence ids #2206
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#2206
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 @SpicyMarinara on GitHub (Jul 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4080
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Chat Settings remembers which collapsible drawer/section was left expanded and restores it on reopen — but in practice this only "sticks" for the sections prominent in Roleplay mode. Most Conversation and Game mode sections do not remember their state.
Root cause
Persistence is opt-in via an optional
idprop on the shared<Section>collapsible, and only the sections that were extracted into dedicated components were given anid. The 18 remaining inline<Section>calls have noid, so they silently never persist.features/chat-settings/ChatSettingsSection.tsx— persistence is gated onid:rememberedOpenreads the store only whenidis set (line 29);toggleOpenwrites back onlyif (id)(lines 36-41).id,rememberedOpenis alwaysundefinedand the section always falls back toinitialOpen.chatSettingsExpandedSectionsinstores/ui.store.ts(state 605-606, setter 2051-2054, persisted via partialize).<ChatSettingsDrawer>is mounted for every mode viaChatCommonOverlays(ChatCommonOverlays.tsx:327-342), so the surface wiring is not the problem.The feature was introduced in commit
efec21a4a("feat(chat-settings): inline prompt-preset editing + remembered section state"), whose diff only addedid="…"to the extracted section components plus the store plumbing.What persists vs what doesn't (in
ChatSettingsDrawer.tsx)Persists (id-bearing, extracted components): chat-name, connection, lorebooks, translation, function-calling (all modes); prompt-preset, impersonate (roleplay); conversation-prompt (conversation); game-prompt, combat-style (game).
Does NOT persist (inline
<Section>, noid) — includes exactly the Conversation/Game-defining sections: Party, Persona, Characters, Card Theming, Scoped Regex, Group Chat, Autonomous Messaging, Agents / Conversation commands, Connected Chats, Widgets, Memory Recall, Automatic Summarization, Conversation Notes. Lines: 4570, 4868, 5041, 5323, 5378, 5482, 5764, 6026, 6314, 6438, 6529, 6579, 6680, 9113, 9164, 9176, 9290, 11173.Because Roleplay's prominent collapsibles (Prompt Preset, Lorebooks, Impersonate, Connection) are id-bearing while the Conversation/Game headline sections are inline-without-id, it looks like the feature only works in Roleplay.
Suggested fix
Give every remaining inline
<Section …>inChatSettingsDrawer.tsxa stable, uniqueid(matching the pattern already used by the extracted section components). No store or per-mode logic changes are needed — the persistence already works for any section that has anid.Manual verification (for the implementer — leave unchecked)
ids are unique (no collisions sharing state across unrelated sections)@SpicyMarinara commented on GitHub (Jul 25, 2026):
I’m implementing this as part of the active open-issue sweep in #4077. No competing issue-linked branch or open PR was found before starting.