Skip to content

feat(#37): remove settings encryption + decrypt-then-migrate#67

Merged
andrewchumchal merged 3 commits into
devfrom
feat/settings-open-file
May 19, 2026
Merged

feat(#37): remove settings encryption + decrypt-then-migrate#67
andrewchumchal merged 3 commits into
devfrom
feat/settings-open-file

Conversation

@andrewchumchal

Copy link
Copy Markdown
Contributor

Part of #37 — client-side changes.

Changes

settings:open-file IPC

  • Added SETTINGS_OPEN_FILE handler in ipc.ts using shell.openPath(settingsStore.path)
  • Wired through preload.ts (config.openSettingsFile) and typed in env.d.ts

Remove settings encryption

  • Removed encryptionKey: 'openconduit-v1' from electron-store config — settings are now plain readable JSON
  • Added decryptLegacyStore() migration: on first launch after upgrade, detects the old binary-encrypted file, reads it with the legacy key, deletes it, and writes the decrypted data into the new plain JSON store
  • No settings are lost on upgrade

- Import settingsStore in ipc.ts; add SETTINGS_OPEN_FILE handler (shell.openPath)
- Bridge config.openSettingsFile() in preload.ts
- Type config.openSettingsFile in env.d.ts
- Remove hardcoded encryptionKey from electron-store (it was security
  theatre — the key was in the binary, providing no real protection)
- Settings file is now plain JSON at userData/openconduit-settings.json,
  matching VS Code / Cursor convention
- On first launch after upgrade, decryptLegacyStore() reads the old
  encrypted file using the old key, deletes it, then writes all settings
  to the new plain store — API keys and providers are preserved
@andrewchumchal andrewchumchal merged commit 343a643 into dev May 19, 2026
3 checks passed
@andrewchumchal andrewchumchal deleted the feat/settings-open-file branch May 19, 2026 13:42
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.

1 participant