Personal fork setup: .bnpnecode home dir, worktree default, .env* carryover#2721
Personal fork setup: .bnpnecode home dir, worktree default, .env* carryover#2721bnpne wants to merge 1 commit into
Conversation
…opy .env* into new worktrees - Home directory default changed from ~/.t3 to ~/.bnpnecode across dev runner, desktop fallback, SSH remote launcher, .gitignore, and tests. T3CODE_HOME env var name is unchanged so existing overrides still work. - resolveEffectiveEnvMode now defaults brand-new draft threads to "worktree" instead of "local". Behavior when already inside a worktree is unchanged. - After git worktree add succeeds, root-level .env* files are copied from the source repo into the new worktree so threads inherit env vars. Copy failures are caught per-file and never fail worktree creation. - Add BUILD.md describing personal-build + GitHub-auto-update flow. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Apologies — opened against upstream by mistake. Moving to my fork. Please disregard. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 574e78a. Configure here.
| STATE_DIR="$HOME/.t3/ssh-launch/@@T3_STATE_KEY@@" | ||
| DEFAULT_SERVER_HOME="$HOME/.t3" | ||
| STATE_DIR="$HOME/.bnpnecode/ssh-launch/@@T3_STATE_KEY@@" | ||
| DEFAULT_SERVER_HOME="$HOME/.bnpnecode" |
There was a problem hiding this comment.
SSH stop/log scripts use stale .t3 path
High Severity
REMOTE_STOP_SCRIPT and REMOTE_LOG_TAIL_SCRIPT still reference $HOME/.t3/ssh-launch/ while REMOTE_LAUNCH_SCRIPT and REMOTE_PAIRING_SCRIPT (in the same file) were updated to $HOME/.bnpnecode/ssh-launch/. The launch script creates state (PID, port, log files) under .bnpnecode, but the stop script looks for them under .t3, so stopping a remote server and tailing its logs will silently fail to find the correct files.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 574e78a. Configure here.
ApprovabilityVerdict: Needs human review This PR has an unresolved high-severity bug where SSH stop/log scripts weren't updated with the new path, which will cause silent failures. Additionally, it changes runtime defaults (env mode flip to 'worktree') and adds new .env file copying behavior that warrant human review. You can customize Macroscope's approvability policy. Learn more. |


What Changed
~/.t3to~/.bnpnecodeacross the dev runner, desktop fallback, SSH remote launcher,.gitignore, and tests. TheT3CODE_HOMEenv var name is unchanged, so existing overrides still work.resolveEffectiveEnvModenow defaults a brand-new draft thread to"worktree"instead of"local". Behavior when already inside a worktree is unchanged.git worktree addsucceeds, root-level.env*files are copied from the source repo into the new worktree so threads inherit env vars. Copy failures are swallowed per-file and never fail the worktree creation.BUILD.mdwith personal-build + GitHub-Releases-based auto-update instructions.Why
Personal-fork ergonomics: I want a single command to build a self-updating app for myself, and I want every new thread to land in its own worktree with
.env*already populated so I don't have to re-paste secrets each time.Checklist
Note
Medium Risk
Medium risk because it changes default filesystem locations and environment/worktree behavior, which can affect existing local state and thread/worktree creation flows across desktop, SSH, and dev tooling.
Overview
Shifts the default T3 Code data directory from
~/.t3to~/.bnpnecodeacross the desktop app, SSH remote launch/pairing scripts, dev runner defaults/tests, and.gitignore(while keepingT3CODE_HOMEas the override).Adjusts branch toolbar logic so a brand-new draft thread defaults to
worktreemode unless explicitly set tolocal.Enhances
GitVcsDriver.createWorktreeto copy root-level.env*files into newly created worktrees (best-effort; failures are swallowed), and addsBUILD.mddocumenting personal desktop builds with GitHub Releases-based auto-updates.Reviewed by Cursor Bugbot for commit 574e78a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Change default home directory from
~/.t3to~/.bnpnecodeand copy.env*files into new worktrees~/.t3→~/.bnpnecode) across the desktop app, dev runner, SSH tunnel scripts, and.gitignore..env*files from the source repo root are now copied into the worktree directory; copy errors are silently ignored.resolveEffectiveEnvModefallback in BranchToolbar.logic.ts to default to'worktree'mode unless the draft explicitly requests'local'.~/.t3will not be migrated automatically; users must move it manually.Macroscope summarized 574e78a.