Repository navigation
feat(projects): wait-for-setup, solenta.json, submodules, branch prefix, clone from URL (#1506 H3) - #1509
Conversation
ProjectInfo gains waitForSetup, branchPrefix and the derived repoConfig (solenta.json commands + approval state). runCommand takes trustRepoConfig. New projects.clone / cancelClone and the clone:progress push (desktop and web). Dev mock and fake client follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
New worktrees are named <prefix><slug>-<id>, default coder/. The prefix is validated against git's ref rules. Placeholder renames keep the prefix the branch was born with, and the orphan sweep tidies branches under coder/ and every project's prefix (still non-force). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tup (#1506) - solenta.json setup/quickActions, validated; project settings win per field. File commands run only after the user approved their sha256, and re-prompt when they change. - New worktrees run git submodule update --init --recursive when .gitmodules exists; failure is a warning event. - waitForSetup holds the first run in a new worktree ("Waiting for setup" step) until setup settles. Failed setup is reported and the agent starts anyway, matching existing setup failure handling. Co-Authored-By: Claude Opus 5.5 <[email protected]>
git clone --progress into a missing or empty folder, streaming clone:progress, with cancel. Whatever the clone created is removed on failure or cancel, then the project is added as usual. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1506) Edit project: Agent waits for setup, Branch prefix, and "from solenta.json" markers with the precedence spelled out. Thread details list file commands and ask once (listing every command the approval covers) before the first run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
URL, target folder and optional name, live progress line and Stop clone. Errors stay in the dialog. runCommand forwards the solenta.json approval and refreshes projects so the trusted state shows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # electron/ipc-projects.js # src/App.tsx # src/components/SettingsModal.module.css # src/dev/projects.ts # test/support/fakeCoder.ts
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 401020114e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const existing = inflight.get(id); | ||
| if (existing) return existing; |
There was a problem hiding this comment.
Queue worktree setup behind an in-flight quick action
When a user starts a never-run thread while one of its quick actions is still running, worktree materialization reaches this branch and returns that quick-action promise instead of scheduling submodule initialization and setup. Because the returned promise was never added to setupJobs, pendingSetup() also returns null, so even with “Agent waits for setup” enabled the agent launches immediately and the actual setup is permanently skipped. Queue the setup after the existing action or otherwise ensure it receives its own setup job.
Useful? React with 👍 / 👎.
| if (branch && appBranchPrefixes(store).some((p) => branch.startsWith(p))) { | ||
| // Non-force: an unmerged orphan branch survives as a recoverable ref. | ||
| await gitTryAsync(repoPath, ["branch", "-d", branch]); |
There was a problem hiding this comment.
Scope custom branch cleanup to the owning project
When any project configures a custom prefix, this check applies that prefix to orphan worktrees from every repository in the store. For example, if project A uses release/, sweeping an orphan worktree in project B whose user-created branch is release/1.0 will delete that branch after removing the worktree whenever git branch -d considers it merged. Match repoPath to its owning project and use only that project's app prefixes rather than the global union.
Useful? React with 👍 / 👎.
| push({ line: "Adding project" }); | ||
| return deps.addProject(target); |
There was a problem hiding this comment.
Clean up the clone when project registration fails
If git clone succeeds but addProject rejects—for example because persisting the project store fails—the clone request still rejects while the newly populated target is left behind. A retry then fails with “Folder is not empty,” contradicting the clone API's cleanup guarantee and forcing manual recovery. Wrap this final registration step so failures invoke the same cleanup used for clone failures, while preserving a pre-existing empty target.
Useful? React with 👍 / 👎.
Item H3 of #1506.
What changed
solenta.json:{ "setup": "...", "quickActions": [{ "name", "command" }] }, validated. An invalid file contributes nothing and shows its error.git submodule update --init --recursivein new worktrees with.gitmodules, with terminal prompts disabled. Best-effort: a failure warns and setup still runs.coder/). Validated against git's ref rules, with a test comparing againstgit check-ref-format. Everycoder/match site was audited: placeholder renames keep their original prefix, and startup cleanup covers all project prefixes, merged branches only.Also: a bug fixed in the shell runner's
envhandling (the submodule command lost PATH), and one em-dash removed from help text.Merge with main: resolved additive conflicts with #1504 and #1505 in
ipc-projects.js,App.tsx,SettingsModal.module.css,src/dev/projects.tsandfakeCoder.ts(kept both sides).Verified independently, on main merged with this branch:
vite buildpasses.🤖 Generated with Claude Code