[PR #5697] [MERGED] perf: share character catalog search #6886

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5697
Author: @Gunterlie
Created: 8/31/2026
Status: ✅ Merged
Merged: 8/31/2026
Merged by: @Gunterlie

Base: staging ← Head: dial-up-character-search


📝 Commits (10+)

  • e56324f perf: share character catalog search
  • 8f00630 fix: harden character catalog refresh
  • 1475230 Merge origin/staging into dial-up-character-search
  • 67ecaf7 test: follow character catalog navigation request
  • ccef390 Merge origin/staging into dial-up-character-search
  • c3c2968 fix: address CodeRabbit catalog findings
  • 3687473 fix: tighten character catalog contract
  • 0d22e1d fix: stabilize catalog favorite sorting
  • 65adad1 fix: pin catalog generation across page loads
  • c88fa2b Merge branch 'staging' into dial-up-character-search

📊 Changes

11 files changed (+361 additions, -57 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/core-flows.e2e.ts (+1 -1)
📝 packages/client/src/components/characters/CharacterLibraryView.tsx (+29 -12)
📝 packages/client/src/components/chat/HomeBrowserHub.tsx (+35 -27)
📝 packages/client/src/components/panels/CharactersPanel.tsx (+36 -15)
📝 packages/client/src/hooks/use-characters.ts (+32 -2)
📝 packages/client/src/lib/professor-mari-navigation.ts (+6 -0)
📝 packages/server/src/routes/characters.routes.ts (+23 -0)
➕ packages/server/src/services/storage/character-catalog.ts (+167 -0)
📝 packages/shared/src/index.ts (+1 -0)
➕ packages/shared/src/types/character-catalog.ts (+30 -0)

📄 Description

Linked issue

Closes #5696

Why this change

Character Library search was slow because the server searched full serialized character cards and the client parsed and searched those cards again. The Home omnibar was faster because it searched prepared local rows. This change gives both surfaces one compact, generation-aware character catalog without adding SQLite or another persistent database.

What changed

  • Added a server-memory character catalog derived from the existing file-backed character table.
  • Added GET /api/characters/catalog for compact paginated character rows.
  • Switched Character Library pagination to the catalog endpoint.
  • Switched Home character-of-the-day and Professor Mari navigation data to the catalog.
  • Added deferred search input handling and previous-result retention during catalog requests.
  • Included explicit saved summaries in catalog search and result data.
  • Added generation checks and retry handling so catalog rebuilds do not publish an inconsistent snapshot.

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

Manual verification notes

Automated validation passed. Manual browser and container verification remain for the maintainer or contributor before merge.

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)

UI evidence (if applicable)

This changes existing library and search behavior. Before and after screenshots should be added after manual browser verification.

Summary by CodeRabbit

  • New Features

    • Added a faster, searchable character catalog with sorting, favorite filtering, and pagination.
    • Character-of-the-day and navigation results now include richer names, summaries, tags, and imagery.
    • Character Library and omnibar searches now use a shared catalog for consistent results.
  • Performance

    • Search input processing is smoother while typing in large character libraries.
    • Reduced repeated loading and transfer of character data across list and search views.
    • Improved responsiveness when browsing and filtering extensive character collections.

🔄 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/5697 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/31/2026 **Status:** ✅ Merged **Merged:** 8/31/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `dial-up-character-search` --- ### 📝 Commits (10+) - [`e56324f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e56324f1649acd7d0cc6c5c44dae8f8931b4e0c8) perf: share character catalog search - [`8f00630`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f00630d01917d8f8ae9778e5c41c5e72c8edf02) fix: harden character catalog refresh - [`1475230`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1475230ac4d7afc5ecdab98c1067cb73a03c3512) Merge origin/staging into dial-up-character-search - [`67ecaf7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/67ecaf786f2f12e3c996c8e8efa03afceea1aa49) test: follow character catalog navigation request - [`ccef390`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ccef3909cd59bfb058e66641bd784714ca3da9c1) Merge origin/staging into dial-up-character-search - [`c3c2968`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c3c2968541414aab40faddbb3937fb3a1fe47f64) fix: address CodeRabbit catalog findings - [`3687473`](https://github.com/Pasta-Devs/Marinara-Engine/commit/36874731f10cb5e160d028c403958cc56df0124e) fix: tighten character catalog contract - [`0d22e1d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0d22e1d65eb42212f0d5bcf692c0ee624656868c) fix: stabilize catalog favorite sorting - [`65adad1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/65adad118891971e2eebd7befdd1bbb00c79bf07) fix: pin catalog generation across page loads - [`c88fa2b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c88fa2b5fbcebbe4f6281d6c53349a926793a84e) Merge branch 'staging' into dial-up-character-search ### 📊 Changes **11 files changed** (+361 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/core-flows.e2e.ts` (+1 -1) 📝 `packages/client/src/components/characters/CharacterLibraryView.tsx` (+29 -12) 📝 `packages/client/src/components/chat/HomeBrowserHub.tsx` (+35 -27) 📝 `packages/client/src/components/panels/CharactersPanel.tsx` (+36 -15) 📝 `packages/client/src/hooks/use-characters.ts` (+32 -2) 📝 `packages/client/src/lib/professor-mari-navigation.ts` (+6 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+23 -0) ➕ `packages/server/src/services/storage/character-catalog.ts` (+167 -0) 📝 `packages/shared/src/index.ts` (+1 -0) ➕ `packages/shared/src/types/character-catalog.ts` (+30 -0) </details> ### 📄 Description ## Linked issue Closes #5696 ## Why this change Character Library search was slow because the server searched full serialized character cards and the client parsed and searched those cards again. The Home omnibar was faster because it searched prepared local rows. This change gives both surfaces one compact, generation-aware character catalog without adding SQLite or another persistent database. ## What changed - Added a server-memory character catalog derived from the existing file-backed character table. - Added `GET /api/characters/catalog` for compact paginated character rows. - Switched Character Library pagination to the catalog endpoint. - Switched Home character-of-the-day and Professor Mari navigation data to the catalog. - Added deferred search input handling and previous-result retention during catalog requests. - Included explicit saved summaries in catalog search and result data. - Added generation checks and retry handling so catalog rebuilds do not publish an inconsistent snapshot. ## Validation - [x] `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) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated validation passed. Manual browser and container verification remain for the maintainer or contributor before merge. ## Docs and release impact - [ ] No docs changes needed - [x] 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) ## UI evidence (if applicable) This changes existing library and search behavior. Before and after screenshots should be added after manual browser verification. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a faster, searchable character catalog with sorting, favorite filtering, and pagination. * Character-of-the-day and navigation results now include richer names, summaries, tags, and imagery. * Character Library and omnibar searches now use a shared catalog for consistent results. * **Performance** * Search input processing is smoother while typing in large character libraries. * Reduced repeated loading and transfer of character data across list and search views. * Improved responsiveness when browsing and filtering extensive character collections. <!-- 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:14:36 +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#6886
No description provided.