1
0
Эх сурвалжийг харах

feat: Remove unused 'finalizing' phase from indexing progress

Eliminates the intermediate 'finalizing' phase that was added as a progress bar transition state but served no functional purpose. Simplifies the progress flow by going directly from 'storing' to 'resolving' phases, removing associated UI labels and progress callbacks.
Colby McHenry 2 сар өмнө
parent
commit
cacc213f09

+ 1 - 10
src/extraction/index.ts

@@ -51,7 +51,7 @@ const WORKER_RECYCLE_INTERVAL = 250;
  * Progress callback for indexing operations
  * Progress callback for indexing operations
  */
  */
 export interface IndexProgress {
 export interface IndexProgress {
-  phase: 'scanning' | 'parsing' | 'storing' | 'finalizing' | 'resolving';
+  phase: 'scanning' | 'parsing' | 'storing' | 'resolving';
   current: number;
   current: number;
   total: number;
   total: number;
   currentFile?: string;
   currentFile?: string;
@@ -852,15 +852,6 @@ export class ExtractionOrchestrator {
       (parseWorker as import('worker_threads').Worker).terminate().catch(() => {});
       (parseWorker as import('worker_threads').Worker).terminate().catch(() => {});
     }
     }
 
 
-    // Phase 3: Resolve references
-    onProgress?.({
-      phase: 'resolving',
-      current: 0,
-      total: 1,
-    });
-
-    // TODO: Implement reference resolution in Phase 3
-
     return {
     return {
       success: filesIndexed > 0 || errors.filter((e) => e.severity === 'error').length === 0,
       success: filesIndexed > 0 || errors.filter((e) => e.severity === 'error').length === 0,
       filesIndexed,
       filesIndexed,

+ 0 - 10
src/index.ts

@@ -390,16 +390,6 @@ export class CodeGraph {
 
 
         // Resolve references to create call/import/extends edges
         // Resolve references to create call/import/extends edges
         if (result.success && result.filesIndexed > 0) {
         if (result.success && result.filesIndexed > 0) {
-          // Signal transition so progress bar doesn't hang at "Parsing 100%"
-          options.onProgress?.({
-            phase: 'finalizing',
-            current: 0,
-            total: 0,
-          });
-
-          // Yield so shimmer worker can flush the phase transition to stdout
-          await new Promise(resolve => setImmediate(resolve));
-
           // Get count without loading all refs into memory
           // Get count without loading all refs into memory
           const unresolvedCount = this.queries.getUnresolvedReferencesCount();
           const unresolvedCount = this.queries.getUnresolvedReferencesCount();
 
 

+ 0 - 1
src/ui/shimmer-progress.ts

@@ -5,7 +5,6 @@ const PHASE_NAMES: Record<string, string> = {
   scanning: 'Scanning files',
   scanning: 'Scanning files',
   parsing: 'Parsing code',
   parsing: 'Parsing code',
   storing: 'Storing data',
   storing: 'Storing data',
-  finalizing: 'Finalizing',
   resolving: 'Resolving refs',
   resolving: 'Resolving refs',
 };
 };