[GH-ISSUE #1524] [Issue]: JSONL chat export/import loses character avatar context #773

Closed
opened 2026-10-20 17:33:12 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

JSONL chat export/import does not round-trip character identity or avatar context. After importing a JSONL chat transcript, the imported chat has no linked characterIds, and imported messages have characterId: null, so character avatars cannot render for those messages.

Expected behavior

If Marinara offers JSONL export/import as a chat round-trip path, it should preserve enough character identity to keep character avatars working after import.

At minimum, the UI should clearly label JSONL export/import as transcript-only if avatars and character links are intentionally unsupported.

Actual behavior

Reported behavior: character avatar images are broken after JSONL export/import.

Current-code audit shows the JSONL export path writes message rows only, while the ST JSONL import path creates a new chat with empty characterIds and imports each message with characterId: null and extra: {}.

That means the imported transcript has no stable source for character avatars even if the original chat had character cards and avatar paths.

Steps to reproduce

  1. Create or open a chat with at least one character that has an avatar.
  2. Export the chat as JSONL.
  3. Import the JSONL transcript back into Marinara.
  4. Open the imported chat.
  5. Observe that character avatar context is missing or broken on imported assistant messages.

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: origin/refactor at e79891d9
  • Run mode: code audit against refactor export/import path; original report came from Roleplay use
  • OS + version: not OS-specific
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Code paths inspected:

  • src/features/catalog/chats/lib/chat-transcript-export.ts
  • src/features/catalog/chats/hooks/use-chats.ts
  • src-tauri/src/commands/storage/imports/bulk_imports.rs

Relevant current behavior:

  • formatChatJsonl(messages) serializes each Message row only.
  • import_st_chat_text(...) creates a chat with default characterIds: [].
  • Each imported message is created with characterId: Value::Null, extra: {}, and swipes: [{ content }].
  • The importer reads character_name from JSONL rows into importedCharacterName, but does not link an existing character, create a character, or preserve avatar metadata.

Regression notes

Unknown. Reported during Roleplay audit on the refactor branch.

Additional context

This may need a product decision:

  • make JSONL a real Marinara round-trip format that includes chat/card/avatar metadata, or
  • keep JSONL as a SillyTavern/transcript compatibility format and make the export/import UI copy explicit that avatars/character links are not preserved.

The native bulk/native chat export format may already be the better full-fidelity path, but the current JSONL UI makes it easy to expect a chat 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 @Xelvanis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1524 Originally assigned to: @Promansis on GitHub. ## Summary JSONL chat export/import does not round-trip character identity or avatar context. After importing a JSONL chat transcript, the imported chat has no linked `characterIds`, and imported messages have `characterId: null`, so character avatars cannot render for those messages. ## Expected behavior If Marinara offers JSONL export/import as a chat round-trip path, it should preserve enough character identity to keep character avatars working after import. At minimum, the UI should clearly label JSONL export/import as transcript-only if avatars and character links are intentionally unsupported. ## Actual behavior Reported behavior: character avatar images are broken after JSONL export/import. Current-code audit shows the JSONL export path writes message rows only, while the ST JSONL import path creates a new chat with empty `characterIds` and imports each message with `characterId: null` and `extra: {}`. That means the imported transcript has no stable source for character avatars even if the original chat had character cards and avatar paths. ## Steps to reproduce 1. Create or open a chat with at least one character that has an avatar. 2. Export the chat as JSONL. 3. Import the JSONL transcript back into Marinara. 4. Open the imported chat. 5. Observe that character avatar context is missing or broken on imported assistant messages. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Chat mode - [x] Roleplay mode - [ ] Game mode - [x] 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: `origin/refactor` at `e79891d9` - Run mode: code audit against refactor export/import path; original report came from Roleplay use - OS + version: not OS-specific - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Code paths inspected: - `src/features/catalog/chats/lib/chat-transcript-export.ts` - `src/features/catalog/chats/hooks/use-chats.ts` - `src-tauri/src/commands/storage/imports/bulk_imports.rs` Relevant current behavior: - `formatChatJsonl(messages)` serializes each `Message` row only. - `import_st_chat_text(...)` creates a chat with default `characterIds: []`. - Each imported message is created with `characterId: Value::Null`, `extra: {}`, and `swipes: [{ content }]`. - The importer reads `character_name` from JSONL rows into `importedCharacterName`, but does not link an existing character, create a character, or preserve avatar metadata. ## Regression notes Unknown. Reported during Roleplay audit on the refactor branch. ## Additional context This may need a product decision: - make JSONL a real Marinara round-trip format that includes chat/card/avatar metadata, or - keep JSONL as a SillyTavern/transcript compatibility format and make the export/import UI copy explicit that avatars/character links are not preserved. The native bulk/native chat export format may already be the better full-fidelity path, but the current JSONL UI makes it easy to expect a chat 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-20 17:33:12 +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#773
No description provided.