Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
fix(ux): surface visible error notifications for addon and download resolution failures
Samir Hossainsd12f956065f7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 972287a..461561c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,7 +4,7 @@### Added- **Comprehensive QA & Regression Test Architecture**:- - Introduced a 52-test automated suite covering critical algorithmic boundaries, mouse interactions, modal dismissals, TUI rendering across terminal size matrices, state reconciliation, crypto HMAC signing, download chunk arithmetic, and URL/stem security.+ - Introduced a 53-test automated suite covering critical algorithmic boundaries, 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/` (`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/`).- Added [`docs/testing.md`](docs/testing.md) detailing test architecture, command references, and manual QA procedures.- **Playback Tracking & Watch History Progress**:diff --git a/src/tui/app/addons.rs b/src/tui/app/addons.rsindex 5b4152a..665b101 100644--- a/src/tui/app/addons.rs+++ b/src/tui/app/addons.rs@@ -90,7 +90,9 @@ impl App {}Err(err) => {sender- .send(Action::SetStatus(format!("Addon install failed: {err}")))+ .send(Action::SetStatus(format!(+ "Error: Addon install failed: {err}"+ ))).ok();}}diff --git a/src/tui/app/download.rs b/src/tui/app/download.rsindex 4b46638..0022dd8 100644--- a/src/tui/app/download.rs+++ b/src/tui/app/download.rs@@ -344,7 +344,9 @@ impl App {Err(error) => {log::error!("stream resolve failed: {error}");sender- .send(Action::SetStatus(format!("Resolve failed: {error}")))+ .send(Action::SetStatus(format!(+ "Error: Resolve failed: {error}"+ ))).ok();}}diff --git a/tests/addons_manifest.rs b/tests/addons_manifest.rsindex 6994724..823fef2 100644--- a/tests/addons_manifest.rs+++ b/tests/addons_manifest.rs@@ -426,3 +426,26 @@ fn test_installed_addon_cinemeta_protection() {};assert!(!community_addon.is_core());}++#[tokio::test]+async fn test_invalid_addon_manifest_url_shows_actionable_error_and_preserves_state() {+ let client = moviebox_tui::providers::addons::client::AddonClient::new();+ let err = client+ .fetch_manifest("https://invalid-nonexistent-domain.test/manifest.json")+ .await+ .unwrap_err();+ assert!(err.contains("Failed to reach manifest") || err.contains("Manifest returned HTTP"));++ let mut app = moviebox_tui::tui::app::App::new();+ let initial_addons_count = app.state().installed_addons.len();++ app.handle_action(moviebox_tui::tui::action::Action::SetStatus(format!(+ "Error: Addon install failed: {err}"+ )))+ .await;++ assert!(!app.state().notifications.is_empty());+ let notif = app.state().notifications.back().unwrap();+ assert_eq!(notif.kind, moviebox_tui::models::NotificationKind::Error);+ assert_eq!(app.state().installed_addons.len(), initial_addons_count);+}