The fix this issue recommends (option a) is now on main for the sharing screens, merged in PR #1965.
The Personas cookie-file message still uses the old path and still never shows in the built app, so this issue stays open for the remaining channels.
Where the pattern lives
PR #1965's commit "keep refusal codes across the context bridge" makes the preload resolve sharing refusals as a plain object with message and code, and the renderer rebuilds the Error. Its reviewer confirmed in Electron 44.9.1 that the plain object keeps code across the bridge and a rejected Error does not. The reader at src/renderer/components/settings/PersonasSection.tsx:276-279 still depends on .code on a rejected Error.