[GH-ISSUE #1960] [Issue]: Native Marinara character import stores avatar data inline #963

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

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

Originally assigned to: @cha1latte on GitHub.

Summary

Native .marinara character imports put embedded avatar data directly into avatarPath as a data:image/... string. Legacy native import wrote embedded avatars to managed avatar storage, and current ST/CharX import in refactor also writes managed avatar metadata.

Expected behavior

Importing a native Marinara character export with an embedded avatar should materialize the avatar under managed character avatar storage and set avatarPath, avatarFilePath, and avatarFilename consistently with other character avatar imports.

Actual behavior

src-tauri/src/commands/storage/imports/marinara.rs sets avatarPath from data_image_string(data.get("avatar")), leaving inline image data in the character row instead of managed avatar file metadata.

Steps to reproduce

  1. Import a native .marinara character export that contains an embedded avatar.
  2. Inspect the saved character row after import.
  3. Observe avatarPath containing a data:image/... value instead of managed avatar path metadata.

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 at 7801a73a
  • Run mode: Tauri desktop / native import path
  • OS + version: Not OS-specific
  • Node + pnpm versions: Not checked; static parityscan
  • Rust version, if relevant: Not checked; Rust import source inspected
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No runtime log captured. Static evidence is the native import path writing inline data, while the current ST/CharX import path writes managed avatar metadata.

Regression notes

Legacy packages/server/src/services/import/marinara.importer.ts saved embedded avatar data with saveAvatarFromDataUrl(...) and then called storage.updateAvatar(...) for the created character.

Additional context

Found during target 5 Characters parityscan for #1904. Related visible thumbnail fallout is tracked in #1944; this issue tracks the native import storage root cause.

Suggested fix: when native character import sees data.avatar with a data:image/... URL, decode and persist it through the same managed avatar helper used by ST/CharX import. Roll back the saved file if the character import fails.

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 @Xelvanis on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1960 Originally assigned to: @cha1latte on GitHub. ## Summary Native `.marinara` character imports put embedded avatar data directly into `avatarPath` as a `data:image/...` string. Legacy native import wrote embedded avatars to managed avatar storage, and current ST/CharX import in refactor also writes managed avatar metadata. ## Expected behavior Importing a native Marinara character export with an embedded avatar should materialize the avatar under managed character avatar storage and set `avatarPath`, `avatarFilePath`, and `avatarFilename` consistently with other character avatar imports. ## Actual behavior `src-tauri/src/commands/storage/imports/marinara.rs` sets `avatarPath` from `data_image_string(data.get("avatar"))`, leaving inline image data in the character row instead of managed avatar file metadata. ## Steps to reproduce 1. Import a native `.marinara` character export that contains an embedded avatar. 2. Inspect the saved character row after import. 3. Observe `avatarPath` containing a `data:image/...` value instead of managed avatar path metadata. ## 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` at `7801a73a` - Run mode: Tauri desktop / native import path - OS + version: Not OS-specific - Node + pnpm versions: Not checked; static parityscan - Rust version, if relevant: Not checked; Rust import source inspected - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No runtime log captured. Static evidence is the native import path writing inline data, while the current ST/CharX import path writes managed avatar metadata. ## Regression notes Legacy `packages/server/src/services/import/marinara.importer.ts` saved embedded avatar data with `saveAvatarFromDataUrl(...)` and then called `storage.updateAvatar(...)` for the created character. ## Additional context Found during target 5 Characters parityscan for #1904. Related visible thumbnail fallout is tracked in #1944; this issue tracks the native import storage root cause. Suggested fix: when native character import sees `data.avatar` with a `data:image/...` URL, decode and persist it through the same managed avatar helper used by ST/CharX import. Roll back the saved file if the character import fails. ## 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:24:10 +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#963
No description provided.