Files tab: browser with breadcrumbs/sort/filter, text editor, image preview, streamed upload with progress, download, mkdir/touch/rename/move/chmod/delete, open-in-terminal; root toggle via sudo-reexecuted 'hamlab fs' helper

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-18 05:39:57 -07:00
co-authored by Claude Fable 5.1
parent 38d4ee09ae
commit 63b020d556
9 changed files with 1094 additions and 9 deletions
+12 -1
View File
@@ -182,7 +182,18 @@ something long in one, switch away and back, refresh — it's all still there.
MVP URL space so `host` can be inserted later without breaking clients.
- **Auth hardening** — WebAuthn passkeys (phone Face ID), TOTP fallback, session
list + revoke, optional NPM access list restricting to WireGuard/LAN.
- **Files** — browse/upload/download/edit under `/`, with a sudo toggle.
- **Files tab** — **shipped 2026-09-18** (`internal/files`, `Files.tsx`): browse from
`/` with breadcrumbs, an editable path box, sort, hidden-file toggle and a filter;
rows show type icon, size, modified, perms and owner, link targets and broken links.
Text files (≤ 2 MiB, sniffed) open in an editor with Ctrl+S / Save; images preview;
everything else downloads. Upload via drag-and-drop or picker with per-file progress
(streamed, no size limit). New folder / file, rename, move, chmod, copy path, delete
(folders need the name typed back), and "open in terminal", which `cd`s the active
shell (or a fresh one) to the folder. **Sudo toggle**: root access re-executes the
same binary as `hamlab fs <op>` under `sudo -n`, streaming bodies over stdin/stdout,
so both modes share one implementation and one set of rules (absolute paths only;
`/`, `/etc`, `/usr`, … are never deleted or moved whole). Every write is logged with
the caller's IP.
- **Docker read-only view** — `docker ps`/logs; dockhand stays the source of truth.
- **Notifications** — push on service failure / SMART warning / UPS event.
- **Terminal extras** — search, copy-mode, font/theme, split panes, upload via