mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1523] [Issue]: Chat settings preset dropdown can show every preset as Default #769
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#769
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/1523
Originally assigned to: @Promansis on GitHub.
Summary
In the Chat Settings drawer, chat-settings presets can all appear as
Defaultinstead of their saved preset names.Current code appears to treat raw truthy
isDefaultvalues as booleans in the dropdown, so imported or legacy rows with string values such as"false"can still render as default.Expected behavior
The preset dropdown should display each preset's actual saved name unless it is truly the built-in/default preset.
Imported or migrated preset rows should be normalized so
isDefault,default,isActive, andactiveare real booleans before UI display and selection logic runs.Actual behavior
Reported behavior: every preset in the Chat Settings drawer dropdown shows as
Default.Current-code audit on latest
origin/refactorfound the drawer still renders options with raw truthiness:The selected-preset fallback also uses
presetList.find((p) => p.isDefault)without boolish coercion.Steps to reproduce
isDefault: "false".Impact area
Environment
origin/refactorate79891d9Logs, screenshots, or video
Code paths inspected:
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsxsrc/features/catalog/chat-presets/hooks/use-chat-presets.tssrc-tauri/src/commands/storage/shared.rssrc-tauri/src/commands/storage/profile/legacy.rsRelevant findings:
p.isDefault ? "Default" : p.namedirectly.p.isDefault.useChatPresetsreturns storage rows without normalizing boolean-ish fields.with_entity_defaultscurrently normalizeschat-presetsJSON object fields, but does not coerceisDefault,default,isActive, oractiveto booleans.Regression notes
Unknown. Reported during Roleplay audit on the refactor branch.
Additional context
Likely fix areas:
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: