Skip to content

Add rich progress bars with clean separation of concerns#3

Merged
martgra merged 1 commit into
mainfrom
claude/add-rich-progress-bars-014C8rjgDsrPtGDf7MBduMVD
Nov 19, 2025
Merged

Add rich progress bars with clean separation of concerns#3
martgra merged 1 commit into
mainfrom
claude/add-rich-progress-bars-014C8rjgDsrPtGDf7MBduMVD

Conversation

@martgra
Copy link
Copy Markdown
Owner

@martgra martgra commented Nov 19, 2025

This commit introduces a new progress tracking system using the Rich library
while maintaining clean separation of concerns through a protocol-based interface.

Changes:

  • Create progress.py with ProgressTracker protocol interface
  • Implement RichProgressTracker with multi-level progress bars:
    • Stage-level tracking (sync, identify, process, cleanup)
    • File-level progress with current file display
    • Embedding progress within each file
  • Implement NoOpProgressTracker for testing/backward compatibility
  • Update pipeline.py to use progress tracking via dependency injection
  • Reduce logging verbosity (INFO -> DEBUG) for detailed logs
  • Update cli.py to initialize and use RichProgressTracker

Benefits:

  • Clean architecture: Pipeline code doesn't depend on Rich directly
  • Easy to test: Can swap in NoOp tracker for testing
  • Better user experience: Visual progress bars instead of log spam
  • Maintainable: Clear interface makes it easy to add other implementations

This commit introduces a new progress tracking system using the Rich library
while maintaining clean separation of concerns through a protocol-based interface.

Changes:
- Create progress.py with ProgressTracker protocol interface
- Implement RichProgressTracker with multi-level progress bars:
  * Stage-level tracking (sync, identify, process, cleanup)
  * File-level progress with current file display
  * Embedding progress within each file
- Implement NoOpProgressTracker for testing/backward compatibility
- Update pipeline.py to use progress tracking via dependency injection
- Reduce logging verbosity (INFO -> DEBUG) for detailed logs
- Update cli.py to initialize and use RichProgressTracker

Benefits:
- Clean architecture: Pipeline code doesn't depend on Rich directly
- Easy to test: Can swap in NoOp tracker for testing
- Better user experience: Visual progress bars instead of log spam
- Maintainable: Clear interface makes it easy to add other implementations
@martgra martgra merged commit 16a24a9 into main Nov 19, 2025
1 check failed
@martgra martgra deleted the claude/add-rich-progress-bars-014C8rjgDsrPtGDf7MBduMVD branch November 19, 2025 21:04
martgra pushed a commit that referenced this pull request Nov 20, 2025
Bug #1: Fix exception handling in migration command
- Added missing 'as e' to except clause
- Changed to f-strings for proper interpolation
- Location: cli.py:247-251

Bug #2: Fix incorrect skip count calculation in orchestrator
- Track total_available files correctly for both force and normal modes
- Fix calculation that was using wrong variable when force=True
- Location: pipeline_orchestrator.py:186-208

Bug #3: Remove missing total_vectors reference
- Removed reference to non-existent 'total_vectors' field in state stats
- Prevents KeyError crash in status command
- Location: cli.py:304-307

Bug #4: Fix inconsistent token check in chunker
- Changed '<' to '<=' to match rest of codebase
- Added warning logging for chunks exceeding max tokens
- Prevents silent data loss when chunks are at max_tokens
- Location: lovdata_chunker.py:372, 386-391

Tests:
- Added TestTokenLimits class with 2 new tests for Bug #4
- All non-tiktoken tests passing (19/19)
- Chunker tests blocked by tiktoken network issue (environment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants