* fix(sftp): preserve successful uploads with backup cleanup warnings
Warn only on confirmed backup cleanup permission refusal after final publication. Preserve actionable warnings across transfer events, history restoration and completion ordering without masking deletion or commit failures.
Narrow follow-up to #3830; related #3879.
* fix(sftp): retain folder cleanup warnings before child completion
Listen for local write-stream errors before opening the SCP channel, pass
encoding/signal into download metadata stat, and restore remote mode after
external-editor SCP uploads.
Remove residual code from merge conflict that caused duplicate variable
declaration error. The lazy-loading pattern is now correctly placed in
handleFileChange function only.
Co-Authored-By: Claude <noreply@anthropic.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>
- 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>