You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found by trying to use it. --runMaintenanceAction scan|reconcile|reset cannot work against the current preload, and fails with the probe's own "unavailable" error rather than anything that points at the cause.
constinvoke=window.electron?.ipcRenderer?.invoke?.bind(window.electron.ipcRenderer)if(!invoke)thrownewError('window.electron.ipcRenderer.invoke is unavailable')returnawaitinvoke('app:indexed-source:scan',{ sourceId,reason: 'manual-rebuild'})
The preload exposes no such method. apps/core-app/src/preload/index.d.ts:14-18:
window.electron is present; invoke is not, on either window.
Why it drifted
The preload says so itself (index.ts:166-169):
A narrow replacement for @electron-toolkit/preload's electronAPI. That helper bridges send/on/once/invoke/sendSync/removeAllListeners for any channel name…
So the surface was deliberately narrowed to three methods over an allowlist (assertBridgedChannel, index.ts:161-164). The probe was written against the wide toolkit surface and never updated. Nothing failed at build time because the expression is a string evaluated in the renderer — there is no type checking across that boundary, which is also why a .d.ts that never had invoke did not catch it.
Consequences
The three maintenance actions are unreachable. Anyone using the probe to drive a scan gets window.electron.ipcRenderer.invoke is unavailable, which reads like an environment problem rather than a surface mismatch.
assertBridgedChannel means even a send-based rewrite needs app:indexed-source:scan on BRIDGED_IPC_CHANNELS, and a send has no reply — so the probe would also need a matching on for the result. It is not a one-word substitution.
Suggested direction
Either re-expose a narrow invoke restricted to the same allowlist (keeps the request/response shape the probes want), or convert the three actions to send + on and add the channels to the allowlist. The first is smaller; the second keeps the preload's current no-invoke posture.
Whichever way, the probe's inline expression should be typed against BridgedElectronAPI rather than written free-hand, or the next narrowing breaks it the same silent way.
Verification
macOS, dev build launched from the repo root with an isolated userDataDir, CDP attached on 9333, bridge read with Runtime.evaluate. The .d.ts and preload source quoted above are from origin/master.
Found by trying to use it.
--runMaintenanceAction scan|reconcile|resetcannot work against the current preload, and fails with the probe's own "unavailable" error rather than anything that points at the cause.The mismatch
coreapp-packaged-indexing-diagnostics-probe.ts:runMaintenanceActionExpressionbuilds:The preload exposes no such method.
apps/core-app/src/preload/index.d.ts:14-18:Confirmed at runtime, not only from the declaration. Attaching over CDP to a running CoreApp and reading the bridge from both windows:
window.electronis present;invokeis not, on either window.Why it drifted
The preload says so itself (
index.ts:166-169):So the surface was deliberately narrowed to three methods over an allowlist (
assertBridgedChannel,index.ts:161-164). The probe was written against the wide toolkit surface and never updated. Nothing failed at build time because the expression is a string evaluated in the renderer — there is no type checking across that boundary, which is also why a.d.tsthat never hadinvokedid not catch it.Consequences
window.electron.ipcRenderer.invoke is unavailable, which reads like an environment problem rather than a surface mismatch.--runMaintenanceAction scanis for.assertBridgedChannelmeans even asend-based rewrite needsapp:indexed-source:scanonBRIDGED_IPC_CHANNELS, and asendhas no reply — so the probe would also need a matchingonfor the result. It is not a one-word substitution.Suggested direction
Either re-expose a narrow
invokerestricted to the same allowlist (keeps the request/response shape the probes want), or convert the three actions tosend+onand add the channels to the allowlist. The first is smaller; the second keeps the preload's current no-invokeposture.Whichever way, the probe's inline expression should be typed against
BridgedElectronAPIrather than written free-hand, or the next narrowing breaks it the same silent way.Verification
macOS, dev build launched from the repo root with an isolated
userDataDir, CDP attached on 9333, bridge read withRuntime.evaluate. The.d.tsand preload source quoted above are fromorigin/master.