Skip to content

electron-compatibility

Pure verdict on whether the Electron version an owned Obsidian instance is actually running is new enough for the resolved app version. Kept separate from the integration-only transport-desktop-cdp (which reads the live version over CDP and is excluded from unit tests) so the tier logic stays unit-testable — mirroring the installer-compatibility / renderer-boot-detection split.

This is the tier-2 companion to installer-compatibility. That one is fully offline — it compares the resolved installer version against installer-version thresholds. But the app’s real requirement is a minimum Electron version hardcoded inside app.js (e.g. 1.13.1 needs Electron 28.2.3), and the installer’s bundled Electron is not derivable offline (see ObsidianVersionMetadata.minRecommendedElectronVersion). So this verdict takes the live process.versions.electron read from the booted renderer and compares it to minRecommendedElectronVersion from metadata.json.

An Electron below the recommendation runs but is nagged ('nagged') — Obsidian would show its “installer too old” recommendation; it never blocks, so there is no 'unrunnable' tier here. When the live version is unreadable or the app version carries no recommended Electron, the verdict is 'unknown' and nothing is warned.

InterfaceDescription
ElectronCompatibilityThe runtime Electron compatibility verdict for a booted owned instance, carried as data on the transport / connection result so consumers can assert on it.
ResolveElectronCompatibilityParamsParameters for resolveElectronCompatibility.
FunctionDescription
resolveElectronCompatibilityComputes the runtime Electron compatibility verdict for a booted owned instance. Only 'nagged' warrants a warning; 'ok' and 'unknown' are silent. An Electron mismatch never blocks, so there is no error tier. Comparisons are pure x.y.z version compares — no I/O.
TypeDescription
ElectronCompatibilityTierThe runtime Electron compatibility tier for a booted owned instance. - 'ok' — the running Electron is at or above the app’s recommended minimum. - 'nagged' — the running Electron is below the recommended minimum; Obsidian runs but would show its “installer too old” recommendation. - 'unknown' — cannot be determined (the live version was unreadable, or the app version carries no recommended Electron version in the table).