Skip to content

feat(web): configure worktree branch prefixes - #7887

Closed
yasinkavakli wants to merge 3 commits into
pingdotgg:mainfrom
yasinkavakli:t3code/configurable-branch-prefix
Closed

yasinkavakli wants to merge 3 commits into
pingdotgg:mainfrom
yasinkavakli:t3code/configurable-branch-prefix

Conversation

@yasinkavakli

@yasinkavakli yasinkavakli commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

  • Added a server setting for the prefix used when T3 Code promotes temporary worktree branches to generated names.
  • Added a Worktree branch prefix field under Settings → General. It defaults to t3code, accepts a normalized custom prefix, and can be left empty for unprefixed branch names.
  • Added settings search, restore-default behavior, user documentation, and focused contract/server tests.
  • Kept temporary branch naming and the wire protocol unchanged. The configured prefix is applied at the shared server rename boundary, so web, desktop, mobile, local, and remote clients receive the same behavior.

Why

Generated worktree branches were always placed under the hard-coded t3code/ namespace. Fork maintainers and teams commonly need a personal or team namespace, while some workflows require no prefix at all.

This makes that namespace configurable without adding client-specific flows or changing worktree creation semantics. Existing installations remain backward compatible because t3code is still the default.

UI Changes

Before: Settings had no branch-prefix control, and generated worktree branches always used t3code/.

After: Settings → General includes a Worktree branch prefix field with inline guidance.

Worktree branch prefix setting in Settings General

Verification

  • Rebased onto the latest main before publishing.
  • 96 focused tests passed across shared Git helpers, settings contracts, and the provider command reactor.
  • Shared, contracts, server, and web typechecks passed.
  • Changed-file lint, formatting, and git diff --check passed.
  • Three independent review passes covered correctness, multi-surface/remote behavior, and unnecessary complexity; follow-up delta reviews found no actionable issues.
  • Confirmed the functionality is not already present on upstream main and found no open upstream PR implementing it.

Checklist

  • This PR is small and focused on one change
  • The problem and implementation are explained above
  • UI evidence is included above; the before state had no corresponding control
  • Video is not applicable because this change adds no animation or timing-dependent interaction

Built with Codex through the Codex harness in T3 Code.

Generated with Codex


Note

Medium Risk
Touches git branch renaming and persisted server settings. Validation and a backward-compatible default limit blast radius, but a bad prefix still affects generated branch names across clients.

Overview
Makes the namespace for auto-generated worktree branches configurable. Default remains t3code; users can set a custom prefix or leave it empty.

Adds worktreeBranchPrefix to server settings (validated Git prefix, max 64 chars) and a Settings → General field with search, reset, and sanitization on commit. The provider reactor applies that prefix when renaming the first-turn temp branch, stripping a duplicate configured or default prefix from the model output.

Temporary branch creation is unchanged. Missing configs still decode to t3code.

Reviewed by Cursor Bugbot for commit 4660733. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add configurable worktreeBranchPrefix setting for generated worktree branches

  • Introduces WorktreeBranchPrefix schema in settings.ts that validates either an empty string or a normalized git branch prefix (length <= 64, alphanumeric boundaries, no //). Added to both ServerSettings (default 't3code') and ServerSettingsPatch.
  • buildGeneratedWorktreeBranchName in ProviderCommandReactor.ts now accepts a caller-supplied prefix and uses sanitizeBranchFragment to normalize it before composing the generated branch name.
  • Adds a DraftInput-based settings row in SettingsPanels.tsx for editing the prefix, with dirty-state tracking, reset-to-default, and normalization on commit (empty if no alphanumeric characters).
  • Registers the new setting in settingsSearch.ts and documents it in source-control.md.
  • Behavioral Change: generated worktree branch names now prefix with the configured value (default 't3code') instead of a hardcoded prefix; existing server settings without worktreeBranchPrefix will decode to 't3code' by default.

Macroscope summarized 4660733.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

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 Plus

Run ID: 9c954713-f624-4475-9db5-cc746a5f4b42

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

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.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026

@macroscopeapp macroscopeapp Bot left a comment

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.

Two consistency issues in the new General → Worktree branch prefix row. Both are local to the added block.

Posted via Macroscope — UI Consistency

@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Skipped

Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically.

@yasinkavakli
yasinkavakli force-pushed the t3code/configurable-branch-prefix branch 2 times, most recently from 8baa28d to 2dbbca4 Compare August 23, 2026 12:33
@yasinkavakli

Copy link
Copy Markdown
Contributor Author

Closing this in favour of #8082

pechhe added a commit to pechhe/t3code that referenced this pull request Nov 16, 2026
… agents (T3-682)

A thread's stance is Orchestrate, Flexible or Implement. The composer lever sets
it, a model's policy default supplies it until the owner chooses, and the server
resolves it in one place. Each ordinary turn tells the agent its stance; slash
commands go to the provider unchanged. Implement refuses a writing role in
delegate_task, read-only requests included. Delegation settings edit the
per-model default, which belongs to the model's policy name as its note does.

The lever is three icons beside the machine lever (split, blend, hammer), lit
when active; hovering one names the stance and says what it does.

The orchestration-policy experiment lever is retired with it: its instruction
overlays are gone and new trials, activation and enrolment are refused, while
stored trials stay readable.

Server and evals: gpt-6.1-sol (Pi). Web: gemini-4-hydrogen (Pi). Lead, lever
look and integration: claude-fable-5-2 (Pi), all in T3 Code.

Build: pingdotgg#7887
pechhe added a commit to pechhe/t3code that referenced this pull request Nov 16, 2026
…odel slider holds three models

The machine lever showed names beside the icon-only stance lever, so the two read as different controls and crowded each other. It now shows icons alone, sized and spaced as the stance lever's, when its two machines differ in kind; two machines of one kind keep their names. The levers sit further apart and the model slider gives up that width.

The slider holds the first three favourites and its fourth stop opens the full picker, so mod+4 opens the picker as mod+5 does. Fast now flows under the chosen model's name or tag instead of sitting at a fixed offset that overlapped a wrapped tag.

claude-fable-5-2 in T3 Code (Pi).

Build: pingdotgg#7887
pechhe added a commit to pechhe/t3code that referenced this pull request Nov 17, 2026
…read waiting on it

A SlipJay landing published at 09:06:29 GMT on 17 Nov, inside a T3 server restart (09:06:23-09:06:30). T3 tracks landings in memory, and the restarted watch starts from no cursor, so its snapshot lists only active operations: the finished landing was never tracked, and the thread waiting on it woke only at give-up, 30 minutes later, told that the runner did not track it.

When a parked landing wait names an operation the watch does not know, the reactor now asks the runner once for that operation's retained outcome (slipjay runner outcome) and, if it finished, tracks it and wakes the thread with it. One read per operation, so a wait the runner never knew costs nothing per sweep.

Built by claude-fable-5-2 in T3 (Pi).

Build: pingdotgg#7887
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant