app
Codex
Public Made by Adomby adom
Codex in Adom Hydrogen: ecosystem setup, dock dashboard and live engineering demos.
← Commit history
Merge PR #90: Add desktop install and chat dashboard prompts (feature/desktop-dashboard-prompts -> main) merge
Showing changes introduced by the merge (against its first parent).
3 files changed
+90−3
dashboard/index.html+9−2@@ -1,9 +1,16 @@ <!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Codex in Hydrogen</title><link rel="icon" href="/dashboard/icon.svg"><style> :root{color-scheme:dark;--bg:#0d1117;--card:#161b22;--text:#e6edf3;--muted:#8b949e;--line:#30363d;--teal:#00b8b1}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px 'Familjen Grotesk',system-ui,sans-serif}header{height:44px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;padding:0 16px}header img{width:18px;height:18px}header strong{font-size:15px}header span{color:var(--muted);font-size:13px}.spacer{flex:1}button,a{touch-action:manipulation}button{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:8px 12px;cursor:pointer}button:hover,button:focus-visible{border-color:var(--teal)}main{margin:auto;padding:16px}h1{font-size:30px;margin:0 0 8px}h2{font-size:19px}p{line-height:1.6;color:var(--muted)}a{color:var(--teal)}.pills{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.pill{border:1px solid var(--line);border-radius:20px;padding:6px 12px;font-size:12px}.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.card{padding:22px;background:var(--card);border:1px solid var(--line);border-radius:12px}.card button{margin-right:8px}video{width:100%;max-height:70vh;background:#000}dialog{width:min(1100px,95vw);background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:12px}dialog::backdrop{background:#0008}pre{white-space:pre-wrap;word-break:break-word}.close{float:right}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--card);padding:12px;border:1px solid var(--teal);border-radius:8px;display:none}@media(max-width:720px){.grid{grid-template-columns:1fr}header span{display:none}main{padding:16px}}-</style><header><img src="/dashboard/icon.svg" alt=""><strong title="Codex integration">Codex</strong><span>Engineering in Hydrogen</span><div class="spacer"></div><span id="machine">Container</span><button id="help" title="Show or hide starter prompts" aria-label="Starter prompts">?</button><button id="settings" title="Integration details" aria-label="Integration details"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="m10 2 4 0 1 3 3 2 3 0 1 4-2 2-1 3 1 3-4 2-2-2-3-1-3 1-2-4 2-2 1-3-1-3 4-2z"/><circle cx="12" cy="12" r="3"/></svg></button></header><main><div id="newbie"></div><div class="pills" id="status"><span class="pill">Checking local integration</span></div><h1>Turn a prompt into working engineering.</h1><p>Orient Codex in your Adom workspace, then drive real tools through Adom Bridge.</p><div class="grid"><section class="card"><h2>Astra routes and checks a real Fusion board</h2><p>Watch Astra expand the thermal pours, highlight their nets and compare heat spreading and solder-mask options in Fusion. Then reproduce the workflow on your desktop with the packaged skills.</p><button data-demo="https://wiki.adom.inc/api/pages/adom/codex/files/videos/fusion/11-bq25792-expanded-heatsinks-narrated.mp4">Watch the latest video · 4:17</button><a href="https://wiki.adom.inc/adom/codex/files/docs/REPRODUCE-FUSION.md" target="_blank">Reproduce this with Astra</a><p>Send to AI requires Hydrogen 1.0.233+. The picker defaults to Codex; you can choose another AI. Select Astra in Codex for fresh routing.</p></section><section class="card"><h2>Workspace setup</h2><p>The package installs an ecosystem entry point, a focused skill and a context command. Your existing instructions and credentials stay yours.</p><button id="inspect">Inspect this workspace</button><a href="https://wiki.adom.inc/adom/codex/files/docs/BOOTSTRAP.md" target="_blank">Setup guide</a></section><section class="card"><h2>Astra routes live in KiCad</h2><p>Watch traces, layer-changing vias and branched nets appear in the real editor. The captions explain the calculation and the measured results.</p><button data-demo="01-astra-live-routing-3x.mp4">6-net demo · 23 sec</button><button data-demo="02-astra-crossbar-24-3x.mp4">24-net demo · 31 sec</button></section><section class="card"><h2>Real-board comparisons</h2><p>Watch a public Adom board go from the human reference to zero traces and independently calculated routing, with narrated explanations and measured KiCad results.</p><button data-demo="04-public-adom-solenoid-full-routing-narrated.mp4">Public board · narrated · 82 sec</button><a href="https://wiki.adom.inc/adom/codex/files/docs/ASTRA-KICAD.md" target="_blank">Read the engineering log</a></section><section class="card"><h2>Codex Desktop</h2><p>Planned: verified desktop installation and a Bridge connection between Hydrogen and Codex Desktop. Desktop controls are not installed by this version.</p><a href="https://wiki.adom.inc/adom/codex/files/docs/DESKTOP-BRIDGE.md" target="_blank">Integration roadmap</a></section></div></main><dialog id="player"><button class="close" id="close-video" title="Close video">Close</button><h2>Astra engineering demonstrations</h2><video id="video" controls playsinline></video></dialog><dialog id="details"><button class="close" id="close-details">Close</button><h2>Local integration</h2><pre id="context"></pre></dialog><div id="toast" role="status"></div><script src="/dashboard/vendor/newbie-panel.js"></script><script>+</style><header><img src="/dashboard/icon.svg" alt=""><strong title="Codex integration">Codex</strong><span>Engineering in Hydrogen</span><div class="spacer"></div><span id="machine">Container</span><button id="help" title="Show or hide starter prompts" aria-label="Starter prompts">?</button><button id="settings" title="Integration details" aria-label="Integration details"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="m10 2 4 0 1 3 3 2 3 0 1 4-2 2-1 3 1 3-4 2-2-2-3-1-3 1-2-4 2-2 1-3-1-3 4-2z"/><circle cx="12" cy="12" r="3"/></svg></button></header><main><div id="newbie"></div><div class="pills" id="status"><span class="pill">Checking local integration</span></div><h1>Turn a prompt into working engineering.</h1><p>Orient Codex in your Adom workspace, then drive real tools through Adom Bridge.</p><div class="grid"><section class="card"><h2>Astra routes and checks a real Fusion board</h2><p>Watch Astra expand the thermal pours, highlight their nets and compare heat spreading and solder-mask options in Fusion. Then reproduce the workflow on your desktop with the packaged skills.</p><button data-demo="https://wiki.adom.inc/api/pages/adom/codex/files/videos/fusion/11-bq25792-expanded-heatsinks-narrated.mp4">Watch the latest video · 4:17</button><a href="https://wiki.adom.inc/adom/codex/files/docs/REPRODUCE-FUSION.md" target="_blank">Reproduce this with Astra</a><p>Send to AI requires Hydrogen 1.0.233+. The picker defaults to Codex; you can choose another AI. Select Astra in Codex for fresh routing.</p></section><section class="card"><h2>Workspace setup</h2><p>The package installs an ecosystem entry point, a focused skill and a context command. Your existing instructions and credentials stay yours.</p><button id="inspect">Inspect this workspace</button><a href="https://wiki.adom.inc/adom/codex/files/docs/BOOTSTRAP.md" target="_blank">Setup guide</a></section><section class="card"><h2>Astra routes live in KiCad</h2><p>Watch traces, layer-changing vias and branched nets appear in the real editor. The captions explain the calculation and the measured results.</p><button data-demo="01-astra-live-routing-3x.mp4">6-net demo · 23 sec</button><button data-demo="02-astra-crossbar-24-3x.mp4">24-net demo · 31 sec</button></section><section class="card"><h2>Real-board comparisons</h2><p>Watch a public Adom board go from the human reference to zero traces and independently calculated routing, with narrated explanations and measured KiCad results.</p><button data-demo="04-public-adom-solenoid-full-routing-narrated.mp4">Public board · narrated · 82 sec</button><a href="https://wiki.adom.inc/adom/codex/files/docs/ASTRA-KICAD.md" target="_blank">Read the engineering log</a></section><section class="card"><h2>Codex Desktop</h2><p>Installation, sign-in, and native desktop conversations through the optional Rust Codex Bridge. The desktop app and bridge are installed separately from this dashboard.</p><a href="https://wiki.adom.inc/adom/codex/files/bridge/README.md" target="_blank">Illustrated bridge guide</a></section></div></main><dialog id="player"><button class="close" id="close-video" title="Close video">Close</button><h2>Astra engineering demonstrations</h2><video id="video" controls playsinline></video></dialog><dialog id="details"><button class="close" id="close-details">Close</button><h2>Local integration</h2><pre id="context"></pre></dialog><div id="toast" role="status"></div><script src="/dashboard/vendor/newbie-panel.js"></script><script> const $=s=>document.querySelector(s);function toast(s){$('#toast').textContent=s;$('#toast').style.display='block';setTimeout(()=>$('#toast').style.display='none',4000)} function play(file){document.querySelector('.anp-video')?.pause();$('#video').src=file.startsWith('https://')?file:'/videos/'+file;$('#player').showModal();$('#video').play().catch(()=>toast('Press Play to start the video.'))}-const panel=AdomNewbiePanel.mount({mount:'#newbie',apiBase:'/codex',app:'codex',appName:'Codex',ai:'codex',slug:'codex',toggleButton:'#help',demo:{label:'Play the Fusion demo',meta:'4:17 · narrated · Astra in Fusion',video:{src:'https://wiki.adom.inc/api/pages/adom/codex/files/videos/fusion/11-bq25792-expanded-heatsinks-narrated.mp4',poster:'/dashboard/fusion-demo-poster.jpg',title:'Astra expands Fusion heatsinks and compares solder-mask cooling'}},phrases:["Codex Astra, reproduce this Fusion demo",'Codex, inspect this workspace','Codex, review my PCB thermal paths']});+const panel=AdomNewbiePanel.mount({mount:'#newbie',apiBase:'/codex',app:'codex',appName:'Codex',ai:'codex',slug:'codex',toggleButton:'#help',demo:{label:'Play the Fusion demo',meta:'4:17 · narrated · Astra in Fusion',video:{src:'https://wiki.adom.inc/api/pages/adom/codex/files/videos/fusion/11-bq25792-expanded-heatsinks-narrated.mp4',poster:'/dashboard/fusion-demo-poster.jpg',title:'Astra expands Fusion heatsinks and compares solder-mask cooling'}},phrases:[+ 'Codex Astra, reproduce this Fusion demo',+ 'Codex, inspect this workspace',+ 'Codex, review my PCB thermal paths',+ 'Codex, install Codex Desktop on arav-rog; ask before accepting agreements and notify me with an AB toast before UAC.',+ 'Codex, ask the actual Codex Desktop app on arav-rog: "Suggest three PCB placement checks." Read its reply back.',+ 'Codex, list my Codex Desktop chats on arav-rog and let me choose one to continue.'+]}); async function inspect(){try{const r=await fetch('/api/status');if(!r.ok)throw Error('Context unavailable');const s=await r.json();$('#context').textContent=JSON.stringify(s,null,2);$('#details').showModal()}catch(e){toast(e.message)}} $('#inspect').onclick=inspect;$('#settings').onclick=inspect;$('#close-details').onclick=()=>$('#details').close();$('#close-video').onclick=()=>$('#player').close();$('#player').addEventListener('close',()=>$('#video').pause());document.querySelectorAll('[data-demo]').forEach(b=>b.onclick=()=>play(b.dataset.demo)); function status(s){$('#machine').textContent=s.container.hostname;$('#status').replaceChildren(...['Entry point: '+(s.instructionsInstalled?'installed':'not installed'),'Bridge CLI: '+(s.tools['adom-bridge']?'available':'missing'),'Host target: select in Bridge'].map(t=>{let e=document.createElement('span');e.className='pill';e.textContent=t;return e}))}
docs/DASHBOARD.md+23−1@@ -4,8 +4,30 @@ The dashboard mounts the shared, vendored `AdomNewbiePanel` module. It provides sample prompts with the standard Copy and Send to AI actions, a help toggle, and a button that plays the recorded KiCad demo. This version's demo is a captioned recording, not an automatic live-board mutation. -The main content offers local setup inspection, both routing videos, the real-board comparison log, and the Codex Desktop roadmap. Status distinguishes installed tools from verified host connectivity; it never shows an untested remote host as healthy.+The main content offers local setup inspection, routing videos, the real-board comparison log, and the illustrated Codex Bridge guide. Status distinguishes installed tools from verified host connectivity; it never shows an untested remote host as healthy.++The starter panel keeps its three existing EDA/workspace prompts first, followed+by three Codex Desktop examples using the dedicated arav-rog test host:++- Install Codex Desktop, asking before accepting agreements and sending an AB toast before UAC.+- Ask the actual desktop app for three PCB placement checks and read its reply back.+- List desktop chats and let the user choose one to continue.++Each row uses the shared Copy and Send to AI actions. Send starts a Hydrogen AI+thread that performs the requested bridge workflow; the dashboard does not itself+connect to a desktop pipe or send directly to a running desktop conversation.+The existing provider picker and Hydrogen version gate remain in place. No+installation or chat submission happens just by opening the dashboard. For another+machine, copy and edit the prompt's target before submitting it.++The bridge runtime and desktop app are separate installations; these prompts do+not claim that either is already present or signed in. Follow the+[desktop setup skill](https://wiki.adom.inc/adom/codex/files/skills/codex-desktop-bridge/SKILL.md)+for discovery, consent, sign-in, and native-result verification. The server exposes `/state`, `/api/status`, and `/events` for observation. The browser exposes `adomCodex.play`, `inspect`, and `selfCheck` for UI verification. The three shared newbie-panel Hydrogen API routes are proxied with their query strings and response bytes intact. Sending a sample prompt is a user action, not an automatic dashboard-open side effect. Add `adom/codex` through Dock settings. The wiki app manifest is dock-ready; adding it does not alter other dock cards or install Codex Desktop.++Prompt configuration and no-send-on-open regression checks:+`node --test tests/test_dashboard.cjs`.
tests/test_dashboard.cjsadded+58@@ -0,0 +1,58 @@+const assert = require('node:assert/strict');+const fs = require('node:fs');+const path = require('node:path');+const test = require('node:test');+const vm = require('node:vm');++const html = fs.readFileSync(path.join(__dirname, '../dashboard/index.html'), 'utf8');++function boot() {+ let config;+ const requests = [];+ const nodes = new Map();+ const document = {+ querySelector(selector) {+ if (!nodes.has(selector)) nodes.set(selector, {+ addEventListener() {}, style: {}, pause() {}, replaceChildren() {},+ });+ return nodes.get(selector);+ },+ querySelectorAll() { return []; },+ };+ const context = vm.createContext({+ document, window: {}, setTimeout,+ AdomNewbiePanel: { mount(value) { config = value; return {}; } },+ fetch(url) { requests.push(url); return new Promise(() => {}); },+ EventSource: class {},+ });+ for (const script of html.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script>/g)) {+ if (!/\bsrc=/.test(script[1])) new vm.Script(script[2]).runInContext(context);+ }+ return { config, requests };+}++test('EDA prompts lead and all desktop prompts fit the shared six-row limit', () => {+ const { config } = boot();+ assert.equal(config.ai, 'codex');+ assert.equal(config.apiBase, '/codex');+ assert.equal(config.phrases.length, 6);+ assert.equal(config.phrases[0], 'Codex Astra, reproduce this Fusion demo');+ assert.match(config.phrases[2], /PCB thermal/);+ config.phrases.slice(3).forEach(phrase => assert.match(phrase, /Codex Desktop.*arav-rog/));+});++test('desktop examples preserve setup approvals and target the actual app', () => {+ const { config } = boot();+ assert.match(config.phrases[3], /ask before accepting agreements/);+ assert.match(config.phrases[3], /AB toast before UAC/);+ assert.match(config.phrases[4], /actual Codex Desktop app/);+ assert.match(config.phrases[4], /Read its reply back/);+ assert.match(config.phrases[5], /let me choose one to continue/);+});++test('opening the dashboard does not send any sample prompt', () => {+ const { requests } = boot();+ assert.deepEqual(requests, ['/api/status']);+ assert.doesNotMatch(html, /Planned: verified desktop installation|Integration roadmap/);+ assert.match(html, /adom\/codex\/files\/bridge\/README\.md/);+});