Skip to content

Create PR is silently dropped when dialog is dismissed and you switch tasks #2801

Description

@richardsolomou

Problem

If I click Create PR, then click outside the dialog to dismiss it, and move to a different task, the PR is never actually created. There's no error and no indication that the action was abandoned — it just silently doesn't happen.

Steps to reproduce

  1. On a task, click Create PR to open the create-PR dialog.
  2. Click outside the dialog (or otherwise dismiss it) instead of clicking the dialog's Create PR button.
  3. Navigate to a different task.

Expected

Either the PR gets created, or it's clear the action was cancelled. Dismissing the dialog by clicking out shouldn't quietly throw away an in-progress create-PR intent.

Actual

No PR is created. The draft fields (branch, commit message, PR title/body) are persisted, but nothing was submitted, and there's no feedback.

Likely cause

Dismissing the dialog fires Radix onOpenChange(false)closeCreatePr(), which only flips createPrOpen and saves the draft — it never triggers the create. Navigating to a different task remounts TaskActionsMenu with the new taskId, recreating the useGitInteraction hook and abandoning the prior closure.

Relevant locations:

  • packages/ui/src/features/git-interaction/components/TaskActionsMenu.tsxonOpenChange only calls closeCreatePr()
  • packages/ui/src/features/git-interaction/state/gitInteractionStore.tscloseCreatePr saves draft, sets createPrOpen: false, nothing else
  • packages/ui/src/features/git-interaction/useGitInteraction.tsrunCreatePr is only invoked by the dialog's submit button
  • packages/ui/src/shell/HeaderRow.tsx<TaskActionsMenu taskId={activeTask.id} /> remounts on task change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions