mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1622] [MERGED] Normalize chat preset boolean flags #5154
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#5154
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1622
Author: @Promansis
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Promansis
Base:
refactor← Head:fix/issue-1523-chat-preset-boolish📝 Commits (2)
e7932beNormalize chat preset boolean flags2ea7509Fix chat preset flag normalization in new chat flows📊 Changes
9 files changed (+203 additions, -47 deletions)
View changed files
📝
src-tauri/src/commands/storage/shared.rs(+44 -0)📝
src/app/shell/useStartNewChat.ts(+8 -7)📝
src/engine/contracts/types/chat-preset.ts(+4 -0)📝
src/features/catalog/characters/hooks/use-start-chat-from-character.ts(+2 -4)📝
src/features/catalog/chat-presets/hooks/use-chat-presets.test.ts(+81 -1)📝
src/features/catalog/chat-presets/hooks/use-chat-presets.ts(+35 -7)📝
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx(+23 -21)📝
src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx(+4 -3)📝
src/features/modes/shared/chat-ui/components/NewChatConnectionGate.tsx(+2 -4)📄 Description
Linked issue
Closes #1523
Why this change
"false".Defaultand default/active selection logic could choose the wrong row.What changed
isDefault,default,isActive, andactiveat the Rust storage typed-field boundary forchat-presets.useChatPresetsso UI code gets booleans even before older rows are rewritten.Refactor impact
Primary owner:
Rust storage normalization; catalog chat preset hook; shared mode chat UI.
Impact areas reviewed:
Boundary notes:
src-taurishared storage typed-field handling.Pressure points touched:
src-tauri/src/commands/storage/shared.rstyped JSON/flag normalization.src/features/catalog/chat-presets/hooks/use-chat-presets.tscatalog hook normalization.src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsxshared mode UI.src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsxshared mode UI.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
cargo test --manifest-path src-tauri/Cargo.toml chat_preset_defaults_normalize_boolish_flagscargo check --manifest-path src-tauri/Cargo.tomlpnpm exec vitest run src/features/catalog/chat-presets/hooks/use-chat-presets.test.tspnpm typecheckpnpm check:architecturegit diff --checkDocs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
Not added. The visible change is corrected dropdown/default-control behavior for legacy/imported preset flags, covered by focused hook/storage tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.