refactor: improve backend, errors, and minor improvements - #96
Merged
Merged
Conversation
bruhnn
commented
Sep 11, 2026
Owner
- Split backend logic into smaller modules for mod management, errors, renaming, syncing, and updates
- Added structured backend errors and updated the frontend to use them
- Improved mod installation, deletion, renaming, and author updates
- Updated profiles automatically when mods are renamed
- Added a way to remove missing mods from profiles
- Improved sync logging and error details
- Prevented syncing or installing mods through symbolic links and junctions
- Prevented sync from continuing when the game mods directory cannot be read
- Cancelled pending auto-sync before manually syncing or unsyncing
- Improved reporting when a sync finishes with errors
- Improved update checks, downloads, and installation
- Improved mod preview errors so the full error is shown
- Added translated error reasons where available
- Improved deletion errors and added retry support
- Improved notifications and logging across the app
- Cleaned up some frontend/backend types, imports, and smaller UI issues
- run discover_mods and delete_mods in the background to avoid ui freezes - move preview helpers (is_texture_mod, preview_image) into mods/preview.rs - allow preview_mod on mods with minor errors (missing modfile, conflicts) - report delete_mods progress via a channel, return per-mod success/failure - return the full mod object from install_mod_from_zip/install_mod_from_folder instead of just its name - return proper results/errors from rename_mod, set_mod_author - return updated mod list from enable_mods and disable_mods - return updated mods from commands instead of emitting mods-updated - replace SyncCommandError with shared ModError - remove unused app_handle params
Changes: - Moved `config`, `game`, `mods`, `profiles`, `migrate`, `updater`, and `utils` commands into their feature modules - Renamed `update/` to `updater/` - Moved `AppState` and `BundledAssets` into `state.rs` - Moved log rotation into `utils/logs.rs` - Moved `get_game_asset` into `utils/misc.rs` - Simplified `main.rs` to just call the library entry point - Added `commands` submodules to feature modules
Changes: - Moved the mod manager implementation into `manager.rs` - Moved ModError into `errors.rs` - Moved mod renaming logic into `mods/rename.rs` - Validate mod names before renaming (empty name, invalid chars, etc)
Changes: - Return changed mods from `change_mods_state` - Rename ambiguous error variants for clarity - Replace `eprintln!` with `error!` logging - Remove an unused import
Replace the flat ModError with AppError and preserve operation-specific context across mod and profile errors.
Serialize backend failures as { parent, type, details, message } payloads and update manager and command call sites to propagate typed errors and I/O sources.
This changes several error variants and their serialized API payloads.
- Checking for updates no longer downloads the installer automatically. - App updates can now be downloaded and installed separately. - Added download progress for app updates, Mod Preview, and game data. - Replaced global update events with command channels.
- Redesign the Logs modal with level and source filters. - Show frontend and backend logs in one place. - Add actions to copy, clear, and open the logs folder. - Add modal size options for fixed-height layouts. - Add debug color tokens to all themes.
Separate app update checks, downloads, and installation. Show app, Mod Preview, and game-data download progress. Improve update errors, retries, and startup dialogs.
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.