Skip to content

Commit cacc213

Browse files
committed
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.
1 parent 9a2d3d9 commit cacc213

3 files changed

Lines changed: 1 addition & 21 deletions

File tree

src/extraction/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const WORKER_RECYCLE_INTERVAL = 250;
5151
* Progress callback for indexing operations
5252
*/
5353
export interface IndexProgress {
54-
phase: 'scanning' | 'parsing' | 'storing' | 'finalizing' | 'resolving';
54+
phase: 'scanning' | 'parsing' | 'storing' | 'resolving';
5555
current: number;
5656
total: number;
5757
currentFile?: string;
@@ -852,15 +852,6 @@ export class ExtractionOrchestrator {
852852
(parseWorker as import('worker_threads').Worker).terminate().catch(() => {});
853853
}
854854

855-
// Phase 3: Resolve references
856-
onProgress?.({
857-
phase: 'resolving',
858-
current: 0,
859-
total: 1,
860-
});
861-
862-
// TODO: Implement reference resolution in Phase 3
863-
864855
return {
865856
success: filesIndexed > 0 || errors.filter((e) => e.severity === 'error').length === 0,
866857
filesIndexed,

src/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -390,16 +390,6 @@ export class CodeGraph {
390390

391391
// Resolve references to create call/import/extends edges
392392
if (result.success && result.filesIndexed > 0) {
393-
// Signal transition so progress bar doesn't hang at "Parsing 100%"
394-
options.onProgress?.({
395-
phase: 'finalizing',
396-
current: 0,
397-
total: 0,
398-
});
399-
400-
// Yield so shimmer worker can flush the phase transition to stdout
401-
await new Promise(resolve => setImmediate(resolve));
402-
403393
// Get count without loading all refs into memory
404394
const unresolvedCount = this.queries.getUnresolvedReferencesCount();
405395

src/ui/shimmer-progress.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const PHASE_NAMES: Record<string, string> = {
55
scanning: 'Scanning files',
66
parsing: 'Parsing code',
77
storing: 'Storing data',
8-
finalizing: 'Finalizing',
98
resolving: 'Resolving refs',
109
};
1110

0 commit comments

Comments
 (0)