Commit Graph

33 Commits

Author SHA1 Message Date
José Almeida e86b6655a3 fix(worktree): handle submodules in worktree creation (#579)
* fix(worktree): handle submodules in worktree creation

Repos with git submodules failed during worktree creation when git-crypt
was also present. The `git checkout HEAD -- .` command in
unlockGitCryptAndCheckout() tried to process submodule gitlink entries,
but git resolved their git dirs relative to the worktree-specific git
dir instead of the common dir, causing "not a git repository" errors.

- Detect submodule paths via `git ls-tree -r HEAD` (mode 160000)
- Exclude submodule paths from git-crypt checkout using :(exclude) pathspecs
- Initialize submodules after worktree creation via `git submodule update --init`
  (non-fatal — unreachable URLs are logged as warnings)
- Add submodule init to all worktree creation paths (git-crypt and non-git-crypt)

* fix(worktree): address review — recursive submodule init, consistent call sites

- Add --recursive to git submodule update --init for nested submodules
- Call initSubmodules unconditionally in git-crypt path (matching manager.go)

* fix(worktree): restore submodule index entries after git-crypt checkout

The :(exclude) pathspec used to skip submodules during git checkout also
prevents their gitlink entries from being written to the index. This
leaves git status showing them as staged deletions.

After checkout, run git reset HEAD for each excluded submodule path to
copy the gitlink entry from HEAD back into the index.

* test(worktree): add git status assertion to submodule unlock test

Validate that the index reset after :(exclude) checkout leaves no
staged deletions for submodule paths.

* fix(worktree): use literal pathspec for submodule exclusion

Use :(literal,exclude) instead of :(exclude) to prevent glob
metacharacters in submodule paths from being interpreted as patterns.

* fix(worktree): fix initSubmodules docstring to match --recursive flag
2026-04-14 15:59:25 +01:00
João Salavisa 3b63013294 fix(worktree): disable inherited git-crypt filters when repo is locked (#577) 2026-04-13 19:23:31 +01:00
João Salavisa 2ecfec4b52 fix(worktree): handle locked git-crypt repos and localized git errors (#532) 2026-04-13 18:30:37 +01:00
José Almeida 135b63e067 fix(backend): prevent worktree branches from inheriting upstream tracking (#570)
When creating a worktree from a remote-tracking ref (e.g. origin/feature/foo),
git automatically sets the new branch's upstream to that ref. This caused new
task branches to incorrectly track the original remote branch instead of
starting with no upstream.

Add -c branch.autoSetupMerge=false to gitAddWorktree and
gitAddWorktreeWithGitCrypt. The explicit CheckoutBranch flow (PR reviews)
is unaffected — it sets upstream via setUpstreamIfExists after creation.
2026-04-09 22:48:26 +01:00
Carlos Florêncio 4f40986488 fix(backend): reduce log noise from expected error states (#560) 2026-04-08 19:16:05 +01:00
Carlos Florêncio bccd4d5f40 fix: always set upstream tracking on git push and fix task worktree startPoint (#536) 2026-04-03 15:40:40 +01:00
Carlos Florêncio 653ec2a1df perf: optimize git clone/fetch for large repos with many tags (#533) 2026-04-03 15:34:53 +01:00
Carlos Florêncio 59ee830d71 feat(web): unified commit list and dockview panel fix (#500) 2026-03-30 22:44:10 +01:00
José Almeida d1a028fdb6 feat: introduce subtasks, allow sessions to task reuse executor (#419) 2026-03-29 15:33:40 +01:00
Carlos Florêncio 7da6550093 fix(orchestrator): fail session with guidance when PR branch is missing (#466) 2026-03-26 19:35:17 +00:00
João Salavisa cc23c9b0c8 fix(worktree): add git-crypt support for worktree creation (#454) 2026-03-23 23:40:45 +00:00
Carlos Florêncio aba9271fd5 fix: async workspace preparation and worktree branch fallback (#433) 2026-03-14 12:00:35 +00:00
Carlos Florêncio 42cdb56889 fix: use kandev home dir for worktrees, repos, sessions instead of data dir (#405) 2026-03-10 19:40:50 +00:00
Carlos Florêncio 21cb909ef4 feat: improve git checkout with error classification and warning propagation (#386) 2026-03-06 23:54:31 +00:00
Carlos Florêncio 766e62d8c2 fix(worktree): improve startup readiness and base sync handling (#374) 2026-03-05 20:55:22 +00:00
Carlos Florêncio c81fb77f72 ci: improve docker image and KANDEV_DATA_DIR env var (#370) 2026-03-05 20:31:17 +00:00
Carlos Florêncio c7978a4ef3 fix: resolve stale PR data on task switch and deduplicate lifecycle code (#361) 2026-03-03 23:40:44 +00:00
Carlos Florêncio a94b8c2c32 fix: worktree folder removal (#277) 2026-02-24 20:05:29 +00:00
Carlos Florêncio 61ef224ec7 style: fix format issues (#255) 2026-02-19 22:18:01 +00:00
Carlos Florêncio fe9298a7ad feat: improve ux (#254) 2026-02-19 18:05:52 +00:00
Carlos Florêncio 7ff7bf1af5 feat: add SQLite single-writer/multi-reader connection pool (#250) 2026-02-18 23:48:52 +00:00
Carlos Florêncio fd4ae1eb54 fix: resolve all backend golangci-lint violations (#245) 2026-02-18 18:24:24 +00:00
Carlos Florêncio 9baa985bbf feat: improve db abstraction (#238) 2026-02-17 17:37:55 +00:00
João Salavisa e2ba35b3bd feat: migrate agent operations from HTTP to WebSocket (#218) 2026-02-13 09:05:40 +00:00
Carlos Florêncio 5b96be8e64 feat: improve git pull (#215) 2026-02-09 23:15:31 +00:00
Carlos Florêncio 1a69152f09 feat: restore session when a worktree folder is deleted (#184) 2026-02-05 00:50:05 +00:00
João Salavisa f3bda8dddd fix(worktree): Fix cache keying bug and repository locks memory leak (#138) 2026-02-01 12:10:45 +00:00
João Salavisa 1888f8465f feat(backend): add thinking/reasoning streaming support (#113) 2026-01-28 17:22:19 +00:00
Carlos Florêncio 7c82ccdf24 feat: improve logging (#105) 2026-01-27 00:18:42 +00:00
Carlos Florêncio 47a02fd18e feat: git pull before worktree creation (#100) 2026-01-26 19:09:55 +00:00
Carlos Florêncio cff2906712 feat: setup and cleanup script (#80)
fix setup

error messages

feat: codex error handling
2026-01-23 23:36:04 +00:00
Carlos Florêncio 752e6b4655 feat: process runners (#71) 2026-01-22 16:39:13 +00:00
João Salavisa b1433a8d45 Clean up dead code and fix ACP session event payload (#73) 2026-01-22 02:39:45 +00:00