[PR #5400] [MERGED] Fix SillyTavern group chat import attribution #6751

Closed
opened 2026-10-23 04:13:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5400
Author: @SpicyMarinara
Created: 8/22/2026
Status: ✅ Merged
Merged: 8/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5399-st-group-import-attribution


📝 Commits (6)

  • ed0615b chore: start issue 5399
  • 38ac0da Merge branch 'staging' into fix/5399-st-group-import-attribution
  • 077bc46 fix: restore SillyTavern group attribution
  • 74a4426 fix: avoid legacy group header reads
  • 7e60fc4 fix: reuse group directory scan
  • 9602000 fix(import): normalize group chat file extensions

📊 Changes

4 files changed (+171 additions, -40 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/services/import/st-bulk.importer.ts (+34 -37)
📝 packages/server/src/services/import/st-chat.importer.ts (+17 -3)
➕ scripts/regressions/sillytavern-group-import.regression.ts (+119 -0)

📄 Description

Linked issue

Closes #5399

Why this change

  • SillyTavern profile imports lose group rosters and per-character message attribution because current profiles associate flat JSONL files through group metadata rather than their unused headers.

What changed

  • Match active and past flat group-chat files through the SillyTavern group chat_id and chats metadata.
  • Build each imported roster from local characters and resolve historical speakers by display name or original_avatar card filename.
  • Add an end-to-end current-format profile fixture covering two characters and two group-chat branches.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Automated validation run:

  • pnpm check
  • node ./scripts/run-regressions.mjs --filter scripts/regressions/sillytavern-group-import.regression.ts

Manual verification notes

  • Manually import a current SillyTavern profile containing a multi-character group and verify its active and past chat rosters and historical speaker attribution.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

A user-facing changelog entry is included; no documentation or version files change.

UI evidence (if applicable)

Not applicable; server-side import correction.

Summary by CodeRabbit

  • New Features

    • Restored group-chat character rosters when importing SillyTavern profiles.
    • Preserved character-specific attribution for historical group-chat replies.
    • Improved recognition of character names, aliases, and avatar-based identities.
  • Bug Fixes

    • Correctly matches nested and standalone group-chat files to their associated groups.
    • Prevents unmatched chat files from being imported with incorrect generic metadata.
  • Documentation

    • Added a changelog entry describing the restored import behavior.

🔄 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/5400 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/22/2026 **Status:** ✅ Merged **Merged:** 8/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5399-st-group-import-attribution` --- ### 📝 Commits (6) - [`ed0615b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed0615b77c4b2748a06ead2f3907a671330f9d31) chore: start issue 5399 - [`38ac0da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/38ac0da3af7380ce1926cae041f097ed655da55a) Merge branch 'staging' into fix/5399-st-group-import-attribution - [`077bc46`](https://github.com/Pasta-Devs/Marinara-Engine/commit/077bc46df3bfe73b986f3982bf39ab624852de8d) fix: restore SillyTavern group attribution - [`74a4426`](https://github.com/Pasta-Devs/Marinara-Engine/commit/74a44260e533e7c75144440aec3375d4445484f4) fix: avoid legacy group header reads - [`7e60fc4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7e60fc40bb04b6ca2f28c5911b3b0c0dfd286323) fix: reuse group directory scan - [`9602000`](https://github.com/Pasta-Devs/Marinara-Engine/commit/96020005545c687b849e49110ab68b41383b0ef7) fix(import): normalize group chat file extensions ### 📊 Changes **4 files changed** (+171 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/services/import/st-bulk.importer.ts` (+34 -37) 📝 `packages/server/src/services/import/st-chat.importer.ts` (+17 -3) ➕ `scripts/regressions/sillytavern-group-import.regression.ts` (+119 -0) </details> ### 📄 Description ## Linked issue Closes #5399 ## Why this change - SillyTavern profile imports lose group rosters and per-character message attribution because current profiles associate flat JSONL files through group metadata rather than their `unused` headers. ## What changed - Match active and past flat group-chat files through the SillyTavern group `chat_id` and `chats` metadata. - Build each imported roster from local characters and resolve historical speakers by display name or `original_avatar` card filename. - Add an end-to-end current-format profile fixture covering two characters and two group-chat branches. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Automated validation run: - `pnpm check` - `node ./scripts/run-regressions.mjs --filter scripts/regressions/sillytavern-group-import.regression.ts` ### Manual verification notes - Manually import a current SillyTavern profile containing a multi-character group and verify its active and past chat rosters and historical speaker attribution. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) A user-facing changelog entry is included; no documentation or version files change. ## UI evidence (if applicable) Not applicable; server-side import correction. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Restored group-chat character rosters when importing SillyTavern profiles. * Preserved character-specific attribution for historical group-chat replies. * Improved recognition of character names, aliases, and avatar-based identities. * **Bug Fixes** * Correctly matches nested and standalone group-chat files to their associated groups. * Prevents unmatched chat files from being imported with incorrect generic metadata. * **Documentation** * Added a changelog entry describing the restored import behavior. <!-- 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-23 04:13:23 +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#6751
No description provided.