Open
Conversation
Contributor
Author
Prompt To Fix All With AIThis 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" />; | ||
| } | ||
| } |
There was a problem hiding this comment.
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.696ec0f to
a36c1e1
Compare
This was referenced Apr 23, 2026
a36c1e1 to
d107aac
Compare
331a490 to
73e2848
Compare
jonathanlab
approved these changes
Apr 24, 2026
Contributor
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Changes
How did you test this?
manually