Port hero_drive to editor and viewer archipelagos #23

Merged
timur merged 6 commits from development_hero_drive into development 2026-02-23 23:17:55 +00:00
Owner

Port the hero_drive filemanager UI into two separate islands in hero_archipelagos: an editor for file modification and a viewer for read-only file display.

Changes

Editor Archipelago

  • Existing implementation with edit and split views
  • Markdown preview with inline formatting
  • Syntax highlighting for Rust, JS, Python, JSON, etc.
  • Autosave functionality
  • 12 unit tests passing

Viewer Archipelago

  • archipelagos/viewer/viewer/ - New crate structure
  • services/mod.rs - FileType detection, ViewerState, FileService wrapper
  • views/image_view.rs - Image viewer with zoom/rotate controls
  • views/pdf_view.rs - PDF viewer via browser iframe
  • views/markdown_view.rs - Markdown → HTML renderer (read-only)
  • views/text_view.rs - Code viewer with syntax highlighting
  • views/viewer_view.rs - Default/empty state view
  • 15 unit tests for FileType, ViewerState, and metadata

Workspace

  • Added viewer to Cargo.toml workspace members
  • Added viewer to server/Cargo.toml dependencies

Testing

  • Editor: 12 tests pass (cargo test --package hero_archipelagos_editor)
  • Viewer: 15 tests pass (cargo test --package hero_archipelagos_viewer)
  • Both packages compile clean

Closes #22

Port the hero_drive filemanager UI into two separate islands in hero_archipelagos: an editor for file modification and a viewer for read-only file display. ## Changes **Editor Archipelago** - Existing implementation with edit and split views - Markdown preview with inline formatting - Syntax highlighting for Rust, JS, Python, JSON, etc. - Autosave functionality - 12 unit tests passing **Viewer Archipelago** - `archipelagos/viewer/viewer/` - New crate structure - `services/mod.rs` - FileType detection, ViewerState, FileService wrapper - `views/image_view.rs` - Image viewer with zoom/rotate controls - `views/pdf_view.rs` - PDF viewer via browser iframe - `views/markdown_view.rs` - Markdown → HTML renderer (read-only) - `views/text_view.rs` - Code viewer with syntax highlighting - `views/viewer_view.rs` - Default/empty state view - 15 unit tests for FileType, ViewerState, and metadata **Workspace** - Added viewer to Cargo.toml workspace members - Added viewer to server/Cargo.toml dependencies ## Testing - Editor: 12 tests pass (`cargo test --package hero_archipelagos_editor`) - Viewer: 15 tests pass (`cargo test --package hero_archipelagos_viewer`) - Both packages compile clean Closes #22
- Introduce `hero_archipelagos_editor` crate
- Implement editor UI components and views
- Add file service and state management
- Integrate Editor Island into desktop app
- Update default API host to 3377
feat(viewer): add viewer archipelago for file viewing
Some checks failed
Build and Test / build (pull_request) Failing after 2m50s
068ea6acd0
- Create viewer archipelago with 5 view types:
  - Image viewer with zoom/rotation controls
  - PDF viewer using native browser iframe
  - Markdown viewer with HTML rendering
  - Text viewer with syntax highlighting
  - Default viewer for unknown files

- Add FileType detection for 30+ file extensions
- Add ViewerState for tracking file content
- Add FileService wrapper for WebDAV operations
- Register in workspace and server Cargo.toml

Tests:
- 15 unit tests for viewer (FileType, ViewerState, FileService, metadata)
- 12 unit tests for editor (existing, all passing)
fix: remove file_exists method (not available in herofossil_webdav_client)
Some checks failed
Build and Test / build (pull_request) Failing after 2m56s
770ae971c1
feat: Add Editor and Viewer archipelagos to registry
Some checks failed
Build and Test / build (pull_request) Failing after 2m50s
66ead5b67a
- Implement Archipelago trait for EditorArchipelago and ViewerArchipelago
- Export archipelago types from lib.rs files
- Add Editor and Viewer to server registry
- Add WASM paths for editor and viewer islands
- Fix syntax error in viewer island tests
fix: use hero_proxy port 8080 for editor and viewer WebDAV URLs
Some checks failed
Build and Test / build (pull_request) Failing after 2m54s
a660df3fbe
- Changed webdav_url default from port 3387 to 8080 in:
  - editor/Cargo.toml metadata
  - viewer/Cargo.toml metadata
  - island_content.rs generated code
- Updated documentation comments in island.rs files
- Updated test URLs in services/mod.rs

This ensures editor and viewer islands work correctly with hero_proxy
routing to hero_fossil on Unix socket.
Merge remote-tracking branch 'origin/development' into development_hero_drive
Some checks failed
Build and Test / build (pull_request) Failing after 7s
1df4b8fb0b
mik-tf changed title from WIP: Port hero_drive to editor and viewer archipelagos to Port hero_drive to editor and viewer archipelagos 2026-02-23 23:14:17 +00:00
timur merged commit 0ebd19a88e into development 2026-02-23 23:17:55 +00:00
timur deleted branch development_hero_drive 2026-02-23 23:17:55 +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_archipelagos!23
No description provided.