Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 17, 2026

This PR attempts to address Issue #10801. Feedback and guidance are welcome.

Summary

Adds a "Delete Checkpoints Only" button to the task history panel, allowing users to free up disk space by removing checkpoint data while preserving task history and conversation.

Based on testing by @nh2, deleting checkpoints manually does not break the UI - the checkpoint lines simply disappear, which simplifies the implementation since we do not need to update ui_messages.json.

Changes

Backend

  • Added deleteTaskCheckpointsWithId message type to WebviewMessage in types package
  • Added deleteTaskCheckpointsWithId method in ClineProvider.ts that:
    • Deletes the shadow checkpoint service data via ShadowCheckpointService.deleteTask()
    • Removes only the checkpoints directory (not the entire task)
    • Refreshes the webview state
  • Added handler in webviewMessageHandler.ts

Frontend

  • Created DeleteCheckpointsButton.tsx component (with history icon, supports Shift+Click to skip confirmation)
  • Created DeleteCheckpointsDialog.tsx confirmation dialog
  • Updated TaskItemFooter.tsx to include the new button (appears in full variant alongside other action buttons)
  • Updated TaskItem.tsx to pass through the onDeleteCheckpoints prop
  • Updated HistoryView.tsx to wire up the dialog state management
  • Added translations to history.json

Tests

  • Added unit tests for DeleteCheckpointsButton
  • Added unit tests for DeleteCheckpointsDialog

How to Test

  1. Open a task that has checkpoints
  2. Go to History view
  3. You should see a clock/history icon button next to the export button
  4. Click it to see the confirmation dialog
  5. Confirm deletion - checkpoints are removed, but task history remains
  6. Shift+Click to skip confirmation

Closes #10801


Important

Add a feature to delete task checkpoints while preserving history, with UI components and tests.

  • Backend:
    • Add deleteTaskCheckpointsWithId to WebviewMessage in vscode-extension-host.ts.
    • Implement deleteTaskCheckpointsWithId in ClineProvider.ts to delete checkpoints and refresh webview.
    • Handle deleteTaskCheckpointsWithId in webviewMessageHandler.ts.
  • Frontend:
    • Add DeleteCheckpointsButton.tsx for button UI with Shift+Click support.
    • Add DeleteCheckpointsDialog.tsx for confirmation dialog.
    • Update TaskItemFooter.tsx and TaskItem.tsx to include the new button.
    • Update HistoryView.tsx to manage dialog state.
    • Add translations in history.json.
  • Tests:
    • Add unit tests for DeleteCheckpointsButton and DeleteCheckpointsDialog.

This description was created by Ellipsis for f235430. You can customize this summary. It will automatically update as commits are pushed.

This PR adds a "Delete Checkpoints Only" button to the task history panel, allowing users to free up disk space by removing checkpoint data while preserving task history and conversation.

Changes:
- Add deleteTaskCheckpointsWithId message type to WebviewMessage
- Add deleteTaskCheckpointsWithId method in ClineProvider.ts
- Handle new message in webviewMessageHandler.ts
- Create DeleteCheckpointsButton component
- Create DeleteCheckpointsDialog component
- Update TaskItemFooter to include the new button
- Wire up the dialog in HistoryView
- Add translations for the new feature
- Add tests for the new components

Closes #10801
@roomote
Copy link
Contributor Author

roomote bot commented Jan 17, 2026

Rooviewer Clock   See task on Roo Cloud

Review completed. The implementation correctly follows existing patterns for adding the delete checkpoints feature. Found one minor test quality issue.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

fireEvent.click(screen.getByText("history:cancel"))
})

expect(vscode.postMessage).not.toHaveBeenCalled()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is named "calls onOpenChange when cancel is clicked" but it doesn't actually assert that onOpenChange is called. Compare with the existing DeleteTaskDialog.spec.tsx which properly includes expect(mockOnOpenChange).toHaveBeenCalledWith(false). The missing assertion should be added to verify the behavior claimed by the test name.

Suggested change
expect(vscode.postMessage).not.toHaveBeenCalled()
expect(vscode.postMessage).not.toHaveBeenCalled()
expect(onOpenChange).toHaveBeenCalledWith(false)

Fix it with Roo Code or mention @roomote and request a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add buttons to delete checkpoints only

2 participants