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.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
fix(desktop): stop reporting non-crashes to error tracking
leepokai74e71a6be69b
diff --git a/apps/desktop/src/main/error-reports.ts b/apps/desktop/src/main/error-reports.tsindex e37419e9..7e1cb21a 100644--- a/apps/desktop/src/main/error-reports.ts+++ b/apps/desktop/src/main/error-reports.ts@@ -2,6 +2,9 @@ import { app, ipcMain } from 'electron'import { errorReport, type ErrorReport } from '../shared/error-report'import type { HostController } from './host-controller'+/** Not crashes: a helper that exited normally, or was ended from outside (logout, shutdown, an update). */+const ENDED_FROM_OUTSIDE = new Set(['clean-exit', 'killed'])+/*** Error tracking: uncaught errors in the main process and the windows, and windows or helpers* that crashed, go to the host's loopback `reportError` (shared/error-report.ts).@@ -18,9 +21,9 @@ export function registerErrorReports(host: HostController) {})ipcMain.on('app:reportError', (_e, report: ErrorReport) => send({ ...report, process: 'desktop-renderer' }))app.on('render-process-gone', (_e, _contents, details) => {- if (details.reason !== 'clean-exit') send({ process: 'desktop-main', type: 'RendererGone', mechanism: 'render-process-gone', value: details.reason, frames: [] })+ if (!ENDED_FROM_OUTSIDE.has(details.reason)) send({ process: 'desktop-main', type: 'RendererGone', mechanism: 'render-process-gone', value: details.reason, frames: [] })})app.on('child-process-gone', (_e, details) => {- if (details.reason !== 'clean-exit') send({ process: 'desktop-main', type: `${details.type}Gone`, mechanism: 'child-process-gone', value: details.reason, frames: [] })+ if (!ENDED_FROM_OUTSIDE.has(details.reason)) send({ process: 'desktop-main', type: `${details.type}Gone`, mechanism: 'child-process-gone', value: details.reason, frames: [] })})}diff --git a/apps/desktop/src/renderer/main.tsx b/apps/desktop/src/renderer/main.tsxindex 6432affc..6b6c50b3 100644--- a/apps/desktop/src/renderer/main.tsx+++ b/apps/desktop/src/renderer/main.tsx@@ -12,7 +12,8 @@ import { errorReport } from '@shared/error-report'// Error tracking: this window's uncaught errors go to the host (shared/error-report.ts).const report = (error: unknown, mechanism: string) => window.codync.app.reportError(errorReport(error, 'desktop-renderer', mechanism))-window.addEventListener('error', (e) => report(e.error, 'onerror'))+// An error event without an error (the ResizeObserver loop notice) has nothing to report.+window.addEventListener('error', (e) => { if (e.error != null) report(e.error, 'onerror') })window.addEventListener('unhandledrejection', (e) => report(e.reason, 'unhandledrejection'))const page = new URLSearchParams(location.search).get('window') ?? 'chat'diff --git a/docs/features/analytics.md b/docs/features/analytics.mdindex 8cc38a76..32fb72c6 100644--- a/docs/features/analytics.md+++ b/docs/features/analytics.md@@ -76,7 +76,9 @@ builds PostHog's generic `custom` frames (oldest first, the failing one last).- **Terminal UI**: its panics, through `reportError` from the panic hook. Process `tui`.- **Desktop** (`apps/desktop/src/main/error-reports.ts`, `shared/error-report.ts`): uncaughterrors and rejections in the main process and every window, and windows or helpers that- crashed (`RendererGone`, `GPUGone`, … with Electron's reason), through `reportError`.+ crashed (`RendererGone`, `GPUGone`, … with Electron's reason), through `reportError`. Not+ reported: error events that carry no error (the ResizeObserver loop notice), and helpers that+ exited normally or were ended from outside (`clean-exit`, `killed`: logout, shutdown, an update).Processes `desktop-main`, `desktop-renderer`. The renderer is built unminified so functionnames stay readable.- **iPhone** (`CodyncKit` `CrashReports`): MetricKit's crash diagnostics, delivered on the next