The useEffect that triggers loadFiles with force:true was running on
every navigation because currentPath was in its dependencies. This
caused redundant SFTP list calls that bypassed caching.
Now we track the previous encoding with a ref and only force reload
when filenameEncoding actually changes, not on every path change.
Regular navigation still works through useSftpModalSession's own
path change handling.
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix temporal dead zone issue in useSftpTransfers.ts by moving
sourceEncoding declaration before its usage (P1 issue)
- Initialize filenameEncoding from host.sftpEncoding in SFTPModal.tsx
and add useEffect to update when host changes (P2 issue)
- Fix duplicate Host import in SftpModalHeader.tsx
Co-Authored-By: Claude <noreply@anthropic.com>
Merged the latest changes from main including:
- Bundled folder uploads with UploadController
- Fast delete using SSH exec
- UI improvements and bug fixes
Resolved conflicts in:
- useSftpExternalOperations.ts
- SFTPModal.tsx
- sftpBridge.cjs
Co-Authored-By: Claude <noreply@anthropic.com>
Refactors the SFTP upload mechanism to provide a more unified and robust experience.
- **Bundles folder uploads**: When uploading a folder from the local machine, it now appears as a single, aggregated task in the UI, showing overall progress instead of individual files.
- **Enhances cancellation**: Implements a new upload service and controller to manage transfers, allowing for more immediate and reliable cancellation of both individual files and bundled folder uploads.
- **Improves UI feedback**: Adds dedicated buttons for cancelling active uploads and dismissing completed, failed, or cancelled tasks.
- **Faster folder deletion**: Utilizes SSH `rm -rf` command for rapid remote folder deletion, falling back to SFTP rmdir if SSH exec is unavailable.
- Updates internationalization keys for single item deletion confirmation.
Adjusts relative import paths across the application to reflect recent changes in the project's directory structure. This primarily affects SFTP state management and modal components.
Updates React hook dependency arrays for `useCallback` and `useEffect` to ensure proper memoization and re-execution, addressing `react-hooks/exhaustive-deps` linting rules.
Improves type safety for translation function parameters by changing `Record<string, any>` to `Record<string, unknown>`.
Adds the `ls` command to the allowed commands for the Claude AI assistant in local settings.
Decomposes the core SFTP state management hook and related UI components into smaller, domain-specific custom hooks and specialized sub-components.
This refactoring aims to:
- Break down the monolithic `useSftpState` hook into focused hooks like `useSftpConnections`, `useSftpTransfers`, and `useSftpPaneActions`.
- Extract complex logic and rendering from `SFTPModal` and `SftpView` into dedicated presentational components and custom hooks.
- Centralize SFTP-related types and utility functions into new `sftp/types.ts` and `sftp/utils.ts` modules.
The changes enhance code organization, maintainability, and testability across the SFTP functionality.
Detects common SFTP session errors and automatically attempts to re‑establish the connection (up to three tries).
Provides user feedback with a reconnect overlay, spinner integration, and success/error toast notifications.
Adds corresponding English and Chinese i18n messages for reconnect status and failure.
Minor build config comment added (no functional impact).
- Introduces a user warning for 1.5 stop‑bits, which may be unsupported on some Windows devices, and updates both English and Chinese locales.
- Extends serial port validation to recognize Windows UNC COM paths and displays the new warning when 1.5 stop‑bits are selected.
- Improves SFTP modal behavior by re‑initializing when the initial path changes, using a ref to track the previous path.
- Refactors terminal logic to obtain the current working directory via stream markers, applies `flushSync` to commit the path before opening the SFTP modal, ensuring correct initialization.
- Adds a binary SFTP read API (`readSftpBinary`) on the Electron side and exposes it through the preload script, enabling proper handling of binary files.
- Updates local Claude settings to allow linting via `npm run lint:*`.
- Minor code clean‑ups and whitespace fixes across several bridge modules.
- 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
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.
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.
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 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.
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.
Integrates Monaco Editor for enhanced syntax highlighting in the text editor modal, improving editing experience for code and config files.
Tracks and synchronizes the terminal's current working directory via OSC 7 escape sequences, enabling SFTP dialogs to open at the detected shell path even after user or directory changes.
Introduces IPC and backend support for querying the current shell directory from active SSH sessions, with fallback and path validation logic for remote SFTP browsing.
Improves file type detection by analyzing file content in addition to extensions.
Updates i18n strings and UI elements for clarity and future system application integration.
Adds necessary dependencies for Monaco Editor and updates content security policy for web workers.
Ensures file list and selection state reset when switching directories or hosts, preventing stale data display. Also improves table header rendering by always displaying column headers for consistency and better UX.
Enhances the UI for symbolic links by displaying a link icon overlay
and removing the arrow indicator, making symlinks more visually
distinct. Refactors SSH IPC message sending to use a new safe send
function, preventing errors when web contents are destroyed during
shutdown, and simplifies event handling for better reliability.
Standardizes whitespace and indentation for better readability
and maintainability. Refactors markup in file list rendering to
enhance clarity and structure without changing functionality.
Enables renaming and permission editing for remote SFTP files, including new dialogs and backend parsing of octal/symbolic permission formats.
Improves file list with parent directory entry and virtual scrolling for large directories.
Suppresses noisy SSH authentication error traces for cleaner UI fallback.
Enhances translation coverage for updated features.
Introduces additional scroll options to terminal settings, enabling more granular control over scroll triggers such as output, key press, and paste. Clarifies SFTP upload task error handling and enhances host picker type safety for better maintainability and reliability.
Positions the file list's sortable, resizable header above the scroll container instead of inside it to improve visibility and user experience when scrolling through files. Enhances usability by keeping column controls accessible at all times.
Loads initial directory contents on mount for better UX.
Enhances file list area scrolling and stickiness of table header.
Unifies sort icons and cleans up redundant JSX for readability.
Refines context menu layout and action consistency.
Enables browsing and managing local files alongside SFTP by abstracting path handling, navigation, and file operations. Improves platform compatibility with robust Windows path logic, dynamic home directory resolution, and consistent UI/UX for both remote and local sessions.
Implements comprehensive i18n support, replacing hardcoded UI strings with translation keys and introducing an i18n provider across the app. Adds persistent UI language selection, cross-window sync, and system menu localization. Updates settings and state to handle locale, propagates language changes to Electron, and adjusts components for runtime translation.
Enables a user-friendly, multi-language experience and prepares the app for further language expansion.
Drops all biometric (Termius-style), WebAuthn, and FIDO2 SSH key logic, UI, and dependencies.
Simplifies key storage and authentication to only support standard and certificate keys.
Eliminates related backend, OS Secure Storage, and Windows Hello/Touch ID code.
Archives any legacy key records for migration safety.
Reduces complexity and potential maintenance/security burden.
Drops all FIDO2 hardware security key and WebAuthn passkey functionality,
including backend bridges, UI components, state hooks, and type definitions.
Simplifies authentication to use only standard, certificate, and biometric
(Windows Hello/Touch ID) keys, improving maintainability and reducing code
complexity. Updates UI, application state, and backend logic to fully remove
FIDO2 options and code paths.