feat(tui): surface the failure reason on failed downloads
Carry a human-readable reason on DownloadStatus::Failed so it flows through the existing status channel to the TUI. The download Info pane now shows an Error line for a failed download (connect failure, peer disconnect, truncated transfer, peer-reported upload failure, or the underlying transfer error). Failures without a known reason render as before.
This commit is contained in:
@@ -54,7 +54,7 @@ pub fn render_downloads_pane(
|
||||
DownloadStatus::InProgress { .. } => ("⧗", warning_style()),
|
||||
DownloadStatus::Paused { .. } => ("⏸", info_style()),
|
||||
DownloadStatus::Completed => ("✓", success_style()),
|
||||
DownloadStatus::Failed => ("✗", error_style()),
|
||||
DownloadStatus::Failed(_) => ("✗", error_style()),
|
||||
DownloadStatus::TimedOut => ("⏱", error_style()),
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ pub fn render_downloads_pane(
|
||||
)
|
||||
}
|
||||
DownloadStatus::Completed => "Completed".to_string(),
|
||||
DownloadStatus::Failed => "Failed".to_string(),
|
||||
DownloadStatus::Failed(_) => "Failed".to_string(),
|
||||
DownloadStatus::TimedOut => "Timed out".to_string(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user