feat: add remember password function#1317
Conversation
|
@Pakchoioioi @Wendong-Fan Could you please review the PR? |
|
thanks @bittoby ! could @4pmtong and @fengju0213 help reviewing this feature? |
|
@Wendong-Fan @4pmtong @fengju0213 I'd really appreciate your feedback! |
nitpicker55555
left a comment
There was a problem hiding this comment.
This PR has several serious issues. A pure function is wrapped in useMemo even though it does not depend on any state and should be defined outside the component. Returning a function from useMemo with an empty dependency array is meaningless and looks like AI-driven over-optimization. The implementation stores plaintext passwords instead of persisting the existing auth token via setAuth, which indicates the current authentication flow was not properly reviewed. There is also a redundant map in credentials-load where the input and output shapes are identical, making it unnecessary code. In addition, credentialsLoad() has no error handling and lacks a catch on the promise.
Considering the extent of these problems, iterating through review cycles would likely cost more effort than rewriting it. I suggest closing this PR and submitting a clean one instead. @Wendong-Fan @4pmtong
|
@nitpicker55555 please don't close this PR. I will update in this PR |
|
@nitpicker55555 I updated to follow your feedback. What i have changed:
|
thanks @bittoby will review it asap |
fengju0213
left a comment
There was a problem hiding this comment.
thanks @bittoby overall its good,I'm wondering if automatic autofill is sufficient, and automatic login isn't necessary, because there might be other operations on this login page later, such as changing the password, etc.
cc @Pakchoioioi
2ca5bc1 to
4336b3b
Compare
|
@bytecii I have updated all to follow your feedback. please review again. |
|
@fengju0213 It passed all tests |
|
@Wendong-Fan @bytecii Any update for me, please |
Sorry for the late reply. Since this involves user experience, I will ask our product team to provide feedback today. |
|
Thank you @fengju0213 |
|
Would someone please merge this PR? |
|
Hi @bittoby Thanks for contribution, just let product team test. Right now the redirect feels a bit too sudden, but it can be improved with slight modifications:
|
f7f6104 to
0306741
Compare
|
@Pakchoioioi I updated logic based on your feedbacks. thanks for your feedback. And Testing fails doesn't seem to relate to my changes. Please check. test.webm |
|
Thanks @bittoby . Could @Pakchoioioi @Douglasymlai help review whether the current approach makes sense? |
thanks @bittoby I think the "remember me" status should be persisted? |
|
@fengju0213 Good point! I solved that. |



Related Issue
Closes #1316
Description
Adds secure "Remember Me" credential storage for the login page using Electron's built-in
safeStorageAPI, which encrypts credentials via OS-level keychain (macOS Keychain, Windows DPAPI, Linux Secret Service). No new dependencies required.What it does:
~/.eigent/saved_credentials.enc(file permissions0o600)Files changed:
electron/main/index.ts— 3 IPC handlers (credentials-save,credentials-load,credentials-remove) usingsafeStorage.encryptString()/decryptString()electron/preload/index.ts— Exposed credential APIs to renderer viaelectronAPIbridgesrc/types/electron.d.ts— TypeScript declarations for new credential methodssrc/pages/Login.tsx— Remember Me checkbox, saved accounts dropdown with outside-click dismiss, auto-fill on mountremember-me,saved-accounts,remove-accountkeys (en, zh-Hans, zh-Hant, ja, ko, de, fr, es, it, ru, ar)Testing Evidence (REQUIRED)
login.mp4
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement