Add OpenCode sync and redesign the account switching dashboard#27
Add OpenCode sync and redesign the account switching dashboard#27abdalrohman wants to merge 6 commits intoLampese:mainfrom
Conversation
Lampese
left a comment
There was a problem hiding this comment.
Requesting changes for two behavioral issues in the OpenCode sync flow:
-
The sync is not actually opt-in as described in the PR. The backend settings default to
opencode_sync_enabled = true, the frontend also initializes the toggle totrue, and the frontend falls back to enabled if loading the setting fails. That means existing users can start syncing switched credentials into OpenCode without an explicit opt-in step, which is the opposite of what the PR description promises. -
The merge-preserve behavior for existing OpenCode providers breaks when the current
auth.jsoncannot be parsed. In that case the code silently falls back to an empty JSON map viaunwrap_or_default()and then writes back only the newopenaientry. That can erase unrelated provider keys from an existing OpenCode auth file instead of preserving them.
I think both issues should be resolved before merging. If this feature is meant to be optional and safe for existing OpenCode setups, the default behavior and the parse-failure path both need to be tightened up.
Summary
auth.jsonWhat Changed
auth.json, and preserve unrelated provider keys instead of overwriting the fileSync to OpenCodetoggle, success feedback, email-only masking, and cleaner import/export flows for account dataValidation
pnpm buildpnpm tauri build --no-bundleScreenshots