mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2310] [MERGED] Fix chat folder storage semantics #5530
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#5530
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/2310
Author: @Promansis
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @Promansis
Base:
refactor← Head:fix/issue-2271-chat-folder-storage-semantics📝 Commits (1)
eeeaf8cFix chat folder storage semantics📊 Changes
3 files changed (+1138 additions, -6 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+1126 -3)📝
src-tauri/src/commands/storage/contracts.rs(+7 -3)📝
src-tauri/src/commands/storage/shared.rs(+5 -0)📄 Description
Linked issue
Closes #2271
Why this change
Chat folder storage paths could create invalid durable state: folder order writes were split from folder creation, chat-folder assignments only checked existence, mode aliases could persist non-canonically, folder mode updates could bypass compatibility, and folder deletion cleaned child chats after parent removal.
What changed
folderIdassignments against the target folder's canonical mode on create and update, including folder-only patches and simultaneousmode/folderIdpatches.folderIdvalues before persisting create and patch bodies.Refactor impact
Primary owner:
Rust storage
Impact areas reviewed:
chatsandchat-folderssortOrderandorderBoundary notes:
src-tauri; no React, engine, shared API, or remote-runtime boundary changes.Pressure points touched:
src-tauri/src/commands/storage/commands/entities.rssrc-tauri/src/commands/storage/contracts.rssrc-tauri/src/commands/storage/shared.rsValidation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
cargo test --manifest-path src-tauri/Cargo.toml chat_foldercargo test --manifest-path src-tauri/Cargo.toml chat_folder_id_create_and_patch_persist_trimmed_referencecargo test --manifest-path src-tauri/Cargo.toml chat_folder_name_patch_trims_and_rejects_blank_namescargo test --manifest-path src-tauri/Cargo.toml legacy_no_modecargo test --manifest-path src-tauri/Cargo.toml filed_chat_alias_mode_create_and_patch_persist_canonical_modecargo test --manifest-path src-tauri/Cargo.toml moving_chatcargo test --manifest-path src-tauri/Cargo.toml creating_chat_rejects_folder_from_another_modecargo test --manifest-path src-tauri/Cargo.toml updating_chat_mode_and_folder_validates_post_patch_paircargo check --manifest-path src-tauri/Cargo.tomlpnpm checkFeature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Storage contract repair only; no new user-discoverable feature or workflow.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
No visible UI changes; storage command behavior only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.