Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

fix: replace desktop icon with a clear vector mark

Rach Pradhan2ad951ced090
diff --git a/apps/native/bun.lock b/apps/native/bun.lock
index 5b76b333..ed7af592 100644
--- a/apps/native/bun.lock
+++ b/apps/native/bun.lock
@@ -26,6 +26,7 @@
"@types/react-dom": "^19",
"electron": "^44.2.0",
"node-api-headers": "^1.9.0",
+ "sharp": "0.35.4",
"tailwindcss": "^4.1.8",
"typescript": "^5",
},
diff --git a/apps/native/desktop/icon.png b/apps/native/desktop/icon.png
index 8d289664..9a33148d 100644
Binary files a/apps/native/desktop/icon.png and b/apps/native/desktop/icon.png differ
diff --git a/apps/native/desktop/icon.svg b/apps/native/desktop/icon.svg
new file mode 100644
index 00000000..00a1913f
--- /dev/null
+++ b/apps/native/desktop/icon.svg
@@ -0,0 +1,20 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
+ <title>Codegraff</title>
+ <defs>
+ <linearGradient id="tile" x1="0" y1="0" x2="0.7" y2="1">
+ <stop stop-color="#294568"/>
+ <stop offset="1" stop-color="#172C49"/>
+ </linearGradient>
+ </defs>
+ <rect x="64" y="64" width="896" height="896" rx="204" fill="url(#tile)"/>
+ <rect x="65" y="65" width="894" height="894" rx="203" fill="none" stroke="#F5EFE3" stroke-opacity=".12" stroke-width="2"/>
+ <g fill="none" stroke="#F5EFE3" stroke-width="58" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M366 386 240 512 366 638"/>
+ <path d="m658 386 126 126-126 126"/>
+ </g>
+ <path d="m562 340-100 344" fill="none" stroke="#EE886C" stroke-width="52" stroke-linecap="round"/>
+ <g fill="#EE886C">
+ <circle cx="562" cy="340" r="37"/>
+ <circle cx="462" cy="684" r="37"/>
+ </g>
+</svg>
diff --git a/apps/native/electron/build-icon.cjs b/apps/native/electron/build-icon.cjs
new file mode 100644
index 00000000..d3e6ddb1
--- /dev/null
+++ b/apps/native/electron/build-icon.cjs
@@ -0,0 +1,27 @@
+// Render the tracked vector at every native icon size; never reuse a stale app.
+const sharp = require('sharp');
+const fs = require('node:fs/promises');
+const os = require('node:os');
+const path = require('node:path');
+const { execFileSync } = require('node:child_process');
+
+async function main() {
+ const output = process.argv[2];
+ if (!output) throw new Error('Provide the output .icns path.');
+ const source = path.join(__dirname, '../desktop/icon.svg');
+ const work = await fs.mkdtemp(path.join(os.tmpdir(), 'graff-icon-'));
+ const iconset = path.join(work, 'Codegraff.iconset');
+ try {
+ await fs.mkdir(iconset);
+ for (const size of [16, 32, 128, 256, 512]) {
+ for (const scale of [1, 2]) {
+ await sharp(source).resize(size * scale, size * scale).png().toFile(
+ path.join(iconset, `icon_${size}x${size}${scale === 2 ? '@2x' : ''}.png`));
+ }
+ }
+ execFileSync('iconutil', ['-c', 'icns', iconset, '-o', path.resolve(output)]);
+ } finally {
+ await fs.rm(work, { recursive: true, force: true });
+ }
+}
+main().catch(error => { console.error(error.message); process.exitCode = 1; });
diff --git a/apps/native/electron/build.sh b/apps/native/electron/build.sh
index 731e318b..2a53dd9e 100644
--- a/apps/native/electron/build.sh
+++ b/apps/native/electron/build.sh
@@ -47,7 +47,7 @@ xcrun clang -O2 -bundle -undefined dynamic_lookup -mmacosx-version-min=14.0 \
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" "$bundle/Contents/Info.plist"
/usr/libexec/PlistBuddy -c 'Set :LSMinimumSystemVersion 14.0' "$bundle/Contents/Info.plist"
/usr/libexec/PlistBuddy -c 'Set :CFBundleDisplayName Codegraff' "$bundle/Contents/Info.plist" 2>/dev/null || true
-cp "$root/zig-out/native-local/Codegraff.app/Contents/Resources/icon.icns" "$resources/electron.icns" 2>/dev/null || true
+bun "$here/build-icon.cjs" "$resources/electron.icns"
# Local development signing; production notarization remains a separate release step.
codesign --force --deep --sign - "$bundle"
codesign --verify --deep --strict "$bundle"
diff --git a/apps/native/package.json b/apps/native/package.json
index 795b4c7e..a7d1fbd2 100644
--- a/apps/native/package.json
+++ b/apps/native/package.json
@@ -40,6 +40,7 @@
"@types/react-dom": "^19",
"electron": "^44.2.0",
"node-api-headers": "^1.9.0",
+ "sharp": "0.35.4",
"tailwindcss": "^4.1.8",
"typescript": "^5"
}