- Add "Duplicate" option to host context menu to quickly copy hosts
- Add "Save Password" toggle in host details panel
- Add savePassword field to Host interface
- Add i18n translations for both features (en, zh-CN)
- Internationalize existing hardcoded context menu items
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
The previous fix only checked the direct parent task ID, which doesn't
work for deeply nested folders:
- Top-level task "A" (user cancels this)
- Child folder "B" with parentTaskId="A" (detected cancellation)
- Grandchild file "C" with parentTaskId="B" (NOT detected!)
Now we pass rootTaskId through all levels of transferDirectory and
transferFile calls, so all nested operations check against the
original top-level task ID.
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, clicking cancel only updated the task status but didn't
stop the actual file transfer operations. The transferFile and
transferDirectory functions would continue running.
Changes:
- Add cancelledTasksRef to track cancelled task IDs
- Check cancellation status at start of transferFile/transferDirectory
- Check cancellation status during directory iteration
- Add cancelled task ID to ref in cancelTransfer
- Handle cancellation errors gracefully in processTransfer
- Clean up cancelled IDs after 5s delay
Now cancelling a folder transfer actually stops the operation.
Co-Authored-By: Claude <noreply@anthropic.com>
The UploadBridge interface has a different parameter order than
NetcattyBridge for writeSftpBinaryWithProgress:
- UploadBridge: (sftpId, path, data, taskId, onProgress, ...)
- NetcattyBridge: (sftpId, path, content, transferId, encoding, onProgress, ...)
Previously, the bridge was passed directly which caused callbacks
to be passed where encoding was expected, leading to
"An object could not be cloned" errors in Electron IPC.
Now we wrap the function to properly adapt the interfaces.
Co-Authored-By: Claude <noreply@anthropic.com>
When connecting to a new host, the pane's filenameEncoding was being
preserved from the previous connection. This caused issues when:
1. A pane was set to explicit encoding (e.g., UTF-8)
2. User connects to a host configured for GB18030
3. The bridge wouldn't auto-detect because encoding wasn't "auto"
Now the encoding is reset to the host's configured sftpEncoding or
"auto" when a new connection is established, ensuring proper
auto-detection and respecting host-level encoding settings.
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>
Adopts a "fail-fast" strategy for SFTP uploads, stopping the entire transfer process upon encountering any error during file or directory operations.
Introduces a new `isFatalUploadError` helper to consolidate and expand the definition of errors that should halt an upload, now explicitly including cases where the target directory is deleted or inaccessible during the transfer.
Removes specific fatal error checks from various components, streamlining error propagation and simplifying the overall error handling logic.
Ensures "Scanning files..." placeholder tasks are consistently removed when actual upload tasks are added, preventing potential state inconsistencies.
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.
- Bundle folder uploads as single tasks showing aggregate progress
- Add unique file transfer IDs for proper cancellation tracking
- Fix cancel button to call cancelExternalUpload for external uploads
- Improve backend cancel detection using cancelled flag instead of error message
- Use SSH exec with rm -rf for fast folder deletion on remote servers
- Add FolderUp icon for folder upload tasks in transfer queue
- Add i18n key for upload cancelled message
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Change rendererType from boolean to 'auto' | 'webgl' | 'canvas':
- 'auto' (default): Uses Canvas on low-memory devices (<=4GB), WebGL otherwise
- 'webgl': Force WebGL renderer
- 'canvas': Force Canvas renderer
This preserves the automatic low-memory device detection that was
inadvertently disabled when always passing a boolean value.
Co-Authored-By: Claude <noreply@anthropic.com>
- Add renderer selection (WebGL/Canvas) in terminal settings
- Remove macOS restriction for Canvas renderer, allow all platforms
- Fix Combobox dropdown to show all options when opened instead of
filtering by current value
- Add i18n translations for new rendering settings
Closes#80
Co-Authored-By: Claude <noreply@anthropic.com>
Add real-time monitoring of Linux server resources in the terminal statusbar:
- CPU usage with per-core breakdown in hover popup
- Memory usage with htop-style colored bar (Used/Buffers/Cache/Free)
- Top 10 processes by memory consumption
- Disk usage for all mounted partitions
- Network speed (RX/TX) with per-interface details
Features:
- Only enabled for Linux servers (detected automatically)
- Configurable refresh interval (default 5 seconds)
- Toggle in Settings > Terminal tab
- Hover-triggered popups using Radix UI HoverCard
- BusyBox compatibility with fallback commands
Closes#108
Co-Authored-By: Claude <noreply@anthropic.com>
- Move autoStartExecutedRef assignment before async work to ensure
effect only runs once regardless of auto-start rules
- Memoize keys array in App.tsx to prevent new references on each render
Co-Authored-By: Claude <noreply@anthropic.com>
- Add manual export button in LogView to save session logs to file
- Add auto-save settings in System tab to automatically save logs when sessions end
- Support three formats: plain text (.txt), raw ANSI (.log), and HTML (.html)
- Logs are organized by host in subdirectories with timestamp filenames
- Add i18n support for English and Chinese
Closes#104
Co-Authored-By: Claude <noreply@anthropic.com>
Introduces a `useUIFontsLoaded` hook to track the loading status of UI fonts.
Updates the `useLayoutEffect` responsible for applying the UI font family to re-run once fonts are loaded. This ensures that local fonts, whose family properties might only be correctly resolved after loading, are applied accurately to the UI.
Also updates local Claude settings to allow GitHub CLI commands for development convenience.
Refactors UI font handling to support dynamic font loading and improves selection in settings.
Implements "Load More" pagination for connection logs, enhancing performance and user experience with large datasets. Adds lazy loading for the Connection Logs Manager.
Addresses an issue in `usePortForwardingState` to prevent duplicate backend sync calls in React StrictMode. Improves IPC communication robustness by checking window destruction status. Refines the visual presentation of the snippets empty state.
- Add UI fonts configuration with 21 font options
- Add state management for UI font preference
- Add i18n translations (English/Chinese)
- Apply font via CSS variable --font-sans
- Support cross-window sync via IPC/localStorage
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Auto-discover and use default SSH keys (~/.ssh/id_ed25519, id_ecdsa, id_rsa) when no credentials configured
- Add Windows SSH Agent service status detection with UI warning
- Remove file extension filter on key import to allow any file type
- Unify Host Details panel card styles with consistent icons and titles
Co-Authored-By: Claude <noreply@anthropic.com>
Enhances SFTP file upload performance and responsiveness by:
- Throttling UI progress updates with `requestAnimationFrame` to reduce re-renders.
- Optimizing Electron-side binary writes with larger chunk sizes, `subarray` for buffers, and efficient buffer handling.
- Implementing IPC progress event throttling to reduce communication overhead between main and renderer processes.
- Speeding up folder processing by traversing directory entries in parallel batches, with yielding to maintain UI responsiveness.
Improves robustness by:
- Ensuring folder uploads stop immediately upon user cancellation.
- Preventing division-by-zero errors in the progress bar calculation.
Also updates Claude settings to allow `npm run build:*` commands.
- Add byte-level progress tracking for current file upload
- Add cancellation support that aborts the current file transfer
- Update UI to show real-time progress bar with bytes/speed
- Add cancelSftpUpload IPC handler for immediate cancellation
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
Enhances keyboard-interactive (2FA/MFA) authentication by implementing a queue-based system, allowing multiple concurrent requests to be processed sequentially.
Previously, password prompts during keyboard-interactive authentication were auto-filled if a saved password was available. This change removes the auto-fill behavior to prevent issues with custom or ambiguous prompt texts, instead providing a user-initiated "Use saved password" option in the UI.
Increases the connection timeout to 120 seconds to provide ample time for users to complete 2FA challenges. A new UI indicator shows when additional 2FA requests are pending.
Also, refines SSH authentication logic to strictly respect explicit password authentication, preventing unintended attempts to use private keys when password authentication is selected.
Adds client-side warnings to alert users when SFTP Sudo is enabled but a password is not configured, particularly for key-based authentication. This helps prevent connection issues by prompting users to address the missing password proactively.
Improves server-side error messages for SFTP Sudo failures, providing more specific diagnostic information for issues such as platform unavailability, handshake timeouts, and various exit codes (e.g., incorrect password, missing sftp-server, TTY requirement). This makes troubleshooting connection problems more effective.
Improves file management by introducing client-side validation for new SFTP filenames. This prevents creation of files with invalid characters or system-reserved names, enhancing cross-platform compatibility and preventing potential errors.
Enhances user experience by adding an overwrite confirmation dialog when creating a file with an existing name. This prevents accidental data loss.
Increases robustness of SFTP operations by validating the presence of source and target SFTP sessions for remote transfers, preventing operations on disconnected endpoints.
Adds convenience features such as a smart default filename generator for new files and a context menu on the empty file list area for quick access to file creation and refresh actions.
Centralizes SFTP-related error and status messages within the internationalization system.
Introduces new i18n keys for connection loss and session errors. Updates the SFTP state management to store these i18n keys instead of hardcoded strings, and ensures the SFTP view component translates them for display.
This improves localization, consistency, and maintainability of error messages.
Adds a specific error message when a connection is lost and no previous host information is available, guiding the user to manually reconnect.
Passes the `targetSide` argument to `processTransfer` calls, providing additional context for file transfer operations.
Pass targetSide parameter to processTransfer instead of using unreliable
object reference comparison (targetPane === leftPane) which fails due to
memoized computed values having different object references.
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
Implements periodic yielding to the main thread during large folder uploads and local folder parsing. This prevents the UI from freezing, improving responsiveness during these intensive operations.
Integrates folder upload progress directly into the transfer status panel, replacing the previous full-screen overlay. This provides a less intrusive and more consistent user experience for monitoring folder uploads.
Refines the drag-and-drop handler to correctly prioritize internal pane-to-pane transfers over external file/folder drops from the operating system.
Introduces a new feature to provide real-time feedback during SFTP folder uploads.
- Displays an overlay showing the current file being uploaded and overall progress (e.g., "Uploading X of Y files").
- Allows users to cancel an ongoing folder upload via a dedicated button in the progress overlay.
- Implements state management to track upload status and cancellation requests.
- Adds corresponding internationalization keys for the new UI messages.
Introduces an option in host details to enable SSH agent forwarding. This allows remote servers to leverage local SSH keys for operations like Git, enhancing convenience for users.
- Parse ProxyJump directive when importing SSH config files
- Support all standard formats: host, user@host, host:port, user@host:port, ssh://
- Support chained jumps (comma-separated): ProxyJump jump1,jump2,jump3
- Auto-resolve jump hosts to existing hosts or create inline hosts
- Map parsed ProxyJump to hostChain for connection tunneling
UI improvements:
- Rename 'Jump Hosts' to 'Proxy via Hosts' for clarity
- Rename 'Proxy' to 'Proxy via HTTP/SOCKS5' to distinguish from host proxying
- Always show Proxy via Hosts config (not hidden behind toggle)
- Multi-line display for proxy chains with numbered hosts
- Remove confusing Agent Forwarding toggle from UI
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).
Introduce new localization entries for host tags and groups (add, select, create) in English and Chinese resource files, enabling UI support for tagging and grouping hosts.
Remove unused `X` icon import and the `cn` utility from the SerialHostDetailsPanel component to eliminate dead code and streamline imports.
- Create SerialHostDetailsPanel with serial-specific fields (port, baud rate, data bits, stop bits, parity, flow control, etc.)
- Update VaultView to show SerialHostDetailsPanel when editing serial hosts instead of the SSH-focused HostDetailsPanel
- Add i18n translations for serial edit panel (en, zh-CN)
- Fix ESLint exhaustive-deps warning
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Add serialConfig field to Host interface for storing full serial configuration
- Update connectToHost to handle serial hosts and create proper serial sessions
- Update handleConnectToHost to log serial connections properly
- Update DistroAvatar to show USB icon for serial hosts
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
- Changed baud rate input from fixed select to combobox with preset options + custom input
- Added "Save Configuration" checkbox to save serial port settings as a host entry
- Added connection logging for serial connections (similar to SSH/local terminals)
- Updated ConnectionLog type to include 'serial' protocol
- Updated ConnectionLogsManager to display serial connections with USB icon
- Added i18n translations for new UI elements (en, zh-CN)
Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>