fix(peer): serve full browse listings + harden the listener; TUI transfer/UX work

Peer layer:
- Stream peer messages with a partial-write queue instead of write_all, so a
  large SharedFileListResponse over the non-blocking socket is no longer
  truncated (third-party clients like SoulseekQt can now browse our shares).
- Bound the peer-init handshake with a read timeout and handle each accepted
  connection on its own thread, so one stalled peer can't wedge the listener.
- e2e: third-party direct/brokered/large-share browse + stalled-peer coverage.

TUI:
- Uploads share the downloads table columns (real Speed) and the info pane now
  renders details for a selected upload.
- Download progress bar counts only in-progress transfers and hides when idle.
- Always-visible unread badge (private messages + rooms) in the shortcuts bar,
  self-drawn blink so it works under tmux.
- Persist the unread private-message count across restarts.
This commit is contained in:
Michel de Graaf
2026-07-24 21:18:20 +02:00
parent 105c798855
commit be5dc6c064
24 changed files with 1503 additions and 159 deletions
+9 -2
View File
@@ -138,10 +138,17 @@ pub fn render_downloads_pane(
percent
)
}
UploadStatus::Completed => format_bytes(upload.size),
UploadStatus::Completed => "Completed".to_string(),
UploadStatus::Cancelled => "Cancelled".to_string(),
UploadStatus::Failed(_) => "Failed".to_string(),
};
// Same rule as a download: a rate only while the transfer is running.
let speed_text = match &upload.status {
UploadStatus::InProgress => {
format_speed(upload.speed_bytes_per_sec)
}
_ => "-".to_string(),
};
let basename = upload
.filename
.rsplit(['\\', '/'])
@@ -152,7 +159,7 @@ pub fn render_downloads_pane(
Cell::from(basename.to_string()).style(body_style()),
Cell::from(upload.username.clone()).style(info_style()),
Cell::from(progress_text).style(primary_style()),
Cell::from(String::new()),
Cell::from(speed_text).style(warning_style()),
])
}));