Skip to content

fix: render branch creation dialog in TaskInput screen#1326

Merged
k11kirky merged 3 commits intoPostHog:mainfrom
CaioDGallo:fix/branch-creation-dialog
Mar 31, 2026
Merged

fix: render branch creation dialog in TaskInput screen#1326
k11kirky merged 3 commits intoPostHog:mainfrom
CaioDGallo:fix/branch-creation-dialog

Conversation

@CaioDGallo
Copy link
Copy Markdown
Contributor

@CaioDGallo CaioDGallo commented Mar 24, 2026

Problem

  • when clicking to "Create a new branch" on the BranchSelector component of the TaskInput page, nothing happens because the GitBranchDialog is never rendered in this flow.

Closes #1205

Changes

  • Added GitBranchDialog component to the TaskInput screen
  • Handled branch name sanitization and branch creation logic for this step (integrated with useGitInteractionStore props)
  • Added branch-here to GitActionType to fix linter issue
  • Extracted branch sanitize/validate/create flow into shared branchCreation utility used by both TaskInput and useGitInteraction (no intended behavior change).

How did you test this?

  • Targeted unit tests on apps/code/src/renderer/features/git-interaction/utils/branchCreation.test.ts
  • Manually

@CaioDGallo
Copy link
Copy Markdown
Contributor Author

Hi @charlesvien , I submitted this PR to fix #1205. The "Create new branch" dialog wasn't rendering on the TaskInput screen because GitInteractionHeader (which hosts the dialog) is only mounted in the task detail view. The fix adds the dialog rendering directly in TaskInput, driven by the existing gitInteractionStore.

Happy to hear your thoughts when you have time. Thanks!

@CaioDGallo CaioDGallo force-pushed the fix/branch-creation-dialog branch 2 times, most recently from 46f1840 to 5be495c Compare March 29, 2026 11:17
@jonathanlab jonathanlab self-assigned this Mar 31, 2026
Copy link
Copy Markdown
Contributor

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

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

This is great, thanks a lot! @k11kirky will reach out to soon about sending some merch your way for all these PRs!

@CaioDGallo CaioDGallo force-pushed the fix/branch-creation-dialog branch from 1589103 to 3237a17 Compare March 31, 2026 10:41
@CaioDGallo CaioDGallo force-pushed the fix/branch-creation-dialog branch from 3237a17 to 9b4d221 Compare March 31, 2026 10:42
@k11kirky k11kirky merged commit 3651ff3 into PostHog:main Mar 31, 2026
15 checks passed
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.

If I am on Local and click "Create a new branch" nothing happens

4 participants