[PR #2203] [MERGED] Fix managed character gallery export #5467

Closed
opened 2026-10-22 04:16:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2203
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2130-gallery-export


📝 Commits (2)

  • 33b6a43 Fix managed character gallery export
  • 7a7c7c9 Record issue 2130 PR metadata

📊 Changes

3 files changed (+294 additions, -42 deletions)

View changed files

📝 scratch/bugfix-verification.json (+77 -32)
📝 src-tauri/src/commands/storage/exports.rs (+164 -10)
📝 src-tauri/src/commands/storage/imports/marinara_tests.rs (+53 -0)

📄 Description

Linked issue

Closes #2130

Why this change

  • Native .marinara character export skipped gallery images uploaded through the managed-gallery flow because those rows store an asset URL instead of an inline data:image/... URL.
  • The export/import round trip should preserve managed character gallery images, including legacy inline gallery rows.

What changed

  • Native character export now resolves managed character-gallery files from the app-owned gallery directory and embeds them into the .marinara envelope as data URLs.
  • Gallery export still preserves inline legacy gallery data and skips rows whose managed files are missing instead of exporting broken references.
  • Added Rust regression coverage for managed gallery export, inline/missing-file boundaries, and native import materializing embedded gallery images as managed assets.

Refactor impact

Primary owner:

Rust storage / native character import-export

Impact areas reviewed:

  • src-tauri/src/commands/storage/exports.rs
  • src-tauri/src/commands/storage/imports/marinara_tests.rs
  • Existing gallery upload, import materialization, and delete cleanup behavior through the focused gallery test filter

Boundary notes:

  • Change stays in src-tauri; no React, engine, shared API, remote-runtime, schema, dependency, or version files changed.
  • Export reads only files resolved by the existing managed-record file resolver under the app-owned gallery directory.

Pressure points touched:

  • Native .marinara character export gallery assembly
  • Native .marinara character import regression coverage

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex reproduced the bug before the fix with cargo test --manifest-path src-tauri\Cargo.toml gallery_assets -- --nocapture: the new managed-export regression failed because gallery_for_character returned 0 items for a managed gallery row.
  • Codex verified the fix with cargo test --manifest-path src-tauri\Cargo.toml gallery -- --nocapture: 17 gallery-focused Rust tests passed.
  • Codex ran cargo check --manifest-path src-tauri\Cargo.toml: passed.
  • Codex ran pnpm install --frozen-lockfile in the isolated worktree because node_modules was absent, with no dependency declaration changes.
  • Codex ran pnpm check: passed.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json: passed.
  • Bunny review ran before opening the PR and passed for the rebased diff.
  • Manual UI verification is not required for the core claim; this is a backend storage/import-export path with command-level proof.

Feature Discoverability

Check exactly one:

  • Updated 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.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix for an existing native character export/import behavior; no new discoverable product surface.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A. This is a Rust storage/native import-export bug with no meaningful visible UI state; command proof is recorded above and in scratch/bugfix-verification.json.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2203 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2130-gallery-export` --- ### 📝 Commits (2) - [`33b6a43`](https://github.com/Pasta-Devs/Marinara-Engine/commit/33b6a43d43fb84b7448c92cf910f0816f8423d00) Fix managed character gallery export - [`7a7c7c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7a7c7c964b049e2f72246f89a45038ce4b8be126) Record issue 2130 PR metadata ### 📊 Changes **3 files changed** (+294 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `scratch/bugfix-verification.json` (+77 -32) 📝 `src-tauri/src/commands/storage/exports.rs` (+164 -10) 📝 `src-tauri/src/commands/storage/imports/marinara_tests.rs` (+53 -0) </details> ### 📄 Description ## Linked issue Closes #2130 ## Why this change - Native `.marinara` character export skipped gallery images uploaded through the managed-gallery flow because those rows store an asset URL instead of an inline `data:image/...` URL. - The export/import round trip should preserve managed character gallery images, including legacy inline gallery rows. ## What changed - Native character export now resolves managed `character-gallery` files from the app-owned gallery directory and embeds them into the `.marinara` envelope as data URLs. - Gallery export still preserves inline legacy gallery data and skips rows whose managed files are missing instead of exporting broken references. - Added Rust regression coverage for managed gallery export, inline/missing-file boundaries, and native import materializing embedded gallery images as managed assets. ## Refactor impact Primary owner: Rust storage / native character import-export Impact areas reviewed: - `src-tauri/src/commands/storage/exports.rs` - `src-tauri/src/commands/storage/imports/marinara_tests.rs` - Existing gallery upload, import materialization, and delete cleanup behavior through the focused gallery test filter Boundary notes: - Change stays in `src-tauri`; no React, engine, shared API, remote-runtime, schema, dependency, or version files changed. - Export reads only files resolved by the existing managed-record file resolver under the app-owned gallery directory. Pressure points touched: - Native `.marinara` character export gallery assembly - Native `.marinara` character import regression coverage ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Codex reproduced the bug before the fix with `cargo test --manifest-path src-tauri\Cargo.toml gallery_assets -- --nocapture`: the new managed-export regression failed because `gallery_for_character` returned 0 items for a managed gallery row. - Codex verified the fix with `cargo test --manifest-path src-tauri\Cargo.toml gallery -- --nocapture`: 17 gallery-focused Rust tests passed. - Codex ran `cargo check --manifest-path src-tauri\Cargo.toml`: passed. - Codex ran `pnpm install --frozen-lockfile` in the isolated worktree because `node_modules` was absent, with no dependency declaration changes. - Codex ran `pnpm check`: passed. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`: passed. - Bunny review ran before opening the PR and passed for the rebased diff. - Manual UI verification is not required for the core claim; this is a backend storage/import-export path with command-level proof. ## Feature Discoverability Check exactly one: - [ ] Updated `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. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix for an existing native character export/import behavior; no new discoverable product surface. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A. This is a Rust storage/native import-export bug with no meaningful visible UI state; command proof is recorded above and in `scratch/bugfix-verification.json`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5467
No description provided.