[PR #3932] [MERGED] Clean up unused code and dependencies #6163

Closed
opened 2026-10-23 04:07:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3932
Author: @SpicyMarinara
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/code-cleanup-audit


📝 Commits (2)

  • 232aae8 Clean up unused code and dependencies
  • 6772f00 Address CodeRabbit cleanup review

📊 Changes

86 files changed (+491 additions, -3359 deletions)

View changed files

➖ MARI_PHASE2_TASK.md (+0 -105)
➖ MARI_PHASE3_TASK.md (+0 -130)
📝 docs/TROUBLESHOOTING.md (+1 -3)
➕ docs/development/code-cleanup-audit.md (+282 -0)
📝 e2e/core-flows.e2e.ts (+23 -10)
📝 package.json (+1 -1)
📝 packages/client/.instructions.md (+1 -1)
📝 packages/client/package.json (+0 -2)
➖ packages/client/src/components/agents/AgentDebugPanel.tsx (+0 -296)
➖ packages/client/src/components/agents/AgentThoughtBubbles.tsx (+0 -113)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+1 -1)
📝 packages/client/src/components/game/GameCombatUI.tsx (+1 -1)
📝 packages/client/src/components/game/GameQteOverlay.tsx (+0 -22)
📝 packages/client/src/components/game/GameSessionReplay.tsx (+2 -5)
📝 packages/client/src/components/game/GameSurface.tsx (+2 -30)
📝 packages/client/src/components/noodle/NoodleHome.tsx (+5 -1)
📝 packages/client/src/components/noodle/NoodlerHome.tsx (+0 -7)
➖ packages/client/src/components/panels/GlobalGalleryPanel.tsx (+0 -468)
📝 packages/client/src/components/ui/HelpTooltip.tsx (+0 -10)
📝 packages/client/src/hooks/use-agents.ts (+4 -43)

...and 66 more files

📄 Description

Why

The codebase had accumulated unreachable modules, completed task artifacts, unconsumed application exports, orphaned dependencies, and a server test runner that exited successfully without running tests. This made maintenance noisier and allowed the generic test command to imply coverage it did not provide.

This PR implements the maintainer-requested cleanup audit while retaining medium-risk compatibility surfaces for separate, focused work.

No linked issue currently exists. This draft should remain unsubmitted for final review until an issue is opened if project policy requires one.

What changed

  • remove unreachable UI/shared modules, obsolete scripts, and completed phase briefs
  • remove compiler-proven unused declarations and 53 unconsumed client exports
  • enable TypeScript unused-local and unused-parameter enforcement
  • remove eight orphaned direct dependencies and update install guidance and the lockfile
  • make pnpm test run the real regression and browser-smoke lanes
  • consolidate duplicated Spotify query-token and storyboard-keyframe selection logic
  • scope preset-variable reordering to the requested preset
  • make affected browser smoke tests explicit about navigation state and duplicate mobile controls
  • record completed and deferred findings in the cleanup audit

Impact

The repository carries less dead code and fewer dependencies, future unused code is rejected by the compiler, and the standard test command now provides meaningful coverage. Runtime behavior is intentionally preserved aside from the preset-ordering integrity boundary and more deterministic test navigation.

Validation

  • pnpm install --frozen-lockfile
  • pnpm check
  • pnpm test — all non-UI regression lanes passed; browser smoke: 81 passed, 51 intentionally skipped
  • git diff --check

Manual verification

  • Manually verify Roleplay setup with presets both with and without configurable variables.
  • Manually verify Noodle timeline, profile, settings, and account-menu navigation on desktop and mobile.
  • Manually verify game storyboard selection and Spotify playback/search behavior.
  • Manually verify active agent diagnostics remain available through supported debug surfaces.

Summary by CodeRabbit

  • New Features

    • Improved game-session replay storyboard selection.
    • Enhanced Spotify search tokenization for normalized and mood-related queries.
  • Bug Fixes

    • Prevented chat preset variable reordering from affecting variables in other presets.
    • Improved NPC portrait prompt cleanup.
    • Made mobile and roleplay end-to-end flows more reliable across UI variations.
  • Documentation

    • Updated installation troubleshooting guidance.
    • Added a code cleanup audit and refreshed development documentation.
  • Refactor

    • Removed unused debug overlays, gallery UI, and obsolete application capabilities.
    • Simplified workspace testing and strengthened client unused-code checks.

