- Check result.success property instead of undefined
- Add fallback to writeSftpBinary if progress API fails
- Improve code clarity by checking method existence upfront
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Extract shared upload logic into handleUploadExternalFilesForSide helper
- Simplify SFTP upload fallback logic for better readability
- Remove code duplication between left and right upload handlers
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Add uploadExternalFiles method to useSftpState for handling OS file drops
- Detect external file drag events in SftpView (e.dataTransfer.types includes 'Files')
- Handle external file drops separately from internal pane-to-pane transfers
- Upload dropped files to local or remote filesystems using existing backend methods
- Display success/error toasts for upload operations
- Support drag-and-drop to any active pane/tab
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Remove unused 'currentTheme' translation keys from English and Chinese
- Add role="dialog", aria-modal="true", aria-labelledby to ThemeSelectModal
- Add aria-label for close button accessibility
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Create new ThemeSelectModal component for theme selection
- Replace inline theme grid with a preview button that opens modal
- Group themes by type (dark/light) in modal
- Add i18n translations for modal (English and Chinese)
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Create dedicated Netcatty temp directory in system temp folder
- Add tempDirBridge for temp directory management
- Add System tab in Settings with temp dir info and cleanup
- Register temp files for cleanup when SFTP session closes
- Add i18n translations for System settings (en/zh-CN)
- Update agents.md with temp file guidelines
Add detailed console logging throughout the file open/watch flow:
- Log file download details (sftpId, paths, temp path)
- Log app launch command and platform
- Log file watch start/stop events
- Log auto-sync check status
- Add error handling for app spawn failures
This will help diagnose issues with third-party apps not triggering
file sync on Windows and other platforms.
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Fix built-in editor Ctrl+S stale closure bug that caused saving the
initial content instead of the current content
- Use a ref to always capture the latest handleSave function
- Improve file watcher to handle both 'change' and 'rename' events
(some editors use atomic writes which trigger 'rename' instead)
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Change fs.watch to use persistent: true for more reliable file watching
- Store webContents reference in watchInfo for later use
- Add debug logging for file system events
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
Use Electron's Notification API to show macOS/Windows/Linux system
notifications when files are synced to or fail to sync to remote.
These notifications are visible even when the app is not focused.
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
Address code review comments:
- Use crypto.randomUUID() instead of Math.random() for watchId generation
- Add file size checking in addition to mtime to prevent spurious sync events
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
Implements file watching to automatically sync changes back to remote:
- Add fileWatcherBridge in Electron for watching local temp files
- Add startFileWatch/stopFileWatch APIs in preload
- Add sftpAutoSync setting with UI toggle in settings
- Update downloadToTempAndOpen to support file watching
- Add i18n translations for auto-sync UI
- Show toast notifications when files are synced to remote
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Improve font filtering logic with word boundary matching to avoid false positives
- Rename snake_case variable to camelCase (mono_fonts -> monoFonts)
- Translate Chinese comments to English
- Add TypeScript type definitions for Font Access API
- Check API availability before calling queryLocalFonts
- Apply CJK fallback fonts to local fonts
- Add 'local-' prefix for local font IDs to avoid collisions
- Handle permission denied gracefully
- Use TERMINAL_FONTS as default for availableFonts
- Add safer fallbacks for empty availableFonts in all components
- Export withCjkFallback function for reuse
Replaces use of global settings state for theme with a MutationObserver
that tracks the presence of the 'dark' class on the root HTML element.
Ensures the editor theme stays consistent with the actual app theme,
even if changed via side effects outside React state.