[PR #2311] [MERGED] Fix ST chat JSONL imports defaulting to conversation #5531

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2311
Author: @Xelvanis
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/st-chat-jsonl-roleplay-import-2297


📝 Commits (1)

  • 42a4bba Fix ST chat JSONL import mode default

📊 Changes

1 file changed (+67 additions, -1 deletions)

View changed files

📝 src-tauri/src/commands/storage/imports/bulk_imports.rs (+67 -1)

📄 Description

Linked issue

Closes #2297

Why this change

  • Single-file SillyTavern JSONL imports were creating chats in conversation mode when the import path had no explicit mode. Legacy/default ST import behavior treats these transcripts as roleplay chats, so imported transcripts landed under the wrong mode tab and continued through the wrong generation path.

What changed

  • Updated the ST JSONL import fallback so a missing chat mode defaults to roleplay.
  • Added Rust coverage for the standalone default and for preserving an inherited/explicit mode.

Refactor impact

Primary owner:

Rust storage imports.

Impact areas reviewed:

  • Single-file import_st_chat path
  • Import-into-group inherited mode path
  • ST bulk import paths that already set roleplay
  • Shared import API and remote runtime dispatch surface

Boundary notes:

  • Behavior stays in src-tauri import storage code.
  • No React, engine, shared API, or command-registration boundary changes.
  • Remote runtime continues through the existing explicit import_st_chat dispatch path.

Pressure points touched:

  • src-tauri/src/commands/storage/imports/bulk_imports.rs

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 fmt --manifest-path src-tauri\Cargo.toml
  • cargo test --manifest-path src-tauri\Cargo.toml import_st_chat_text passed, 11/11
  • cargo check --manifest-path src-tauri\Cargo.toml --workspace passed
  • pnpm check passed
  • Manual Tauri import flow not run.

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:

  • Restores the existing ST JSONL import behavior; it does not add a new discoverable workflow.

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

No screenshots or recordings; this is a storage import compatibility fix with command-level validation.

Summary by CodeRabbit

  • Bug Fixes

    • Chat imports from SillyTavern JSONL files now correctly default to "roleplay" mode instead of "conversation" mode when no inherited mode is specified. Imported chats now properly preserve inherited modes from parent objects.
  • Tests

    • Added tests to verify correct default chat mode assignment and preservation of inherited modes during imports.

🔄 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/2311 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/5/2026 **Status:** ✅ Merged **Merged:** 6/5/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/st-chat-jsonl-roleplay-import-2297` --- ### 📝 Commits (1) - [`42a4bba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/42a4bba9afb7d5fb78cb782106c1d20fa30e8323) Fix ST chat JSONL import mode default ### 📊 Changes **1 file changed** (+67 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/imports/bulk_imports.rs` (+67 -1) </details> ### 📄 Description ## Linked issue Closes #2297 ## Why this change - Single-file SillyTavern JSONL imports were creating chats in `conversation` mode when the import path had no explicit mode. Legacy/default ST import behavior treats these transcripts as roleplay chats, so imported transcripts landed under the wrong mode tab and continued through the wrong generation path. ## What changed - Updated the ST JSONL import fallback so a missing chat `mode` defaults to `roleplay`. - Added Rust coverage for the standalone default and for preserving an inherited/explicit mode. ## Refactor impact Primary owner: Rust storage imports. Impact areas reviewed: - Single-file `import_st_chat` path - Import-into-group inherited mode path - ST bulk import paths that already set `roleplay` - Shared import API and remote runtime dispatch surface Boundary notes: - Behavior stays in `src-tauri` import storage code. - No React, engine, shared API, or command-registration boundary changes. - Remote runtime continues through the existing explicit `import_st_chat` dispatch path. Pressure points touched: - `src-tauri/src/commands/storage/imports/bulk_imports.rs` ## 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) - [x] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `cargo fmt --manifest-path src-tauri\Cargo.toml` - `cargo test --manifest-path src-tauri\Cargo.toml import_st_chat_text` passed, 11/11 - `cargo check --manifest-path src-tauri\Cargo.toml --workspace` passed - `pnpm check` passed - Manual Tauri import flow not run. ## 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: - Restores the existing ST JSONL import behavior; it does not add a new discoverable workflow. ## 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 No screenshots or recordings; this is a storage import compatibility fix with command-level validation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Chat imports from SillyTavern JSONL files now correctly default to "roleplay" mode instead of "conversation" mode when no inherited mode is specified. Imported chats now properly preserve inherited modes from parent objects. * **Tests** * Added tests to verify correct default chat mode assignment and preservation of inherited modes during imports. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:17:08 +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#5531
No description provided.