Skip to content

fix: surface worktree setup errors instead of showing infinite spinner#106

Merged
matt2e merged 1 commit intomainfrom
matt2e/error-creating-branch
Feb 13, 2026
Merged

fix: surface worktree setup errors instead of showing infinite spinner#106
matt2e merged 1 commit intomainfrom
matt2e/error-creating-branch

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Feb 13, 2026

Screenshot 2026-02-13 at 2 01 05 pm When worktree creation fails, the branch card previously showed an infinite "Creating worktree…" spinner with no way to recover. This change:
  • Tracks worktree setup errors per-branch in a worktreeErrors map
  • Displays the error message with an AlertCircle icon in the branch card when setup fails
  • Adds a Retry button so users can re-attempt worktree creation without deleting and recreating the branch
  • Shows a Delete button in the error state header so users can clean up failed branches
  • Clears previous errors when retrying
  • Extracts worktree setup logic into a reusable setupBranchWorktree function in ProjectHome
  • Threads worktreeErrors and onRetryWorktree through ProjectSection to BranchCard

When creating a branch, if the git worktree setup fails, the error was
only logged to console. The branch card would show a 'Creating
worktree...' spinner forever since worktreePath remained null.

Now worktree setup errors are tracked in a Map<branchId, errorMessage>
in ProjectHome and passed through ProjectSection to BranchCard. On
failure, the branch card shows the error message with a Retry button
and a Delete button, instead of an infinite spinner. Retrying clears
the error and re-attempts worktree setup.
@matt2e matt2e merged commit 0614d1e into main Feb 13, 2026
3 checks passed
@matt2e matt2e deleted the matt2e/error-creating-branch branch February 13, 2026 22:03
taylorkmho added a commit that referenced this pull request Feb 13, 2026
* origin/main:
  fix: surface worktree setup errors instead of showing infinite spinner (#106)
  feat: store data in platform-conventional directories (XDG) (#104)
  feat(notes): add copy-to-clipboard button in NoteModal (#103)
  feat: add use github repo based projects to avoid cloning when using remote branches (#102)
  fix: always branch new worktrees from remote-tracking refs (#100)
  fix: remove debug console.log statements from BranchCard (#97)
  feat: improve PR button UX with push support and conditional visibility (#89)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant