Complete remaining features (issue #6) #7

Merged
mik-tf merged 7 commits from development into main 2026-02-25 17:15:10 +00:00
Owner

Summary

All remaining features from issue #6 implemented across 7 phases:

  • Phase 1: Foundation fixes — modified_at date parsing, conditional WebDAV startup (--webdav-url), Unix socket proxy (--bind), hero_zero service template, README
  • Phase 2: JWT auth middleware — HS256 validation at proxy layer, scope enforcement (read/write/admin), UI auth token support
  • Phase 3: Zip download (GET /api/download-zip) + folder upload via webkitdirectory
  • Phase 4: HeroIndex search integration — tries heroindex Unix socket first, falls back to WebDAV tree-walk
  • Phase 5: Audit log — in-memory ring buffer (1000 entries) with optional heroindex persistence, GET /api/audit endpoint
  • Phase 6: Viewer enhancements — image fullscreen overlay, PDF page controls, markdown tables/lists/blockquotes
  • Phase 7: UI polish — skeleton loaders, file templates in NewFileDialog, toast auto-dismiss (4s/8s), MoveToDialog folder picker

Architecture

Dual-mode: standalone (embedded hero_fossil on 3387 + OServer on 3394) and ecosystem (external WebDAV, Unix socket bind, JWT auth via HERO_SECRET).

Test plan

  • make test-all passes locally (20 tests: fmt, clippy, unit, smoke, Playwright E2E)
  • CI passes on push and PR workflows
## Summary All remaining features from issue #6 implemented across 7 phases: - **Phase 1**: Foundation fixes — modified_at date parsing, conditional WebDAV startup (`--webdav-url`), Unix socket proxy (`--bind`), hero_zero service template, README - **Phase 2**: JWT auth middleware — HS256 validation at proxy layer, scope enforcement (read/write/admin), UI auth token support - **Phase 3**: Zip download (`GET /api/download-zip`) + folder upload via `webkitdirectory` - **Phase 4**: HeroIndex search integration — tries heroindex Unix socket first, falls back to WebDAV tree-walk - **Phase 5**: Audit log — in-memory ring buffer (1000 entries) with optional heroindex persistence, `GET /api/audit` endpoint - **Phase 6**: Viewer enhancements — image fullscreen overlay, PDF page controls, markdown tables/lists/blockquotes - **Phase 7**: UI polish — skeleton loaders, file templates in NewFileDialog, toast auto-dismiss (4s/8s), MoveToDialog folder picker ## Architecture Dual-mode: standalone (embedded hero_fossil on 3387 + OServer on 3394) and ecosystem (external WebDAV, Unix socket bind, JWT auth via HERO_SECRET). ## Test plan - [x] `make test-all` passes locally (20 tests: fmt, clippy, unit, smoke, Playwright E2E) - [x] CI passes on push and PR workflows
- Parse D:getlastmodified from PROPFIND responses into OTime via from_components
- Conditional embedded hero_fossil: skip when WEBDAV_URL is already set
- Add --bind flag (HERO_DRIVE_BIND env) for Unix socket proxy support
- Add hero_zero service TOML (services/hero_drive.toml)
- Update README with dual-mode architecture docs and env vars table
- Enable clap env feature for env-based CLI args
- Add auth.rs with validate_jwt(), required_scope(), scope_includes()
- Proxy handler enforces JWT when HERO_SECRET env is set
- Read-only methods require 'read' scope, mutations require 'write', OSIS admin requires 'admin'
- ApiClient gains with_auth() and client_for() for token injection
- 6 unit tests for JWT validation, scope hierarchy, method classification
- Auth is optional: standalone mode (no HERO_SECRET) passes all requests through
feat: zip download endpoint, folder upload via webkitdirectory
Some checks failed
Build and Test / test (push) Failing after 1m5s
Build and Test / test (pull_request) Failing after 1m5s
d420971822
- Add /api/download-zip?paths=a,b,c endpoint on axum proxy
- Zip handler fetches from WebDAV, assembles deflated zip, streams response
- Toolbar download button detects multi-select/directories and uses zip
- Upload dialog gains "Upload Folder" button using JS webkitdirectory
- Folder upload preserves directory structure via webkitRelativePath
Image viewer: fullscreen overlay with escape key, prev/next navigation.
PDF viewer: page controls with #page=N URL fragment.
Markdown editor: ordered lists, tables, blockquotes, horizontal rules.
Also fix clippy warnings in auth/proxy/zip modules.
Loading state shows skeleton rows with pulse animation instead of text.
NewFileDialog has template buttons (Markdown, README, Text, JSON, TOML)
that pre-fill filename and content. Toasts auto-dismiss after 4s (success)
or 8s (errors) with guard against dismissing newer toasts. MoveToDialog
shows clickable folder list loaded from root directory.
feat: heroindex search integration, audit log with in-memory fallback
All checks were successful
Build and Test / test (pull_request) Successful in 3m0s
Build and Test / test (push) Successful in 3m31s
7704d16039
Search: tries heroindex (Unix socket JSON-RPC at ~/hero/var/socket_heroindex)
first, falls back to WebDAV tree-walk when socket doesn't exist. No new
crate dependencies — uses tokio UnixStream + serde_json directly.

Audit: in-memory ring buffer (1000 entries) with optional heroindex persistence.
OnceLock singleton accessed from RPC methods. GET /api/audit?limit=100 endpoint
on the axum proxy returns JSON array of recent entries.

Mutating RPC methods (create_folder, rename, move, copy, delete, trash, restore)
now log to audit service and fire-and-forget index updates.
mik-tf changed title from WIP: Complete remaining features (issue #6) to Complete remaining features (issue #6) 2026-02-25 16:02:03 +00:00
feat: date range search filter, ETag conflict detection, permission-aware UI
All checks were successful
Build and Test / test (pull_request) Successful in 3m6s
Build and Test / test (push) Successful in 3m36s
665ad044d4
- Add modified date range filter (from/to) to advanced search UI
- Add ETag-based version conflict detection in markdown editor
- Add permission-aware UI: disable/hide write actions when user lacks scope
- Always run axum proxy in front of OServer for /api/audit and /api/download-zip
- Add smoke tests for audit and zip endpoints
- Add Playwright E2E tests for date filter, skeleton loaders, toasts, templates
mik-tf merged commit e90146fc92 into main 2026-02-25 17:15:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_drive!7
No description provided.