Skip to content

fix: branch dropdown, diff base branch, and direct mode auto-checkout#34

Merged
johannesjo merged 2 commits intojohannesjo:mainfrom
ASRagab:bugfix-pr
Mar 25, 2026
Merged

fix: branch dropdown, diff base branch, and direct mode auto-checkout#34
johannesjo merged 2 commits intojohannesjo:mainfrom
ASRagab:bugfix-pr

Conversation

@ASRagab
Copy link
Copy Markdown
Contributor

@ASRagab ASRagab commented Mar 25, 2026

Summary

  • Branch dropdown: Fixed branch list disappearing on dialog re-open by merging two racing SolidJS createEffect blocks into one. Added loading spinner and retry+toast error handling.
  • Diff base branch: Fixed diff viewer computing diffs against main instead of per-task base branch. Normalized empty-string baseBranch to undefined at the IPC boundary, task creation, and legacy state load.
  • Direct mode auto-checkout: Replaced "Please checkout X first" blocking warning with automatic git checkout when creating a Direct mode task on a non-current branch. Shows git's error message if checkout fails (e.g., dirty working tree).

Test plan

  • Open new task dialog, verify branch dropdown populates with spinner
  • Close and reopen dialog — branches should persist (not reset to empty)
  • Rapid close/reopen 3-4x — branches populate every time
  • Create a task with base branch set to develop — diff should show against develop, not main
  • Restart app with legacy state containing baseBranch: '' — should auto-normalize
  • Select Direct mode, pick a non-current branch, click Create Task — should auto-checkout
  • Select Direct mode with dirty working tree on wrong branch — should show git error
  • npm run typecheck passes
  • npx vitest run — all 73 tests pass

🤖 Generated with Claude Code

ASRagab and others added 2 commits March 24, 2026 22:34
Three bug fixes for the task creation and diff review workflows:

1. Branch dropdown: merge two racing SolidJS createEffect blocks into one
   effect with loading spinner and retry+toast error handling (DROP-01, DROP-02)

2. Diff base branch: normalize empty-string baseBranch to undefined at the
   IPC boundary (register.ts), task creation (tasks.ts), and legacy state
   load (persistence.ts) so diffs use the correct per-task base branch
   instead of silently falling back to main (DIFF-01, DIFF-02, DIFF-03)

3. Direct mode auto-checkout: replace "Please checkout X first" warning with
   automatic git checkout when creating a Direct mode task on a non-current
   branch (CHECKOUT-01)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@johannesjo
Copy link
Copy Markdown
Owner

Thank you very much <3

@johannesjo johannesjo merged commit 2b82e88 into johannesjo:main Mar 25, 2026
2 checks passed
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.

2 participants