mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
Improve pull request flow, add branch selection for worktree creation, fix auto-mode concurrency count (#787)
* Changes from fix/fetch-before-pull-fetch * feat: Improve pull request flow, add branch selection for worktree creation, fix for automode concurrency count * feat: Add validation for remote names and improve error handling * Address PR comments and mobile layout fixes * ``` refactor: Extract PR target resolution logic into dedicated service ``` * feat: Add app shell UI and improve service imports. Address PR comments * fix: Improve security validation and cache handling in git operations * feat: Add GET /list endpoint and improve parameter handling * chore: Improve validation, accessibility, and error handling across apps * chore: Format vite server port configuration * fix: Add error handling for gh pr list command and improve offline fallbacks * fix: Preserve existing PR creation time and improve remote handling
This commit is contained in:
@@ -168,6 +168,20 @@ ${feature.spec}
|
||||
feature = await this.loadFeatureFn(projectPath, featureId);
|
||||
if (!feature) throw new Error(`Feature ${featureId} not found`);
|
||||
|
||||
// Update status to in_progress immediately after acquiring the feature.
|
||||
// This prevents a race condition where the UI reloads features and sees the
|
||||
// feature still in 'backlog' status while it's actually being executed.
|
||||
// Only do this for the initial call (not internal/recursive calls which would
|
||||
// redundantly update the status).
|
||||
if (
|
||||
!options?._calledInternally &&
|
||||
(feature.status === 'backlog' ||
|
||||
feature.status === 'ready' ||
|
||||
feature.status === 'interrupted')
|
||||
) {
|
||||
await this.updateFeatureStatusFn(projectPath, featureId, 'in_progress');
|
||||
}
|
||||
|
||||
if (!options?.continuationPrompt) {
|
||||
if (feature.planSpec?.status === 'approved') {
|
||||
const prompts = await getPromptCustomization(this.settingsService, '[ExecutionService]');
|
||||
@@ -199,7 +213,18 @@ ${feature.spec}
|
||||
validateWorkingDirectory(workDir);
|
||||
tempRunningFeature.worktreePath = worktreePath;
|
||||
tempRunningFeature.branchName = branchName ?? null;
|
||||
await this.updateFeatureStatusFn(projectPath, featureId, 'in_progress');
|
||||
// Ensure status is in_progress (may already be set from the early update above,
|
||||
// but internal/recursive calls skip the early update and need it here).
|
||||
// Mirror the external guard: only transition when the feature is still in
|
||||
// backlog, ready, or interrupted to avoid overwriting a concurrent terminal status.
|
||||
if (
|
||||
options?._calledInternally &&
|
||||
(feature.status === 'backlog' ||
|
||||
feature.status === 'ready' ||
|
||||
feature.status === 'interrupted')
|
||||
) {
|
||||
await this.updateFeatureStatusFn(projectPath, featureId, 'in_progress');
|
||||
}
|
||||
this.eventBus.emitAutoModeEvent('auto_mode_feature_start', {
|
||||
featureId,
|
||||
projectPath,
|
||||
|
||||
Reference in New Issue
Block a user