feat(code): add warning dialog for archiving running tasks#2530
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
e590e45 to
ecbad7c
Compare
|
| <AlertDialog.Cancel> | ||
| <Button variant="soft" color="gray" size="1"> | ||
| Cancel | ||
| </Button> | ||
| </AlertDialog.Cancel> |
There was a problem hiding this comment.
If the
onOpenChange approach is kept, the Cancel button should also explicitly call onCancel via its own onClick so the cancel path is explicit rather than relying solely on onOpenChange.
| <AlertDialog.Cancel> | |
| <Button variant="soft" color="gray" size="1"> | |
| Cancel | |
| </Button> | |
| </AlertDialog.Cancel> | |
| <AlertDialog.Cancel> | |
| <Button variant="soft" color="gray" size="1" onClick={onCancel}> | |
| Cancel | |
| </Button> | |
| </AlertDialog.Cancel> |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/sidebar/components/ArchiveRunningTaskDialog.tsx
Line: 37-41
Comment:
If the `onOpenChange` approach is kept, the `Cancel` button should also explicitly call `onCancel` via its own `onClick` so the cancel path is explicit rather than relying solely on `onOpenChange`.
```suggestion
<AlertDialog.Cancel>
<Button variant="soft" color="gray" size="1" onClick={onCancel}>
Cancel
</Button>
</AlertDialog.Cancel>
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Reviews (2): Last reviewed commit: "feat(code): add warning dialog for archi..." | Re-trigger Greptile |

Problem
tasks move around in the sidebar, i accidentally archived one that was running earlier, was frustrating
Changes
adds a warning dialog if you attempt to archive a task that is actively doing something
How did you test this?
manually
Automatic notifications