[PR #1643] [MERGED] [codex] Optimize character summary and search paths #5175

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

📋 Pull Request Information

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

Base: refactor ← Head: codex/character-list-search-followup


📝 Commits (3)

  • 7ecc3a5 Optimize character summary list paths
  • 32b2e91 Harden character search follow-up paths
  • f132b17 Address CodeRabbit storage search notes

📊 Changes

11 files changed (+347 additions, -53 deletions)

View changed files

📝 src-tauri/src/commands/storage/commands/entities.rs (+120 -0)
📝 src-tauri/src/commands/storage/shared.rs (+89 -0)
📝 src-tauri/src/http_dispatch.rs (+16 -0)
📝 src/features/catalog/characters/components/ImportCharacterModal.tsx (+5 -3)
📝 src/features/catalog/characters/hooks/use-characters.ts (+1 -1)
📝 src/features/runtime/generation/hooks/use-generate.ts (+36 -11)
📝 src/features/runtime/tracker/hooks/use-tracker-panel-model.ts (+12 -4)
📝 src/features/shell/bot-browser/components/BotBrowserPanel.tsx (+51 -17)
📝 src/features/shell/settings/components/settings/TTSConfigCard.tsx (+2 -2)
📝 src/features/shell/settings/hooks/tracker-card-color-manager.ts (+5 -2)
📝 src/features/shell/settings/hooks/use-tracker-card-color-manager.ts (+10 -13)

📄 Description

Linked issue

Closes #1582
Closes #1585
Related #1583
Related #1584

Why this change

  • Character summary/list paths still had a few full-record fetches or avatarPath payload exposure points after the broader refactor work.
  • Character search needed to work against projected storage rows without pulling embedded avatar payloads back into list/search responses.
  • Some follow-up consumers needed full character data only at action time, not during initial list rendering.

What changed

  • Removed avatarPath from character summary list options while keeping managed avatar file references.
  • Moved remaining summary-capable useCharacters() consumers to useCharacterSummaries() and added targeted full-record fetches only where needed.
  • Removed the direct full storageApi.list("characters") fallback from generation card-update naming.
  • Added projected-search support for embedded Tauri storage and hostable HTTP dispatch while preserving explicit full-data projections.
  • Added Rust regression coverage for projected character search matching card text, excluding avatar payload text, and preserving full data when requested.
  • Ran failpath and Bunny passes; fixed Bunny findings around full-data projection and quiet fallback handling.

Refactor impact

Primary owner:

  • Catalog character data hooks, Rust storage list/search, runtime generation, shell/settings character consumers.

Impact areas reviewed:

  • Character library/panels and pickers using summary rows.
  • Bot Browser greeting context menu.
  • TTS character voice assignments.
  • Tracker sprite/color character lookup paths.
  • Generation pending card-update name lookup.
  • Embedded Tauri and hostable HTTP storage list dispatch.

Boundary notes:

  • Feature code continues through existing storage API wrappers; no new raw Tauri or raw remote-runtime calls.
  • Rust storage command and HTTP dispatch paths mirror the same projected-search behavior.
  • Engine code was not changed.

Pressure points touched:

  • src-tauri/src/commands/storage/commands/entities.rs
  • src-tauri/src/http_dispatch.rs
  • src/features/runtime/generation/hooks/use-generate.ts
  • Shell/settings panels that consume character summaries.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • pnpm typecheck passed.
  • pnpm check:architecture passed.
  • pnpm exec vitest run src/features/catalog/characters/hooks/use-characters.test.ts src/shared/api/local-file-api.test.ts passed.
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passed.
  • cargo test --manifest-path src-tauri/Cargo.toml storage_list_searches_projected_character_fields_without_returning_avatar_payloads passed.
  • cargo test --manifest-path src-tauri/Cargo.toml apply_storage_search passed.
  • git diff --check passed.
  • Native Tauri QA launched Marinara Engine QA; character summary IPC returned 5 rows with avatarPathCount: 0, projected search matched a non-returned description field with returnedAvatarPathCount: 0, and visible character-panel search narrowed A5 from 5 characters to 1 with no console/page errors.
  • Native Bot Browser and Settings panels opened with no console/page errors.
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check was attempted and reported existing rustfmt drift in storage files, including untouched exports.rs; no unrelated formatter churn was included.
  • Remote runtime smoke was not manually launched; HTTP dispatch was code-reviewed and covered by matching Rust path logic.

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

  • Native QA screenshots were captured locally under scratch/native-tauri-*.png; not committed.

Summary by CodeRabbit

Release Notes

  • Chores
    • Optimized character data loading and search performance by implementing targeted field selection across character listing and import workflows, reducing unnecessary data transfers.
    • Improved data fetching efficiency for character summaries to load only required fields when displaying character lists.

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/1643 **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-list-search-followup` --- ### 📝 Commits (3) - [`7ecc3a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7ecc3a56edd4f74093260aab230c735560e91624) Optimize character summary list paths - [`32b2e91`](https://github.com/Pasta-Devs/Marinara-Engine/commit/32b2e918de3786c081ebeb11b83083b70556e381) Harden character search follow-up paths - [`f132b17`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f132b1798e3a091b9215c69e2895f72c2a665303) Address CodeRabbit storage search notes ### 📊 Changes **11 files changed** (+347 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+120 -0) 📝 `src-tauri/src/commands/storage/shared.rs` (+89 -0) 📝 `src-tauri/src/http_dispatch.rs` (+16 -0) 📝 `src/features/catalog/characters/components/ImportCharacterModal.tsx` (+5 -3) 📝 `src/features/catalog/characters/hooks/use-characters.ts` (+1 -1) 📝 `src/features/runtime/generation/hooks/use-generate.ts` (+36 -11) 📝 `src/features/runtime/tracker/hooks/use-tracker-panel-model.ts` (+12 -4) 📝 `src/features/shell/bot-browser/components/BotBrowserPanel.tsx` (+51 -17) 📝 `src/features/shell/settings/components/settings/TTSConfigCard.tsx` (+2 -2) 📝 `src/features/shell/settings/hooks/tracker-card-color-manager.ts` (+5 -2) 📝 `src/features/shell/settings/hooks/use-tracker-card-color-manager.ts` (+10 -13) </details> ### 📄 Description ## Linked issue Closes #1582 Closes #1585 Related #1583 Related #1584 ## Why this change - Character summary/list paths still had a few full-record fetches or `avatarPath` payload exposure points after the broader refactor work. - Character search needed to work against projected storage rows without pulling embedded avatar payloads back into list/search responses. - Some follow-up consumers needed full character data only at action time, not during initial list rendering. ## What changed - Removed `avatarPath` from character summary list options while keeping managed avatar file references. - Moved remaining summary-capable `useCharacters()` consumers to `useCharacterSummaries()` and added targeted full-record fetches only where needed. - Removed the direct full `storageApi.list("characters")` fallback from generation card-update naming. - Added projected-search support for embedded Tauri storage and hostable HTTP dispatch while preserving explicit full-`data` projections. - Added Rust regression coverage for projected character search matching card text, excluding avatar payload text, and preserving full `data` when requested. - Ran failpath and Bunny passes; fixed Bunny findings around full-data projection and quiet fallback handling. ## Refactor impact Primary owner: - Catalog character data hooks, Rust storage list/search, runtime generation, shell/settings character consumers. Impact areas reviewed: - Character library/panels and pickers using summary rows. - Bot Browser greeting context menu. - TTS character voice assignments. - Tracker sprite/color character lookup paths. - Generation pending card-update name lookup. - Embedded Tauri and hostable HTTP storage list dispatch. Boundary notes: - Feature code continues through existing storage API wrappers; no new raw Tauri or raw remote-runtime calls. - Rust storage command and HTTP dispatch paths mirror the same projected-search behavior. - Engine code was not changed. Pressure points touched: - `src-tauri/src/commands/storage/commands/entities.rs` - `src-tauri/src/http_dispatch.rs` - `src/features/runtime/generation/hooks/use-generate.ts` - Shell/settings panels that consume character summaries. ## Validation - [x] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `pnpm check:docs` passes locally - [x] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [x] Rust clippy/tests were run for Rust behavior changes - [x] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - `pnpm typecheck` passed. - `pnpm check:architecture` passed. - `pnpm exec vitest run src/features/catalog/characters/hooks/use-characters.test.ts src/shared/api/local-file-api.test.ts` passed. - `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passed. - `cargo test --manifest-path src-tauri/Cargo.toml storage_list_searches_projected_character_fields_without_returning_avatar_payloads` passed. - `cargo test --manifest-path src-tauri/Cargo.toml apply_storage_search` passed. - `git diff --check` passed. - Native Tauri QA launched `Marinara Engine QA`; character summary IPC returned 5 rows with `avatarPathCount: 0`, projected search matched a non-returned description field with `returnedAvatarPathCount: 0`, and visible character-panel search narrowed `A5` from 5 characters to 1 with no console/page errors. - Native Bot Browser and Settings panels opened with no console/page errors. - `cargo fmt --manifest-path src-tauri/Cargo.toml --check` was attempted and reported existing rustfmt drift in storage files, including untouched `exports.rs`; no unrelated formatter churn was included. - Remote runtime smoke was not manually launched; HTTP dispatch was code-reviewed and covered by matching Rust path logic. ## 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 - Native QA screenshots were captured locally under `scratch/native-tauri-*.png`; not committed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Chores** * Optimized character data loading and search performance by implementing targeted field selection across character listing and import workflows, reducing unnecessary data transfers. * Improved data fetching efficiency for character summaries to load only required fields when displaying character lists. <!-- 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/1643?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:56 +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#5175
No description provided.