feat: add skill uninstall confirmation#2177
Conversation
janburzinski
commented
May 21, 2026
Greptile SummaryThis PR adds an uninstall confirmation step for skills by introducing a
Confidence Score: 4/5Safe to merge; the core uninstall flow is correct and error handling is intact. The confirmation dialog wires up correctly and errors are handled by the existing mutation callbacks. The only notable issue is that the detail modal is always closed before the confirmation appears — cancelling the dialog leaves the user at the skills list rather than returning to the detail view they were reading. src/renderer/features/skills/components/SkillsView.tsx — specifically the order of closeDetail() and showConfirm() in handleUninstallRequest.
|
| Filename | Overview |
|---|---|
| src/renderer/features/skills/components/SkillDetailModal.tsx | Simplified handleUninstall to be synchronous; delegates loading state and close logic to the new confirmation flow in SkillsView. isProcessing now only guards install operations. |
| src/renderer/features/skills/components/SkillsView.tsx | Adds handleUninstallRequest that closes the detail modal then shows a confirmActionModal before calling uninstall. Detail modal is always dismissed on Uninstall click, even if the user cancels confirmation. |
Sequence Diagram
sequenceDiagram
participant U as User
participant SM as SkillDetailModal
participant SV as SkillsView
participant CD as ConfirmActionDialog
participant API as uninstall RPC
U->>SM: Click "Uninstall"
SM->>SV: handleUninstallRequest(skillId)
SV->>SV: closeDetail() — modal closes immediately
SV->>CD: "showConfirm({ title, description, onSuccess })"
CD-->>U: Show confirmation dialog
alt User confirms
U->>CD: Click "Uninstall"
CD->>SV: onSuccess()
SV->>API: uninstall(skillId)
API-->>SV: success toast + cache invalidation
else User cancels
U->>CD: Click "Cancel"
CD-->>U: Dialog dismissed (user is back at skills list)
end
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/renderer/features/skills/components/SkillsView.tsx:40-46
**Detail modal discarded even on confirmation cancel**
`closeDetail()` is called unconditionally before the confirm dialog is shown, so if the user opens a skill's detail view, clicks Uninstall, and then cancels the confirmation, they end up back at the empty skills list instead of the detail modal they were reading. Previously, the detail modal stayed open until the uninstall actually succeeded. If this is intentional (avoiding two overlapping modals), it's worth adding a comment; otherwise, deferring `closeDetail()` to the `onSuccess` callback would preserve the previous "cancel = stay in detail" behaviour.
Reviews (1): Last reviewed commit: "Add skill uninstall confirmation" | Re-trigger Greptile