Skip to content

Commit 45d2cb9

Browse files
Cheticclaude
andcommitted
fix: keep file name visible on progress sub-line during indexing
progress_update() and FileProcessingContext.__exit__() were both clearing _progress_file, causing the current file name to disappear almost immediately — especially in parallel mode where one worker finishing would wipe the display for all active workers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 538c8b3 commit 45d2cb9

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/chunksilo/index.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,6 @@ def progress_update(self, step: int = 1) -> None:
985985
if not self._progress_active or self._progress_total <= 0:
986986
return
987987
self._progress_current = min(self._progress_total, self._progress_current + step)
988-
self._progress_file = ""
989-
self._progress_phase = ""
990-
self._progress_heartbeat = ""
991988
self._render_progress()
992989

993990
def progress_set_file(self, file_path: str, phase: str = "") -> None:
@@ -1319,9 +1316,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
13191316
f"Slow file processing: {self.file_path} took {duration:.1f}s"
13201317
)
13211318

1322-
# Clear file indicator
1323-
self.ui.progress_set_file("", "")
1324-
13251319
# Don't suppress exceptions
13261320
return False
13271321

test/test_indexing_ui.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ def test_progress_set_heartbeat(self, ui):
139139
output = _output(ui)
140140
assert "⠹" in output
141141

142+
def test_progress_update_preserves_file(self, ui):
143+
"""progress_update does not clear the current file sub-line."""
144+
ui.progress_start(10)
145+
ui.progress_set_file("/path/to/report.pdf", "Loading")
146+
ui.progress_update(1)
147+
output = _output(ui)
148+
assert "report.pdf" in output
149+
142150
def test_progress_done_completes(self, ui):
143151
"""progress_done exits progress mode cleanly."""
144152
ui.progress_start(2)

0 commit comments

Comments
 (0)