zed-industries/zed · error

Failed to trash {failed_count} of {total_count} files: {firs

Error message

Failed to trash {failed_count} of {total_count} files: {first_error:#}

What it means

Aggregated failure from the 'trash files' flow: multiple project.trash_file tasks were spawned and failed_count of total_count did not complete; first_error carries the underlying cause. Fires when files cannot be moved to trash (permissions, missing files, filesystem errors).

Source

Thrown at crates/git_ui/src/git_panel.rs:2632

            );
            cx.background_spawn(prompt)
        };

        let this = cx.weak_entity();
        window
            .spawn(cx, async move |cx| {
                if prompt.await? != 0 {
                    return anyhow::Ok(());
                }

                let created = this.update_in(cx, |this, window, cx| {
                    let staged = entries
                        .iter()
                        .filter(|entry| entry.status.staging().has_staged())
                        .cloned()
                        .collect::<Vec<_>>();
                    if !staged.is_empty() {
                        this.change_file_stage(false, staged, cx);
                    }
                    let tracked = entries
                        .iter()
                        .filter(|entry| !entry.status.is_created())
                        .cloned()
                        .collect::<Vec<_>>();
                    if !tracked.is_empty() {
                        this.perform_checkout(tracked, window, cx);
                    }
                    entries
                        .into_iter()
                        .filter(|entry| entry.status.is_created())
                        .collect::<Vec<_>>()
                })?;

                if created.is_empty() {
                    return Ok(());
                }

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Surface first_error so the user knows why trashing failed
  2. Report how many of the total files failed, since some may have succeeded
  3. Continue unstaging only successfully trashed entries to keep git state consistent
  4. Suggest checking file permissions or whether files were deleted externally
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/git_ui/src/git_panel.rs:2624 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/a091f0c7fd0c9e59. Report an issue: GitHub.