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.

feat(desktop): show the network in the menu bar menu

leepokaifeed63c67137
diff --git a/apps/desktop/src/main/tray.ts b/apps/desktop/src/main/tray.ts
index 11e7bd4f..1152d2c8 100644
--- a/apps/desktop/src/main/tray.ts
+++ b/apps/desktop/src/main/tray.ts
@@ -128,10 +128,9 @@ export class Tray {
items.push({ label: bot.name, icon: this.image(bot.avatar), submenu })
}
}
- if (s?.screen) {
- items.push({ type: 'separator' })
- items.push({ label: this.tr('Remote screen'), icon: symbol('display'), submenu: this.screenMenu(s.screen) })
- }
+ if (s?.screen || s?.networks) items.push({ type: 'separator' })
+ if (s?.screen) items.push({ label: this.tr('Remote screen'), icon: symbol('display'), submenu: this.screenMenu(s.screen) })
+ if (s?.networks) items.push({ label: this.tr('Network'), icon: symbol('point.3.connected.trianglepath.dotted'), submenu: this.networkMenu(s.networks) })
if (s && s.usage.length) {
items.push({ type: 'separator' })
for (const provider of s.usage) {
@@ -167,6 +166,21 @@ export class Tray {
return items
}
+ /** Each network's computers, as last heard; any row opens Settings → Network. */
+ private networkMenu(networks: NonNullable<TraySummary['networks']>): Electron.MenuItemConstructorOptions[] {
+ const open = () => this.deps.send({ kind: 'networkSettings' })
+ const items: Electron.MenuItemConstructorOptions[] = []
+ for (const net of networks) {
+ if (items.length) items.push({ type: 'separator' })
+ items.push({ label: net.title, enabled: false })
+ // Buttons, not text: the menu dims a disabled item's image.
+ for (const c of net.computers) items.push({ label: c.label, icon: this.image(c.dot), click: open })
+ }
+ if (!networks.length) items.push({ label: this.tr('Connect your computers so bots on one can message bots on another.'), enabled: false })
+ items.push({ type: 'separator' }, { label: this.tr('Network settings…'), click: open })
+ return items
+ }
+
private updatesMenu(): Electron.MenuItemConstructorOptions[] {
const { updates } = this.deps
const u = updates.state
diff --git a/apps/desktop/src/renderer/lib/theme.ts b/apps/desktop/src/renderer/lib/theme.ts
index 29b06c41..58fd53b5 100644
--- a/apps/desktop/src/renderer/lib/theme.ts
+++ b/apps/desktop/src/renderer/lib/theme.ts
@@ -76,6 +76,8 @@ export const palette = (dark: boolean) => ({
text: dark ? [250, 250, 250] : [20, 20, 20],
warning: '#F0A030',
danger: dark ? '#F0A7A7' : '#C23A2B',
+ added: dark ? '#8fd18b' : '#2e7d32',
+ tertiary: dark ? '#9a9a9a' : '#6e6e6e',
})
export interface Swatch {
diff --git a/apps/desktop/src/renderer/views/ChatWindow.tsx b/apps/desktop/src/renderer/views/ChatWindow.tsx
index 604cfbc9..f9aa3bfe 100644
--- a/apps/desktop/src/renderer/views/ChatWindow.tsx
+++ b/apps/desktop/src/renderer/views/ChatWindow.tsx
@@ -245,6 +245,7 @@ function ChatSplitView() {
window.codync.app.onCommand((c) => {
if (c.kind === 'newBot' && onlineStores.length) create('bot')
if (c.kind === 'search') setSearching(true)
+ if (c.kind === 'networkSettings') setSettings('network')
if (c.kind === 'toggleSidebar') setCompact(!prefs.sidebarCompact.get())
if (c.kind === 'voiceKey') {
// No chat open: talk to the top bot in the sidebar.
diff --git a/apps/desktop/src/renderer/views/tray-summary.ts b/apps/desktop/src/renderer/views/tray-summary.ts
index 85690221..041cd9f5 100644
--- a/apps/desktop/src/renderer/views/tray-summary.ts
+++ b/apps/desktop/src/renderer/views/tray-summary.ts
@@ -1,7 +1,9 @@
import { useEffect } from 'react'
import type { TrayImage, TraySummary } from '@shared/ipc'
import { isGroup, isWorking, needsInput, folderName, type Bot, type UsageWindow } from '@shared/models'
+import type { NetworkView } from '@shared/network'
import { drawCharacter, moodOf } from '../components/Avatar'
+import { botsTemplate, presenceTitle, roleTitle } from '../lib/network-copy'
import { useModels } from '../lib/observable'
import { resetLine, resolvedLanguage, translate } from '../lib/l10n'
import { prefs, usePref } from '../lib/prefs'
@@ -83,6 +85,29 @@ function barIcon(providerId: string, window: UsageWindow) {
})
}
+/** A network computer's dot, as in Settings → Network: green while it answers. */
+function dotIcon(online: boolean) {
+ return canvasImage(`dot|${online}`, 16, 16, (ctx) => {
+ ctx.fillStyle = online ? palette(isDark()).added : palette(isDark()).tertiary
+ ctx.beginPath()
+ ctx.arc(8, 8, 3.5, 0, Math.PI * 2)
+ ctx.fill()
+ })
+}
+
+/** "home · Owner" and "desk · Online · 3 bots" per network; null on hosts without networks. */
+function networkLines(view: NetworkView | null | undefined): TraySummary['networks'] {
+ if (!view) return null
+ const tr = (text: string) => translate(text, prefs.appLanguage.get(), typeof navigator === 'undefined' ? 'en' : navigator.language)
+ return view.networks.map((net) => ({
+ title: `${net.name} · ${tr(roleTitle(net.role))}`,
+ computers: net.computers.map((c) => ({
+ label: [c.name, tr(presenceTitle(c)), tr(botsTemplate(c)).replaceAll('{count}', String(c.agents.length))].join(' · '),
+ dot: dotIcon(c.me || c.online),
+ })),
+ }))
+}
+
function usageLine(w: UsageWindow) {
const preference = prefs.appLanguage.get()
const system = typeof navigator === 'undefined' ? 'en' : navigator.language
@@ -135,6 +160,7 @@ export function useTraySummary(app: AppModel) {
error: app.screenError,
}
: null,
+ networks: networkLines(local?.network),
needsAttention: app.needsAttention,
textSize,
usageIconStyle: iconStyle,
diff --git a/apps/desktop/src/shared/ipc.ts b/apps/desktop/src/shared/ipc.ts
index 82670714..ccd54fa2 100644
--- a/apps/desktop/src/shared/ipc.ts
+++ b/apps/desktop/src/shared/ipc.ts
@@ -55,6 +55,8 @@ export interface TraySummary {
subtitle: string
error: string | null
} | null
+ /** This computer's networks (codync-network), lines already translated; null on hosts without them. */
+ networks: { title: string; computers: { label: string; dot: TrayImage | null }[] }[] | null
needsAttention: boolean
textSize: number
usageIconStyle: 'character' | 'original'
@@ -74,6 +76,7 @@ export type WindowCommand =
| { kind: 'setUsageIconStyle'; style: 'character' | 'original' }
| { kind: 'setRemoteScreen'; on: boolean }
| { kind: 'computerAccess' }
+ | { kind: 'networkSettings' }
| { kind: 'newBot' }
| { kind: 'search' }
| { kind: 'toggleSidebar' }
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
index bb3a8fac..2e9bcd57 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
@@ -1142,6 +1142,7 @@
"Stop task": "Aufgabe stoppen",
"Enable remote screen": "Remote-Bildschirm aktivieren",
"Set up computer access…": "Computerzugriff einrichten…",
+ "Network settings…": "Netzwerkeinstellungen…",
"Restarting…": "Neustart…",
"Restart to update": "Zum Aktualisieren neu starten",
"Downloading… {percent}%": "Wird heruntergeladen… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
index deea8cba..896a8484 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
@@ -1142,6 +1142,7 @@
"Stop task": "Detener tarea",
"Enable remote screen": "Activar pantalla remota",
"Set up computer access…": "Configurar acceso a la computadora…",
+ "Network settings…": "Ajustes de red…",
"Restarting…": "Reiniciando…",
"Restart to update": "Reiniciar para actualizar",
"Downloading… {percent}%": "Descargando… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
index a7095843..6ed526a9 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
@@ -1142,6 +1142,7 @@
"Stop task": "Arrêter la tâche",
"Enable remote screen": "Activer l’écran distant",
"Set up computer access…": "Configurer l’accès à l’ordinateur…",
+ "Network settings…": "Réglages du réseau…",
"Restarting…": "Redémarrage…",
"Restart to update": "Redémarrer pour mettre à jour",
"Downloading… {percent}%": "Téléchargement… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
index 149f0e46..eb68c46d 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
@@ -1142,6 +1142,7 @@
"Stop task": "タスクの停止",
"Enable remote screen": "リモート画面を有効にする",
"Set up computer access…": "コンピューターアクセスを設定してください…",
+ "Network settings…": "ネットワーク設定…",
"Restarting…": "再起動中…",
"Restart to update": "更新するには再起動してください",
"Downloading… {percent}%": "ダウンロード中… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
index 59c8388a..2b423ca2 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
@@ -1142,6 +1142,7 @@
"Stop task": "작업 중지",
"Enable remote screen": "원격 화면 활성화",
"Set up computer access…": "컴퓨터 접근 설정…",
+ "Network settings…": "네트워크 설정…",
"Restarting…": "재시작 중…",
"Restart to update": "업데이트를 위해 재시작",
"Downloading… {percent}%": "다운로드 중… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
index f48e2b8b..0b0a7316 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
@@ -1142,6 +1142,7 @@
"Stop task": "停止任务",
"Enable remote screen": "启用远程屏幕",
"Set up computer access…": "设置电脑访问…",
+ "Network settings…": "网络设置…",
"Restarting…": "正在重启…",
"Restart to update": "重启以更新",
"Downloading… {percent}%": "正在下载… {percent}%",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
index 433f473c..a6934c03 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
@@ -1142,6 +1142,7 @@
"Stop task": "停止任務",
"Enable remote screen": "啟用遠端螢幕",
"Set up computer access…": "設定電腦訪問…",
+ "Network settings…": "網路設定…",
"Restarting…": "正在重啟…",
"Restart to update": "重啟以更新",
"Downloading… {percent}%": "正在下載… {percent}%",
diff --git a/web/content/docs/teamwork.mdx b/web/content/docs/teamwork.mdx
index 74c3e591..7ac6e106 100644
--- a/web/content/docs/teamwork.mdx
+++ b/web/content/docs/teamwork.mdx
@@ -56,7 +56,7 @@ In a [group chat](/docs/groups), members don't message each other this way; they
Your computers can join private networks, codync-network, so a bot on your desktop can ask a bot on your laptop or server. Computers connect to each other directly; when they can't, traffic goes through a relay that sees only encrypted data. Networks stay off until you set them up on each computer, in the Codync app or the terminal UI there. Phones only show them: who is in a network is decided at a computer. Networks are a **beta** feature.
-- **Desktop:** Settings → **Computers**, the **Network** section under each computer.
+- **Desktop:** Settings → **Network**. The menu bar or tray menu's **Network** lists each network's computers, whether each one answers and how many bots it offers; any row opens Settings → Network.
- **Terminal UI:** `N` (or **Network** in the `^k` palette).
- **iPhone and Android:** **Network** on the computer's card in **Manage computers** lists each network's computers, whether each one answers, the bots it offers and the network's rules.