aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri
Commit message (Collapse)AuthorAgeFilesLines
* refactor(client): rewrite macros to generate client苏向夜2026-02-1818-249/+247
|
* merge: dev苏向夜2026-02-152-27/+34
|
* feat(java): add mise version manager support and refactor detection logicBegonia, HE2026-01-304-12/+76
| | | | | | | | | | - Add scan_java_dir() helper to filter symlinks and scan directories - Implement find_mise_java() for ~/.local/share/mise/installs/java/ - Refactor find_sdkman_java() to scan candidates dir instead of 'current' - Fix import paths to use absolute crate::core::java:: paths - Add mise detection to Linux and macOS candidates Reviewed-by: Claude Sonnet 4.5
* refactor: add TypeScript support to account storage structuresHsiangNianian2026-01-301-3/+21
|
* refactor: add TypeScript support to JavaConfig structHsiangNianian2026-01-301-3/+7
|
* refactor(java): add TypeScript support to Java data structuresHsiangNianian2026-01-301-4/+21
|
* refactor(java): enhance Adoptium structs with TypeScript supportHsiangNianian2026-01-301-5/+26
|
* fix: resolve rebase conflicts and compilation errorsBegonia, HE2026-01-295-138/+152
| | | | | | | | | | | | - Export JavaError from java module - Fix type mismatches in Adoptium provider methods - Add type annotations for reqwest json() calls - Remove non-existent cache_version field from JavaCatalog - Fix resolve_java_for_launch call signature (remove extra window param) - Add error conversion to String for Tauri commands - Fix import for save_catalog_cache in adoptium.rs Reviewed-by: Claude Sonnet 4.5
* refactor(java): improve error handling and loggingBegonia, HE2026-01-295-20/+140
| | | | | | | | | | - Extract JavaError to dedicated error.rs module - Add serde defaults for JavaInstallation optional fields - Replace unwrap() with proper error propagation - Add detailed logging for Java resolution priority chain - Improve error mapping in validation (NotFound vs VerificationFailed) Reviewed-by: Claude Sonnet 4.5
* feat(java): implement cache versioning, size limits, and automatic cleanupBegonia, HE2026-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | - Add CACHE_VERSION constant for cache format compatibility tracking - Add MAX_CACHE_SIZE_BYTES limit (10 MB) to prevent unbounded cache growth - Add cache_version field to JavaCatalog struct with default value - Implement cache version validation in load_cached_catalog() - Implement cache size enforcement in save_catalog_cache() - Add cleanup_expired_caches() for background cache cleanup - Add enforce_cache_size_limit() to validate cache file sizes - Add is_cache_version_compatible() helper function - Automatically clean up expired caches on load and clear operations - Validate cache version before using cached data Fixes: - Cache expiration without automatic cleanup (now cleaned on load) - Missing cache version control (now validates format compatibility) - Unbounded cache size growth (now limited to 10 MB) Reviewed-by: Claude 3.5 Sonnet
* feat(java): Enhance Java detection and error handlingBegonia, HE2026-01-294-33/+121
| | | | | | | | | | | | - Added support for detecting Java installations from SDKMAN! in `find_sdkman_java`. - Improved `run_which_command_with_timeout` to handle command timeouts gracefully. - Introduced a unified `JavaError` enum for consistent error handling across Java operations. - Updated functions to return `Result` types instead of `Option` for better error reporting. - Enhanced `load_cached_catalog` and `save_catalog_cache` to use `JavaError`. - Refactored `fetch_java_catalog`, `fetch_java_release`, and `fetch_available_versions` to return `JavaError`. - Improved validation functions to return detailed errors when checking Java installations. - Added tests for version parsing and compatibility checks. - Updated `resolve_java_for_launch` to handle instance-specific and global Java paths.
* refactor(java): simplify version compatibility logic and improve error handlingBegonia, HE2026-01-296-182/+133
| | | | | | | | | | | - Extract version compatibility check into shared validation function - Remove duplicated version checking code across multiple modules - Simplify Java detection timeout logic in detection.rs - Expand vendor detection to support more JDK distributions (Dragonwell, Kona, Semeru, BiSheng, etc.) - Refactor start_game to use priority-based Java resolution - Improve error handling in Adoptium provider task collection Reviewed-by: Claude Sonnet 4.5
* refactor(java): replace unwrap with expect for better error handlingBegonia, HE2026-01-291-1/+6
| | | | | | Replace potentially panicking unwrap() call with expect() that includes a descriptive error message to aid debugging if the edge case occurs. Reviewed-by: Claude Sonnet 4.5
* refactor(java): suppress dead code warnings and improve detectionBegonia, HE2026-01-294-16/+19
| | | | | | | | | - Add #[allow(dead_code)] attributes to utility functions - Improve 64-bit detection with case-insensitive check - Support aarch64 architecture in bitness detection - Add TODO for future vendor expansion Reviewed-by: Claude Sonnet 4.5
* refactor(java): address Sourcery AI code review feedbackBegonia, HE2026-01-294-84/+110
| | | | | | | | | | | | | | - Centralize strip_unc_prefix into java/mod.rs to eliminate duplication across detection.rs and validation.rs - Remove unused JAVA_CHECK_TIMEOUT constant from validation.rs - Implement actual timeout mechanism in run_which_command_with_timeout() using try_wait() loop - Parallelize Adoptium API requests for better catalog fetch performance Fixes: - Multiple strip_unc_prefix implementations consolidated - Timeout constant now properly enforced in which/where command execution - Catalog fetching now uses concurrent tokio::spawn tasks instead of sequential await Reviewed-by: Claude Sonnet 4.5
* refactor(java): modularize Java detection and management systemBegonia, HE2026-01-2912-1125/+1354
| | | | | | | | | | | | | | | | - Split monolithic java.rs (1089 lines) into focused modules - detection: Java installation discovery - validation: Version validation and requirements checking - priority: Installation selection priority logic - provider: Java download provider trait - providers: Provider implementations (Adoptium) - persistence: Cache and catalog management - Add java_path_override field to Instance struct for per-instance Java configuration - Export JavaInstallation at core module level This refactoring improves maintainability and prepares for multi-vendor Java provider support. Reviewed-by: Claude Sonnet 4.5
* docs(java): add TODO comment for refactoring candidate detectionBegonia, HE2026-01-291-0/+2
| | | | Reviewed-by: Claude-Sonnet-4.5
* feat(ui): add new ui project苏向夜2026-01-231-3/+3
|
* feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-2311-0/+48
|
* feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-2111-103/+76
|
* fix(fabric): Add untagged attribute to FabricMainClass enum exportHsiangNianian2026-01-212-2/+3
|
* fix: Update ts_rs import to include SerializeHsiangNianian2026-01-211-1/+1
|
* fix(auth): Remove commented-out prism's Client ID from auth.rsHsiangNianian2026-01-211-1/+0
|
* fix(deps): Update ts-rs dependency to include serde-compat featureHsiangNianian2026-01-211-1/+1
|
* fix: Update TypeScript export paths to reflect new directory structureHsiangNianian2026-01-2111-58/+76
|
* feat: Add TypeScript support to data structures using ts-rs for type generationHsiangNianian2026-01-2111-61/+276
|
* chore(deps): Add ts-rs dependency version 11.1.0HsiangNianian2026-01-201-0/+1
|
* Potential fix for code scanning alert no. 3: Cleartext logging of sensitive ↵简律纯2026-01-191-1/+1
|\ | | | | | | information (#71)
| * Potential fix for code scanning alert no. 3: Cleartext logging of sensitive ↵简律纯2026-01-191-1/+1
| | | | | | | | | | information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* | chore(ui): refactor workspace to monorepo苏向夜2026-01-191-1/+1
|/
* Merge branch 'main' into chore/migrate-repository苏向夜2026-01-1911-166/+930
|\
| * chore(release): bump versionsgithub-actions[bot]2026-01-194-3/+10
| |
* | chore: migrate repository from HsiangNianian to HydroRoll-TeamBegonia, HE2026-01-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Updated repository URL in Cargo.toml - Updated GitHub API endpoint in main.rs - Updated commit links in HomeView.svelte - Updated issue template links in config.yml Reviewed-by: Claude Sonnet 4.5
| * chore(tauri): mark tauri crate as private苏向夜2026-01-191-0/+1
| |
| * ci(semifold): change os name苏向夜2026-01-181-1/+1
| |
| * ci(semifold): prepare for alpha release苏向夜2026-01-181-7/+1
| |
| * fix(build): fix pnpm build script苏向夜2026-01-181-40/+40
| |
| * feat(backend): enhance instance management for editor supportHsiangNianian2026-01-182-6/+135
| | | | | | | | | | | | | | - Sync instance.version_id after start_game, install_fabric, install_forge - Add jvm_args_override and memory_override to Instance struct - Add file management commands: list_instance_directory, delete_instance_file, open_file_explorer - Support per-instance settings overrides (Java args, memory)
| * feat(migration): implement shared cache migration with SHA1 dedupHsiangNianian2026-01-182-1/+275
| | | | | | | | | | | | | | | | - Add migrate_to_shared_caches() with hard link preference - SHA1-based deduplication across all instances - Copy fallback for cross-filesystem scenarios - Auto-enable use_shared_caches after successful migration - UI shows statistics: moved files, hardlinks/copies, MB saved
| * fix(ci): improve pre-commit fmt hook configurationHsiangNianian2026-01-184-90/+262
| | | | | | | | | | | | - Add pass_filenames: false to fmt hook - Add -- separator for cargo fmt args - Manually format code with cargo fmt
| * delete: remove instance isolation tests for cleanupHsiangNianian2026-01-181-198/+0
| |
| * fix: complete Instance/Profile System isolation and state managementHsiangNianian2026-01-182-7/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Overview Fixed critical multi-instance isolation bugs where versions, mod loaders, and instance state were not properly isolated between instances. These changes ensure full data isolation and consistent instance metadata. ## Bug Fixes - P0 (Critical Isolation Issues) ### 1. Backend: get_versions() command isolation - Problem: Used global app_data_dir instead of instance-specific game_dir - Fix: Added instance_id parameter, now queries instance.game_dir - Impact: Versions are now properly isolated per instance ### 2. Frontend: delete_version missing instanceId - Problem: Frontend passed only versionId, not instanceId - Fix: Updated VersionsView.svelte to pass instanceId parameter - Impact: Version deletion now targets correct instance ### 3. Frontend: get_version_metadata missing instanceId - Problem: Metadata queries didn't specify which instance to check - Fix: Updated VersionsView.svelte to pass instanceId parameter - Impact: Version info displayed per-instance correctly ### 4. Frontend: Instance switching doesn't refresh versions - Problem: Switching instances didn't reload version list - Fix: Added $effect hook in GameState to watch activeInstanceId changes - Impact: Version list auto-refreshes on instance switch ## Bug Fixes - P1 (State Synchronization) ### 5. Backend: install_fabric doesn't update Instance.mod_loader - Problem: Instance.mod_loader field wasn't updated after installation - Fix: Added instance_state.update_instance() call - Impact: Instance metadata stays in sync ### 6. Backend: install_forge doesn't update Instance.mod_loader - Problem: Instance.mod_loader field wasn't updated after installation - Fix: Added instance_state.update_instance() call - Impact: Instance metadata stays in sync ### 7. Backend: delete_version doesn't clean up Instance state - Problem: Deleting version didn't clear Instance.version_id or .mod_loader - Fix: Added cleanup logic to clear stale references - Impact: Instance state remains valid after deletion ## Testing - Added comprehensive integration tests in instance_isolation_tests.rs - Tests document 10 key scenarios for multi-instance isolation - All code compiles cleanly with no errors
| * fix(java): handle build metadata and underscore formats in version parsingHsiangNianian2026-01-181-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | Update parse_java_version() to properly handle: - Build metadata (strip '+' and everything after) - Trailing garbage (strip '-' and everything after, e.g. -Ubuntu) - Underscore version separators (1.8.0_411 -> 1.8.0.411) This ensures Java versions are correctly parsed on all platforms: - Old format: 1.8.0_411 (Java 8 update 411) - New format: 21.0.3+13-Ubuntu (Java 21 with build metadata) - Short format: 17.0.1 (Java 17 update 1).
| * fix(manifest): add find_root_version for nested inheritance resolutionHsiangNianian2026-01-181-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | Add find_root_version() function to walk the inheritance chain and find the root vanilla Minecraft version from a modded version (Fabric/Forge). This is useful for determining which vanilla version's client.jar should be used when launching modded versions, as modded versions inherit from vanilla versions but don't contain their own client.jar. The function follows the inheritsFrom field recursively until reaching a version without a parent (the root vanilla version).
| * fix(rules): add architecture and version checks to library rule matchingHsiangNianian2026-01-181-5/+24
| | | | | | | | | | | | | | | | | | | | Complete the rule_matches function to properly evaluate: - OS name (already working: osx/macos, linux, windows) - Architecture (arch field): match against env::consts::ARCH - OS version (version field): accept all versions for now (conservative) This ensures that architecture-specific libraries (e.g. natives-arm64) are correctly filtered based on the current platform.
| * fix(downloader): use proper atomic ordering for thread-safe progress trackingHsiangNianian2026-01-181-11/+11
| | | | | | | | | | | | | | | | | | | | Replace Ordering::Relaxed with appropriate synchronization: - Ordering::AcqRel for fetch_add operations that modify shared state - Ordering::Acquire for loads that depend on other thread's writes - Ordering::Release for stores that other threads may read This ensures visibility of downloaded bytes and completed files across concurrent download tasks without data races.
| * fix(auth): add token expiry check in start_gameHsiangNianian2026-01-182-2/+30
| | | | | | | | | | | | | | | | | | Check if the Microsoft account token is expired before attempting to launch the game. If expired, attempt to refresh using the refresh_token. If refresh fails, return an error instructing the user to login again. Also removed #[allow(dead_code)] from is_token_expired since it's now actively used.
| * fix(instance): copy directory BEFORE creating metadata in duplicate_instanceHsiangNianian2026-01-181-11/+32
| | | | | | | | | | | | | | | | Prevent race condition in duplicate_instance by copying the source game directory BEFORE creating and saving the new instance metadata. This ensures that if the copy fails, no orphaned metadata is created. Also copy the icon_path from source instance to maintain visual consistency.
| * fix(forge): check if installer created version JSON before manual creationHsiangNianian2026-01-181-4/+22
| | | | | | | | | | | | | | The Forge installer may or may not create the version.json file depending on the installer version. Check if the file exists after running the installer before manually creating it to avoid overwriting any installer-generated configuration.
| * fix(auth): prevent infinite recursion in get_client()HsiangNianian2026-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | The fallback in the reqwest client builder was calling get_client() recursively, which would cause a stack overflow if Client::builder() failed. Now uses reqwest::Client::new() as the fallback. Also fixed User-Agent to be platform-agnostic. Reviewed-by: Claude Opus 4.5