* feat: add React Query hooks for managing cloud accounts and update the generated route tree.
* feat: implement React Query hooks for comprehensive cloud account management.
* fix(cloud-accounts): add error handling to force poll mutation
Add an onError handler to log failures when forcing a cloud monitor poll, improving debuggability.
* fix: add error handling for cloud account polling failure
Add error toast notification when force polling fails, providing localized error message to improve user feedback.
* refactor: remove error logging from force poll cloud monitor hook
The onError handler was removed as error handling is now managed at a higher level in the application. This simplifies the hook and prevents duplicate error logging.
* fix(localization): add missing pollFailed translation keys
Add missing English and Chinese translations for the 'pollFailed' error message used when quota polling fails for all accounts.
* fix(CloudAccountList): prevent duplicate force poll requests
Add guard clause to disable button while mutation is pending to avoid duplicate API calls.
* fix: ensure UI updates after cloud quota poll and refresh
* chore: remove "peer": true flags from package-lock.json
---------
Co-authored-by: Draculabo <[email protected]>
Summary
- Replace hard keytar dependency with a multi-strategy key storage:
1) safeStorage (Electron built-in) — preferred
2) keytar (system keychain) — fallback
3) file-based encryption — last resort
- Dynamically import keytar to avoid asar load failures
- Refactor cloudHandler to use const (clean code)
- Fix “Failed to load cloud accounts” in packaged app
Rationale
The keytar native module can fail to load from asar archives in production builds. This ensures the app works even when system keychain access is unavailable.
Additional changes
- Replace sync file ops with async (fs/promises)
- Add atomic file writes to prevent data races
- Implement concurrency lock for key generation
- Add security error codes for better diagnostics
- Add warnings for file-based fallback mode
- Align error handling after merge
- Migrate legacy encrypted account data
References
- Issue: #38
- Commit: 92dc2f6