[PR #205] [MERGED] Fix ST import grouping and branch label updates #4505

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/205
Author: @DarthTheMonster
Created: 4/23/2026
Status: ✅ Merged
Merged: 4/27/2026
Merged by: @LukaTheHero

Base: main ← Head: fix/st-import-branches


📝 Commits (1)

  • 3f889ac Fix ST import grouping and branch label updates

📊 Changes

6 files changed (+219 additions, -92 deletions)

View changed files

📝 packages/client/src/components/chat/ChatFilesDrawer.tsx (+72 -21)
📝 packages/client/src/components/modals/STBulkImportModal.tsx (+2 -2)
📝 packages/client/src/hooks/use-chats.ts (+41 -17)
📝 packages/server/src/routes/chats.routes.ts (+9 -8)
📝 packages/server/src/services/import/st-bulk.importer.ts (+75 -42)
📝 packages/server/src/services/import/st-chat.importer.ts (+20 -2)

📄 Description

Fixes SillyTavern import grouping and branch labeling.

Why:
Imported ST chats could be grouped incorrectly or shown under unused/unknown, and branch rows reused the main chat name instead of a per-branch label. Branch create/delete/rename also did not always refresh the visible branch list until reload.

Changes:

  • improve ST chat character matching/grouping
  • keep the stable chat/thread name separate from branch labels
  • store imported file/checkpoint names as branch metadata
  • add branch rename support in the chat files drawer
  • invalidate relevant React Query group/list/detail caches after branch create/delete/rename

Manual validation:

  • pnpm check
  • pnpm db:push
  • pnpm version:check
  • imported ST chat and character data and verified chats grouped under the correct character
  • verified branch labels display correctly
  • verified branch rename/create/delete update without page reload

Before:
image

image image

After:
image

image image

Summary by CodeRabbit

  • New Features

    • Chat files are now directly clickable to switch between branches
    • Added chat renaming capability
    • Improved branch display naming with metadata support
  • Improvements

    • Enhanced bulk import modal to show more detailed chat information
    • Smarter character name detection in bulk imports, ignoring placeholder values
    • Better automatic naming for branched chats
    • Improved chat selection and active chat management during deletions

🔄 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/205 **Author:** [@DarthTheMonster](https://github.com/DarthTheMonster) **Created:** 4/23/2026 **Status:** ✅ Merged **Merged:** 4/27/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `fix/st-import-branches` --- ### 📝 Commits (1) - [`3f889ac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3f889ac3ed4e65b9e7c6882a7fec486c1995c2c2) Fix ST import grouping and branch label updates ### 📊 Changes **6 files changed** (+219 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatFilesDrawer.tsx` (+72 -21) 📝 `packages/client/src/components/modals/STBulkImportModal.tsx` (+2 -2) 📝 `packages/client/src/hooks/use-chats.ts` (+41 -17) 📝 `packages/server/src/routes/chats.routes.ts` (+9 -8) 📝 `packages/server/src/services/import/st-bulk.importer.ts` (+75 -42) 📝 `packages/server/src/services/import/st-chat.importer.ts` (+20 -2) </details> ### 📄 Description Fixes SillyTavern import grouping and branch labeling. Why: Imported ST chats could be grouped incorrectly or shown under unused/unknown, and branch rows reused the main chat name instead of a per-branch label. Branch create/delete/rename also did not always refresh the visible branch list until reload. Changes: - improve ST chat character matching/grouping - keep the stable chat/thread name separate from branch labels - store imported file/checkpoint names as branch metadata - add branch rename support in the chat files drawer - invalidate relevant React Query group/list/detail caches after branch create/delete/rename Manual validation: - pnpm check - pnpm db:push - pnpm version:check - imported ST chat and character data and verified chats grouped under the correct character - verified branch labels display correctly - verified branch rename/create/delete update without page reload Before: <img width="774" height="294" alt="image" src="https://github.com/user-attachments/assets/5fb03d12-b58f-4361-9a9f-21524efc6a43" /> <img width="465" height="60" alt="image" src="https://github.com/user-attachments/assets/aeeeb536-c9b5-415a-a700-9f1900dff8f1" /> <img width="339" height="494" alt="image" src="https://github.com/user-attachments/assets/3f44a11a-2ef3-4647-a13c-2b4ef6cc6ada" /> After: <img width="784" height="609" alt="image" src="https://github.com/user-attachments/assets/755bad9d-1f9e-49ba-97ac-835a99c7b175" /> <img width="231" height="130" alt="image" src="https://github.com/user-attachments/assets/506e0ee6-d0c8-4928-829e-2c8dca2e654e" /> <img width="329" height="165" alt="image" src="https://github.com/user-attachments/assets/57ee5510-fbff-4317-adc6-341a0fe1c00b" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Chat files are now directly clickable to switch between branches * Added chat renaming capability * Improved branch display naming with metadata support * **Improvements** * Enhanced bulk import modal to show more detailed chat information * Smarter character name detection in bulk imports, ignoring placeholder values * Better automatic naming for branched chats * Improved chat selection and active chat management during deletions <!-- 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:08:13 +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#4505
No description provided.