graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
test: preserve layout diagnostics for desktop handoff failures
Rach Pradhand93898916438
diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.ymlindex 1081bd53..c2c00017 100644--- a/.github/workflows/desktop.yml+++ b/.github/workflows/desktop.yml@@ -102,7 +102,7 @@ jobs:name: native-gui-resultspath: |zig-out/html-tool-test/results.json- zig-out/cli-test/results.json+ zig-out/cli-test/zig-out/native-tests/native-results.jsonzig-out/frontend-tests/zig-out/split-stress/diff --git a/apps/native/electron/frontend-runtime.cjs b/apps/native/electron/frontend-runtime.cjsindex d6f72b12..9871da75 100644--- a/apps/native/electron/frontend-runtime.cjs+++ b/apps/native/electron/frontend-runtime.cjs@@ -39,7 +39,16 @@ async function finish(error) {finished = true; clearTimeout(deadline);if (error) {report.error = error.stack; console.error(error);- try { fs.writeFileSync(path.join(output, 'failure.png'), (await win.webContents.capturePage()).toPNG()); } catch {}+ try {+ report.layout = await win.webContents.executeJavaScript(`(() => ({+ viewport: { width: innerWidth, height: innerHeight },+ prompts: Array.from(document.querySelectorAll('textarea[aria-label="Prompt"]')).map(e => {+ const r = e.getBoundingClientRect(), hit = document.elementFromPoint(r.x+r.width/2, r.y+r.height/2);+ return { rect: r.toJSON(), hit: hit?.tagName, hitClass: hit?.className, hitLabel: hit?.getAttribute('aria-label'), visible: e.checkVisibility() };+ })+ }))()`);+ fs.writeFileSync(path.join(output, 'failure.png'), (await win.webContents.capturePage()).toPNG());+ } catch {}}try { report.desktop = desktop.assertSafe(); } catch (e) { error ||= e; report.error ||= e.message; }report.status = error ? 'failed' : report.skipped.length ? 'passed-with-skips' : 'passed';