The claude-desktop-extra "Extra" settings group never appears in the Settings dialog when Claude Desktop runs in 3P (third-party inference) mode. In 1P it works ([ExtraSettings] ... Extra nav group added in ~/.config/Claude/logs/claude-patches.log); in 3P there is no [ExtraSettings] log line at all.
Users: anyone running claude-desktop-extra with a gateway / Bedrock / Vertex / Foundry 3P config.
In 3P the main window loads the bundled SPA from app://localhost instead of https://claude.ai. Two main-process gates in js/extra_settings_main.js only accept http(s) claude origins:
- Gate A, injection (
dom-readyhook, ~L1739-1745):if (!/^https?:\/\//i.test(url)) return;dropsapp://localhostbeforeinsertCSS/executeJavaScript. - Gate B, IPC sender check (
__cdbEx_ALLOWED_ORIGINS~L1196-1201,__cdbEx_okSender~L1213-1220): only claude.ai / claude.com (+ previews), so everycdbExtra.*call fromapp://localhostis rejected. - Same origin list in
js/window_transparency.js(~L315-320, ~L435-441) guards thecdb-wt:*channels used by the panel's Transparency section.
Trap: new URL("app://localhost/x").origin === "null" in Node/Chromium, so adding "app://localhost" to the list alone never matches. Upstream's own eIPC validator normalises with origin === "null" ? protocol + "//" + host : origin.
Known limitation recorded in CHANGELOG.md L469-472; this spec removes it.
js/extra_settings_main.js- Add origin normaliser:
o = u.origin; if (!o || o === "null") o = u.protocol + "//" + u.host; - Allow exact origin
app://localhostin addition to the existing https origins. dom-ready: replace the scheme regex with the shared origin check (also narrows 1P injection from "any https page" to the allowed origins). Skipapp://localhost/setup-desktop-3p(upstream setup window, no settings dialog).- Keep the main-frame-only sender check.
- Add origin normaliser:
js/window_transparency.js: same normaliser + allow-list forcdb-wt:*.- CHANGELOG.md: entry under Unreleased; drop the "never mounted in 3P" limitation note.
Out of scope: any change to upstream's 3P model validation; theme handlers (no sender guard, work once Gate A is fixed); DOM anchors in js/extra_settings_page.js (shared ion-dist frontend, expected to match).
- In 3P mode, Settings shows the Extra nav group and its sections render;
~/.config/Claude-3p/logs/claude-patches.logcontains[ExtraSettings] ... Extra nav group added. - Panel actions (
cdbExtra.*, Transparencycdb-wt:*) succeed fromapp://localhostmain frame. - 1P unchanged: panel still renders on claude.ai.
- Rejected: subframes,
app://other,app://localhost.evil,app://localhost:1234,file://...,http://localhost:3000,https://evil.example.
- Tests:
node scripts/tests/core/test-deployment-main.mjsand the new/updated core tests (run the repo's core test runner as documented in AGENTS.md). - Build/install per AGENTS.md; verify by launching
claude-desktop --3pand opening Settings.
scripts/tests/core/test-deployment-main.mjssection [11]: addapp://localhost/,app://localhost/new?x=1to allowed; add the foreign URLs above to rejected; assert subframeapp://localhostis rejected.- New dom-ready case using the fake
appEvents["web-contents-created"]+wc.fire("dom-ready")pattern (seetest-theme-scope.mjs,test-spinner-main.mjs): injection happens forhttps://claude.ai/newandapp://localhost/new, not for the foreign URLs orapp://localhost/setup-desktop-3p. Fails before the fix. - Equivalent allow/deny cases for
window_transparency.jssender guard. - Manual: 3P launch on the installed build, check log line + visual.
Match surrounding code: plain ES5-style JS in the injected files, existing __cdbEx_ naming, existing log prefix [ExtraSettings]. No new dependencies.
- Always: keep main-frame-only check; exact-origin matching (no prefix/suffix matching).
- Ask first: widening allowed origins beyond
app://localhost; touching patch .nim files. - Never: alter upstream's model/inference validation; commit unless asked.