Skip to content

Add OpenCode sync and redesign the account switching dashboard#27

Open
abdalrohman wants to merge 6 commits intoLampese:mainfrom
abdalrohman:main
Open

Add OpenCode sync and redesign the account switching dashboard#27
abdalrohman wants to merge 6 commits intoLampese:mainfrom
abdalrohman:main

Conversation

@abdalrohman
Copy link
Copy Markdown

@abdalrohman abdalrohman commented Mar 19, 2026

Summary

  • sync the active Codex account into OpenCode whenever a switch happens, while keeping that propagation opt-in and safe for existing third-party entries in auth.json
  • resolve OpenCode's platform-specific config location rules so the sync lands in the right place on Linux, Windows, and macOS
  • redesign the account switching experience around reserve analytics, responsive cards, privacy controls, and polished light/dark themes so users can choose the best next account faster

What Changed

  • OpenCode synchronization: adds backend support to transform switched Codex credentials into OpenCode's format, merge them into auth.json, and preserve unrelated provider keys instead of overwriting the file
  • Cross-platform path handling: applies explicit storage-path logic for OpenCode config discovery across supported operating systems, including OpenCode's non-standard fallback behavior
  • User controls and feedback: adds a persistent Sync to OpenCode toggle, success feedback, email-only masking, and cleaner import/export flows for account data
  • Reserve-first dashboard: introduces an active account overview, bench analytics, smarter sorting, clearer usage/reset signals, denser account cards, and a full UI refresh for both light and dark mode

Validation

  • pnpm build
  • pnpm tauri build --no-bundle

Screenshots

image image

@abdalrohman abdalrohman changed the title Support account synchronization to OpenCode Add OpenCode sync and redesign the account switching dashboard Mar 19, 2026
Copy link
Copy Markdown
Owner

@Lampese Lampese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for two behavioral issues in the OpenCode sync flow:

  1. 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 to true, 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.

  2. The merge-preserve behavior for existing OpenCode providers breaks when the current auth.json cannot be parsed. In that case the code silently falls back to an empty JSON map via unwrap_or_default() and then writes back only the new openai entry. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants