[GH-ISSUE #2297] [Issue]: ST chat (JSONL) import defaults to "conversation" mode instead of "roleplay" #1133

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

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

Originally assigned to: @Xelvanis on GitHub.

Summary

Importing a SillyTavern chat transcript (.jsonl) on the refactor creates the chat in conversation mode, where the main web app created it in roleplay mode. Because the chat sidebar filters by mode tab, the imported transcript shows up under the wrong tab and continues with the wrong generation pipeline.

Expected behavior

A single-file ST JSONL import should default to roleplay mode (SillyTavern is a roleplay tool), matching main. The imported chat should appear under the Roleplay tab and continue with the roleplay prompt assembly/pipeline.

Actual behavior

The standalone single-file import path defaults the new chat to conversation. The imported transcript appears only under the Conversation tab, is invisible under Roleplay where the user expects it, and runs the conversation-mode pipeline when continued. The misclassification is silent; message data itself is preserved and the mode is user-correctable after the fact.

Steps to reproduce

  1. Export a chat transcript from SillyTavern as .jsonl.
  2. In the refactor, use Import Chat (JSONL) to import it via the single-file path (no mode selected).
  3. Observe the new chat is filed under the Conversation tab, not Roleplay.

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 @ f56a3774 (compared against main @ b4ab97fb)
  • Run mode: Tauri desktop
  • OS + version: Windows 11
  • Node + pnpm versions: not relevant (static source comparison)
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Not applicable (identified via source comparison).

Regression notes

This worked in main; the refactor changed the default.

  • main: packages/server/src/services/import/st-chat.importer.ts:199 defaults mode: (opts?.mode ?? "roleplay") as ChatMode. The single-file route packages/server/src/routes/import.routes.ts:465-469 passes no mode, and the bulk paths (st-bulk.importer.ts:675, :714) also resolve to roleplay, so main is consistently roleplay.
  • refactor: src-tauri/src/commands/storage/imports/bulk_imports.rs:929-930 does chat.entry("mode").or_insert(Value::String("conversation")). On the standalone single-file path (import_st_chat, ~lines 1010-1028) inherited is None, so the empty object falls through to the conversation default. The UI callers (src/shared/api/import-api.ts:96-100, and the Settings import trigger) pass no mode. Note the refactor's own bulk paths (bulk_imports.rs:1445, :1502) pre-set roleplay, so the single-file and bulk paths disagree internally.
  • Consequence: ChatSidebar.tsx:276 filters chats by chat.mode === activeTab, so a transcript imported as conversation is hidden under the Roleplay tab.

Additional context

Suggested direction: change the standalone single-file default in bulk_imports.rs:929-930 to roleplay so it matches main and the refactor's own bulk paths, or thread an explicit mode from the import UI. This is on the primary single-file import path, so it affects essentially every plain ST transcript import.

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 @Romuromylus on GitHub (Jun 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2297 Originally assigned to: @Xelvanis on GitHub. ## Summary Importing a SillyTavern chat transcript (`.jsonl`) on the refactor creates the chat in `conversation` mode, where the main web app created it in `roleplay` mode. Because the chat sidebar filters by mode tab, the imported transcript shows up under the wrong tab and continues with the wrong generation pipeline. ## Expected behavior A single-file ST JSONL import should default to `roleplay` mode (SillyTavern is a roleplay tool), matching main. The imported chat should appear under the Roleplay tab and continue with the roleplay prompt assembly/pipeline. ## Actual behavior The standalone single-file import path defaults the new chat to `conversation`. The imported transcript appears only under the Conversation tab, is invisible under Roleplay where the user expects it, and runs the conversation-mode pipeline when continued. The misclassification is silent; message data itself is preserved and the mode is user-correctable after the fact. ## Steps to reproduce 1. Export a chat transcript from SillyTavern as `.jsonl`. 2. In the refactor, use Import Chat (JSONL) to import it via the single-file path (no mode selected). 3. Observe the new chat is filed under the Conversation tab, not Roleplay. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [x] 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 @ f56a3774 (compared against main @ b4ab97fb) - Run mode: Tauri desktop - OS + version: Windows 11 - Node + pnpm versions: not relevant (static source comparison) - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Not applicable (identified via source comparison). ## Regression notes This worked in main; the refactor changed the default. - main: `packages/server/src/services/import/st-chat.importer.ts:199` defaults `mode: (opts?.mode ?? "roleplay") as ChatMode`. The single-file route `packages/server/src/routes/import.routes.ts:465-469` passes no mode, and the bulk paths (`st-bulk.importer.ts:675`, `:714`) also resolve to `roleplay`, so main is consistently `roleplay`. - refactor: `src-tauri/src/commands/storage/imports/bulk_imports.rs:929-930` does `chat.entry("mode").or_insert(Value::String("conversation"))`. On the standalone single-file path (`import_st_chat`, ~lines 1010-1028) `inherited` is `None`, so the empty object falls through to the `conversation` default. The UI callers (`src/shared/api/import-api.ts:96-100`, and the Settings import trigger) pass no mode. Note the refactor's own bulk paths (`bulk_imports.rs:1445`, `:1502`) pre-set `roleplay`, so the single-file and bulk paths disagree internally. - Consequence: `ChatSidebar.tsx:276` filters chats by `chat.mode === activeTab`, so a transcript imported as `conversation` is hidden under the Roleplay tab. ## Additional context Suggested direction: change the standalone single-file default in `bulk_imports.rs:929-930` to `roleplay` so it matches main and the refactor's own bulk paths, or thread an explicit mode from the import UI. This is on the primary single-file import path, so it affects essentially every plain ST transcript import. ## 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:27:35 +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#1133
No description provided.