feat(workshop): implement mod project testing in the workshop#21
Merged
feat(workshop): implement mod project testing in the workshop#21
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements the ability to test mod projects directly from the workshop by launching them in the game patcher. It introduces a comprehensive state management refactor using Zustand stores and adds multi-selection capabilities for bulk testing of projects.
Changes:
- Adds four new Zustand stores for managing workshop UI state (view, selection, dialogs, and patcher session)
- Refactors all workshop dialogs and components to use centralized state management instead of local component state
- Implements project selection UI with checkboxes and a new SelectionActionBar for bulk operations
- Adds "Test" functionality that starts the patcher with selected workshop projects loaded at highest priority
- Updates Rust backend to support loading workshop projects directly from filesystem into the overlay
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/stores/workshopView.ts | New store for view mode and search query state |
| src/stores/workshopSelection.ts | New store for multi-select project paths |
| src/stores/workshopDialogs.ts | New store for dialog open/closed state |
| src/stores/patcherSession.ts | New store for tracking testing projects |
| src/stores/index.ts | Exports new stores |
| src/routes/workshop/index.tsx | Simplified to use stores instead of local state |
| src/routes/workshop/$projectName.tsx | Refactored to use centralized dialog state |
| src/modules/workshop/components/WorkshopToolbar.tsx | Refactored to use stores and handle imports internally |
| src/modules/workshop/components/SelectionActionBar.tsx | New component for bulk selection and testing |
| src/modules/workshop/components/ProjectHeader.tsx | Added Test button using project actions hook |
| src/modules/workshop/components/ProjectGrid.tsx | Simplified props by using stores |
| src/modules/workshop/components/ProjectCard.tsx | Added selection checkboxes and testing UI indicators |
| src/modules/workshop/components/PackDialog.tsx | Refactored to use dialog store internally |
| src/modules/workshop/components/DeleteConfirmDialog.tsx | Refactored to use dialog store with navigation |
| src/modules/workshop/components/NewProjectDialog.tsx | Refactored to use dialog store and create mutation |
| src/modules/workshop/components/ImportGitRepoDialog.tsx | Refactored to use dialog store internally |
| src/modules/workshop/components/ImportFantomeDialog.tsx | Refactored to use dialog store internally |
| src/modules/workshop/components/EmptyStates.tsx | Refactored to use stores for actions |
| src/modules/workshop/components/index.ts | Added SelectionActionBar export |
| src/modules/workshop/api/useTestProject.ts | New mutation hook for testing projects |
| src/modules/workshop/api/useProjectActions.ts | Simplified to use stores and removed local state |
| src/modules/workshop/api/useFilteredProjects.ts | New hook for filtered projects logic |
| src/modules/workshop/api/index.ts | Exports new API hooks |
| src/modules/patcher/index.ts | Exports patcherKeys for external use |
| src/modules/patcher/components/StatusBar.tsx | Added testing project labels and cleanup logic |
| src/lib/bindings/PatcherConfig.ts | Added workshopProjects field to TypeScript bindings |
| src/components/Icon.tsx | New Icon component (unused) |
| src/components/Button.tsx | Added IconSlot wrapper for consistent icon sizing |
| src/components/index.ts | Exports Icon component |
| src-tauri/src/overlay/mod.rs | Added workshop project loading via FsModContent |
| src-tauri/src/commands/patcher.rs | Passes workshop project paths to overlay builder |
| .gitignore | Ignores ts-rs default output directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.