Repository navigation
feat(files): improve the Files panel with transfer cards and an upload picker - #19
Conversation
A remote download reported itself only in the Files panel's transfer strip: one narrow row at the bottom of the panel, with the file name and status on the same line. A long name ellipsized the percentage away, so the only visible sign of progress was a spinner, and the finished line was easy to miss. Closing the panel or switching it to another mode hid the transfer entirely. Put the transfer in a floating card in the window's bottom-right corner, where the update capsule already lives: - While a file or folder is coming down, the card shows its name, the percentage and bytes (or items, for a folder), and a bar. The card does not need the Files panel to be open and stays out of the right sidebar's way when it is. - On success the same card becomes the completion notice: a green check, the name, its size or item count, where it was saved, and two icon+text buttons that open the file/folder or the download folder. It stays for twelve seconds, pausing while the pointer is over it, while a menu is open, or while the app is unfocused; a close button dismisses it at once. - Failures appear in the same card without the open buttons. A cancel the user asked for does not raise a failure card. A live transfer outranks a finished notice when more than three cards compete for the corner. - Record each download's destination on its transfer. A single file's path is known when it is reserved; a folder's free name is only reserved after its walk, so it arrives with the result. The Files panel's strip stays as the compact history; the card is the visible progress and the actionable completion notice.
…indow corner The first cut left the Files panel's download row in place and shifted the new card left of the right sidebar. A download therefore showed two progress UIs at once, and the card covered the terminal area instead of the corner the user asked for. - Exclude downloads from the transfer strip. It keeps uploads, deletes and local copies; the card is now the only place a download reports progress, completion or failure. - Pin the card to the window's own bottom-right corner. It overlays the right sidebar when that is open, and no longer hides when the sidebar is hover-revealed. - Give a failed download a persistent card with a Retry button when its row kept a source and host. A failure that happened before the transfer started now gets a card too. A cancel the user asked for still raises nothing.
0410440 to
902445b
Compare
The card only registered its buttons as UI items, so a click on the name, progress bar, message or padding matched nothing and went to the file tree or terminal underneath. Clicking what looked like an inert card could select a file or open a preview in the panel behind it. - Register the card's whole surface as a hit target. It is pushed before the buttons, so the reverse-order hit test still gives the buttons priority. - Keep the arrow cursor over that surface; buttons still show a hand.
|
Follow-up from testing:
Latest code: macOS arm64 preview build (run 40484660145) succeeded, and manual testing passed for download/completion, folder download, cancel, failure/retry, and the click-through fix. |
Uploads reported themselves in the same narrow strip as downloads, so they had the same problems: a long name hid the percentage, and the finished "Uploaded" row was easy to miss. Give them the floating card too. - Generalise the transfer card to downloads and uploads. Running uploads show the name, percentage/bytes or items, a bar and Cancel; successful uploads show the size/item count, the remote folder, and Copy Path; failures persist with Retry when the row kept a source and host. - Remove downloads and uploads from the Files strip entirely. It keeps deletes and local copies; the cards are the only transfer UI. - Add an Upload button beside the Files filter, left of Refresh, using the same icon-button style and size. Its tooltip is "Upload Files/Folders"; Refresh now has "Refresh Directory Information". - Add a native path picker. macOS can select files and folders together in one NSOpenPanel; Windows and Linux native dialogs cannot, so the button offers an Upload Files… / Upload Folder… menu there. Selections upload to the selected directory, a selected file's parent, or the tree root, and the host is re-checked after the picker closes. - Multiple files and folders are supported; folder uploads keep the existing size confirmation.
…e header fixed
Three issues from testing the preview:
- A Finder drop started uploading before the card was visible: the card
hidden itself whenever the process-wide focus flag was false, and that
flag lags a drag from Finder. Keep running cards visible regardless of
focus; only completed notices wait to be looked at. Also focus the window
when it accepts a drop.
- The Upload button silently used the tree root unless a FILE was selected;
clicking a folder expanded it without selecting it. Select directories on
click too, and make the button ask first: a menu shows the destination
("Upload to /path…", or files/folder choices on platforms without a
combined picker) before opening the system picker.
- Scrolling the remote tree covered the header with its mask and repainted
only Filter and Refresh. Repaint the Upload button in the same pass.
|
Combined preview package for testing all open fork PRs:
This build also contains the three follow-up fixes: immediate running cards on Finder drops, an explicit upload-destination menu, and the upload button staying visible while the tree scrolls. |
|
Preview package 0.3.7-preview3 is built. It includes all six open fork PRs: #15, #16, #18, #19, #21, and the updated #22 (seven app icon themes: Capsules / Dawn / Ivory / Ligature / Nordic / Pure / Split). The old six-theme set from preview2 was replaced, not layered on top. macOS arm64 build: run 40668715087, success in 36m8s. Bundle version: |
Problem
The Files panel's transfer strip was the only place a remote download or upload reported itself: one narrow row at the bottom of the panel. A long file name ellipsized the percentage away, the finished "Saved to …" / "Uploaded" line was easy to miss, and closing the panel hid the transfer entirely. The panel also had no visible upload action, and its Refresh button had no hover label.
What changed
This PR is now the Files-panel improvement set: download cards, upload cards, an upload button with a native picker, and header tooltips.
Transfer cards
~/Downloads), Open File (or Open Folder) and Open Download Folder. Twelve-second auto-dismiss; hover, menus and app focus pause it; the close button dismisses at once.Upload button and picker
NSOpenPanelwith files and directories enabled together.Follow-up fixes from the first macOS preview
Testing
cargo check -p window -p wezterm-guicargo test -p wezterm-gui(1307 passed, 1 ignored)cargo test -p thinkterm-i18n(6 passed)0.3.7-preview3: run 40668715087, success. The bundle'sCFBundleShortVersionStringis0.3.7-preview3.Notes