From 41aabf19ce5acd3e762997d032c41dcf7a60114e Mon Sep 17 00:00:00 2001 From: 4 Bytes Robby Date: Tue, 23 Jun 2026 09:01:51 +0200 Subject: [PATCH 1/2] fix: fire progress counter immediately, only delay filename display --- src/ingest/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ingest/index.ts b/src/ingest/index.ts index a9b522f..b50dba7 100644 --- a/src/ingest/index.ts +++ b/src/ingest/index.ts @@ -206,6 +206,9 @@ export async function ingestPath( return; } + // Update counter immediately for every file + options?.progressCallback?.({ current: i + 1, total: walkedFiles.length }); + // Only show filename in progress if the file takes longer than 3s let slowFileTimer: ReturnType | undefined; slowFileTimer = setTimeout(() => { From 1ce9ef2bb5f0cb003395a92a2fc0fa18e02fc359 Mon Sep 17 00:00:00 2001 From: 4 Bytes Robby Date: Tue, 23 Jun 2026 09:09:44 +0200 Subject: [PATCH 2/2] fix: move progress callback before MAX_FILE_SIZE gate so skipped files advance the counter #189 --- src/ingest/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ingest/index.ts b/src/ingest/index.ts index b50dba7..4b661ce 100644 --- a/src/ingest/index.ts +++ b/src/ingest/index.ts @@ -199,6 +199,9 @@ export async function ingestPath( return; } + // Update counter immediately for every file (BEFORE MAX_FILE_SIZE gate — skipped files still advance the counter) + options?.progressCallback?.({ current: i + 1, total: walkedFiles.length }); + if (fileStats.size > MAX_FILE_SIZE) { const msg = `Skipped (too large, ${(fileStats.size / 1024 / 1024).toFixed(1)}MB): ${filePath}`; log("info", "ingest", msg); @@ -206,9 +209,6 @@ export async function ingestPath( return; } - // Update counter immediately for every file - options?.progressCallback?.({ current: i + 1, total: walkedFiles.length }); - // Only show filename in progress if the file takes longer than 3s let slowFileTimer: ReturnType | undefined; slowFileTimer = setTimeout(() => {