Skip to content

Conversation

@cannuri
Copy link
Contributor

@cannuri cannuri commented Mar 12, 2025

Fix failing e2e test for tasks and subtasks.
@cte I hope that's fine that fine?


Important

Fixes e2e test race condition by introducing mock implementations and refactoring state management in ContextProxy and ClineProvider.

  • Testing:
    • Fixes race condition in e2e tests for tasks and subtasks by introducing mock implementations for API methods and event handling in e2e/src/suite/utils.ts.
    • Adds new test subtasks.test.ts to verify subtask cancellation and resumption.
    • Updates task.test.ts and modes.test.ts to use enhanced API with mock events.
  • Environment:
    • Renames .env.integration to .env.local in code-qa.yml and updates related documentation and scripts.
  • State Management:
    • Refactors ContextProxy in contextProxy.ts to initialize state and secret caches asynchronously.
    • Updates ClineProvider in ClineProvider.ts to use ContextProxy for state management and initialization.
  • API Changes:
    • Extends RooCodeAPI in roo-code.d.ts with event emitter capabilities for task and message events.
    • Updates globalState.ts to ensure type safety for secret and global state keys.

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

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2025

🦋 Changeset detected

Latest commit: fc36655

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Patch

Not sure what this means? Click here to learn what changesets are.

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

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 12, 2025
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Mar 12, 2025

This pull request is quite large, with 23 files changed and over 1500 lines added. It includes various changes such as environment file updates, test suite initialization, API enhancements, and more. To improve the review process and maintain clarity, it might be beneficial to split this pull request into smaller, more focused ones.

Here are some suggestions on how the changes could be split:

  1. Environment Configuration Updates: Changes related to environment files and configuration updates (e.g., .env.local changes, GitHub workflow updates).

  2. Test Suite Enhancements: Updates related to the test suite initialization and test logic improvements (e.g., e2e test suite changes, mode switching tests).

  3. API Enhancements: Changes related to API enhancements and event handling (e.g., RooCodeAPI updates, event emitter additions).

  4. Documentation and Chore Updates: Documentation updates and minor chore changes (e.g., README changes, knip.json updates).

Please consider splitting the pull request into these smaller, more manageable parts if the changes are not closely related. This will help streamline the review process and ensure each set of changes is thoroughly reviewed.

@dosubot dosubot bot added the bug Something isn't working label Mar 12, 2025

this.initializeStateCache()
this.initializeSecretCache()
this.initialize()
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider awaiting the call to this.initialize() in resetAllState to ensure caches are fully reinitialized before subsequent operations.

Suggested change
this.initialize()
await this.initialize()

Comment on lines +4 to +8
"task:started": (taskId: string, message?: string) => void
"task:cancelled": (taskId: string) => void
"message:received": (taskId: string, message: ClineMessage) => void
"message:sent": (taskId: string, message: string, images?: string[]) => void
"task:completed": (taskId: string) => void
Copy link
Contributor

Choose a reason for hiding this comment

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

i love the event base <3

@cte cte changed the base branch from main to cte/context-proxy-fixes March 12, 2025 04:36
@cte cte deleted the branch RooCodeInc:cte/context-proxy-fixes March 12, 2025 15:16
@cte cte closed this Mar 12, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 12, 2025
@cte
Copy link
Collaborator

cte commented Mar 12, 2025

Oops, I think this got automatically closed when I merged RooVetGit:cte/context-proxy-fixes - will bring this back in another PR.

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

Labels

bug Something isn't working size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants