aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* feat(frontend): add instance editor modal with tabbed interfaceHsiangNianian2026-01-183-50/+464
| | | | | | | | | | | | | - Create InstanceEditorModal.svelte with 4 tabs: * Info: Instance name, notes, metadata (created date, last played) * Version: Mod loader switcher and version display * Files: File browser for mods/resourcepacks/shaderpacks/saves/screenshots * Settings: Memory override and JVM arguments customization - Wire InstanceEditorModal to InstancesView with Edit button - Add FileInfo type definition to types/index.ts - Fix accessibility issues: proper button roles, keyboard events - All TypeScript and Svelte compilation errors resolved - Enable comprehensive per-instance configuration management
* feat(frontend): add instance creation wizardHsiangNianian2026-01-182-41/+487
| | | | | | | | | | | | | | - Create multi-step InstanceCreationModal with version and mod loader selection - Step 1: Instance name input - Step 2: Minecraft version selection with search and filtering - Step 3: Mod loader choice (vanilla/Fabric/Forge) with version selection - Automatically installs vanilla version + mod loader during creation - Wire new modal to InstancesView, replace old simple creation dialog - Remove unused confirmCreate function This wizard integrates version management into instance creation workflow, streamlining the user experience by combining instance setup and version installation into a single guided process.
* feat(backend): enhance instance management for editor supportHsiangNianian2026-01-183-6/+142
| | | | | | | - 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-183-4/+303
| | | | | | | | - 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-188-93/+409
| | | | | | - 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
|
* refactor: move version refresh logic to App.svelte and clean up GameState ↵HsiangNianian2026-01-182-11/+15
| | | | constructor
* fix: complete Instance/Profile System isolation and state managementHsiangNianian2026-01-184-9/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## 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
* Merge pull request #60 from HsiangNianian/dev简律纯2026-01-180-0/+0
|\
| * Merge pull request #59 from HsiangNianian/main简律纯2026-01-187-37/+179
| |\ | |/ |/|
* | Merge pull request #57 from HsiangNianian/fix/critical-bugs简律纯2026-01-187-37/+179
|\ \
| | * Merge pull request #58 from HsiangNianian/main简律纯2026-01-1866-338/+7286
| | |\ | |_|/ |/| |
| * | 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
* | chore: add regex dependency version 1.12.2 to Cargo.tomlHsiangNianian2026-01-181-0/+1
| |
* | Update README.md简律纯2026-01-171-1/+1
| |
* | Update README.md简律纯2026-01-171-1/+1
| |
* | chore: update image asset to improve visual qualityHsiangNianian2026-01-161-0/+0
| | | | | | | | Replaced the existing image asset with a higher quality version to enhance the overall visual presentation of the project. This change ensures that the asset meets current design standards.
* | chore: bump version to 0.1.26 in Cargo.toml and tauri.conf.jsonv0.1.26HsiangNianian2026-01-162-2/+2
| | | | | | | | Updated the version number in both Cargo.toml and tauri.conf.json to reflect the new release version 0.1.26. This change ensures consistency across project configuration files.
* | chore: update pre-commit configuration for Rust hooks to specify manifest pathHsiangNianian2026-01-161-1/+7
| | | | | | | | Modified the .pre-commit-config.yaml file to include the `--manifest-path` argument for Rust hooks (fmt, cargo-check, clippy) and defined file patterns for Rust source files. This change enhances the configuration by ensuring that the hooks operate on the correct project files, improving the development workflow.
* | style: auto format and lint fix [skip ci]HsiangNianian2026-01-161-1/+6
| |
* | Merge pull request #55 from HsiangNianian/feat/Instance/Profile-System简律纯2026-01-1617-109/+1065
|\ \
| * | chore: update pre-commit configuration to skip specific hooksfeat/Instance/Profile-SystemHsiangNianian2026-01-161-1/+2
| | | | | | | | | | | | Modified the .pre-commit-config.yaml file to add a skip option for formatting, cargo-check, and clippy hooks. This change optimizes the pre-commit setup by allowing selective execution of hooks, enhancing the efficiency of the development workflow.
| * | chore: update pre-commit configuration for Rust hooksHsiangNianian2026-01-161-14/+6
| | | | | | | | | | | | Modified the .pre-commit-config.yaml file to replace the Rust pre-commit repository and update the hooks for formatting and linting. This change enhances the configuration by using the latest version of the Rust pre-commit hooks and streamlining the setup for Rust projects.
| * | chore: update pre-commit configuration to include Rust as system languageHsiangNianian2026-01-161-1/+2
| | | | | | | | | | | | Modified the .pre-commit-config.yaml file to add 'rust' to the system_language setting, ensuring that pre-commit hooks are properly configured for Rust projects. This change enhances the versatility of the pre-commit setup.
| * | chore: update pre-commit configuration to specify language for clippy checksHsiangNianian2026-01-161-0/+2
| | | | | | | | | | | | Modified the .pre-commit-config.yaml file to explicitly set the language for clippy checks to 'system', ensuring consistent behavior across different environments. This change enhances the clarity of the configuration.
| * | chore: simplify GitHub Actions workflow by removing unnecessary auto-fix optionHsiangNianian2026-01-161-3/+1
| | | | | | | | | | | | Updated the GitHub Actions workflow to remove the 'all_files' option from the prek action, streamlining the process and ensuring that the action runs without additional parameters. This change enhances clarity and maintains the workflow's efficiency.
| * | chore: enhance GitHub Actions workflow to check for changes before ↵HsiangNianian2026-01-161-1/+11
| | | | | | | | | | | | | | | | | | committing fixes Updated the GitHub Actions workflow to include a step that checks for changes before committing auto-fixes. This ensures that commits are only made when there are actual changes, improving the efficiency of the workflow.
| * | fix: improve Java path normalization logicHsiangNianian2026-01-161-2/+6
| | | | | | | | | | | | Enhanced the normalization logic for Java paths by ensuring that the search for "java.exe" in the PATH only occurs for relative paths or the name "java", excluding absolute paths that do not exist. This change improves the reliability of locating the Java executable in various environments.
| * | feat: implement instance management features and enhance game launch processHsiangNianian2026-01-166-84/+527
| | | | | | | | | | | | Added functionality for managing game instances, including creating, deleting, updating, and duplicating instances. Integrated instance selection into the game launch process, allowing users to specify the instance when starting a game. Updated the main application logic to handle instance states and paths, ensuring proper directory management for each instance. Introduced a new module for instance management and updated relevant commands to support instance-specific operations.
| * | feat: add InstancesView component and integrate instance management into the UIHsiangNianian2026-01-166-5/+376
| | | | | | | | | | | | Introduced a new InstancesView component for managing game instances, allowing users to create, edit, delete, and duplicate instances. Updated the App.svelte to include the InstancesView and modified various components to ensure instance selection is handled correctly. Enhanced the ModLoaderSelector and VersionsView to check for active instances before performing actions. Updated the Sidebar to include navigation to the new InstancesView.
| * | feat: implement instance management functionalityHsiangNianian2026-01-163-3/+137
|/ / | | | | | | Added a new InstancesState class to manage game instances, including loading, creating, deleting, updating, and duplicating instances. Integrated instance selection into the game launch process, ensuring an active instance is selected before starting a game. Updated the types to include instance-related data structures.
* | feat: enhance Java version management for Minecraft versionsHsiangNianian2026-01-1610-138/+854
| | | | | | | | Added functionality to determine and validate the required Java version for Minecraft versions, including checks for compatibility with older versions. Implemented event emissions for version installation and deletion, and updated the UI to reflect Java version requirements and installation status. Improved version metadata handling and added support for deleting versions.
* | Merge pull request #53 from BegoniaHe/fix/windows-java-path简律纯2026-01-163-4/+264
|\ \
* \ \ Merge pull request #54 from BegoniaHe/docs/improve-copilot-instructions简律纯2026-01-161-7/+44
|\ \ \
* | | | fix: update logging for Java arguments in game start functionHsiangNianian2026-01-161-1/+1
| | | | | | | | | | | | | | | | Modified the logging statement in the start_game function to display all Java arguments instead of just the first ten, improving debugging capabilities.
* | | | chore: bump version in tauri configuration to 0.1.25v0.1.25HsiangNianian2026-01-162-2/+2
| | | |
* | | | chore: update CSP in tauri configuration for enhanced securityHsiangNianian2026-01-161-1/+1
| | | | | | | | | | | | | | | | Modified the content security policy (CSP) in tauri.conf.json to define specific sources for scripts, styles, images, fonts, and connections, improving the application's security posture.
* | | | chore: update pre-commit configuration to specify language for hooksHsiangNianian2026-01-161-5/+4
| | | | | | | | | | | | | | | | Removed the language specification for the ruff hook and added it for the fmt and clippy hooks, ensuring proper configuration for Rust in the pre-commit setup.
* | | | chore: refine prek workflow by removing skip ci commentHsiangNianian2026-01-161-2/+1
| | | | | | | | | | | | | | | | Removed the commented line that instructed to skip the CI process based on commit messages, streamlining the workflow configuration for clarity and maintainability.
* | | | chore: add pre-commit badge to README for enhanced visibilityHsiangNianian2026-01-161-0/+1
| | | | | | | | | | | | | | | | Included a badge in the README to indicate pre-commit status, improving project documentation and providing users with immediate feedback on the pre-commit checks.
* | | | chore: update pre-commit configuration to skip formatting and clippy checksHsiangNianian2026-01-161-0/+3
| | | | | | | | | | | | | | | | Modified the .pre-commit-config.yaml to skip the formatting and clippy checks during the CI process, optimizing the pre-commit workflow. Added Rust as the language for the pre-commit hook to ensure compatibility.
* | | | chore: enhance prek workflow with Rust installation and system dependenciesHsiangNianian2026-01-161-0/+16
| | | | | | | | | | | | | | | | Added steps to the GitHub Actions workflow for installing Rust and necessary system dependencies on Linux, improving the environment setup for the prek auto-fix action.
* | | | chore: update prek workflow bot user detailsHsiangNianian2026-01-161-2/+2
| | | | | | | | | | | | | | | | Changed the commit user name and email for the prek auto-fix action in the GitHub Actions workflow to reflect the new bot identity, enhancing clarity in commit history.