mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
refactor(auto-mode): convert getStatusForProject to async and enhance feature retrieval
- Updated getStatusForProject method in AutoModeServiceCompat and its facade to be asynchronous, allowing for better handling of feature status retrieval. - Modified related status handlers in the server routes to await the updated method. - Introduced a new method, getRunningFeaturesForWorktree, in ConcurrencyManager to improve feature ID retrieval based on branch normalization. - Adjusted BoardView component to ensure consistent handling of running auto tasks across worktrees. These changes improve the responsiveness and accuracy of the auto mode feature in the application.
This commit is contained in:
@@ -757,7 +757,7 @@ Address the follow-up instructions above. Review the previous work and make the
|
||||
* Get status for this project/worktree
|
||||
* @param branchName - The branch name, or null for main worktree
|
||||
*/
|
||||
getStatusForProject(branchName: string | null = null): ProjectAutoModeStatus {
|
||||
async getStatusForProject(branchName: string | null = null): Promise<ProjectAutoModeStatus> {
|
||||
const isAutoLoopRunning = this.autoLoopCoordinator.isAutoLoopRunningForProject(
|
||||
this.projectPath,
|
||||
branchName
|
||||
@@ -766,10 +766,12 @@ Address the follow-up instructions above. Review the previous work and make the
|
||||
this.projectPath,
|
||||
branchName
|
||||
);
|
||||
const runningFeatures = this.concurrencyManager
|
||||
.getAllRunning()
|
||||
.filter((f) => f.projectPath === this.projectPath && f.branchName === branchName)
|
||||
.map((f) => f.featureId);
|
||||
// Use branchName-normalized filter so features with branchName "main"
|
||||
// are correctly matched when querying for the main worktree (null)
|
||||
const runningFeatures = await this.concurrencyManager.getRunningFeaturesForWorktree(
|
||||
this.projectPath,
|
||||
branchName
|
||||
);
|
||||
|
||||
return {
|
||||
isAutoLoopRunning,
|
||||
|
||||
Reference in New Issue
Block a user