[PR #51] [MERGED] feat: refactor wolf-actions into modular architecture (fixes #30) #58

Closed
opened 2026-10-15 13:02:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolfmanager/pull/51
Author: @salty2011
Created: 7/16/2025
Status: ✅ Merged
Merged: 7/16/2025
Merged by: @salty2011

Base: release/202507.001 ← Head: refactor/wolf-actions-breakdown


📝 Commits (1)

  • 9db9c0c feat: refactor wolf-actions into modular architecture

📊 Changes

12 files changed (+1117 additions, -1043 deletions)

View changed files

📝 src/app/actions/wolf-actions.ts (+3 -1042)
➕ src/app/actions/wolf/auth.ts (+42 -0)
➕ src/app/actions/wolf/client-control.ts (+127 -0)
➕ src/app/actions/wolf/client-management.ts (+126 -0)
➕ src/app/actions/wolf/client-retrieval.ts (+210 -0)
➕ src/app/actions/wolf/index.ts (+10 -0)
➕ src/app/actions/wolf/requests.ts (+152 -0)
➕ src/app/actions/wolf/server-status.ts (+54 -0)
➕ src/app/actions/wolf/synchronization.ts (+283 -0)
➕ src/app/actions/wolf/types.ts (+45 -0)
➕ src/app/actions/wolf/utils.ts (+64 -0)
📝 tsconfig.tsbuildinfo (+1 -1)

📄 Description

Summary

This PR refactors the monolithic 1,043-line wolf-actions.ts file into 9 focused, maintainable modules, addressing issue #30.

Changes

New Module Structure

  • auth.ts: Authentication and session management
  • client-control.ts: Client start/stop/restart operations
  • client-management.ts: Client creation, editing, deletion
  • client-retrieval.ts: Client data fetching and listing
  • requests.ts: HTTP request utilities and error handling
  • server-status.ts: Wolf server status monitoring
  • synchronization.ts: Client state synchronization
  • types.ts: TypeScript type definitions
  • utils.ts: Shared utility functions
  • index.ts: Centralized exports maintaining backward compatibility

Key Improvements

  • ✅ Full backward compatibility through index.ts re-exports
  • ✅ Zero breaking changes - all existing imports continue to work
  • ✅ Follows established patterns from clients/actions refactoring
  • ✅ Addresses security concerns through better code organization
  • ✅ Improves maintainability with focused, single-responsibility modules
  • ✅ Enables easier testing with isolated functionality
  • ✅ Better developer experience with clearer code structure

Testing

  • All existing functionality preserved
  • Import/export compatibility verified
  • Module boundaries properly defined

Closes

Fixes #30

Deployment Notes

This refactoring maintains full API compatibility. No changes required for existing code that imports from wolf-actions.ts.


🔄 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/games-on-whales/wolfmanager/pull/51 **Author:** [@salty2011](https://github.com/salty2011) **Created:** 7/16/2025 **Status:** ✅ Merged **Merged:** 7/16/2025 **Merged by:** [@salty2011](https://github.com/salty2011) **Base:** `release/202507.001` ← **Head:** `refactor/wolf-actions-breakdown` --- ### 📝 Commits (1) - [`9db9c0c`](https://github.com/games-on-whales/wolfmanager/commit/9db9c0cd4d6aa7c5e7a7da0d246d4cc8a9cb2631) feat: refactor wolf-actions into modular architecture ### 📊 Changes **12 files changed** (+1117 additions, -1043 deletions) <details> <summary>View changed files</summary> 📝 `src/app/actions/wolf-actions.ts` (+3 -1042) ➕ `src/app/actions/wolf/auth.ts` (+42 -0) ➕ `src/app/actions/wolf/client-control.ts` (+127 -0) ➕ `src/app/actions/wolf/client-management.ts` (+126 -0) ➕ `src/app/actions/wolf/client-retrieval.ts` (+210 -0) ➕ `src/app/actions/wolf/index.ts` (+10 -0) ➕ `src/app/actions/wolf/requests.ts` (+152 -0) ➕ `src/app/actions/wolf/server-status.ts` (+54 -0) ➕ `src/app/actions/wolf/synchronization.ts` (+283 -0) ➕ `src/app/actions/wolf/types.ts` (+45 -0) ➕ `src/app/actions/wolf/utils.ts` (+64 -0) 📝 `tsconfig.tsbuildinfo` (+1 -1) </details> ### 📄 Description ## Summary This PR refactors the monolithic 1,043-line `wolf-actions.ts` file into 9 focused, maintainable modules, addressing issue #30. ## Changes ### New Module Structure - **auth.ts**: Authentication and session management - **client-control.ts**: Client start/stop/restart operations - **client-management.ts**: Client creation, editing, deletion - **client-retrieval.ts**: Client data fetching and listing - **requests.ts**: HTTP request utilities and error handling - **server-status.ts**: Wolf server status monitoring - **synchronization.ts**: Client state synchronization - **types.ts**: TypeScript type definitions - **utils.ts**: Shared utility functions - **index.ts**: Centralized exports maintaining backward compatibility ### Key Improvements - ✅ **Full backward compatibility** through index.ts re-exports - ✅ **Zero breaking changes** - all existing imports continue to work - ✅ **Follows established patterns** from clients/actions refactoring - ✅ **Addresses security concerns** through better code organization - ✅ **Improves maintainability** with focused, single-responsibility modules - ✅ **Enables easier testing** with isolated functionality - ✅ **Better developer experience** with clearer code structure ## Testing - All existing functionality preserved - Import/export compatibility verified - Module boundaries properly defined ## Closes Fixes #30 ## Deployment Notes This refactoring maintains full API compatibility. No changes required for existing code that imports from `wolf-actions.ts`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:02:02 +00: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
games-on-whales/wolfmanager#58
No description provided.