Releases: jxwalker/modfetch
Releases · jxwalker/modfetch
v0.6.1
🎯 Overview
Comprehensive test infrastructure improvements with real API integration testing, robust retry logic, and extensive TUI test coverage.
✨ New Features
Real API Integration Tests
- Replaced mock tests with real HuggingFace and CivitAI API integration tests
- Tests now verify actual downloads from external APIs
- Better confidence in production behavior
Robust Retry Logic with Exponential Backoff
- Implemented exponential backoff for flaky API calls (1s, 2s, 4s delays)
- Graceful test skipping when external APIs are unavailable
- Centralized retry helper in
testutilpackage - No more false test failures from temporary API issues
Comprehensive TUI Testing
- Added 10 new TUI navigation tests
- 99 total TUI tests covering all major functionality
- Created
TUI_TESTING_GUIDE.mdwith manual testing checklist - Tests cover: tab switching, library navigation, search, detail views, help, inspector
🐛 Bug Fixes
Test Failures (17 fixed)
- HuggingFace resolver: Fixed repository path parsing (
openai-community/gpt2) - Scanner: Fixed version extraction regex for full semantic versions
- Scanner: Fixed file format detection with separate temp directories
- State/Metadata: Fixed timestamp precision (SQLite second-level precision)
- TUI: Added required
DownloadURLfields to test fixtures - TUI: Fixed search input focus issues
🔧 Improvements
Code Quality
- Eliminated magic numbers (added
MaxAPIRetriesconstant) - Removed code duplication (48 net lines reduced)
- Applied DRY principles with shared
testutil.RetryOnAPIError()helper - Added comprehensive function documentation
Test Reliability
- All tests now handle external API flakiness gracefully
- Exponential backoff prevents API hammering
- Consistent error handling across all integration tests
- Better observability with detailed retry logging
📚 Documentation
- Created
TUI_TESTING_GUIDE.mdwith:- Complete test coverage summary (99 tests)
- Manual testing checklist
- Instructions for running specific test suites
- Coverage metrics and future improvements
🔍 Technical Details
Files Changed
internal/resolver/- Real API tests with retry logicinternal/downloader/- Real download tests with retry logicinternal/scanner/- Version extraction and format detection fixesinternal/state/- Timestamp precision fixesinternal/tui/- Navigation tests and test fixturesinternal/testutil/- Shared retry helper with exponential backoffTUI_TESTING_GUIDE.md- Comprehensive testing documentation
Test Coverage
- 12/12 packages passing
- 99 TUI tests
- Real integration tests for HuggingFace and CivitAI APIs
- Graceful handling of external API unavailability
🙏 Credits
Thanks to the test infrastructure improvements, this release provides much higher confidence in the stability and reliability of modfetch.
v0.5.2
modfetch v0.5.2 TUI Regression Fixes and Enhancements: - Restore rich UI elements, vibrant colors, and proper borders to TUI v1 (refactored MVC) - Fix critical startup issue where TUI was stuck at 'Loading...' due to uninitialized window dimensions - Eliminate terminal escape sequences '10;?11;?' by removing problematic tea.WithMouseCellMotion() - Enhance visual feedback with colorful status indicators (green for completed, red for failed, pink for active) - Improve help system overlay rendering and navigation experience - Add comprehensive color scheme matching TUI v2's visual appeal Installation and Documentation: - Fix installer 404 error when downloading binaries - handle raw binaries instead of tar archives - Initialize SKIP_CONFIG_WIZARD variable to prevent unbound variable error - Fix backwards TUI version selection logic - default to working TUI v2, use --v1 for refactored version - Restore proper arrow key navigation and help system functionality - Update documentation to reflect current TUI features and improvements
v0.5.0
modfetch v0.5.0 - Comprehensive Installation Package - One-liner curl installer with cross-platform support - Interactive config wizard integration for guided setup - Clean uninstaller with optional data preservation - Enhanced developer setup with git hooks and IDE config - Memory-efficient hashing and CLI auth preflight - TUI MVC refactoring for better maintainability See CHANGELOG.md for full release notes.
v0.4.0
Highlights
- TUI auto-recovery: resume running/hold downloads on startup (ui.auto_recover_on_start)
- Downloader: transactional initial chunk plan; streaming SHA256 utilities for final verification
- CLI: add --force to skip SHA256 verification
- Robust HTTP probing: stricter Content-Length parsing and Accept-Ranges=bytes handling; better final-URL HEAD fallback
- Safetensors handling: header bounds checks, io.ReadFull, and end<=dataLen validation; adjust/truncate trailing bytes as needed
- State DB: preserve chunk sha256 unless non-empty provided on upsert; WithTx helpers for atomic updates
- Batch import and naming: sanitize versionHint in UniquePath (defense-in-depth)
- Error messages: friendlier host-aware auth/rate-limit messages; nil cfg guard
Builds
- Linux: dist/modfetch_linux_amd64, dist/modfetch_linux_arm64
- macOS: dist/modfetch_darwin_amd64, dist/modfetch_darwin_arm64
- Checksums: dist/SHA256SUMS
Notes
- Tokens required only for gated content (HF_TOKEN, CIVITAI_TOKEN).
- See WARP.md and docs/CONFIG.md for usage and configuration.
v0.3.3
Fixes
- Naming: strip URL query/fragment from default filenames and sanitize more aggressively; applies to CLI, TUI, and batch importer fallbacks (e.g., CivitAI direct links no longer include ?type=… in filenames).
- TUI v2: computeDefaultDest now tries a HEAD request for CivitAI direct download URLs (/api/download/…) to use Content-Disposition filename when available; falls back to safe base.
v0.3.2
Maintenance: add macOS universal binary to releases; docs updated. No functional changes from v0.3.1.
v0.3.1
CI-only: fix release workflow duplicate upload; no code changes since v0.3.0.
See v0.3.0 notes for features.
v0.3.0
Highlights
- TUI v2 is now the default with extensive UX upgrades:
- Live progress, speed, ETA with smoothing; throughput sparkline
- Filtering, sorting, grouping; multi-select; toasts drawer; help/commands bar
- New download wizard with smarter filename suggestions (resolver + HEAD Content-Disposition), detected artifact type, and placement hints
- Auth status indicators for Hugging Face and CivitAI (presence + rejection detection)
- Reachability probe (P), duplicate row merge, and immediate pending-row visibility
- Persisted UI state (theme/columns/layout) and configurable refresh rate (ui.refresh_hz)
- Batch/import
- Import URLs from text with preprocessing (redirects, filename/dest inference); integration tests and CI smoke
- Parallel batch download and duplicate/collision handling
- Resolver/classifier
- CivitAI suggested filename de-duplication and slugification while preserving extension
- GGUF magic detection (case-insensitive)
- Resolver cache with TTL and CLI purge
- Downloader/state/metrics
- Friendlier HTTP auth/permission error messages (401/403/404) persisted to state.last_error
- Context-based cancellation and cleanup; atomic counters; periodic metrics write
- State DB indices and COALESCE fixes; new last_error column and CreatedAt timestamps
- CLI
- Default config path fallback to ~/.config/modfetch/config.yml
- Safer host boundary checks and URL normalization
- Docs/CI
- CHANGELOG introduced; expanded TUI guide and docs refresh
- Release workflow builds OS/arch artifacts and attaches checksums
Assets
- Linux: modfetch_linux_amd64, modfetch_linux_arm64
- macOS: modfetch_darwin_amd64, modfetch_darwin_arm64
- Checksums: SHA256SUMS
v0.2.1
Highlights
TUI
- Ephemeral rows keyed by URL|dest to avoid collisions and enable precise clearing
- New shortcuts: D (delete staged data) and X (clear stuck row)
- Open/Reveal actions now execute synchronously to surface errors to the user
- Live speed/ETA for both chunked and single-stream fallbacks; smoother progress sampling
Downloader
- Treat HTTP 416 on resume-beyond-EOF as successful completion for single-stream fallback
- Safe finalize and verification polish for .safetensors
- Better error messages for missing auth tokens and 401s
Docs
- README and USER_GUIDE refreshed with simpler quickstart, TUI keymap, and resolver URL examples
- Sample config includes sane defaults; CivitAI model page URLs are supported and auto-resolved
Misc
- Metrics writes guarded when disabled
- General polish, better defaults, and resiliency improvements
Thanks to contributors and reviewers! 🎉
v0.2.0
v0.2.0: CivitAI model-aware default filenames, CLI wiring, docs, tests