Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

Merge origin/main into feat/debug-log-panel (palette: keep both new entries)

enesfa6d9785a1e3
diff --cc src/main/index.ts
index 5c672d0a5,a7dbf4e87..bd3033946
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@@ -7,17 -7,9 +7,18 @@@ import { homedir, hostname } from 'os
import { randomUUID } from 'crypto'
import { app, BrowserWindow, clipboard, dialog, ipcMain, Menu, Notification, powerMonitor, safeStorage, shell, systemPreferences, webContents } from 'electron'
import { IPC } from '../shared/ipc'
+
+// Debug log ring (issue #78): capture the process console from the first line — a packaged app
+// swallows it entirely, and the boot path is where the interesting warnings are. The ring is
+// in-memory and redacted at its push boundary; the panel/IPC side is gated on the setting.
+const logBuffer = new LogBuffer()
+installLogSink(logBuffer)
import { writeFilesToClipboard } from './clipboard-files'
+ import { allowGuestNavigation } from './webview-nav'
import { registerFsHandlers } from '../core/fs-handlers'
+import { LogBuffer } from '../core/log-buffer'
+import { installLogSink } from '../core/log-sink'
+import { registerLogHandlers } from '../core/log-handlers'
import {
registerBrowserGuest,
type BrowserGuest,
@@@ -679,22 -671,11 +680,22 @@@ app.whenReady().then(async () =>
// window's setWindowOpenHandler / will-navigate above don't cover it). Registered once at
// startup for all current and future guests.
app.on('web-contents-created', (_e, contents) => {
+ // Mirror renderer consoles into the debug ring (issue #78) — a packaged app swallows them
+ // too, and React error boundaries report through console.error. All webContents kinds:
+ // the main window and webview guests alike.
+ contents.on('console-message', (event) => {
+ try {
+ const level = event.level === 'error' ? 'error' : event.level === 'warning' ? 'warn' : 'info'
+ logBuffer.push({ level, tag: 'renderer', msg: String(event.message ?? '') })
+ } catch {
+ /* logging must never break a page */
+ }
+ })
if (contents.getType() !== 'webview') return
- // Web nodes may only show http(s) pages or local content we serve via the jailed
- // nt-media:// scheme.
+ // Web nodes may only show http(s) pages, jailed nt-media:// content, or origin-gated
+ // local file:// pages (policy + tests in webview-nav.ts).
contents.on('will-navigate', (e, url) => {
- if (!/^https?:\/\//i.test(url) && !/^nt-media:\/\//i.test(url)) e.preventDefault()
+ if (!allowGuestNavigation(contents.getURL(), url)) e.preventDefault()
})
// A browser node's guest requested a new window → open it as another browser node
// (never a real popup). Only http(s); other schemes are dropped. The map is consulted
diff --cc src/renderer/canvas/Canvas.tsx
index bd54242be,df7743696..0c5484718
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@@ -8866,18 -8885,14 +8896,26 @@@ export function Canvas()
note: isSshProject ? WORKTREE_SSH_HINT : undefined,
run: () => openWorktreeDialog(null)
},
+ ...(useSettings.getState().settings.debugLogPanel
+ ? [
+ {
+ id: 'debug-log',
+ label: 'Show debug log',
+ hint: 'console diagnostics troubleshoot',
+ section: 'View',
+ icon: <IconGear />,
+ run: () => setLogPanelOpen(true)
+ } satisfies Command
+ ]
+ : []),
+ {
+ id: 'spawn-team',
+ label: 'Spawn a team…',
+ // Searchable synonyms — this is the entry people will look for by intent, not by name.
+ hint: 'orchestrate parallelize delegate agents conductor',
+ icon: <IconGroup />,
+ run: () => setSpawnTeamDialog({})
+ },
{ id: 'new-project', label: 'New project', icon: <IconProject />, run: () => addProject() },
{ id: 'clone-repo', label: 'Clone repository…', icon: <IconProject />, run: () => setCloneDialogOpen(true) },
{