[PR #1599] [MERGED] Remove unreferenced feature hook exports #5134

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

📋 Pull Request Information

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

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


📝 Commits (1)

  • 6025a10 Remove unreferenced feature hook exports

📊 Changes

6 files changed (+1 additions, -102 deletions)

View changed files

📝 src/features/catalog/agents/hooks/use-agents.ts (+0 -20)
📝 src/features/catalog/agents/hooks/use-custom-tools.ts (+0 -9)
📝 src/features/catalog/agents/hooks/use-regex-scripts.ts (+0 -9)
📝 src/features/catalog/chat-presets/hooks/use-chat-presets.ts (+1 -41)
📝 src/features/catalog/chats/hooks/use-chat-folders.ts (+0 -14)
📝 src/features/catalog/personas/hooks/use-personas.ts (+0 -9)

📄 Description

Linked issue

Refs #1566

Why this change

  • Continue the Knip restore follow-up by trimming feature-owned React Query hooks that no current feature imports.

What changed

  • Removed unreferenced agent, custom tool, regex script, chat preset, chat folder, and persona hook exports.
  • Removed the now-unused per-record query-key helpers and createChatPresetSchema import that only supported those deleted exports.

Refactor impact

Primary owner:

  • src/features

Impact areas reviewed:

  • Catalog agent hooks
  • Catalog custom tool hooks
  • Catalog regex script hooks
  • Catalog chat preset hooks
  • Catalog chat folder hooks
  • Catalog persona hooks

Boundary notes:

  • This stays inside feature-owned hook modules.
  • No engine contract, shared API, Rust, storage, or remote-runtime boundary changes.

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; unused exports dropped from 95 to 89 and unused exported types stayed at 71.
  • 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
    • Simplified internal data fetching patterns across catalog features including agents, custom tools, regex scripts, chat presets, chat folders, and personas.

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/1599 **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-2` --- ### 📝 Commits (1) - [`6025a10`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6025a107a3880fa929fe56bd0d5961a487d8ef7d) Remove unreferenced feature hook exports ### 📊 Changes **6 files changed** (+1 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/agents/hooks/use-agents.ts` (+0 -20) 📝 `src/features/catalog/agents/hooks/use-custom-tools.ts` (+0 -9) 📝 `src/features/catalog/agents/hooks/use-regex-scripts.ts` (+0 -9) 📝 `src/features/catalog/chat-presets/hooks/use-chat-presets.ts` (+1 -41) 📝 `src/features/catalog/chats/hooks/use-chat-folders.ts` (+0 -14) 📝 `src/features/catalog/personas/hooks/use-personas.ts` (+0 -9) </details> ### 📄 Description ## Linked issue Refs #1566 ## Why this change - Continue the Knip restore follow-up by trimming feature-owned React Query hooks that no current feature imports. ## What changed - Removed unreferenced agent, custom tool, regex script, chat preset, chat folder, and persona hook exports. - Removed the now-unused per-record query-key helpers and `createChatPresetSchema` import that only supported those deleted exports. ## Refactor impact Primary owner: - `src/features` Impact areas reviewed: - Catalog agent hooks - Catalog custom tool hooks - Catalog regex script hooks - Catalog chat preset hooks - Catalog chat folder hooks - Catalog persona hooks Boundary notes: - This stays inside feature-owned hook modules. - No engine contract, shared API, Rust, storage, or remote-runtime boundary changes. 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`; unused exports dropped from 95 to 89 and unused exported types stayed at 71. - 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** * Simplified internal data fetching patterns across catalog features including agents, custom tools, regex scripts, chat presets, chat folders, and personas. <!-- 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/1599?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: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#5134
No description provided.