[PR #2176] [MERGED] Materialize native persona import avatars #5455

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-2174-managed-persona-avatar-import


📝 Commits (4)

  • c58539e Materialize native persona import avatars
  • cb430ce Restore native character avatar rollback test
  • fadac2f Split Marinara import helpers
  • 5830e90 Update avatar rollback test triggers

📊 Changes

4 files changed (+283 additions, -125 deletions)

View changed files

📝 src-tauri/src/commands/storage/imports/marinara.rs (+49 -117)
➕ src-tauri/src/commands/storage/imports/marinara_helpers.rs (+111 -0)
📝 src-tauri/src/commands/storage/imports/marinara_tests.rs (+105 -0)
📝 src-tauri/src/commands/storage/imports/service.rs (+18 -8)

📄 Description

Linked issue

Closes #2174

Why this change

  • Native Marinara persona imports with embedded avatar data kept the data URL inline instead of materializing a managed persona avatar file.

What changed

  • Made the native import avatar materialization helper folder-aware.
  • Materialized native persona embedded avatars under avatars/personas.
  • Stored managed avatar URL and metadata on imported persona rows.
  • Rolled back the managed persona avatar file if later persona import work fails.
  • Returned the imported persona record in the native persona import response for parity with character imports and test visibility.

Refactor impact

Primary owner:

Tauri/Rust storage imports.

Impact areas reviewed:

  • Native Marinara persona import
  • Native character import avatar helper call path
  • Persona sprite failure rollback path

Boundary notes:

Rust storage/import boundary only. No React UI, engine, shared API wrapper, or remote runtime routing changes.

Pressure points touched:

Import modules only; no src-tauri/src/lib.rs command registration changes.

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

  • cargo check --manifest-path src-tauri/Cargo.toml
  • cargo test --manifest-path src-tauri/Cargo.toml native_marinara_persona_import_materializes_embedded_avatar
  • cargo test --manifest-path src-tauri/Cargo.toml native_marinara_persona_import_rolls_back_avatar_when_sprite_fails

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 existing native persona import behavior.

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 - Rust storage/import behavior only.


🔄 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/2176 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/issue-2174-managed-persona-avatar-import` --- ### 📝 Commits (4) - [`c58539e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c58539e1e07b48076b6ad222b8026810b0afc17a) Materialize native persona import avatars - [`cb430ce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cb430ce2e2182ac35138a535abc7277a40feeea5) Restore native character avatar rollback test - [`fadac2f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fadac2f2038ddf208e579f8ab012cf16aa6a3dc3) Split Marinara import helpers - [`5830e90`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5830e90be2ab1d24eee32eb918aaa9b79ed29240) Update avatar rollback test triggers ### 📊 Changes **4 files changed** (+283 additions, -125 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/imports/marinara.rs` (+49 -117) ➕ `src-tauri/src/commands/storage/imports/marinara_helpers.rs` (+111 -0) 📝 `src-tauri/src/commands/storage/imports/marinara_tests.rs` (+105 -0) 📝 `src-tauri/src/commands/storage/imports/service.rs` (+18 -8) </details> ### 📄 Description ## Linked issue Closes #2174 ## Why this change - Native Marinara persona imports with embedded avatar data kept the data URL inline instead of materializing a managed persona avatar file. ## What changed - Made the native import avatar materialization helper folder-aware. - Materialized native persona embedded avatars under `avatars/personas`. - Stored managed avatar URL and metadata on imported persona rows. - Rolled back the managed persona avatar file if later persona import work fails. - Returned the imported persona record in the native persona import response for parity with character imports and test visibility. ## Refactor impact Primary owner: Tauri/Rust storage imports. Impact areas reviewed: - Native Marinara persona import - Native character import avatar helper call path - Persona sprite failure rollback path Boundary notes: Rust storage/import boundary only. No React UI, engine, shared API wrapper, or remote runtime routing changes. Pressure points touched: Import modules only; no `src-tauri/src/lib.rs` command registration changes. ## Validation - [x] 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 - `cargo check --manifest-path src-tauri/Cargo.toml` - `cargo test --manifest-path src-tauri/Cargo.toml native_marinara_persona_import_materializes_embedded_avatar` - `cargo test --manifest-path src-tauri/Cargo.toml native_marinara_persona_import_rolls_back_avatar_when_sprite_fails` ## 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. - [x] 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 existing native persona import behavior. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A - Rust storage/import behavior only. --- <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:28 +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#5455
No description provided.