[GH-ISSUE #2308] [Issue]: 09-CHAT-COMPAT-chat-file-import-export-profile exports incompatible chat files #1140

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

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

Originally assigned to: @Promansis on GitHub.

Summary

09-CHAT-COMPAT-chat-file-import-export-profile parityscan found that chat transcript export/import/profile is not fully compatible with legacy chat-file workflows. Refactor JSONL/text export no longer emits legacy ST-compatible transcript shape, and the new sidebar Native JSON chat-bulk export has no matching import path.

Expected behavior

Legacy-compatible chat export should preserve the user workflow from v1.6.1:

  • Single-chat JSONL export should emit a SillyTavern-compatible transcript with a header row and message rows using name, is_user, is_system, mes, and send_date.
  • Single-chat text export should include useful transcript context such as chat header, display names, and timestamps.
  • Bulk transcript export should package JSONL/text transcript files with branch/group metadata.
  • Any visible Native JSON chat-bulk export should either be importable/recoverable through the Marinara import surface or not be offered as an import-fidelity format.
  • Imported JSONL chat files should continue to create branch/chat-file siblings with target chat roster, mode, persona, connection, prompt preset, and branch label preserved.

Actual behavior

Refactor keeps the UI affordances for JSONL/text export and JSONL import-as-branch, and import_st_chat_into_group still preserves branch/group behavior.

However, refactor JSONL export writes raw Marinara message objects, not the legacy/ST-compatible transcript header and message rows. Refactor text export is also reduced to role/content lines. The sidebar also offers Native JSON for selected chats and writes a format: "marinara-chat-bulk" file, but no importer for marinara-chat-bulk was found.

Steps to reproduce

  1. Open a chat or chat-file group on the refactor branch.
  2. Export the chat as JSONL from Manage Chat Files, or export selected chats as Native JSON from the sidebar bulk export menu.
  3. Inspect the exported file shape.
  4. Compare against legacy v1.6.1 /chats/:id/export?format=jsonl and /chats/export/bulk behavior, then try to find/import the Native JSON chat-bulk format in the current import surfaces.

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 parityscan, 2026-06-05
  • Run mode: static trace only
  • OS + version: not runtime-tested
  • Node + pnpm versions: not run
  • Rust version, if relevant: not run
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No runtime logs. Static proof:

  • Legacy single/bulk transcript export builds ST-compatible JSONL/text and ZIP manifest: main:packages/server/src/routes/chats.routes.ts:2034, main:packages/server/src/routes/chats.routes.ts:2082, main:packages/server/src/routes/chats.routes.ts:2127
  • Legacy chat-file import into group preserves group/branch inheritance: main:packages/server/src/routes/import.routes.ts:478, main:packages/server/src/routes/import.routes.ts:494, main:packages/server/src/routes/import.routes.ts:541
  • Refactor ChatFilesDrawer export/import affordances: src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:50, src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:155, src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:230
  • Refactor import wrapper and Rust group import path: src/shared/api/import-api.ts:96, src-tauri/src/commands/storage/imports/bulk_imports.rs:1031
  • Refactor JSONL/text export helpers write role/content or raw message JSONL: src/features/catalog/chats/hooks/use-chats.ts:1059, src/features/catalog/chats/lib/chat-transcript-export.ts:23, src/features/catalog/chats/lib/chat-transcript-export.ts:32
  • Refactor importer accepts mes/content and role, so self re-import is partly supported but no longer ST-compatible export shape: src-tauri/src/commands/storage/imports/bulk_imports.rs:47, src-tauri/src/commands/storage/imports/bulk_imports.rs:915
  • Refactor Native JSON chat-bulk export exists, but no importer was found for marinara-chat-bulk: src/app/shell/ChatSidebar.tsx:1241, src/features/catalog/chats/hooks/use-bulk-export-chats.ts:53
  • Profile import/export path itself exists and accepts native plus legacy profile shapes: src/shared/api/profile-api.ts:92, src-tauri/src/commands/storage/profile.rs:562, src-tauri/src/commands/storage/profile.rs:637

Regression notes

This is a confirmed parity gap from upstream parity tracker #2268, surface 09-CHAT-COMPAT-chat-file-import-export-profile.

Legacy behavior existed on main / v1.6.1 paths. Refactor currently changes exported JSONL/text shape and exposes an unimportable Native JSON chat-bulk format.

Additional context

Acceptance criteria:

  • 09-CHAT-COMPAT-chat-file-import-export-profile JSONL export is ST-compatible again, or a separate clearly named Marinara JSONL export/import pair is added while the ST-compatible JSONL affordance remains available.
  • Text export restores useful transcript context comparable to legacy, including speaker/display labels and timestamps.
  • Bulk JSONL/text export includes stable filenames and branch/group metadata comparable to legacy.
  • Sidebar Native JSON chat-bulk export is either importable through the Marinara import/profile workflow, or the UI copy/format is changed so users do not treat it as an importable recovery export.
  • Imported chat-file JSONL continues to create a branch in the target chat group and preserves inherited roster/mode/persona/connection/preset plus branch label.
  • Add focused proof for JSONL export shape and native chat-bulk importability/UX behavior.

Follow-up from parityscan but not chased here: full Target 20 asset/profile/storage proof remains out of scope.

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 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2308 Originally assigned to: @Promansis on GitHub. ## Summary `09-CHAT-COMPAT-chat-file-import-export-profile` parityscan found that chat transcript export/import/profile is not fully compatible with legacy chat-file workflows. Refactor JSONL/text export no longer emits legacy ST-compatible transcript shape, and the new sidebar Native JSON chat-bulk export has no matching import path. ## Expected behavior Legacy-compatible chat export should preserve the user workflow from v1.6.1: - Single-chat JSONL export should emit a SillyTavern-compatible transcript with a header row and message rows using `name`, `is_user`, `is_system`, `mes`, and `send_date`. - Single-chat text export should include useful transcript context such as chat header, display names, and timestamps. - Bulk transcript export should package JSONL/text transcript files with branch/group metadata. - Any visible Native JSON chat-bulk export should either be importable/recoverable through the Marinara import surface or not be offered as an import-fidelity format. - Imported JSONL chat files should continue to create branch/chat-file siblings with target chat roster, mode, persona, connection, prompt preset, and branch label preserved. ## Actual behavior Refactor keeps the UI affordances for JSONL/text export and JSONL import-as-branch, and `import_st_chat_into_group` still preserves branch/group behavior. However, refactor JSONL export writes raw Marinara message objects, not the legacy/ST-compatible transcript header and message rows. Refactor text export is also reduced to role/content lines. The sidebar also offers `Native JSON` for selected chats and writes a `format: "marinara-chat-bulk"` file, but no importer for `marinara-chat-bulk` was found. ## Steps to reproduce 1. Open a chat or chat-file group on the refactor branch. 2. Export the chat as JSONL from Manage Chat Files, or export selected chats as Native JSON from the sidebar bulk export menu. 3. Inspect the exported file shape. 4. Compare against legacy v1.6.1 `/chats/:id/export?format=jsonl` and `/chats/export/bulk` behavior, then try to find/import the Native JSON chat-bulk format in the current import surfaces. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Chat mode - [ ] 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 - [x] 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 parityscan, 2026-06-05 - Run mode: static trace only - OS + version: not runtime-tested - Node + pnpm versions: not run - Rust version, if relevant: not run - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No runtime logs. Static proof: - Legacy single/bulk transcript export builds ST-compatible JSONL/text and ZIP manifest: `main:packages/server/src/routes/chats.routes.ts:2034`, `main:packages/server/src/routes/chats.routes.ts:2082`, `main:packages/server/src/routes/chats.routes.ts:2127` - Legacy chat-file import into group preserves group/branch inheritance: `main:packages/server/src/routes/import.routes.ts:478`, `main:packages/server/src/routes/import.routes.ts:494`, `main:packages/server/src/routes/import.routes.ts:541` - Refactor ChatFilesDrawer export/import affordances: `src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:50`, `src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:155`, `src/features/modes/shared/chat-ui/components/ChatFilesDrawer.tsx:230` - Refactor import wrapper and Rust group import path: `src/shared/api/import-api.ts:96`, `src-tauri/src/commands/storage/imports/bulk_imports.rs:1031` - Refactor JSONL/text export helpers write role/content or raw message JSONL: `src/features/catalog/chats/hooks/use-chats.ts:1059`, `src/features/catalog/chats/lib/chat-transcript-export.ts:23`, `src/features/catalog/chats/lib/chat-transcript-export.ts:32` - Refactor importer accepts `mes`/`content` and `role`, so self re-import is partly supported but no longer ST-compatible export shape: `src-tauri/src/commands/storage/imports/bulk_imports.rs:47`, `src-tauri/src/commands/storage/imports/bulk_imports.rs:915` - Refactor Native JSON chat-bulk export exists, but no importer was found for `marinara-chat-bulk`: `src/app/shell/ChatSidebar.tsx:1241`, `src/features/catalog/chats/hooks/use-bulk-export-chats.ts:53` - Profile import/export path itself exists and accepts native plus legacy profile shapes: `src/shared/api/profile-api.ts:92`, `src-tauri/src/commands/storage/profile.rs:562`, `src-tauri/src/commands/storage/profile.rs:637` ## Regression notes This is a confirmed parity gap from upstream parity tracker #2268, surface `09-CHAT-COMPAT-chat-file-import-export-profile`. Legacy behavior existed on `main` / v1.6.1 paths. Refactor currently changes exported JSONL/text shape and exposes an unimportable Native JSON chat-bulk format. ## Additional context Acceptance criteria: - `09-CHAT-COMPAT-chat-file-import-export-profile` JSONL export is ST-compatible again, or a separate clearly named Marinara JSONL export/import pair is added while the ST-compatible JSONL affordance remains available. - Text export restores useful transcript context comparable to legacy, including speaker/display labels and timestamps. - Bulk JSONL/text export includes stable filenames and branch/group metadata comparable to legacy. - Sidebar Native JSON chat-bulk export is either importable through the Marinara import/profile workflow, or the UI copy/format is changed so users do not treat it as an importable recovery export. - Imported chat-file JSONL continues to create a branch in the target chat group and preserves inherited roster/mode/persona/connection/preset plus branch label. - Add focused proof for JSONL export shape and native chat-bulk importability/UX behavior. Follow-up from parityscan but not chased here: full Target 20 asset/profile/storage proof remains out of scope. ## 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.
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#1140
No description provided.