[PR #1663] [MERGED] Remove unused game mechanics exports #5195

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

📋 Pull Request Information

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

Base: refactor ← Head: knip/refactor-export-cleanup


📝 Commits (1)

  • 5c5fdde Remove unused game mechanics exports

📊 Changes

9 files changed (+16 additions, -78 deletions)

View changed files

📝 src/engine/modes/game/mechanics/combat.service.ts (+5 -5)
📝 src/engine/modes/game/mechanics/dice.service.ts (+1 -9)
📝 src/engine/modes/game/mechanics/element-reactions.service.ts (+2 -2)
📝 src/engine/modes/game/mechanics/encounter.service.ts (+2 -2)
📝 src/engine/modes/game/mechanics/loot.service.ts (+3 -3)
📝 src/engine/modes/game/mechanics/morale.service.ts (+0 -35)
📝 src/engine/modes/game/mechanics/perception.service.ts (+1 -1)
📝 src/engine/modes/game/mechanics/reputation.service.ts (+2 -14)
📝 src/engine/modes/game/mechanics/skill-check.service.ts (+0 -7)

📄 Description

Linked issue

N/A - mechanical Knip cleanup batch.

Why this change

  • Continues the refactor branch Knip cleanup by removing unnecessary public exports from game mechanics modules.
  • Fresh source-of-truth command before editing: pnpm exec knip --exports --no-config-hints --reporter compact --no-exit-code.
  • Fresh counts changed from Unused exports (70) / Unused exported types (55) to Unused exports (62) / Unused exported types (50).

What changed

  • Removed public export visibility from game mechanics helpers/types that are only used inside their defining modules.
  • Removed declarations that became true unused locals once their public export was removed:
    • isDiceNotation
    • moraleDiceModifier
    • formatMoraleContext
    • buildNpcRelationshipSummary
    • attributeModifier

Refactor impact

Primary owner:

engine game mode mechanics

Impact areas reviewed:

  • src/engine/modes/game/mechanics
  • Fresh Knip output
  • TypeScript project references
  • Production Vite build/import graph

Boundary notes:

  • No React, feature UI, shared API, Rust, storage, schema, prompt-pipeline, or contract files changed.
  • This is a public export-surface cleanup only; runtime imports and remaining exported entrypoints are unchanged.

Pressure points touched:

  • Game mechanics services only.
  • No GameSurface, ModeSurface, 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 after the cleanup and confirmed the selected mechanics rows no longer appear.
  • Codex ran pnpm typecheck successfully.
  • Codex ran git diff --check successfully.
  • Codex ran pnpm build successfully.
  • No browser/Tauri manual verification was run because this is a non-UI mechanical export cleanup.

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

No docs or release-note updates are needed for this mechanical export cleanup.

UI evidence

N/A - no UI changes.

Summary by CodeRabbit

Release Notes

This release contains internal code refactoring with no user-facing changes. All game mechanics, features, and functionality remain unchanged and work as before.

  • Refactor
    • Internal API reorganization for improved code structure and maintainability.

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/1663 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `knip/refactor-export-cleanup` --- ### 📝 Commits (1) - [`5c5fdde`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5c5fdded88ad5be627f00d37dfb97335d665f516) Remove unused game mechanics exports ### 📊 Changes **9 files changed** (+16 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/modes/game/mechanics/combat.service.ts` (+5 -5) 📝 `src/engine/modes/game/mechanics/dice.service.ts` (+1 -9) 📝 `src/engine/modes/game/mechanics/element-reactions.service.ts` (+2 -2) 📝 `src/engine/modes/game/mechanics/encounter.service.ts` (+2 -2) 📝 `src/engine/modes/game/mechanics/loot.service.ts` (+3 -3) 📝 `src/engine/modes/game/mechanics/morale.service.ts` (+0 -35) 📝 `src/engine/modes/game/mechanics/perception.service.ts` (+1 -1) 📝 `src/engine/modes/game/mechanics/reputation.service.ts` (+2 -14) 📝 `src/engine/modes/game/mechanics/skill-check.service.ts` (+0 -7) </details> ### 📄 Description ## Linked issue N/A - mechanical Knip cleanup batch. ## Why this change - Continues the `refactor` branch Knip cleanup by removing unnecessary public exports from game mechanics modules. - Fresh source-of-truth command before editing: `pnpm exec knip --exports --no-config-hints --reporter compact --no-exit-code`. - Fresh counts changed from `Unused exports (70)` / `Unused exported types (55)` to `Unused exports (62)` / `Unused exported types (50)`. ## What changed - Removed public export visibility from game mechanics helpers/types that are only used inside their defining modules. - Removed declarations that became true unused locals once their public export was removed: - `isDiceNotation` - `moraleDiceModifier` - `formatMoraleContext` - `buildNpcRelationshipSummary` - `attributeModifier` ## Refactor impact Primary owner: engine game mode mechanics Impact areas reviewed: - `src/engine/modes/game/mechanics` - Fresh Knip output - TypeScript project references - Production Vite build/import graph Boundary notes: - No React, feature UI, shared API, Rust, storage, schema, prompt-pipeline, or contract files changed. - This is a public export-surface cleanup only; runtime imports and remaining exported entrypoints are unchanged. Pressure points touched: - Game mechanics services only. - No `GameSurface`, `ModeSurface`, 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` after the cleanup and confirmed the selected mechanics rows no longer appear. - Codex ran `pnpm typecheck` successfully. - Codex ran `git diff --check` successfully. - Codex ran `pnpm build` successfully. - No browser/Tauri manual verification was run because this is a non-UI mechanical export cleanup. ## 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 No docs or release-note updates are needed for this mechanical export cleanup. ## UI evidence N/A - no UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes This release contains internal code refactoring with **no user-facing changes**. All game mechanics, features, and functionality remain unchanged and work as before. * **Refactor** * Internal API reorganization for improved code structure and maintainability. <!-- 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/1663?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:14:06 +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#5195
No description provided.