Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

docs: update changelog, testing architecture, and known issues

Samir Hossainsc9ab5bf2e788
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4fc1772..3896e14 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@
## [Unreleased]
### Added
+- **Update System Concurrency & Platform Compatibility Architecture**:
+ - Added single-flight guard (`is_checking_updates`) ensuring manual (`/update`) and automatic startup checks never spawn duplicate concurrent network requests.
+ - Added shared geometry calculation (`UpdateModalLayout`, `update_modal_layout`) guaranteeing 1:1 synchronization between popup rendering and mouse hit testing.
+ - Added release asset data modeling (`Release`, `ReleaseAsset`, `TargetPlatform`) with deterministic platform compatibility detection across macOS Universal, Linux x64/arm64, Windows x64/arm64, and Android Termux ARM64.
+ - Added dedicated integration test suite `tests/update_lifecycle.rs` testing update single-flighting, error recovery, mouse hit testing, and asset filtering.
- **Comprehensive QA & Regression Test Architecture**:
- Introduced an 83-test automated suite covering critical algorithmic boundaries, end-to-end user journeys, watch history reconciliation & precision progress tracking, content & metadata loading pipelines, stale request isolation, active player session lifecycle & duplicate launch protection, dynamic slash command autocomplete (`/download-dir reset`), search/command draft cancellation via `Esc`, error handling, addon manifest validation, mouse interactions, modal dismissals, TUI rendering across terminal size matrices, state reconciliation, crypto HMAC signing, download chunk arithmetic, and URL/stem security.
- Added structured integration tests in `tests/` (`content_pipeline.rs`, `error_handling.rs`, `tui_acceptance.rs`, `history_reconciliation.rs`, `cache_lifecycle.rs`, `player_integration.rs`, `m3u_integration.rs`, `addons_manifest.rs`, `download_integration.rs`, `url_security.rs`) and test fixtures (`tests/fixtures/`).
diff --git a/docs/known-issues.md b/docs/known-issues.md
index a80f83f..60594db 100644
--- a/docs/known-issues.md
+++ b/docs/known-issues.md
@@ -26,6 +26,6 @@ Tracked here so future work and issue reports reference the same facts.
## Verification
-- Automated testing is enforced via `cargo test --locked` covering 87 unit and integration tests across 12 test suites (see [`docs/testing.md`](testing.md)).
+- Automated testing is enforced via `cargo test --locked` covering 98 unit and integration tests across 13 test suites (see [`docs/testing.md`](testing.md)).
- Static correctness is enforced by strict compiler type checking, the lint gate (`cargo clippy --all-targets --all-features -- -D warnings`), formatting (`cargo fmt --check`), dependency vulnerability scanning (`cargo audit`), and packaging verification (`cargo package --locked`).
- Runtime and platform-specific behavior (terminal resize, focus handling, external player launch, and Termux chooser) are verified through the release checklist in [`release-checklist.md`](release-checklist.md).
diff --git a/docs/testing.md b/docs/testing.md
index ab3ac5a..c9fde54 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -28,6 +28,7 @@ MovieBox-TUI/
├── error_handling.rs # Failure state cleanup, error toasts, and recovery
├── content_pipeline.rs # Content/metadata pipeline, stale request isolation, & cache keys
├── tui_acceptance.rs # Headless TUI rendering, theme rendering, and resize matrix
+ ├── update_lifecycle.rs # Update single-flight checks, modal hitboxes, & platform assets
└── addons_manifest.rs # Addon manifest deserialization & catalog checks
```
@@ -36,10 +37,12 @@ Inline unit tests live inside `#[cfg(test)] mod tests` blocks within their respe
- Title normalization (`clean_moviebox_title`)
- HMAC-MD5 cryptographic signing and token generation (`generate_x_client_token`, `generate_x_tr_signature`)
- Segment partitioning math and byte range calculations
-- Internal helper logic and parsing functions
+- Internal helper logic, parsing functions, and release asset matching
+- Update modal layout geometry calculations and semver comparisons
### B. Subsystem Integration Tests (`tests/*.rs`)
Integration tests live in the `tests/` directory and test externally observable behaviors without mocking internal types:
+- **`update_lifecycle.rs`**: Validates update single-flight concurrency barriers, error recovery on network failure, 1:1 mouse hit-test synchronization with rendered popup geometry, and deterministic platform asset filtering.
- **`content_pipeline.rs`**: Validates search result identity, ambiguous title isolation, stale metadata response protection (`request_id` validation), cache key dimensional isolation, addon metadata mapping & partial degradation, search failure vs empty result status distinction, and mode-switch stale response isolation.
- **`error_handling.rs`**: Validates active player session lifecycle, playback debounce guards, search failure cleanup, addon manifest error toasts, stream and download resolution failure notifications, malformed M3U recovery, and URL scheme rejection.
- **`tui_acceptance.rs`**: Validates headless TUI rendering, all theme palettes, end-to-end user journeys (search, details, navigation, mode switching), mouse click and scroll interactions, modal dismissals, and terminal resize matrices across 8 standard and boundary dimensions without panics.