Skip to content

Conversation

@GitlyHallows
Copy link
Contributor

@GitlyHallows GitlyHallows commented Mar 16, 2025

Context

#1295

The core issues are:

  1. Tasks silently disappear when clicked if their files are missing
  2. Task history persists in global state even when task files are gone after uninstall/reinstall

Observations:

  • The current code in getTaskWithId() silently deletes tasks when files are missing
  • There's no validation of task history on extension activation
  • No user feedback when task files are missing

Implementation

  1. Added task history validation on extension activation to check for missing files
  2. Modified getTaskWithId() to throw a specific error instead of silently deleting
  3. Updated showTaskWithId() to handle missing files gracefully with user feedback
  4. Added Unit tests to verify the new behaviour.

This approach:

  • Maintains existing functionality while adding proper error handling
  • Provides clear user feedback
  • Validates task history on startup to prevent confusion
  • Doesn't require clearing history on install (which could be frustrating for users upgrading)

The solution maintains existing functionality while adding proper error handling and user feedback. It doesn't automatically clear history on install/uninstall since that could be frustrating for users who are just upgrading the extension.

Video

Task_history.mov

How to Test

  1. Remove or rename a task's API conversation history file(api_conversation_history.json) from its directory
  2. Try deleting the task from Roo
  3. You should see a warning and an option to remove/keep it in the task history
image

Important

Fixes task history management by validating tasks with missing files on startup and providing user feedback in ClineProvider.ts.

  • Behavior:
    • Validates task history on extension activation in extension.ts to remove tasks with missing files.
    • getTaskWithId() in ClineProvider.ts now throws "TASK_FILES_MISSING" error instead of deleting tasks silently.
    • showTaskWithId() in ClineProvider.ts prompts user to remove or keep tasks with missing files.
  • Tests:
    • Added tests in ClineProvider.test.ts to verify task history validation and user prompts for missing files.
  • Misc:
    • Minor logging changes in extension.ts for task history validation errors.

This description was created by Ellipsis for 2a2e467. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2025

⚠️ No Changeset found

Latest commit: 2a2e467

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Mar 16, 2025
@hannesrudolph hannesrudolph linked an issue Mar 17, 2025 that may be closed by this pull request
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Mar 17, 2025
@cte
Copy link
Collaborator

cte commented Mar 17, 2025

Thanks! This is working well for me and is a less confusing experience.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 17, 2025
@cte cte merged commit bfd6009 into RooCodeInc:main Mar 17, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Mar 17, 2025
@mrubens
Copy link
Collaborator

mrubens commented Mar 20, 2025

I think this has some issues when developing in WSL: #1829. Going to revert for now while we investigate since the impact is high on affected users.

mrubens added a commit that referenced this pull request Mar 20, 2025
…ion"

This reverts commit bfd6009, reversing
changes made to 7459ac5.
mrubens added a commit that referenced this pull request Mar 20, 2025
…ion" (#1837)

This reverts commit bfd6009, reversing
changes made to 7459ac5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Old tasks deleting without pressing the delete trash bin

3 participants