Repository navigation
Add "Live agent" setting: agent window with agent-flow graph beside it - #8
Merged
ArtyomVancyan merged 13 commits intoOct 14, 2026
Conversation
…ch agent window Settings > Claude Code > Agent windows gets a "Live agent" switch (AppSettings.liveAgent, off by default, saved like the other app settings). With it on, every agent window takes twice its width: the terminal on the left and a live graph of its Claude Code session on the right. - Graph: the user's agent-flow visualizer (web/), moved as is into src/renderer/components/live-agent (imports made relative). The relay hook reads relay messages over IPC instead of EventSource, and the graph is lazy-loaded only when an agent window shows it. The canvas no longer paints its own navy background: it draws over bg-background, the palette has a light variant with deeper colors that stay readable on it, the bloom is only drawn on dark, and the theme follows the root `dark` class as MemoryGraph does. - Relay: agent-flow's relay (relay/), moved into src/main/live-agent/relay. It runs in a Node worker_threads Worker, not a utilityProcess, because it is pure Node (fs watchers, timers, the hook HTTP server) and uses no Electron APIs. A thread can't outlive or orphan the app, terminate() always works, and process.pid in agent-flow's discovery file stays the app's pid, which its hook script checks. It bundles with electron-vite's ?nodeWorker import. Messages reach the renderer over IPC rather than its SSE server, because the renderer's CSP only allows connect-src 'self'. So the only port it opens is agent-flow's hook server, on 127.0.0.1 with an OS-assigned port, closed on stop. - Each graph subscribes with its window's directory. The relay watches that directory's sessions in ~/.claude and every Claude profile's config dir, and sends a client only the sessions whose recorded cwd is that directory, so a task's worktree session never shows in the project's window. console output in the relay goes to appLog through the worker's port, and the Windows path check uses src/main/platform. - Lifecycle (LiveAgentRelay): started when the setting is switched on (or at startup if saved on), stopped when it is switched off, and stopped by before-quit (stop message, 2s cap, then terminate) with a will-quit terminate as a safety net. Agent windows only subscribe and unsubscribe, so opening, closing or reloading them never restarts it. Start failures and crashes become a text status shown in the graph pane. - Grid: with agent windows that are twice as wide, the windows keep their flat order and are placed as boxes from computeWeightedTerminalLayout (an agent window counts as two slots). Without any, the existing grid is used unchanged. The xterm container is never remounted when the setting changes, and the terminal is refit (and the PTY resized) when its graph appears or goes away. Drops the earlier Task flow page work on this branch (reset to the develop merge base). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read the Claude profiles' config dirs without checking credentials (getSettings() can run a blocking keychain lookup on the main thread for every graph subscription) - Start or stop the relay only when the setting actually switches (the dialog autosave sends every setting, which restarted a failed relay on unrelated changes) - Stop scanning and advertising a directory once no agent window shows it - Only widen agent windows that can show a graph (they have a directory) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…laude/flow - The setting is now the selected project's: it is on while the project has a .auto-claude/flow directory (no app-wide AppSettings.liveAgent any more), so it stays stored with the project across restarts and project switches. Settings > Claude Code switches it for the selected project, and agent windows read it for their own project. - Switching it on creates the directory and runs agent-flow's setup for the project (src/main/live-agent/project-setup.ts, from relay/setup.js): the hook forwarder goes to .auto-claude/flow/hook.cjs (.cjs, so a "type": "module" project can run it) and Claude Code's hooks to the project's .claude/settings.local.json, run by Auto Claude's own executable as Node (ELECTRON_RUN_AS_NODE). Switching it off removes our hooks (others stay) and the directory. - The relay writes its discovery files to the project's flow directory instead of ~/.claude/agent-flow, and the hook script reads the ones next to it. - The relay runs while any project has Live agent on. At startup the setup is refreshed for those projects (it only writes when something changed, e.g. the executable moved). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…moves them everywhere - A worktree of a project with Live agent on gets a copy of the project's .claude/settings.local.json (git doesn't check it out, and Claude Code reads it from the worktree's own .claude), or our hooks added to its own: when a task or terminal worktree is created, for existing worktrees when Live agent is switched on, and at startup (to refresh them) - Switching Live agent off removes our hooks from the project's and every worktree's settings.local.json (other settings and hooks stay; a file left empty is deleted), deletes .auto-claude/flow (hook script and discovery files), and drops the project's graph subscriptions from the relay at once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the background (the agent window's) follows the light or dark theme: the light palette, the theme observer and the light-mode bloom skip are gone, so every graph element is drawn in the colors of agent-flow's colors.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Agent nodes: no interior fill or drop shadow, the center icon in the full state color, and the glow starting at the hexagon's border instead of filling the node (the inside stays clear; the scan line is kept) - Tool nodes: outline only (no background fill), with a 2px border in the full state color for every state - colors.ts keeps a single DEFAULT palette without nodeInterior, toolNodeErrorBase, toolNodeBase, agentShadowFill and withAlpha Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The renderer dev server ignored `**/.auto-claude/**`, which also matches every file of a task worktree (<project>/.auto-claude/worktrees/...), so a dev app started there never picked up edits. Only the project's own .auto-claude folder is ignored now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- No drifting background dots (the depth particles); the spotlight following the active agent stays - Resting zoom 3 (was 2): nodes draw 50% larger when the graph fits; auto-fit still zooms out - No circle effect when an agent completes (flash, expanding ring, glow); the hexagon shapes stay - Sub-agent nodes show the Agents menu icon (its path is shared with AgentsIcon in app-icons.tsx) instead of a text glyph Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…manager worktree-manager imported the Live agent setup, which pulls in the app logger (electron-log, which loads the real electron package). CI installs dependencies without the Electron binary, so task-retry-reset.test.ts, which imports createOrGetWorktree, failed to load there. The hooks are now copied by AgentManager, the only caller, right after it gets the task's worktree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test-frontend matrix ran with fail-fast: false, so a failure on one platform left the others running to the end. Steps already stop at the first failing one within a job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The relay resolves each profile's config dir, which on Windows turns /tmp/claude-work into a drive path, so the test failed there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ArtyomVancyan
deleted the
auto-claude/006-add-task-flow-page-under-graph-modeled-on-agent-fl
branch
October 14, 2026 17:06
remc010
pushed a commit
to remc010/workbench
that referenced
this pull request
Oct 26, 2026
…/006-add-task-flow-page-under-graph-modeled-on-agent-fl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/home/artyom/Python/agent-flow) into Auto Claude with only the changes needed to fit. The relay runs in a Node worker thread and talks to the window over IPC.Changes
.auto-claude/flow. Added alive-agent-store, IPC handlers and a preload API.Terminal.tsxandTerminalGrid.tsxwiden agent windows only when the graph is actually shown. The terminal never remounts when the setting toggles, so the session and scrollback are kept, and it is refit to its new width. Grid layout logic is interminal-grid-layout.ts.components/live-agent/holds the copied agent-flow canvas, hooks and libs. It draws overbg-backgroundinstead of the navy fill, has a light palette, skips glow in light mode and follows the theme switch. Nothing is loaded when the setting is off.src/main/live-agent/holds the relay and its worker.worker_threads, notutilityProcess. The relay is pure Node, a thread can't orphan the app, andterminate()is guaranteed.~/.claudeand every Claude profile's config dir. A newgetProfileConfigDirs()is inclaude-profile-manager.ts. Subscribing never reads credentials.project-setup.tsand the worktree handlers give worktrees the project's hooks. Switching the setting off removes them everywhere. Nothing edits~/.claude/settings.json.electron.vite.config.tsnow watches source files when the app runs from a task worktree.Testing
npm run typechecknpm test(118 files, 1836 tests), including new relay, project andTerminal.live-agenttestsnpx knip --productionnpm run build: the relay worker is emitted as its own chunk. I ran that chunk in a real worker thread. It started, sent the session only to the subscribed folder's window, and removed its discovery file on stop.npm run dev.Known limitations
🤖 Generated with Claude Code