mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1953] [MERGED] Fix legacy chat gallery recovery #5355
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#5355
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/1953
Author: @cha1latte
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1929-gallery-recovery📝 Commits (1)
5882fcfFix legacy chat gallery recovery📊 Changes
1 file changed (+221 additions, -0 deletions)
View changed files
📝
src-tauri/src/state.rs(+221 -0)📄 Description
Linked issue
Closes #1929
Why this change
data/gallery/<chatId>/during startup when the chat still existed but the gallery storage row was missing. Refactor now stores managed gallery uploads as files again, but startup still had no equivalent recovery path.What changed
data/gallery/<chatId>/.gallerycollection, and removed from the legacy source path after the row is created.Refactor impact
Primary owner:
Rust storage
Impact areas reviewed:
src-tauri/src/state.rsfilePath,filename,url)data/gallery/<chatId>/<image>)Boundary notes:
src-tauristorage lane. It does not change React feature code, engine contracts, shared API wrappers, remote runtime routing, dependencies, schemas, or version files.data/gallery/<filename>files because a missing row leaves no reliable chat/resource owner.Pressure points touched:
AppState::from_data_dir_with_resource_dirstartup initializationdata/gallerymanaged media recoveryValidation
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 app_state_startup_recovers_legacy_chat_gallery_files; before the fix the test failed because startup listed 0 gallery rows instead of the expected recovered row.cargo test --manifest-path src-tauri\Cargo.toml app_state_startup_recovers_legacy_chat_gallery_files.cargo check --manifest-path src-tauri\Cargo.toml.pnpm checkafter installing locked dependencies in the fresh worktree withpnpm install --frozen-lockfile.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json.Feature 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:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs changes were needed for this internal storage recovery bugfix.
UI evidence
N/A. This is a backend/storage startup recovery bug with no direct visible UI state; proof is the targeted Rust regression and full repo check above.
Summary by CodeRabbit
New Features
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.