fix(api): make download_logs limit optional with sensible default
Merged
MP
6mo ago+109+109+012345678901234567890123456789-9-9-0123456789
Summary
• download_logs IPC required limit on every call, breaking QA tooling (tauri-pilot, debug scripts, future headless adapters)
• Made limit optional with default 256 bytes (matches per-download log buffer capacity)
• Frontend always passed limit: 20, so contract was undocumented—now explicit with tests
• 2 tests lock down: default returns full 256-line buffer, explicit smaller limit trims correctly
Type
fix
Summary by cubic
Make download_logs accept an optional limit with a safe default so QA and headless clients work without extra args. Default is 256 lines, kept in sync with the per-download buffer via a shared constant; explicit limits still trim to the most recent lines.
- Bug Fixes
- IPC
limitis nowOption<usize>withDEFAULT_DOWNLOAD_LOG_LIMIT = 256(aliased to sharedDEFAULT_MAX_ENTRIES_PER_DOWNLOADused inlib.rsto prevent drift). - Fixes errors when clients call without
limit(e.g.,tauri-pilot; vortex-qa BUG #2). - Added
resolve_download_log_limit()and tests: default returns full buffer, explicit limit trims, resolver defaults whenNone, end-to-endNonesurfaces all lines. - Frontend unchanged;
LogsSection.tsxstill passeslimit: 20.
- IPC
Summary by CodeRabbit
-
New Features
- Added a skip link to improve keyboard navigation accessibility.
-
Bug Fixes
- Report-broken-plugin flow now handles missing repository info and shows clearer validation messages.
- Statistics KPIs no longer show zeroed values after downloads complete.
- Download logs endpoint accepts an optional limit and uses a sensible default when omitted.
-
Documentation
- Updated CHANGELOG to reflect behavior changes.