{"record":{"id":"a091f0c7fd0c9e59","repo":"zed-industries/zed","slug":"failed-to-trash-failed-count-of-total-count-fi","errorCode":null,"errorMessage":"Failed to trash {failed_count} of {total_count} files: {first_error:#}","messagePattern":"Failed to trash (.+?) of (.+?) files: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/git_ui/src/git_panel.rs","lineNumber":2632,"sourceCode":"            );\n            cx.background_spawn(prompt)\n        };\n\n        let this = cx.weak_entity();\n        window\n            .spawn(cx, async move |cx| {\n                if prompt.await? != 0 {\n                    return anyhow::Ok(());\n                }\n\n                let created = this.update_in(cx, |this, window, cx| {\n                    let staged = entries\n                        .iter()\n                        .filter(|entry| entry.status.staging().has_staged())\n                        .cloned()\n                        .collect::<Vec<_>>();\n                    if !staged.is_empty() {\n                        this.change_file_stage(false, staged, cx);\n                    }\n                    let tracked = entries\n                        .iter()\n                        .filter(|entry| !entry.status.is_created())\n                        .cloned()\n                        .collect::<Vec<_>>();\n                    if !tracked.is_empty() {\n                        this.perform_checkout(tracked, window, cx);\n                    }\n                    entries\n                        .into_iter()\n                        .filter(|entry| entry.status.is_created())\n                        .collect::<Vec<_>>()\n                })?;\n\n                if created.is_empty() {\n                    return Ok(());\n                }","sourceCodeStart":2614,"sourceCodeEnd":2650,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/git_ui/src/git_panel.rs#L2614-L2650","documentation":"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).","triggerScenarios":"Thrown at crates/git_ui/src/git_panel.rs:2624 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Surface first_error so the user knows why trashing failed","Report how many of the total files failed, since some may have succeeded","Continue unstaging only successfully trashed entries to keep git state consistent","Suggest checking file permissions or whether files were deleted externally"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}