← Commit history
Publish 0.1.29
4 files changed
+59−5
README.md+1−1@@ -110,7 +110,7 @@ See [installation, extension updates, and uninstall behavior](docs/RELOAD-INTEGR ### Broken Codex builds are held back -Version 0.1.28 keeps Codex working when OpenAI ships a build that does not load. Builds listed in `runtime/bad-versions.json` (26.1021.22027 and its 26.51021.22027 pre-release: the UI never loads and freezes the editor, [openai/codex#56780](https://github.com/openai/codex/issues/56780)) are swapped back to the last good build once no Codex turn is running, the user sees a notice, and the hold lifts by itself when Open VSX ships a build that is not listed. The list is re-read from this page hourly, so adding or clearing a build needs no release. A Codex update that changes the backend's startup options now replaces an idle backend instead of refusing every Codex view, and the runtime installs bubblewrap (Codex's Linux sandbox) when sudo needs no password.+Version 0.1.28 keeps Codex working when OpenAI ships a build that does not load. Builds listed in `runtime/bad-versions.json` (26.1021.22027 and its 26.51021.22027 pre-release: the UI never loads and freezes the editor, [openai/codex#56780](https://github.com/openai/codex/issues/56780)) are swapped back to the last good build once no Codex turn is running (0.1.29: if the editor loads a listed build anyway, as a manual update does, its panel shows a short notice instead of OpenAI's UI, so it can never freeze the editor), the user sees a notice, and the hold lifts by itself when Open VSX ships a build that is not listed. The list is re-read from this page hourly, so adding or clearing a build needs no release. A Codex update that changes the backend's startup options now replaces an idle backend instead of refusing every Codex view, and the runtime installs bubblewrap (Codex's Linux sandbox) when sudo needs no password. ### Skip the repeated IDE walkthrough
package.json+1−1@@ -4,7 +4,7 @@ "type": "app", "title": "Codex", "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",- "version": "0.1.28",+ "version": "0.1.29", "description": "Codex in Adom Hydrogen with reusable CAD routing, electrical review, copper-ablation and narrated video skills, plus verified KiCad and Fusion demo progressions.", "org": "adom", "needs_sudo": false,
page.json+3−2@@ -4,7 +4,7 @@ "type": "app", "title": "Codex", "brief": "Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.",- "version": "0.1.28",+ "version": "0.1.29", "hero": { "type": "image", "path": "screenshots/hero.png"@@ -79,6 +79,7 @@ "runtime/*.py", "runtime/*.cjs", "runtime/*.css",+ "runtime/*.json", "runtime/vendor/*.md", "runtime/vendor/*LICENSE", "runtime/vendor/websockets/*.py",@@ -97,4 +98,4 @@ "videos/04-public-adom-solenoid-full-routing-narrated.mp4", "videos/04-public-adom-solenoid-full-routing.mp4" ]-}+}
runtime/webview.cjs+54−1@@ -1,8 +1,61 @@ 'use strict'; +const fs = require('fs');+const os = require('os');+const path = require('path');+ // Installed only by the optional adom/codex wiki package.-// VS Code does not instantiate a restored hidden webview until it is shown.++// The calling Codex build, read from the patched extension.js on the call stack.+function callerVersion() {+ const match = /openai\.chatgpt-(\d+(?:\.\d+)+)-/.exec(new Error().stack || '');+ return match ? match[1] : null;+}++// Same list the guard uses: its hourly copy from the wiki page, else the bundled one.+function badBuild(version) {+ const sources = [+ () => JSON.parse(fs.readFileSync(path.join(os.homedir(), '.local/state/adom/codex-integration/guard.json'), 'utf8')).list,+ () => JSON.parse(fs.readFileSync(path.join(__dirname, 'bad-versions.json'), 'utf8')),+ ];+ for (const read of sources) {+ try {+ const list = read();+ if (list && Array.isArray(list.builds))+ return list.builds.find((b) => (b.versions || []).includes(version)) || null;+ } catch (_) { /* next source */ }+ }+ return null;+}++function escape(text) {+ return String(text).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));+}++// A known-bad build never gets to load its own UI (it freezes the whole editor).+// Show why instead; the guard has already put the last good build back on disk.+function blockedPage(version, build) {+ const issue = build.issue ? `<p><a href="${escape(build.issue)}">${escape(build.issue)}</a></p>` : '';+ return `<!doctype html><html><head><meta charset="utf-8">+<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">+<style>body{font:13px/1.5 system-ui,sans-serif;color:var(--vscode-foreground);padding:24px;max-width:560px}+h2{font-size:15px;margin:0 0 8px}code{font-size:12px}a{color:var(--vscode-textLink-foreground)}</style></head><body>+<h2>This Codex build is turned off</h2>+<p>Codex ${escape(version)} has a known problem: ${escape(build.reason || 'it does not load')}.+Adom kept the last working Codex for you.</p>+<p>Reload the window to use it: <code>Ctrl+Shift+P</code>, then <b>Developer: Reload Window</b>.</p>+${issue}<p>Updates resume on their own once OpenAI ships a fixed build.</p></body></html>`;+}+ exports.watchRenderer = function (webview, role, provider, guard, onDispose) {+ const version = callerVersion();+ const build = version && badBuild(version);+ if (build) {+ webview.html = blockedPage(version, build);+ const disposed = onDispose(() => { disposed?.dispose(); guard.dispose(); });+ return;+ }+ // VS Code does not instantiate a restored hidden webview until it is shown. const panel = role === 'panel' ? provider.findPanelByWebview(webview) : null; if (!panel) { guard.start(); return; } const update = () => {