Fix Action Execution Order and Command Synchronization
Overview
This PR implements a global execution queue to ensure proper synchronization of file operations and shell commands, particularly during project reloads and code streaming. It addresses issues with command execution order and eliminates UI flickering during code streaming operations.
Key Changes
1. Global Execution Queue
Added #globalExecutionQueue to WorkbenchStore to manage sequential execution
Implemented queue management methods to ensure operations run in correct order
Modified action handling to respect queue ordering
2. Action Runner Updates
Made start actions non-blocking while maintaining execution order
Added delay between start actions to prevent race conditions
Improved promise chain handling in action execution
3. Workbench Store Improvements
Split action handling into public and private methods for better control
Modified file operations to properly integrate with execution queue
Updated document reset timing to prevent UI flickering
Technical Details
The core improvement revolves around the introduction of a Promise-based execution queue:
Fix Action Execution Order and Command Synchronization
Overview
This PR implements a global execution queue to ensure proper synchronization of file operations and shell commands, particularly during project reloads and code streaming. It addresses issues with command execution order and eliminates UI flickering during code streaming operations.
Key Changes
1. Global Execution Queue
#globalExecutionQueue
toWorkbenchStore
to manage sequential execution2. Action Runner Updates
3. Workbench Store Improvements
Technical Details
The core improvement revolves around the introduction of a Promise-based execution queue:
This ensures that:
Benefits
Testing
Migration Impact
Preview
https://github.com/user-attachments/assets/5a55f39a-1564-452a-81e7-f8d7761a37a1