Skip to content

feat(code): warn on local task branch mismatch#1596

Draft
adboio wants to merge 1 commit into04-09-feat_code_enable_branch_linking_for_local_tasksfrom
04-09-feat_code_warn_on_local_task_branch_mismatch
Draft

feat(code): warn on local task branch mismatch#1596
adboio wants to merge 1 commit into04-09-feat_code_enable_branch_linking_for_local_tasksfrom
04-09-feat_code_warn_on_local_task_branch_mismatch

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented Apr 9, 2026

Problem

we want task isolation, but we can only do so much with local tasks, since they are simply not in an isolated environment

downstack #1594 + #1595 add automatic branch linking to tasks, so when an agent touches a file, or an agent/human creates a branch from posthog code, we associate that branch to that task

now, we need a way to keep the user in the loop on what's happening, and steer them in the right direction

Changes

adds a UI warning if you send a prompt in a task that has a linked branch, but that branch is not currently checked out

details:

  • hooks into tiptap with a new onBeforeSendso prompt is never lost if you cancel
  • the warning is "blocking" in the sense that you have to make a decision. you can:
    • "continue anyway" -> ignore the warning, agent works in your current branch
    • "switch branch" - checks out the task's linked branch
      • TODO: add error handling around this with dirty git state etc

How did you test this?

manually

Copy link
Copy Markdown
Contributor Author

adboio commented Apr 9, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from ab9c711 to b502180 Compare April 9, 2026 18:35
@adboio adboio force-pushed the 04-09-feat_code_enable_branch_linking_for_local_tasks branch from 0b99da5 to 920a050 Compare April 9, 2026 18:35
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from b502180 to af89a1a Compare April 9, 2026 18:36
@adboio adboio force-pushed the 04-09-feat_code_enable_branch_linking_for_local_tasks branch 2 times, most recently from 3851b2a to 9deb3b7 Compare April 9, 2026 18:37
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from af89a1a to 3452729 Compare April 9, 2026 18:37
@adboio adboio force-pushed the 04-09-feat_code_enable_branch_linking_for_local_tasks branch 2 times, most recently from 804359b to ab59a63 Compare April 10, 2026 15:36
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from 3452729 to da32088 Compare April 10, 2026 15:36
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.

1 participant