Skip to content

feat(projects): per-project setup command and header quick actions (#153) - #660

Merged
currentbits merged 4 commits into
mainfrom
coder/fork-per-project-setup-script-auto-run-o-a19ee2
Aug 22, 2026
Merged

currentbits merged 4 commits into
mainfrom
coder/fork-per-project-setup-script-auto-run-o-a19ee2

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #153.

A project can now carry a setupCommand that runs once after a new worktree is created, plus up to 8 named quickActions that show as buttons in the thread header.

What it does

  • Setup on worktree creation — setupWorktree fire-and-forgets the project's setupCommand in the new worktree. A failed npm install never undoes the worktree, and setupWorktree stays synchronous for its existing call sites.
  • Named quick actions — up to 8 per project, run from the thread header, disabled while the thread is working or another command is in flight.
  • Transcript events — every run logs [setup] running <cmd> and [setup] ok in 12.3s / [setup] failed: exit 1 in 4s with a 1500-char log tail.

How

  • New electron/projectCommands.js reuses the existing verify.js shell runner rather than adding a second one. Setup gets a 30 min timeout (a cold npm install beats a test suite); named actions use the verify timeout. One in-flight command per thread. Command failure is a result, not a throw, matching runVerify.
  • setupCommand / quickActions normalize in migrateProject and updateProject; empty clears the key.
  • New IPC threads:runCommand wired through ipc.js, ipcChannels.ts, preload.js, useCoder, devCoder and fakeCoder — the preload entry is present, so this does not repeat the Verify is broken on desktop: threads.setVerifyCommand/runVerify are missing from preload (web and dev have them) #622 drift.
  • UI: fields in EditProjectModal, buttons in the ThreadView header.

Size

1435 lines / 22 files, over the 400-line cap and opened deliberately. ~668 of those lines are tests; the rest is one coherent feature whose slices would not stand green alone.

Verification

Run on the worker's branch worktree:

  • npx tsc --noEmit — clean
  • node --test electron/test/{project-commands,store,projects-update,ipc-seam,worktree-setup-fail}.test.js — 88 pass / 0 fail
  • renderer test/{threadHeader,editProject,threadView}.test.tsx — 84 pass / 0 fail

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 6ac80c1 into main Aug 22, 2026
5 of 6 checks passed
@currentbits
currentbits deleted the coder/fork-per-project-setup-script-auto-run-o-a19ee2 branch October 3, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-project setup script auto-run on worktree creation, plus named quick actions

1 participant