VAPP-7: Per-device file browser tab #34
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/file-browser-tab-vapp-7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements VAPP-7: enables the Files tab on the device detail page (previously an inert
DisabledTab) as a live file browser. Reachable for online devices alongside the Terminal and Desktop tabs.How
The prior run parked this because it assumed a control-channel
getdirrelay and a cross-origin.ashxdownload path, neither of which existed. Both dependencies have since landed: VA-3 (agent Files tunnel mode) and VS-3 (server file-tunnel allocator) are resolved, and the relay rendezvous is usage-agnostic (verified in vervain-servermeshrelay.rs). So the Files tab rides the agent's Files tunnel (usage=4) exactly like Terminal (usage=1) and Desktop (usage=2): the newopen_files_tunnelserver fn reuses the sharedopen_relay_tunnel(device_id, usage)helper, the browser connects DIRECTLY to vervain-server's relay, and drives the agent'srun_filesprotocol over the rendezvous WebSocket. No control-channel relay and no streaming Axum proxy are needed.Protocol implemented exactly from
vervain-agent::host::tunnel::run_files:lsdirectory listing (name / type / size / mtime, folders first)mkdir,rename,rm(delete with a confirm dialog)download: streams to disk via the File System Access API (showSaveFilePicker+ a streamingWritableStream), writing one 16 KiB chunk at a time and acking per chunk for backpressure, so a >100 MB file is never held whole in memory. Browsers without the API fall back to a buffered Blob download. The File System Access calls go throughjs_sys::Reflect, so noweb_sys_unstable_apisbuild flag is required.upload: reads the local file slice-by-slice and is flow-controlled by the agent's per-chunkuploadack, with a progress indicator. Chunks are 0x00-escaped per the agent's JSON-disambiguation rule.UI
Breadcrumb + Up navigation, folders-first listing with size and modified columns, New folder / Upload toolbar actions, and per-row Download / Rename / Delete. Offline devices and tunnel-open rights errors surface via the routing-ack mapping and a
LoadErrorbanner; the tab is disabled when the device is offline.Acceptance criteria
Checks
just checkequivalents all green in therust-builder-glibc:v1.0.1-rust1.94image:cargo fmt --check,cargo clippy --all-targets --features server -- -D warnings,cargo clippy --target wasm32-unknown-unknown -- -D warnings,cargo check --features server,cargo check --target wasm32-unknown-unknown,cargo test --features server --bin vervain-app(15 passed).Manual verification pending
The tunnel protocol is implemented against the agent source byte-for-byte, but a live agent + relay round-trip (listing, >100 MB download, upload progress, mkdir/rename/delete) has not been exercised in this environment. The one runtime assumption worth confirming on a live device is that Dioxus signal writes from the WebSocket
onmessagecallback re-render the listing (standard Dioxus pattern, but untested here).