Commit Graph

29 Commits

Author SHA1 Message Date
5c378ab239 Merge branch 'conflict-resolution'
# Conflicts:
#	src/git.ts
2026-04-10 10:13:03 -07:00
a7285a4347 Add comment explaining why clearActivity is called before process.exit
process.exit(1) skips the finally block, so cleanup must happen
explicitly in the catch block.
2026-04-10 10:06:00 -07:00
101651b107 Extract shared gitError helper to deduplicate stderr formatting
Also clear activity on failed merge and improve error context for
conflicted file reads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 10:02:23 -07:00
fbb8680376 Guard against empty stdout when resolving merge conflicts
Claude can exit 0 but produce no output, leaving the file blank.
2026-04-10 09:41:39 -07:00
b4d0d9e948 Add "(no output)" fallback to all git error messages
The helpers already handled empty stderr but the git module did not,
leading to confusing error messages with a trailing colon and no detail.
2026-04-10 08:54:17 -07:00
374454f0fb Add missing lockfiles to skip list and show fallback for empty stderr
Several ecosystem lockfiles (Nix flake, Gradle, npm-shrinkwrap, Swift PM)
were missing from SKIP_RESOLVE, causing unnecessary conflict resolution
attempts. Empty stderr on failure produced confusing error messages.
2026-04-10 08:44:17 -07:00
cbb6bac1b9 Expand the lock-file skip list for merge conflict resolution
Add bun.lockb, mix.lock, Pipfile.lock, Podfile.lock, pubspec.lock, and
uv.lock to SKIP_RESOLVE so generated files from additional ecosystems are
auto-resolved with theirs during rebases. Sort entries alphabetically.
2026-04-10 08:29:45 -07:00
85cf9cc02f Expand lock-file skip list and extract checkoutTheirs into git module
Covers all common ecosystem lock files (npm, yarn, pnpm, Go, Ruby,
PHP, Poetry) so merge conflicts in any of them are auto-resolved
with --theirs rather than sent to Claude.
2026-04-10 08:17:55 -07:00
a9043d154d Rework squash command to collapse commits in-place
Instead of squash-merging into main, `sandlot squash` now soft-resets
to the merge base and recommits, keeping the branch independent.
This removes the --force flag and all squash-merge logic from
mergeAndClose, which goes back to being a plain merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 08:07:51 -07:00
cc61e09384 Propagate git-add failures instead of silently swallowing them
The old `stageFile` call discarded non-zero exit codes, hiding issues
like unresolved conflicts or missing files from the caller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 08:07:43 -07:00
e694ab06d7 Accept theirs for conflicting lock files instead of deleting them
Removing lock files during conflict resolution caused missing dependencies
after the merge. Checking out theirs and staging preserves a valid lockfile.
2026-04-07 17:55:40 -07:00
29cbf29b76 Remove lock files instead of resolving them during conflict resolution
Lock files like bun.lock and Cargo.lock get regenerated, so resolving
their conflict markers is unnecessary work.
2026-04-07 09:26:55 -07:00
1143bf08c9 Skip AI conflict resolution for lock files
Lock files like bun.lock and Cargo.lock contain auto-generated content
that Claude cannot meaningfully merge. Remove them during conflict
resolution so they get regenerated cleanly.
2026-04-07 09:21:11 -07:00
97a6a2632a Improve commit message prompts and use Opus model 2026-03-15 23:13:40 -07:00
90bb8da28e Add progress indicator to conflict resolution 2026-03-13 13:47:07 -07:00
6d86a988f7 Track activity markers during merge/rebase 2026-03-11 22:13:55 -07:00
e8318f68b0 Remove unused readdir import, simplify rmdir loop 2026-03-09 12:49:13 -07:00
385673f420 Refactor symlink removal into unlinkSessionSymlink helper 2026-03-09 12:04:04 -07:00
7e9d372d96 Show current branch name in merge success message 2026-02-27 07:59:46 -08:00
392d3c787b add --force flag to merge and squash commands 2026-02-27 07:48:21 -08:00
920b4d12b4 Add pre-merge validation in mergeAndClose 2026-02-27 07:45:09 -08:00
7ebbfad8f2 Add ensureSession to recreate missing worktrees 2026-02-26 19:26:24 -08:00
c85af793cd Refactor teardown logic into shared helper 2026-02-26 19:26:24 -08:00
1d7f60b50c Simplify commit message prompts to single-line format
Change the commit message generation prompts from requesting
50/72-rule multi-line messages to single-line subjects only.
This avoids unnecessary body text in automated commits and
ensures the first line is always used via `.split("\n")[0]`.
2026-02-23 20:35:43 -08:00
c6ef48384e Improve commit message generation to follow 50/72 rule 2026-02-23 20:06:41 -08:00
1022a75722 Improve merge spinner messages and conflict resolution flow 2026-02-23 19:20:37 -08:00
31df93016b Refactor merge/squash into shared mergeAndClose helper with AI-generated squash commit messages 2026-02-21 08:54:58 -08:00
603c92b595 refactor conflict resolution into shared helper and add rebase round limit 2026-02-20 18:54:25 -08:00
14cad28488 Refactor cli.ts into per-command modules with shared utilities 2026-02-20 15:43:15 -08:00