fix(tui): make browse retry work and de-jargon the copy

- Retry actually retries: 'r' in the browse popup re-requests a
  timed-out user (previously the 'Press b to retry' hint did nothing —
  b wasn't handled inside the popup). BrowseTabs::retry_active is
  unit-tested.
- Friendlier timeout copy that explains the likely cause: "Couldn't
  reach <user>. They may be offline, or their connection can't be
  reached (both of you may be behind a router/firewall). Press r to try
  again."
- Replace protocol terminology in user-facing labels: 'Peer slots' ->
  'Free slots', 'Peer upload speed' -> 'Upload speed'.
This commit is contained in:
michel
2026-07-19 20:49:32 +02:00
parent 1b62d218dd
commit e59c2bc199
4 changed files with 50 additions and 6 deletions
+12 -4
View File
@@ -90,10 +90,18 @@ fn render_browse_one(
frame.render_widget(Paragraph::new(text).block(block), area);
}
BrowseStatus::TimedOut => {
let text = Line::styled(
"Timed out waiting for the file list. Press b to retry.",
error_style(),
);
let text = vec![
Line::styled(
format!("Couldn't reach {}.", browse.username),
error_style(),
),
Line::raw(""),
Line::raw(
"They may be offline, or their connection can't be \
reached (both of you may be behind a router/firewall).",
),
Line::raw("Press r to try again."),
];
frame.render_widget(Paragraph::new(text).block(block), area);
}
BrowseStatus::Loaded => {