Skip to content

refactor: improve backend, errors, and minor improvements - #96

Merged
bruhnn merged 56 commits into
mainfrom
rework/backend
Sep 16, 2026
Merged

bruhnn merged 56 commits into
mainfrom
rework/backend

Conversation

@bruhnn

@bruhnn bruhnn commented Sep 11, 2026

Copy link
Copy Markdown
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

bruhnn added 30 commits July 3, 2026 21:01
- 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.
bruhnn added 26 commits August 23, 2026 20:13
- 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.
@bruhnn bruhnn self-assigned this Sep 11, 2026
@bruhnn
bruhnn merged commit dcdee22 into main Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant