- 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
- 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>
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.
Updates the editor to use the app's current theme preference,
ensuring consistency with user-selected light or dark modes.
Also improves the loading UI to better match the surrounding style.
Introduces a dedicated, toggleable filter bar for searching SFTP files, improving discoverability and usability over the previous inline filter input. Updates translations to support the new filter UI in English and Chinese.
Enhances user experience by making filtering more accessible and visually distinct from other toolbar actions.
Configures the editor to load Monaco assets from a local directory in production, improving reliability and performance by avoiding CDN usage.
Adds prebuild script to copy Monaco files, and updates ignore rules to exclude copied assets from version control.
Simplifies SFTP modal initialization by eliminating the initial
directory path prop and streamlining logic for selecting the
start path. Now always defaults to the user's home directory
when possible, with a fallback to root if inaccessible.
Enhances reliability and user experience by verifying
directory accessibility before loading contents.
Adjusts the loading overlay to ensure it fully covers the SFTP pane and appears above other elements during directory navigation. Increases loader icon size and layering for better user feedback while loading files.
Centralizes the loading overlay logic by removing it from the individual pane component and handling it at the parent view level instead. Improves overlay rendering, ensures correct z-index stacking, and maintains clearer separation of concerns between view and pane responsibilities.
Standardizes indentation and spacing for consistency and clarity,
making future maintenance easier and reducing potential confusion.
No logic or functional changes are introduced.
Improves user feedback by displaying loading spinners when opening files in the SFTP and text editor modals.
Clarifies loading state to prevent confusion during slow file reads.
Adds distinct icons for "open" and "download" actions in the context menu to enhance user recognition and clarify available operations for directories and files.
Uses a ref to always access the latest file opener association in file operation callbacks, avoiding issues caused by stale closures when opener associations change.
Adds logging for debugging opener selection logic and ensures dialogs are shown if opener data is invalid or missing.
Improves reliability of file opening behavior in SFTP view.
Switches the language selection component in the editor modal to a combobox for better usability and UX consistency.
Improves truncation and overflow handling on dialogs and combobox triggers to prevent layout issues and enhance readability, especially for long file names and options.
Removes redundant "only system app" info for non-editable files to streamline the dialog.
Cleans up the component props by eliminating an unused function,
improving maintainability and reducing potential confusion.
No functional changes introduced.
Drops support for the built-in image viewer, including related UI, state, and file association logic. Simplifies file opener options and context menus to support only text editing and external system applications.
Streamlines codebase by eliminating redundant image preview code and reduces maintenance overhead for this feature.
Enables users to open files with a chosen application via a new
'Open With' context menu action, which always prompts for an
opener selection. Improves flexibility for file handling and
association management in the SFTP view.
Cleans up inconsistent whitespace and formatting in multiple component files
to improve readability and maintain code style consistency. No functional
logic is changed.
Enables users to open SFTP files using any system application via a new "Open With" dialog. Remembers associations per file extension, supports editing/removing these in settings, and synchronizes changes across components. Updates backend and Electron bridge to handle selecting and launching external applications on all platforms. Improves localization and user feedback for the new feature.
Enables text and image file viewing and editing directly from the SFTP interface with context menu actions and modals. Improves file type detection to distinguish between text, image, and known binary files, preventing inappropriate editing options. Updates editor modal with find support and refines build config to reduce dev warnings.
Enhances user workflow by reducing friction in managing remote files.
Cleans up extra blank lines and trailing spaces across multiple
components to improve code readability and maintain consistent
formatting. No logic or functional changes are introduced.