From 7a2a3ef50065e215b37d95cdda47e66acf7ed445 Mon Sep 17 00:00:00 2001 From: Stephan Rieche Date: Fri, 2 Jan 2026 13:02:43 +0100 Subject: [PATCH] refactor: create PipelineStatusInfo interface to eliminate type duplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define a dedicated PipelineStatusInfo interface and use it consistently in both resumePipelineFeature() parameter and detectPipelineStatus() return type. This eliminates duplicate inline type definitions and improves maintainability by ensuring both locations always stay in sync. Any future changes to the pipeline status structure only need to be made in one place. Changes: - Add PipelineStatusInfo interface definition - Replace inline type in resumePipelineFeature() with PipelineStatusInfo - Replace inline return type in detectPipelineStatus() with PipelineStatusInfo Co-authored-by: gemini-code-assist bot 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- apps/server/src/services/auto-mode-service.ts | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/apps/server/src/services/auto-mode-service.ts b/apps/server/src/services/auto-mode-service.ts index 805cf642..12b2620e 100644 --- a/apps/server/src/services/auto-mode-service.ts +++ b/apps/server/src/services/auto-mode-service.ts @@ -74,6 +74,18 @@ interface PlanSpec { tasks?: ParsedTask[]; } +/** + * Information about pipeline status when resuming a feature + */ +interface PipelineStatusInfo { + isPipeline: boolean; + stepId: string | null; + stepIndex: number; + totalSteps: number; + step: PipelineStep | null; + config: PipelineConfig | null; +} + /** * Parse tasks from generated spec content * Looks for the ```tasks code block and extracts task lines @@ -757,14 +769,7 @@ Complete the pipeline step instructions above. Review the previous work and appl projectPath: string, feature: Feature, useWorktrees: boolean, - pipelineInfo: { - isPipeline: boolean; - stepId: string | null; - stepIndex: number; - totalSteps: number; - step: PipelineStep | null; - config: PipelineConfig | null; - } + pipelineInfo: PipelineStatusInfo ): Promise { const featureId = feature.id; console.log( @@ -2761,14 +2766,7 @@ Review the previous work and continue the implementation. If the feature appears projectPath: string, featureId: string, currentStatus: FeatureStatusWithPipeline - ): Promise<{ - isPipeline: boolean; - stepId: string | null; - stepIndex: number; - totalSteps: number; - step: PipelineStep | null; - config: PipelineConfig | null; - }> { + ): Promise { // Check if status is pipeline format using PipelineService const isPipeline = pipelineService.isPipelineStatus(currentStatus);