🔄 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/3932 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/code-cleanup-audit` --- ### 📝 Commits (2) - [`232aae8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/232aae8af47519162ee172b3d89831d573d48b50) Clean up unused code and dependencies - [`6772f00`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6772f0050d104e2c88a1edebd8f546222b107be9) Address CodeRabbit cleanup review ### 📊 Changes **86 files changed** (+491 additions, -3359 deletions) <details> <summary>View changed files</summary> ➖ `MARI_PHASE2_TASK.md` (+0 -105) ➖ `MARI_PHASE3_TASK.md` (+0 -130) 📝 `docs/TROUBLESHOOTING.md` (+1 -3) ➕ `docs/development/code-cleanup-audit.md` (+282 -0) 📝 `e2e/core-flows.e2e.ts` (+23 -10) 📝 `package.json` (+1 -1) 📝 `packages/client/.instructions.md` (+1 -1) 📝 `packages/client/package.json` (+0 -2) ➖ `packages/client/src/components/agents/AgentDebugPanel.tsx` (+0 -296) ➖ `packages/client/src/components/agents/AgentThoughtBubbles.tsx` (+0 -113) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameQteOverlay.tsx` (+0 -22) 📝 `packages/client/src/components/game/GameSessionReplay.tsx` (+2 -5) 📝 `packages/client/src/components/game/GameSurface.tsx` (+2 -30) 📝 `packages/client/src/components/noodle/NoodleHome.tsx` (+5 -1) 📝 `packages/client/src/components/noodle/NoodlerHome.tsx` (+0 -7) ➖ `packages/client/src/components/panels/GlobalGalleryPanel.tsx` (+0 -468) 📝 `packages/client/src/components/ui/HelpTooltip.tsx` (+0 -10) 📝 `packages/client/src/hooks/use-agents.ts` (+4 -43) _...and 66 more files_ </details> ### 📄 Description ## Why The codebase had accumulated unreachable modules, completed task artifacts, unconsumed application exports, orphaned dependencies, and a server test runner that exited successfully without running tests. This made maintenance noisier and allowed the generic test command to imply coverage it did not provide. This PR implements the maintainer-requested cleanup audit while retaining medium-risk compatibility surfaces for separate, focused work. No linked issue currently exists. This draft should remain unsubmitted for final review until an issue is opened if project policy requires one. ## What changed - remove unreachable UI/shared modules, obsolete scripts, and completed phase briefs - remove compiler-proven unused declarations and 53 unconsumed client exports - enable TypeScript unused-local and unused-parameter enforcement - remove eight orphaned direct dependencies and update install guidance and the lockfile - make `pnpm test` run the real regression and browser-smoke lanes - consolidate duplicated Spotify query-token and storyboard-keyframe selection logic - scope preset-variable reordering to the requested preset - make affected browser smoke tests explicit about navigation state and duplicate mobile controls - record completed and deferred findings in the cleanup audit ## Impact The repository carries less dead code and fewer dependencies, future unused code is rejected by the compiler, and the standard test command now provides meaningful coverage. Runtime behavior is intentionally preserved aside from the preset-ordering integrity boundary and more deterministic test navigation. ## Validation - `pnpm install --frozen-lockfile` - `pnpm check` - `pnpm test` — all non-UI regression lanes passed; browser smoke: 81 passed, 51 intentionally skipped - `git diff --check` ## Manual verification - [ ] Manually verify Roleplay setup with presets both with and without configurable variables. - [ ] Manually verify Noodle timeline, profile, settings, and account-menu navigation on desktop and mobile. - [ ] Manually verify game storyboard selection and Spotify playback/search behavior. - [ ] Manually verify active agent diagnostics remain available through supported debug surfaces. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved game-session replay storyboard selection. - Enhanced Spotify search tokenization for normalized and mood-related queries. - **Bug Fixes** - Prevented chat preset variable reordering from affecting variables in other presets. - Improved NPC portrait prompt cleanup. - Made mobile and roleplay end-to-end flows more reliable across UI variations. - **Documentation** - Updated installation troubleshooting guidance. - Added a code cleanup audit and refreshed development documentation. - **Refactor** - Removed unused debug overlays, gallery UI, and obsolete application capabilities. - Simplified workspace testing and strengthened client unused-code checks. <!-- 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-23 04:07:41 +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#6163
No description provided.