feat(tui): hierarchical browse tree with file/folder downloads

Wire browsing a user's shared files into the TUI as a modal tree popup:
- press 'b' on a highlighted search result to browse that result's owner, or
  'b' elsewhere to type a username (new CommandBarMode::Browse);
- a new models/browse.rs synthesizes the flat SharedDirectory list into a
  nested, collapsible tree (intermediate folders reconstructed from the
  backslash paths; file download paths kept byte-exact from the original names),
  with expand/collapse state and a flatten-to-rows renderer — fully unit-tested;
- the popup polls take_browse_result each tick (with a timeout), navigates with
  arrows/hjkl, expands/collapses folders, and queues downloads: Enter on a file,
  'd' on a file or an entire folder subtree (recursively) — all funneled into
  the existing Downloads pane;
- shortcuts bar advertises browse keys and surfaces our own sharing status.
This commit is contained in:
michel
2026-07-19 19:27:05 +02:00
parent 95bd6359c1
commit aa8f4182d3
6 changed files with 808 additions and 10 deletions
+2
View File
@@ -1,8 +1,10 @@
mod app_state;
mod browse;
mod file_display_data;
pub use app_state::{
AppState, ChatMessage, CommandBarMode, DownloadEntry, FocusedPane,
MessageDirection, SearchEntry, SearchStatus,
};
pub use browse::{BrowseState, BrowseStatus, files_under, find_node};
pub use file_display_data::FileDisplayData;