Repository navigation
feat: let one task work across several repositories - #257
Open
hongkongkiwi wants to merge 14 commits into
Open
hongkongkiwi wants to merge 14 commits into
hongkongkiwi wants to merge 14 commits into
Conversation
hongkongkiwi
force-pushed
the
multi-repo-tasks
branch
2 times, most recently
from
November 1, 2026 04:52
ca9d9e9 to
df7b15a
Compare
project_folders and session_repos tables; projects keep a primary folder (write-through to projects.path), tasks can pin per-repo worktrees, and task_links keys per repo. Groundwork for aicodeking#213.
resolve_in_folders routes agent paths across a task's folder set (longest-prefix match, scoped_path containment per folder), and the turn-change tracker covers every folder with label-qualified paths; pandacode_track_files accepts label/ and absolute forms. aicodeking#213
RunConfig carries extra_dirs; claude gets --add-dir, codex sandbox writableRoots covers every folder, zcode passes additionalDirectories, ACP only when advertised; warm key and the per-message note follow; cloud bridge payload carries the dirs for later. aicodeking#213
Worktree task creation loops every git folder (same branch each, per-repo failures reported, non-git folders skipped); git diff/stage/ commit/push/status gain a folder qualifier; git_status returns a per-repo array over today's primary fields. aicodeking#213
Folder to link-key mapping (primary keeps the legacy key, others use their GitHub origin), detect loops every repository and shields only its own open link, PR create links under the chosen repository, and linked_pulls lists them all. aicodeking#213
project_folders/add/remove/set_primary + workspace_folders commands, typed payloads, and a ?folders preview sample seeding a three-folder project. aicodeking#213
Settings > Projects lists each project's folders with primary marking, add/remove/set-primary wired to the new commands; the project picker shows folder counts. aicodeking#213
The Files tree renders one section per folder with its label heading, file tabs key as label/path for non-primary folders and read through the folder qualifier, search fans out across folders grouped by label, and the @-mention pickers index every folder (non-primary hits inserted as label/relative, the form the folders note and turn changes use). list_files, search_files, search_text, read_file, read_document_file and workspace_image take the optional folder qualifier; unqualified calls keep byte-identical behavior.
Changes groups per repository with per-repo stage/commit/push, the branch chip lists each repository, and the PR tab shows every linked pull request routed to its repository. aicodeking#213
…ument the model Mirror tasks and cloud agents fail closed with a clear error until they can sync several repositories; AGENTS.md notes schema 37 and the feature, docs/multi-folder.md explains it. aicodeking#213
…own repository Worktree creation failures surface per repository instead of passing silently; pull requests of removed repositories route to their own link or render disabled instead of falling back to the primary; labels disambiguate across every parent level and a primary-relative path beats a label match; the task's primary is pinned at creation so a later primary change cannot relabel it, and the primary never moves while tasks hold primary-keyed links; link refresh keys on the repository; cloud prompts drop folders the machine does not have. aicodeking#213
The agent's worktree tool reports per-repo failures in its reply, attached worktrees pin their primary like created ones, and file-tree, search and mention results carry their folder explicitly instead of re-deriving it from the path string. aicodeking#213
is_none_or over map_or, no needless borrows, test-only tracker and lease helpers marked, and search_text takes its qualifier alongside the seven existing parameters.
Register the three new folder specs in the WebKit config's testMatch and match their titles in its grep, so the suite's second browser really covers them instead of silently skipping. aicodeking#213
hongkongkiwi
force-pushed
the
multi-repo-tasks
branch
from
November 1, 2026 05:07
b246e9b to
66c1a65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
A project can hold several folders, so one task works across a backend, a frontend and shared libraries at once. Fixes #213.
The design follows the converged pattern of other desktop agents (ZCode Desktop, ChatGPT Projects, Claude Code's
--add-dir, Codex): one primary folder keeps the working directory, discovery, run script and Deploy; every folder belongs to at most one project; git stays per repository.project_folders,session_repos(the primary is pinned at creation so a later primary change cannot relabel a task), andtask_linksre-keyed(session_id, kind, repo)withrepo=''meaning the primary.--add-dirfor Claude-family CLIs, sandboxwritableRootsfor Codex,additionalDirectoriesfor ZCode and, when advertised, ACP) plus a per-message note with absolute paths. Agents address the primary with project-relative paths and other folders withlabel/relativeor absolute paths;resolve_in_foldersapplies the existing per-root containment rules to every folder, and turn-change tracking covers all of them.docs/multi-folder.md): remote mirrors and cloud agents refuse multi-folder projects until they can sync several repositories; the mobile app shows the primary repository.How it was tested
npm run build(typecheck + bundle)npm test(217/218; the one failure is a locale-dependent date-format test that also fails onmain)cargo test --manifest-path src-tauri/Cargo.toml(1834 passed; alsocargo clippy --all-targets -- -D warningsclean)36 storage, workspace, turn-change and GitHub tests were written fail-first against the new surfaces before implementation and stayed frozen during repair; preview mocks (
?folderssample) cover every new IPC command.Checklist
<type>: <description>docs/updated if behavior changed (docs/multi-folder.md, AGENTS.md)src/preview.tsfor new IPC commands