[PR #1629] [MERGED] [codex] Add character library legacy parity #5162

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

📋 Pull Request Information

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

Base: refactor ← Head: codex/character-library-legacy-parity


📝 Commits (3)

  • b5b1b84 Add character library legacy parity
  • 0344c1c Preserve character search query casing
  • b27321f Address character search review findings

📊 Changes

7 files changed (+554 additions, -164 deletions)

View changed files

📝 src-tauri/src/commands/storage/shared.rs (+111 -2)
📝 src/features/catalog/characters/components/CharacterLibraryView.tsx (+49 -31)
📝 src/features/catalog/characters/components/CharactersPanel.tsx (+163 -131)
➕ src/features/catalog/characters/lib/character-groups.test.ts (+15 -0)
➕ src/features/catalog/characters/lib/character-groups.ts (+19 -0)
➕ src/features/catalog/characters/lib/character-search.test.ts (+68 -0)
➕ src/features/catalog/characters/lib/character-search.ts (+129 -0)

📄 Description

Summary

  • Add shared character search helpers for explicit negative tag queries, deeper card-field search metadata, tag matching, and loose group-member normalization.
  • Expand storage search to match character prompt/profile fields before summary projection, keeping character summary payloads small.
  • Update the full character library and side panel with negative tag filtering, session sort persistence, multi-include tag filtering, match-count sorting, and a synthetic Ungrouped group.

Impact

  • Character search can now find prompt/profile text such as description, personality, scenario, greetings, system/post-history instructions, and selected extension text without loading full records into summary lists.
  • Tag exclusions use explicit -tag: / !# syntax, and ordinary negative words remain part of text search.
  • Existing loose persisted group member shapes are normalized in the side panel before display/action logic.

Validation

  • pnpm exec vitest run src/features/catalog/characters/lib/character-search.test.ts src/features/catalog/characters/lib/character-groups.test.ts src/features/catalog/characters/hooks/use-characters.test.ts
  • pnpm typecheck
  • pnpm check:architecture
  • pnpm build
  • cargo test --manifest-path src-tauri/Cargo.toml apply_storage_search_matches_character
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace

Native QA

  • Earlier native Tauri QA on this branch verified deeper summary-projection search, side-panel text search, negative tag search, multi-tag filtering, full-library negative tag search, and sort storage writes with disposable QA characters.
  • After the later parser-only Bunny fix, I reran automated validation but did not rerun the native Tauri UI pass.

Remaining Risk

  • Token estimate badges are intentionally deferred because accurate estimates require full card text, which would undermine summary-list payload performance.
  • Full-library close/reopen sort restore was not manually reverified; the session storage write was verified during native QA.

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced character search now includes backstory, appearance, and world metadata fields
    • Added session-persistent sorting preferences for character library
    • Multi-tag filtering with included and excluded tag support
    • Automatic "Ungrouped" group for unassigned characters
  • Improvements

    • Updated search query syntax for advanced filtering options (including -tag:"tag name")
    • Characters now rank by tag match relevance when using tag filters
    • Improved group member ID normalization and handling

Review Change Stack


🔄 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/1629 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `codex/character-library-legacy-parity` --- ### 📝 Commits (3) - [`b5b1b84`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5b1b841b88bfd20a6b900e80a56a366e14bee02) Add character library legacy parity - [`0344c1c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0344c1c8ded66d865ffde192ef22f413612719d7) Preserve character search query casing - [`b27321f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b27321ffe9ef8975cf50db93c0ed0e19a5203316) Address character search review findings ### 📊 Changes **7 files changed** (+554 additions, -164 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/shared.rs` (+111 -2) 📝 `src/features/catalog/characters/components/CharacterLibraryView.tsx` (+49 -31) 📝 `src/features/catalog/characters/components/CharactersPanel.tsx` (+163 -131) ➕ `src/features/catalog/characters/lib/character-groups.test.ts` (+15 -0) ➕ `src/features/catalog/characters/lib/character-groups.ts` (+19 -0) ➕ `src/features/catalog/characters/lib/character-search.test.ts` (+68 -0) ➕ `src/features/catalog/characters/lib/character-search.ts` (+129 -0) </details> ### 📄 Description ## Summary - Add shared character search helpers for explicit negative tag queries, deeper card-field search metadata, tag matching, and loose group-member normalization. - Expand storage search to match character prompt/profile fields before summary projection, keeping character summary payloads small. - Update the full character library and side panel with negative tag filtering, session sort persistence, multi-include tag filtering, match-count sorting, and a synthetic Ungrouped group. ## Impact - Character search can now find prompt/profile text such as description, personality, scenario, greetings, system/post-history instructions, and selected extension text without loading full records into summary lists. - Tag exclusions use explicit `-tag:` / `!#` syntax, and ordinary negative words remain part of text search. - Existing loose persisted group member shapes are normalized in the side panel before display/action logic. ## Validation - `pnpm exec vitest run src/features/catalog/characters/lib/character-search.test.ts src/features/catalog/characters/lib/character-groups.test.ts src/features/catalog/characters/hooks/use-characters.test.ts` - `pnpm typecheck` - `pnpm check:architecture` - `pnpm build` - `cargo test --manifest-path src-tauri/Cargo.toml apply_storage_search_matches_character` - `cargo check --manifest-path src-tauri/Cargo.toml --workspace` ## Native QA - Earlier native Tauri QA on this branch verified deeper summary-projection search, side-panel text search, negative tag search, multi-tag filtering, full-library negative tag search, and sort storage writes with disposable QA characters. - After the later parser-only Bunny fix, I reran automated validation but did not rerun the native Tauri UI pass. ## Remaining Risk - Token estimate badges are intentionally deferred because accurate estimates require full card text, which would undermine summary-list payload performance. - Full-library close/reopen sort restore was not manually reverified; the session storage write was verified during native QA. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Enhanced character search now includes backstory, appearance, and world metadata fields * Added session-persistent sorting preferences for character library * Multi-tag filtering with included and excluded tag support * Automatic "Ungrouped" group for unassigned characters * **Improvements** * Updated search query syntax for advanced filtering options (including `-tag:"tag name"`) * Characters now rank by tag match relevance when using tag filters * Improved group member ID normalization and handling <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1629?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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:13:51 +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#5162
No description provided.