Skip to content

Personal fork setup: .bnpnecode home dir, worktree default, .env* carryover#2721

Closed
bnpne wants to merge 1 commit into
pingdotgg:mainfrom
bnpne:bnpne/local-dev-setup
Closed

Personal fork setup: .bnpnecode home dir, worktree default, .env* carryover#2721
bnpne wants to merge 1 commit into
pingdotgg:mainfrom
bnpne:bnpne/local-dev-setup

Conversation

@bnpne
Copy link
Copy Markdown

@bnpne bnpne commented May 15, 2026

What Changed

  • Renamed the default home directory from ~/.t3 to ~/.bnpnecode across the dev runner, desktop fallback, SSH remote launcher, .gitignore, and tests. The T3CODE_HOME env var name is unchanged, so existing overrides still work.
  • resolveEffectiveEnvMode now defaults a brand-new draft thread 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 swallowed per-file and never fail the worktree creation.
  • Added BUILD.md with 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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (n/a)
  • I included a video for animation/interaction changes (n/a)

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 ~/.t3 to ~/.bnpnecode across the desktop app, SSH remote launch/pairing scripts, dev runner defaults/tests, and .gitignore (while keeping T3CODE_HOME as the override).

Adjusts branch toolbar logic so a brand-new draft thread defaults to worktree mode unless explicitly set to local.

Enhances GitVcsDriver.createWorktree to copy root-level .env* files into newly created worktrees (best-effort; failures are swallowed), and adds BUILD.md documenting 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 ~/.t3 to ~/.bnpnecode and copy .env* files into new worktrees

  • Updates all references to the default home directory (~/.t3~/.bnpnecode) across the desktop app, dev runner, SSH tunnel scripts, and .gitignore.
  • When creating a new git worktree, .env* files from the source repo root are now copied into the worktree directory; copy errors are silently ignored.
  • Adjusts resolveEffectiveEnvMode fallback in BranchToolbar.logic.ts to default to 'worktree' mode unless the draft explicitly requests 'local'.
  • Adds BUILD.md documenting how to build and release a personal desktop app with auto-updates.
  • Behavioral Change: any existing data stored under ~/.t3 will not be migrated automatically; users must move it manually.

Macroscope summarized 574e78a.

…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]>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8f54d30a-6899-43b7-8543-5fe19c6ca3be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bnpne
Copy link
Copy Markdown
Author

bnpne commented May 15, 2026

Apologies — opened against upstream by mistake. Moving to my fork. Please disregard.

@bnpne bnpne closed this May 15, 2026
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels May 15, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 574e78a. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 15, 2026

Approvability

Verdict: 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.

@bnpne bnpne deleted the bnpne/local-dev-setup branch May 15, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant