improve delete worktree failure diagnostics#302
improve delete worktree failure diagnostics#302VooDisss wants to merge 1 commit intoNeuralNomadsAI:devfrom
Conversation
Move delete-worktree failures out of transient toast-only feedback and into the confirmation modal so the error stays visible, selectable, and easier to copy when deletion fails. The modal now keeps the raw backend/git error inline, offers raw and sanitized copy actions, and presents a clearer two-line worktree summary instead of pushing users to capture a disappearing notification. Add lightweight error parsing and classification in the UI so common failure modes such as local changes, in-use directories, missing worktrees, and permission issues get a short summary, likely-cause label, and suggested next step. This keeps the backend contract unchanged while making the delete flow much easier to understand and debug without losing access to the original raw error text. Also tune the delete dialog layout so it uses a deliberate desktop-sized modal, allows the content to expand vertically to the viewport, and keeps the copy actions compact. Matching i18n strings were added for all supported locales so the new diagnostics remain wired through the existing translation layer instead of hardcoding English-only UI text.
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Gatekeeper review for the latest PR state. I reviewed the current diff for regressions and stronger implementation options. Findings:
Validation:
-- |
Summary
Closes #301.
BEFORE:
AFTER:
Problem
Before this change, delete-worktree failures were difficult to work with:
This was especially frustrating for common cases such as:
What changed
Modal failure UX
packages/ui/src/components/worktree-selector.tsxHuman-readable diagnostics
{"error":"..."}before classificationlocalChangesinUsenotFoundpermissionDeniedunknownCopy flows
Copy errorfor the original failure textCopy sanitizedto redact common absolute path and username patterns before copyingModal content and sizing
Deletes this branch worktree and its local folder.i18n coverage
enesfrhejaruzh-HansWhy this approach
Not included
Those are useful follow-ups, but this PR is intentionally scoped to failure presentation and debuggability.
Files changed
packages/ui/src/components/worktree-selector.tsxpackages/ui/src/lib/i18n/messages/en/instance.tspackages/ui/src/lib/i18n/messages/es/instance.tspackages/ui/src/lib/i18n/messages/fr/instance.tspackages/ui/src/lib/i18n/messages/he/instance.tspackages/ui/src/lib/i18n/messages/ja/instance.tspackages/ui/src/lib/i18n/messages/ru/instance.tspackages/ui/src/lib/i18n/messages/zh-Hans/instance.tsValidation
npm run typecheck --workspace @codenomad/uinpm run build --workspace @codenomad/uinpm run typecheck --workspace @neuralnomads/codenomad-electron-appNotes for reviewers