[PR #1605] [MERGED] Trim unused catalog preset hook exports #5136

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

📋 Pull Request Information

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

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


📝 Commits (1)

  • b4b89cf Trim unused catalog preset hook exports

📊 Changes

1 file changed (+1 additions, -85 deletions)

View changed files

📝 src/features/catalog/presets/hooks/use-presets.ts (+1 -85)

📄 Description

Linked issue

Refs #1566

Why this change

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

What changed

  • Removed unreferenced preset detail, creation, group list/reorder, section list, variable list, and preview hook exports.
  • Removed orphaned preset query-key helpers and the preview-only imports that supported those deleted exports.
  • Kept the active preset list, summary, full-detail, default, mutation, reorder section, and reorder variable hooks intact.

Refactor impact

Primary owner:

  • src/features

Impact areas reviewed:

  • Catalog preset hooks
  • Prompt preset editor/export surface
  • Query invalidation keys that remain reachable from active preset mutations

Boundary notes:

  • This stays inside the feature-owned catalog preset hook module.
  • 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; src/features/catalog/presets/hooks/use-presets.ts no longer appears in the unused export report and the headline unused export count dropped from 89 to 88.
  • 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
    • Removed preset preview functionality
    • Streamlined internal preset query management and cache invalidation behavior

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/1605 **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-3` --- ### 📝 Commits (1) - [`b4b89cf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b4b89cfd882647936fc1b06437e0559ef2726fef) Trim unused catalog preset hook exports ### 📊 Changes **1 file changed** (+1 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/presets/hooks/use-presets.ts` (+1 -85) </details> ### 📄 Description ## Linked issue Refs #1566 ## Why this change - Continue the Knip restore follow-up by trimming catalog preset React Query hooks that no current feature imports. ## What changed - Removed unreferenced preset detail, creation, group list/reorder, section list, variable list, and preview hook exports. - Removed orphaned preset query-key helpers and the preview-only imports that supported those deleted exports. - Kept the active preset list, summary, full-detail, default, mutation, reorder section, and reorder variable hooks intact. ## Refactor impact Primary owner: - `src/features` Impact areas reviewed: - Catalog preset hooks - Prompt preset editor/export surface - Query invalidation keys that remain reachable from active preset mutations Boundary notes: - This stays inside the feature-owned catalog preset hook module. - 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`; `src/features/catalog/presets/hooks/use-presets.ts` no longer appears in the unused export report and the headline unused export count dropped from 89 to 88. - 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** * Removed preset preview functionality * Streamlined internal preset query management and cache invalidation behavior <!-- 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/1605?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:38 +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#5136
No description provided.