feat: add built-in file editor with syntax highlighting #79

Merged
naomi merged 6 commits from feat/editor into main 2026-01-28 18:20:02 -08:00
Owner

Summary

  • Add CodeMirror 6 editor with syntax highlighting for 40+ languages
  • Add file browser sidebar with collapsible directory tree navigation
  • Add multi-tab support with dirty state indicators and close buttons
  • Add keyboard shortcuts (Ctrl+E toggle, Ctrl+B file browser, Ctrl+S save, Ctrl+W close tab)
  • Add editor toggle button to status bar (disabled when not connected)
  • Editor automatically uses current session's working directory
  • Add Tauri backend commands for file operations (list_directory, read_file_content, write_file_content)

Test Plan

  • Connect to a session and verify the editor toggle button becomes enabled
  • Press Ctrl+E to open the editor and verify file tree shows the session's CWD
  • Navigate directories and open files to verify syntax highlighting works
  • Edit a file and verify the dirty indicator (*) appears
  • Save with Ctrl+S and verify the dirty indicator disappears
  • Open multiple files and verify tab switching works
  • Close tabs with Ctrl+W or the X button
  • Disconnect and verify the editor automatically closes
  • Verify keyboard shortcuts are documented in the shortcuts modal

Closes #72

This PR was created with help from Hikari~ 🌸

## Summary - Add CodeMirror 6 editor with syntax highlighting for 40+ languages - Add file browser sidebar with collapsible directory tree navigation - Add multi-tab support with dirty state indicators and close buttons - Add keyboard shortcuts (Ctrl+E toggle, Ctrl+B file browser, Ctrl+S save, Ctrl+W close tab) - Add editor toggle button to status bar (disabled when not connected) - Editor automatically uses current session's working directory - Add Tauri backend commands for file operations (list_directory, read_file_content, write_file_content) ## Test Plan - [ ] Connect to a session and verify the editor toggle button becomes enabled - [ ] Press Ctrl+E to open the editor and verify file tree shows the session's CWD - [ ] Navigate directories and open files to verify syntax highlighting works - [ ] Edit a file and verify the dirty indicator (*) appears - [ ] Save with Ctrl+S and verify the dirty indicator disappears - [ ] Open multiple files and verify tab switching works - [ ] Close tabs with Ctrl+W or the X button - [ ] Disconnect and verify the editor automatically closes - [ ] Verify keyboard shortcuts are documented in the shortcuts modal Closes #72 ✨ This PR was created with help from Hikari~ 🌸
hikari added 1 commit 2026-01-28 16:14:23 -08:00
feat: add built-in file editor with syntax highlighting
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 58s
CI / Lint & Test (pull_request) Successful in 16m9s
CI / Build Linux (pull_request) Successful in 21m21s
CI / Build Windows (cross-compile) (pull_request) Successful in 34m43s
392243f54f
- Add CodeMirror 6 editor with support for 40+ languages
- Add file browser sidebar with directory tree navigation
- Add multi-tab support with dirty state indicators
- Add keyboard shortcuts (Ctrl+E, Ctrl+B, Ctrl+S, Ctrl+W)
- Add editor toggle button to status bar
- Editor uses current session's CWD and requires connection
- Add Tauri commands for file operations (list, read, write)
naomi added 1 commit 2026-01-28 16:23:47 -08:00
feat: add create and delete file/folder functionality to editor
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m33s
CI / Lint & Test (pull_request) Successful in 17m8s
CI / Build Linux (pull_request) Successful in 20m45s
CI / Build Windows (cross-compile) (pull_request) Successful in 35m50s
d6d43a8abe
- Add Tauri backend commands: create_file, create_directory, delete_file, delete_directory
- Add editor store functions for create/delete with auto-refresh
- Add FileContextMenu component with right-click support
- Add InputDialog component for file/folder name input
- Add ConfirmDialog component for delete confirmation
- Add Ctrl+N keyboard shortcut for new file
- Update keyboard shortcuts modal with new shortcuts
- Auto-close tabs when their files are deleted
- Auto-refresh file tree after create/delete operations
naomi added 1 commit 2026-01-28 16:33:48 -08:00
feat: add theme support for code editor
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m55s
CI / Lint & Test (pull_request) Successful in 19m56s
CI / Build Linux (pull_request) Successful in 23m23s
CI / Build Windows (cross-compile) (pull_request) Successful in 35m20s
abacb0131f
- Add light theme with GitHub-inspired colors
- Add high contrast theme with VS Code high contrast colors
- Dynamically switch themes when user changes app theme
- Use CodeMirror Compartment for efficient theme reconfiguration
- Support dark, light, high-contrast, and custom (uses dark) themes
naomi added 1 commit 2026-01-28 16:49:36 -08:00
feat: add rename functionality to file editor
CI / Lint & Test (pull_request) Failing after 6m40s
CI / Build Linux (pull_request) Has been skipped
CI / Build Windows (cross-compile) (pull_request) Has been skipped
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m23s
505e24cbd2
Add ability to rename files and folders through the context menu:
- Add rename_path Tauri command in backend
- Add renamePath function to editor store that updates open tabs
- Add rename option to context menu with pencil icon
- Update InputDialog to support initial value for rename operations
naomi added 1 commit 2026-01-28 16:54:59 -08:00
feat: add theme support to editor dialogs and context menu
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m22s
CI / Lint & Test (pull_request) Successful in 23m1s
CI / Build Linux (pull_request) Successful in 21m11s
CI / Build Windows (cross-compile) (pull_request) Successful in 34m46s
38b591a084
Update ConfirmDialog, InputDialog, and FileContextMenu to use CSS
variables instead of hardcoded Tailwind colors, so they respect the
user's theme selection (dark/light/high-contrast).
naomi added 1 commit 2026-01-28 17:25:34 -08:00
feat: add custom context menus for editor and chat input
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m41s
CI / Lint & Test (pull_request) Successful in 17m53s
CI / Build Linux (pull_request) Successful in 24m31s
CI / Build Windows (cross-compile) (pull_request) Successful in 32m54s
f889002266
- Add EditorContextMenu for code editor with clipboard operations
  (Undo, Redo, Cut, Copy, Paste, Select All)
- Add TextInputContextMenu for chat input textarea
- Add global context menu prevention to disable default webview menu
- Add viewport boundary detection to keep menus within window bounds
- Install @codemirror/commands for undo/redo functionality
naomi merged commit e45a1a1c98 into main 2026-01-28 18:20:02 -08:00
naomi deleted branch feat/editor 2026-01-28 18:20:02 -08:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#79