Skip to content

Comments

feat: implement migration progress tracking for cslol-manager mods#15

Merged
Crauzer merged 1 commit intomainfrom
cslol-migration-progress-tracking
Feb 23, 2026
Merged

feat: implement migration progress tracking for cslol-manager mods#15
Crauzer merged 1 commit intomainfrom
cslol-migration-progress-tracking

Conversation

@Crauzer
Copy link
Member

@Crauzer Crauzer commented Feb 23, 2026

No description provided.

@Crauzer Crauzer self-assigned this Feb 23, 2026
@Crauzer Crauzer added the enhancement New feature or request label Feb 23, 2026
@Crauzer Crauzer requested a review from Copilot February 23, 2026 11:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements progress tracking for the cslol-manager migration feature, allowing users to see real-time updates during both the packaging and installation phases of mod migration. The implementation adds a new MigrationProgress type that tracks the current phase (packaging or installing), progress counters, and the current file being processed.

Changes:

  • Added progress tracking types and event emission for migration operations
  • Created a new useMigrationProgress hook that listens to both migration and install progress events
  • Converted migration commands to async to support non-blocking operations with progress updates

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/modules/migration/components/MigrationWizardDialog.tsx Replaced BulkInstallProgress with new MigrationImportProgress component that shows phase-specific progress
src/modules/migration/api/useMigrationWizard.ts Updated to use useMigrationProgress instead of useInstallProgress
src/modules/migration/api/useMigrationProgress.ts New hook that listens to both migration-progress and install-progress events, transforming them into a unified progress state
src/modules/migration/api/index.ts Exported the new useMigrationProgress hook
src/lib/tauri.ts Added MigrationProgress and MigrationPhase TypeScript type definitions
src-tauri/src/mods/mod.rs Added Rust types for MigrationProgress and MigrationPhase
src-tauri/src/mods/migration.rs Added progress event emission during packaging phase, passing AppHandle to enable event emission
src-tauri/src/commands/migration.rs Converted scan_cslol_mods and import_cslol_mods commands to async, using spawn_blocking for file I/O operations
Comments suppressed due to low confidence (1)

src-tauri/src/mods/migration.rs:110

  • Progress is emitted before checking if the folder exists. If a folder doesn't exist (line 108-110), the progress will still show it as being processed, which may be misleading to users. While this maintains the counter accuracy (showing X out of total selected), it could confuse users who see a folder name in the progress that wasn't actually packaged. Consider moving the progress emission after the folder existence check, or updating the current file name only for folders that are actually processed.
    for (i, folder) in folders.iter().enumerate() {
        let _ = app_handle.emit(
            "migration-progress",
            MigrationProgress {
                phase: MigrationPhase::Packaging,
                current: i + 1,
                total,
                current_file: folder.clone(),
            },
        );

        let mod_dir = installed_dir.join(folder);
        if !mod_dir.is_dir() {
            tracing::warn!("Skipping missing folder: {}", folder);
            continue;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Crauzer Crauzer merged commit a9aeb09 into main Feb 23, 2026
9 checks passed
@Crauzer Crauzer deleted the cslol-migration-progress-tracking branch February 23, 2026 12:17
@github-project-automation github-project-automation bot moved this from Todo to Done in LTK Manager Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant