Skip to content

feat: config bundle export/import + Crashpad minidump capture#79

Merged
andrewchumchal merged 1 commit into
devfrom
feat/config-bundle
May 21, 2026
Merged

feat: config bundle export/import + Crashpad minidump capture#79
andrewchumchal merged 1 commit into
devfrom
feat/config-bundle

Conversation

@andrewchumchal

Copy link
Copy Markdown
Contributor

Summary

Two independent improvements:

  1. Config Bundle — export/import a shareable .ocbundle file containing provider + MCP server config (secrets stripped).
  2. Crashpad — enable Electron's built-in crash reporter so future renderer/GPU/main crashes write minidump files to disk, making them debuggable.

Changes

Config Bundle

packages/desktop/src/main/ipc.ts

  • config:export-bundle handler: shows save dialog for .ocbundle/.json, strips apiKey from providers and headers/env from MCP servers, writes JSON
  • config:import-bundle handler: shows open dialog, reads + validates the file, returns parsed ConfigBundle

packages/desktop/src/preload.ts

  • Exposes window.api.config.exportBundle() and window.api.config.importBundle() via context bridge

packages/desktop/src/renderer/env.d.ts

  • Adds both methods to the config namespace type

packages/desktop/src/shared/types.ts

  • Local ConfigBundle declaration (mirrors core) until @openconduit/core is bumped to a version that includes it
  • Consolidated duplicate import type statements to fix import/no-duplicates lint warning

Crashpad

packages/desktop/src/main.ts

  • crashReporter.start({ submitURL: '', uploadToServer: false }) called before the first BrowserWindow is created — enables Crashpad for renderer, GPU and main processes
  • render-process-gone handler now passes crashDumpsDir to fireTelemetryCrash

packages/desktop/src/main/store/settings.ts

  • StoredCrash gains optional crashDumpsDir?: string field

packages/desktop/src/main/ipc.ts

  • fireTelemetryCrash accepts optional extra: { crashDumpsDir? } and stores it alongside the crash record

Context

Crash that triggered the Crashpad work:

errorType: RendererCrash
errorMessage: Renderer process gone (crashed, exit 5)

Exit code 5 = RESULT_CODE_KILLED_BAD_MESSAGE — a native Chromium-level kill with no JS stack trace. Crashpad minidumps are required to diagnose this class of crash.

Config Bundle:
- Add config:export-bundle IPC handler (saves .ocbundle, strips apiKey/headers/env)
- Add config:import-bundle IPC handler (validates + returns parsed bundle)
- Expose exportBundle() / importBundle() via preload context bridge
- Declare ConfigBundle type locally until core package is bumped
- Wire window.api types in env.d.ts

Crashpad:
- Call crashReporter.start() before first window so renderer/GPU/main crashes
  all produce Minidump files on disk
- Record crashDumpsDir in stored crash report so users can locate .dmp files
- Pass crashDumpsDir to fireTelemetryCrash from render-process-gone handler
@andrewchumchal andrewchumchal merged commit e76c720 into dev May 21, 2026
3 checks passed
@andrewchumchal andrewchumchal deleted the feat/config-bundle branch May 24, 2026 19:55
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