Skip to content

feat(desktop): add configurable branch prefix setting - #89642

Open
0xMudit wants to merge 1 commit into
PostHog:masterfrom
0xMudit:feat/desktop-configurable-branch-prefix
Open

feat(desktop): add configurable branch prefix setting#89642
0xMudit wants to merge 1 commit into
PostHog:masterfrom
0xMudit:feat/desktop-configurable-branch-prefix

Conversation

@0xMudit

@0xMudit 0xMudit commented Aug 26, 2026

Copy link
Copy Markdown

Problem

Fixes #76277

The Desktop app hardcodes posthog/ as the branch name prefix. Users who work across multiple projects or follow different conventions need to customize this prefix.

Changes

  • Added branchPrefix setting in GeneralSettings with input UI under a new Git section
  • Threaded branchPrefix through settingsStore -> sessionServiceHost -> SessionService -> tRPC -> agent pipeline
  • Updated buildLocalAttributionPrompt and buildAppendedInstructions to use dynamic prefix
  • Added tests for custom prefix in task-system-prompt, instructions, branchName, and deriveBranchName
  • Default remains posthog/ for backward compatibility

Test evidence

All tests pass:

  • packages/agent/src/pi/task-system-prompt.test.ts - 4 tests (2 new for prefix)
  • packages/agent/src/adapters/claude/session/instructions.test.ts - 16 tests (2 new for prefix)
  • packages/core/src/git-interaction/branchName.test.ts - 23 tests (2 new for prefix)
  • packages/core/src/git-interaction/deriveBranchName.test.ts - 10 tests (2 new for prefix)
  • packages/core/src/mcp-servers/toolDerivation.test.ts - 4 tests (regression check)

TypeScript typecheck passes on agent package.

Disclosure

This PR was developed with the assistance of an AI coding tool.

@trunk-io

trunk-io Bot commented Aug 26, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions github-actions Bot added the feature/desktop Feature Tag: Desktop label Aug 26, 2026
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team August 26, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/desktop Feature Tag: Desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confirgurable default branch prefixes/names

1 participant