⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 23, 2026

Summary

image image

Adds a button in the task header that allows users to restore the workspace to its initial state when the task was created. This uses the baseHash checkpoint created during shadow git initialization.

Changes

Backend

  • Add checkpointRestoreToBase(task) function in src/core/checkpoints/index.ts
  • Add restoreToTaskStart message handler in src/core/webview/webviewMessageHandler.ts
  • Add restoreToTaskStart message type to packages/types/src/vscode-extension-host.ts
  • Add 4 unit tests for the new checkpoint restore function
  • Add error message translations for all 17 locales

Frontend

  • Add RestoreTaskDialog confirmation dialog component
  • Add restore button (↺) to TaskActions (visible only when checkpoints enabled)
  • Add dialog translations for all 17 locales

User Experience

The button appears in the expanded task header. Clicking it shows a confirmation dialog:

Restore workspace to task start
This will reset all files in the workspace to their state when this task was created. Changes made by this task, by other tasks, or manually will all be reverted. This action cannot be undone.

Testing

  • All 29 checkpoint tests pass including 4 new tests for checkpointRestoreToBase
  • All 5104 total tests pass

Important

Adds a feature to restore the workspace to its initial state at task creation, with backend and frontend support, including translations and tests.

  • Behavior:
    • Adds a button in the task header to restore the workspace to its initial state using baseHash checkpoint.
    • Confirmation dialog warns that this action cannot be undone.
  • Backend:
    • Adds checkpointRestoreToBase(task) in index.ts to restore workspace to initial state.
    • Adds restoreToTaskStart message handler in webviewMessageHandler.ts.
    • Adds restoreToTaskStart message type in vscode-extension-host.ts.
    • Adds 4 unit tests for checkpointRestoreToBase.
  • Frontend:
    • Adds RestoreTaskDialog component for confirmation dialog.
    • Adds restore button to TaskActions (visible when checkpoints enabled).
  • Translations:
    • Adds dialog and error message translations for 17 locales.
  • Testing:
    • All 29 checkpoint tests pass, including 4 new tests for checkpointRestoreToBase.
    • All 5104 total tests pass.

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

Adds a button in the task header that allows users to restore the workspace
to its initial state when the task was created. This uses the baseHash
checkpoint from the shadow git repository.

- Add checkpointRestoreToBase() function in checkpoints/index.ts
- Add restoreToTaskStart message handler in webviewMessageHandler.ts
- Add RestoreTaskDialog component with confirmation dialog
- Add restore button to TaskActions (visible when checkpoints enabled)
- Add translations for all 17 supported locales
- Add 4 unit tests for the new checkpoint restore function
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Jan 23, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 23, 2026

Oroocle Clock   Follow along on Roo Cloud

Review status: resolved.

  • Avoid triggering destructive restore action on any Enter keypress while dialog is open (limit to focused action button or remove global key listener).
Previous reviews

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


export const RestoreTaskDialog = ({ ...props }: AlertDialogProps) => {
const { t } = useAppTranslation()
const [isEnterPressed] = useKeyPress("Enter")
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a global Enter key listener to trigger the destructive restore action means pressing Enter anywhere while the dialog is open will restore immediately, even if focus is on Cancel. This makes accidental restores much more likely; it is safer to rely on the focused button/AlertDialogAction behavior (or only trigger on Enter when the Restore button is focused).

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@roomote are you saying enter should select cancel instead of confirming?

Copy link
Contributor

@roomote roomote bot Jan 23, 2026

Choose a reason for hiding this comment

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

Fixaroo Clock   See task on Roo Cloud

Fixed the reported issue by removing the global Enter key listener. The AlertDialog's default behavior will now only trigger the restore action when the Restore button is focused. All local checks passed.

View commit | Revert commit

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

Labels

Enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants