You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle empty git ref when fixing compact review jobs (#327)
I think this likely gets us to a fix for #323
## Summary
- Compact jobs are stored with an empty `git_ref` (only a display label
is stored). Attempting to fix a compact review would pass `""` to
`worktree.Create`, causing `create worktree: ref must not be empty`.
- The fix job handler now resolves the ref via: explicit request
override → parent job's `git_ref` → parent job's branch → `HEAD` (with a
log warning).
- When the TUI detects no git ref and no branch (the HEAD fallback
case), it shows a new confirmation modal (`tuiViewFixGitRef`) pre-filled
with `"HEAD"` so the user can verify or correct the target before
proceeding.
## Test plan
- [ ] Fix a compact review job from the TUI — should no longer fail with
`create worktree: ref must not be empty`
- [ ] When compact job has a branch set, fix proceeds normally using
that branch as the ref
- [ ] When compact job has neither git ref nor branch, the new git ref
modal appears pre-filled with `HEAD`, allowing the user to edit before
confirming
- [ ] `go test ./...` passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>
0 commit comments