[GH-ISSUE #2130] [Issue]: Native character export omits managed gallery images #1041

Closed
opened 2026-10-21 05:25:29 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2130

Originally assigned to: @cha1latte on GitHub.

Summary

Native .marinara character export on the refactor branch omits character gallery images that were uploaded through the normal managed-gallery flow. The export path only serializes gallery rows whose url is already an inline data:image/... value, but normal refactor gallery uploads persist managed files and store an asset URL.

Expected behavior

Native character export/import should preserve character gallery images across a .marinara round trip, matching legacy main behavior.

Actual behavior

Refactor gallery_for_character lists character-gallery rows, then skips every row whose url does not start with data:image/. Normal refactor gallery uploads store managed gallery assets and set the gallery row URL to the managed asset URL, so those images are not included in the native character export payload.

Steps to reproduce

  1. On refactor, create or open a character.
  2. Upload one or more images in the character Gallery tab.
  3. Export the character as native .marinara.
  4. Inspect the exported payload or import it into a clean profile.
  5. Observe that the uploaded gallery images are missing from the native character export/round trip.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor static trace on 2026-06-04; legacy reference main
  • Run mode: Tauri desktop / native character import-export path
  • OS + version: Not checked; static parityscan
  • Node + pnpm versions: Not checked; static parityscan
  • Rust version, if relevant: Not checked; static parityscan
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No runtime log or screenshot captured. Static evidence:

  • Refactor normal gallery upload persists managed assets in src-tauri/src/commands/storage/shared.rs at upload_gallery_image.
  • Refactor native export filters gallery rows to inline data URLs in src-tauri/src/commands/storage/exports.rs at gallery_for_character.
  • Legacy main read gallery image files from disk and embedded them in the native character envelope in packages/server/src/routes/characters.routes.ts at readGalleryForCharacter / buildNativeCharacterEnvelope.

Regression notes

Legacy main exported gallery metadata rows plus gallery image binaries from disk into the native character envelope. Refactor changed gallery uploads to managed assets, but the native export path still only handles inline gallery data:image/... rows.

Additional context

Found during the 2026-06-04 target 5 Characters parityscan for #2124 / #1904, in rows 05-CHAR-ASSET-gallery-images and 05-CHAR-COMPAT-native-marinara-import-export.

Adjacent import risk: native character gallery restore should be checked with the fix. The current restore path creates gallery rows from embedded inline data; proof should confirm those rows are materialized into managed gallery assets instead of leaving inline-only records.

Suggested proof after fixing: create a character with two managed gallery uploads, export native .marinara, import into a clean profile, confirm gallery row count, managed asset files, thumbnails/display URLs, and delete cleanup all survive the round trip.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2130 Originally assigned to: @cha1latte on GitHub. ## Summary Native `.marinara` character export on the refactor branch omits character gallery images that were uploaded through the normal managed-gallery flow. The export path only serializes gallery rows whose `url` is already an inline `data:image/...` value, but normal refactor gallery uploads persist managed files and store an asset URL. ## Expected behavior Native character export/import should preserve character gallery images across a `.marinara` round trip, matching legacy `main` behavior. ## Actual behavior Refactor `gallery_for_character` lists `character-gallery` rows, then skips every row whose `url` does not start with `data:image/`. Normal refactor gallery uploads store managed gallery assets and set the gallery row URL to the managed asset URL, so those images are not included in the native character export payload. ## Steps to reproduce 1. On `refactor`, create or open a character. 2. Upload one or more images in the character Gallery tab. 3. Export the character as native `.marinara`. 4. Inspect the exported payload or import it into a clean profile. 5. Observe that the uploaded gallery images are missing from the native character export/round trip. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `refactor` static trace on 2026-06-04; legacy reference `main` - Run mode: Tauri desktop / native character import-export path - OS + version: Not checked; static parityscan - Node + pnpm versions: Not checked; static parityscan - Rust version, if relevant: Not checked; static parityscan - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No runtime log or screenshot captured. Static evidence: - Refactor normal gallery upload persists managed assets in `src-tauri/src/commands/storage/shared.rs` at `upload_gallery_image`. - Refactor native export filters gallery rows to inline data URLs in `src-tauri/src/commands/storage/exports.rs` at `gallery_for_character`. - Legacy `main` read gallery image files from disk and embedded them in the native character envelope in `packages/server/src/routes/characters.routes.ts` at `readGalleryForCharacter` / `buildNativeCharacterEnvelope`. ## Regression notes Legacy `main` exported gallery metadata rows plus gallery image binaries from disk into the native character envelope. Refactor changed gallery uploads to managed assets, but the native export path still only handles inline gallery `data:image/...` rows. ## Additional context Found during the 2026-06-04 target 5 Characters parityscan for #2124 / #1904, in rows `05-CHAR-ASSET-gallery-images` and `05-CHAR-COMPAT-native-marinara-import-export`. Adjacent import risk: native character gallery restore should be checked with the fix. The current restore path creates gallery rows from embedded inline data; proof should confirm those rows are materialized into managed gallery assets instead of leaving inline-only records. Suggested proof after fixing: create a character with two managed gallery uploads, export native `.marinara`, import into a clean profile, confirm gallery row count, managed asset files, thumbnails/display URLs, and delete cleanup all survive the round trip. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:25:29 +07:00
  • closed this issue
  • added the
    bug
    label
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#1041
No description provided.