Skip to content

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

Open
adboio wants to merge 1 commit intomainfrom
04-09-feat_code_warn_on_local_task_branch_mismatch
Open

feat(code): warn on local task branch mismatch#1596
adboio wants to merge 1 commit intomainfrom
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
      • warns if there are uncommitted changes on current branch. this does not block, and surfaces errors from the switch (if any) in the dialog

How did you test this?

manually

Copy link
Copy Markdown
Contributor Author

adboio commented Apr 9, 2026

@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 2 times, most recently from da32088 to c6dfede Compare April 13, 2026 16:29
@adboio adboio force-pushed the 04-09-feat_code_enable_branch_linking_for_local_tasks branch from ab59a63 to 75a5057 Compare April 13, 2026 16:29
@adboio adboio changed the base branch from 04-09-feat_code_enable_branch_linking_for_local_tasks to graphite-base/1596 April 13, 2026 16:35
@adboio adboio force-pushed the graphite-base/1596 branch from 75a5057 to de8c55d Compare April 13, 2026 16:35
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from c6dfede to 5eb240a Compare April 13, 2026 16:35
@graphite-app graphite-app bot changed the base branch from graphite-base/1596 to main April 13, 2026 16:36
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch 5 times, most recently from 8fda684 to 7cc27c1 Compare April 13, 2026 20:52
@adboio adboio requested a review from a team April 13, 2026 20:58
@adboio adboio marked this pull request as ready for review April 13, 2026 20:58
@adboio adboio marked this pull request as draft April 14, 2026 02:18
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from 7cc27c1 to 637b323 Compare April 15, 2026 15:01
@adboio adboio force-pushed the 04-09-feat_code_warn_on_local_task_branch_mismatch branch from 637b323 to 6e9df68 Compare April 15, 2026 15:13
@adboio adboio marked this pull request as ready for review April 15, 2026 16:00
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