Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(desktop): include Apple symbols in fresh builds

leepokaiee0441426fc3
diff --git a/apps/desktop/electron.vite.config.ts b/apps/desktop/electron.vite.config.ts
index 5ba069d9..4772bfd5 100644
--- a/apps/desktop/electron.vite.config.ts
+++ b/apps/desktop/electron.vite.config.ts
@@ -1,7 +1,14 @@
+import { execFileSync } from 'node:child_process'
import { resolve } from 'node:path'
import react from '@vitejs/plugin-react'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
+// Fresh macOS checkouts must include SF Symbols without a separate manual icons step.
+if (process.platform === 'darwin') {
+ execFileSync('swift', [resolve('tools/export-symbols.swift')], { stdio: 'inherit' })
+ execFileSync(process.execPath, [resolve('tools/native-auth.mjs')], { stdio: 'inherit' })
+}
+
export default defineConfig({
main: { plugins: [externalizeDepsPlugin()] },
preload: { plugins: [externalizeDepsPlugin()] },
diff --git a/apps/desktop/src/shared/packaging-symbols.test.ts b/apps/desktop/src/shared/packaging-symbols.test.ts
new file mode 100644
index 00000000..09f77cff
--- /dev/null
+++ b/apps/desktop/src/shared/packaging-symbols.test.ts
@@ -0,0 +1,37 @@
+import assert from 'node:assert/strict'
+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
+import { createRequire } from 'node:module'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+import { test, type TestContext } from 'node:test'
+
+const verifyBuild = createRequire(import.meta.url)('../../tools/verify-build.cjs')
+
+function fixture(t: TestContext, platform = 'darwin') {
+ const projectDir = mkdtempSync(join(tmpdir(), 'codync-symbol-check-'))
+ t.after(() => rmSync(projectDir, { recursive: true, force: true }))
+ mkdirSync(join(projectDir, 'resources'))
+ writeFileSync(join(projectDir, 'resources/account-config.json'), JSON.stringify({ environment: 'dev' }))
+ return { electronPlatformName: platform, packager: { projectDir, appInfo: { id: 'com.pokai.Codync.dev' } } }
+}
+
+test('macOS packaging requires the Apple logo manifest entry and every rendered weight', async (t) => {
+ const context = fixture(t)
+ await assert.rejects(verifyBuild(context), /ENOENT/)
+ const symbols = join(context.packager.projectDir, 'out/renderer/symbols')
+ mkdirSync(symbols, { recursive: true })
+ writeFileSync(join(symbols, 'manifest.json'), '{}')
+ await assert.rejects(verifyBuild(context), /missing the Apple logo/)
+ writeFileSync(join(symbols, 'manifest.json'), JSON.stringify({ 'apple.logo': { w: 0.9, h: 1.15 } }))
+ await assert.rejects(verifyBuild(context), /ENOENT/)
+ for (const weight of ['light', 'regular', 'medium', 'semibold', 'bold', 'black']) {
+ writeFileSync(join(symbols, `apple.logo.${weight}.png`), 'fixture')
+ }
+ await assert.doesNotReject(verifyBuild(context))
+})
+
+test('Linux and Windows packaging does not require Apple-only SF Symbols', async (t) => {
+ for (const platform of ['linux', 'win32']) {
+ await assert.doesNotReject(verifyBuild(fixture(t, platform)))
+ }
+})
diff --git a/apps/desktop/tools/verify-build.cjs b/apps/desktop/tools/verify-build.cjs
index 1b711526..5654a26d 100644
--- a/apps/desktop/tools/verify-build.cjs
+++ b/apps/desktop/tools/verify-build.cjs
@@ -1,8 +1,16 @@
// Fail before packaging if a stale account-config.json belongs to the other app variant.
-const { readFileSync } = require('node:fs')
+const { accessSync, readFileSync } = require('node:fs')
const { join } = require('node:path')
module.exports = async (context) => {
const expected = context.packager.appInfo.id === 'com.pokai.Codync.dev' ? 'dev' : 'main'
const config = JSON.parse(readFileSync(join(context.packager.projectDir, 'resources/account-config.json'), 'utf8'))
if (config.environment !== expected) throw new Error(`Packaging ${expected} with ${config.environment} account config; run the matching dist script.`)
+ if (context.electronPlatformName === 'darwin') {
+ const symbols = join(context.packager.projectDir, 'out/renderer/symbols')
+ const manifest = JSON.parse(readFileSync(join(symbols, 'manifest.json'), 'utf8'))
+ if (!manifest['apple.logo']) throw new Error('The macOS build is missing the Apple logo; rebuild the app on macOS.')
+ for (const weight of ['light', 'regular', 'medium', 'semibold', 'bold', 'black']) {
+ accessSync(join(symbols, `apple.logo.${weight}.png`))
+ }
+ }
}