Skip to content

feat(code): add PR actions to local tasks#1862

Open
adboio wants to merge 2 commits intomainfrom
04-23-feat_code_add_pr_actions_to_local_tasks
Open

feat(code): add PR actions to local tasks#1862
adboio wants to merge 2 commits intomainfrom
04-23-feat_code_add_pr_actions_to_local_tasks

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented Apr 23, 2026

Problem

  • brings PR status / actions to local tasks
  • combines PR actions + git actions buttons

Changes

Screenshot 2026-04-23 at 10.00.41 AM.png

Screenshot 2026-04-23 at 10.00.52 AM.png

How did you test this?

manually

Copy link
Copy Markdown
Contributor Author

adboio commented Apr 23, 2026

@adboio adboio requested a review from a team April 23, 2026 14:01
@adboio adboio marked this pull request as ready for review April 23, 2026 14:34
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/git-interaction/components/TaskActionsMenu.tsx
Line: 419-444

Comment:
**Missing `view-pr` icon case**

`getGitActionIcon` no longer handles `"view-pr"`, so it falls through to the `default` branch and returns a cloud-upload icon. The filter that removes `view-pr` from `gitItems` only fires when `hasPr` is true, but during initial load `useLinkedBranchPrUrl` may still be resolving while `gitState.actions` already contains a `view-pr` entry — producing the wrong icon briefly in the dropdown.

```suggestion
function getGitActionIcon(actionId: GitMenuActionId) {
  switch (actionId) {
    case "commit":
      return <GitCommit size={12} weight="bold" />;
    case "push":
      return <CloudArrowUp size={12} weight="bold" />;
    case "sync":
      return <ArrowsClockwise size={12} weight="bold" />;
    case "publish":
      return <GitBranch size={12} weight="bold" />;
    case "create-pr":
      return <GitPullRequest size={12} weight="bold" />;
    case "view-pr":
      return <GitPullRequest size={12} weight="bold" />;
    case "branch-here":
      return <GitFork size={12} weight="bold" />;
    default:
      return <CloudArrowUp size={12} weight="bold" />;
  }
}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(code): add PR actions to local task..." | Re-trigger Greptile

Comment on lines +419 to +444
}
return (
<QDropdownMenuItem onSelect={() => onSelect(action.id)}>
{itemContent}
</QDropdownMenuItem>
);
}

function getGitActionIcon(actionId: GitMenuActionId) {
switch (actionId) {
case "commit":
return <GitCommit size={12} weight="bold" />;
case "push":
return <CloudArrowUp size={12} weight="bold" />;
case "sync":
return <ArrowsClockwise size={12} weight="bold" />;
case "publish":
return <GitBranch size={12} weight="bold" />;
case "create-pr":
return <GitPullRequest size={12} weight="bold" />;
case "branch-here":
return <GitFork size={12} weight="bold" />;
default:
return <CloudArrowUp size={12} weight="bold" />;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Missing view-pr icon case

getGitActionIcon no longer handles "view-pr", so it falls through to the default branch and returns a cloud-upload icon. The filter that removes view-pr from gitItems only fires when hasPr is true, but during initial load useLinkedBranchPrUrl may still be resolving while gitState.actions already contains a view-pr entry — producing the wrong icon briefly in the dropdown.

Suggested change
}
return (
<QDropdownMenuItem onSelect={() => onSelect(action.id)}>
{itemContent}
</QDropdownMenuItem>
);
}
function getGitActionIcon(actionId: GitMenuActionId) {
switch (actionId) {
case "commit":
return <GitCommit size={12} weight="bold" />;
case "push":
return <CloudArrowUp size={12} weight="bold" />;
case "sync":
return <ArrowsClockwise size={12} weight="bold" />;
case "publish":
return <GitBranch size={12} weight="bold" />;
case "create-pr":
return <GitPullRequest size={12} weight="bold" />;
case "branch-here":
return <GitFork size={12} weight="bold" />;
default:
return <CloudArrowUp size={12} weight="bold" />;
}
}
function getGitActionIcon(actionId: GitMenuActionId) {
switch (actionId) {
case "commit":
return <GitCommit size={12} weight="bold" />;
case "push":
return <CloudArrowUp size={12} weight="bold" />;
case "sync":
return <ArrowsClockwise size={12} weight="bold" />;
case "publish":
return <GitBranch size={12} weight="bold" />;
case "create-pr":
return <GitPullRequest size={12} weight="bold" />;
case "view-pr":
return <GitPullRequest size={12} weight="bold" />;
case "branch-here":
return <GitFork size={12} weight="bold" />;
default:
return <CloudArrowUp size={12} weight="bold" />;
}
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/git-interaction/components/TaskActionsMenu.tsx
Line: 419-444

Comment:
**Missing `view-pr` icon case**

`getGitActionIcon` no longer handles `"view-pr"`, so it falls through to the `default` branch and returns a cloud-upload icon. The filter that removes `view-pr` from `gitItems` only fires when `hasPr` is true, but during initial load `useLinkedBranchPrUrl` may still be resolving while `gitState.actions` already contains a `view-pr` entry — producing the wrong icon briefly in the dropdown.

```suggestion
function getGitActionIcon(actionId: GitMenuActionId) {
  switch (actionId) {
    case "commit":
      return <GitCommit size={12} weight="bold" />;
    case "push":
      return <CloudArrowUp size={12} weight="bold" />;
    case "sync":
      return <ArrowsClockwise size={12} weight="bold" />;
    case "publish":
      return <GitBranch size={12} weight="bold" />;
    case "create-pr":
      return <GitPullRequest size={12} weight="bold" />;
    case "view-pr":
      return <GitPullRequest size={12} weight="bold" />;
    case "branch-here":
      return <GitFork size={12} weight="bold" />;
    default:
      return <CloudArrowUp size={12} weight="bold" />;
  }
}
```

How can I resolve this? If you propose a fix, please make it concise.

@adboio adboio force-pushed the 04-23-feat_code_add_pr_actions_to_local_tasks branch from a36c1e1 to d107aac Compare April 23, 2026 19:21
@adboio adboio force-pushed the 04-23-feat_code_add_method_for_finding_pr_for_branch branch from 331a490 to 73e2848 Compare April 23, 2026 19:21
Copy link
Copy Markdown
Contributor Author

adboio commented Apr 24, 2026

Merge activity

  • Apr 24, 1:56 PM UTC: A user started a stack merge that includes this pull request via Graphite.

@adboio adboio changed the base branch from 04-23-feat_code_add_method_for_finding_pr_for_branch to graphite-base/1862 April 24, 2026 13:56
@adboio adboio changed the base branch from graphite-base/1862 to main April 24, 2026 13:56
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.

2 participants