[PR #1606] [MERGED] Narrow character catalog hook exports #5139

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1606
Author: @cha1latte
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @cha1latte

Base: refactor ← Head: codex/knip-feature-export-slice-4


📝 Commits (1)

  • 0d132b9 Narrow character catalog hook exports

📊 Changes

2 files changed (+2 additions, -81 deletions)

View changed files

📝 src/features/catalog/characters/hooks/use-characters.ts (+2 -80)
📝 src/features/catalog/characters/query-keys.ts (+0 -1)

📄 Description

Linked issue

Refs #1566

Why this change

  • Continue the Knip restore follow-up by trimming character-catalog hook exports that no current feature imports.

What changed

  • Made character-list cache helpers private because they are only used inside the character hook module.
  • Removed unreferenced persona summary-by-id, persona duplicate/activate, character group detail, and persona group mutation hook exports from the character catalog hook module.
  • Removed the orphaned characterKeys.groupDetail query-key helper.
  • Left the separate src/features/catalog/personas hooks intact; those are the active persona panel hooks.

Refactor impact

Primary owner:

  • src/features

Impact areas reviewed:

  • Catalog character hooks
  • Catalog character query keys
  • Existing persona panel hook imports
  • Character hook cache helper tests

Boundary notes:

  • This stays inside feature-owned catalog character modules.
  • No shared API, Rust, storage, remote-runtime, or visible UI boundary changes.
  • Engine contract schemas were not edited; any schema exports now reported by Knip remain in the separate engine contract lane.

Pressure points touched:

  • None. No ModeSurface, GameSurface, shared mode UI, command registration, or import modules touched.

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

  • Codex ran pnpm exec knip --exports --no-config-hints --reporter compact --no-exit-code; src/features/catalog/characters/hooks/use-characters.ts no longer appears in the unused export report and the headline unused export count dropped from 88 to 87.
  • Codex ran pnpm test -- src/features/catalog/characters/hooks/use-characters.test.ts.
  • Codex ran pnpm typecheck.
  • Codex ran pnpm check:architecture.
  • Codex ran pnpm check:unused.
  • Codex ran pnpm build.
  • Codex ran pnpm check, including cargo check --manifest-path src-tauri/Cargo.toml --workspace.
  • Codex ran git diff --check.
  • Browser/Tauri manual verification was not run because this is deletion-only cleanup of unreferenced hook exports with no reachable UI call sites.

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

N/A - no visible UI behavior changed.

Summary by CodeRabbit

  • Refactor
    • Streamlined character group management APIs
    • Reorganized internal query structure for character group operations

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/1606 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `codex/knip-feature-export-slice-4` --- ### 📝 Commits (1) - [`0d132b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0d132b9c580cfb7b38dccbec86bafd352b24509b) Narrow character catalog hook exports ### 📊 Changes **2 files changed** (+2 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/characters/hooks/use-characters.ts` (+2 -80) 📝 `src/features/catalog/characters/query-keys.ts` (+0 -1) </details> ### 📄 Description ## Linked issue Refs #1566 ## Why this change - Continue the Knip restore follow-up by trimming character-catalog hook exports that no current feature imports. ## What changed - Made character-list cache helpers private because they are only used inside the character hook module. - Removed unreferenced persona summary-by-id, persona duplicate/activate, character group detail, and persona group mutation hook exports from the character catalog hook module. - Removed the orphaned `characterKeys.groupDetail` query-key helper. - Left the separate `src/features/catalog/personas` hooks intact; those are the active persona panel hooks. ## Refactor impact Primary owner: - `src/features` Impact areas reviewed: - Catalog character hooks - Catalog character query keys - Existing persona panel hook imports - Character hook cache helper tests Boundary notes: - This stays inside feature-owned catalog character modules. - No shared API, Rust, storage, remote-runtime, or visible UI boundary changes. - Engine contract schemas were not edited; any schema exports now reported by Knip remain in the separate engine contract lane. Pressure points touched: - None. No ModeSurface, GameSurface, shared mode UI, command registration, or import modules touched. ## 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 - Codex ran `pnpm exec knip --exports --no-config-hints --reporter compact --no-exit-code`; `src/features/catalog/characters/hooks/use-characters.ts` no longer appears in the unused export report and the headline unused export count dropped from 88 to 87. - Codex ran `pnpm test -- src/features/catalog/characters/hooks/use-characters.test.ts`. - Codex ran `pnpm typecheck`. - Codex ran `pnpm check:architecture`. - Codex ran `pnpm check:unused`. - Codex ran `pnpm build`. - Codex ran `pnpm check`, including `cargo check --manifest-path src-tauri/Cargo.toml --workspace`. - Codex ran `git diff --check`. - Browser/Tauri manual verification was not run because this is deletion-only cleanup of unreferenced hook exports with no reachable UI call sites. ## 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 N/A - no visible UI behavior changed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Streamlined character group management APIs * Reorganized internal query structure for character group operations <!-- 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/1606?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:39 +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#5139
No description provided.