refactor: decouple commands from god-module lib.rs#1
Open
vibemasshq-dev wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there! 👋 I've been really enjoying the Downpour application and wanted to contribute to the codebase by helping organize the core architecture.
What does this PR do?
I actually ran your codebase through an AI CTO tool I'm building called VibeMass, and its Architecture Agent flagged
src-tauri/src/lib.rsas a "God-module" bottleneck because it handles the registration of 19 different Tauri commands along with extensive state wiring.I took a look, and the AI was spot on! It was definitely getting a bit crowded in there, so I rolled up my sleeves and refactored that structure to make the codebase much easier for you to maintain and scale.
Specifically, I have:
src-tauri/src/commands/module directory.download.rs,queue.rs,media.rs,settings.rs, andsystem.rs).lib.rsso its primary responsibility is now just importing and exposing these granular modules.Validation:
I've strictly followed the
CONTRIBUTING.mdguidelines to ensure this doesn't break anything:cargo fmtappliedcargo clippy -- -D warningspasses perfectlycargo testpasses (197 unit tests, 10 integration tests)node extension/filter.property.test.jspassesThank you for building such an awesome project! I hope this architectural improvement (and my AI's catch) makes future development even smoother.