Skip to content

IDE: agent-first workbench with ACP coding agents (epic #265) - #289

Merged
aMonteSl merged 25 commits into
idefrom
claude/project-thread-9m9bjg
Nov 27, 2026
Merged

aMonteSl merged 25 commits into
idefrom
claude/project-thread-9m9bjg

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Epic #265: the IDE opens in an Agent layout where the person chats with their own coding agents (Claude Code, Codex, Gemini CLI) while the live Code-XR analysis of the project sits on the right.

What

Verification

  • npm test at the root: extension 1288/1288; IDE typecheck (node, web), ESLint 0 warnings, 840 pass, 1 skipped (debugpy).
  • ide:smoke OK on Linux.
  • Driven in the real Electron window with Playwright and a scripted ACP agent: new chat, streamed reply, edit diff, permission card, approved write to disk, plan, context meter, re-analysis of the scene, metric delta line, Changes tab with diff, first-run guide, Classic switch.

Known limits

  • The scene, metric delta and MCP server follow the main project, not a chat's worktree; files of a worktree chat do not open in the editor.
  • No real vendor agent was run here (no logins available); the protocol path is covered by in-process and child-process fake agents. The manual test guide covers that part.

Agent Client Protocol host for Claude Code, Codex and Gemini CLI: catalogue
with PATH and IDE-installed resolution, per-chat agent processes, session
store per project, permissions, agent terminals, fs access limited to the
folder, vendor logins in an integrated terminal. Exposed to the renderer as
api.agentSessions.
The analysis queries of the built-in agent move to a shared module and are
served over stdio by out/codexrMcp/index.cjs, run with ELECTRON_RUN_AS_NODE.
codexrMcpServerSpec builds the session/new entry.
Snapshots of the project in a private git directory outside it, changes
against a review base, exact-byte restores. The project's own repository is
never touched.
Create a worktree and branch per chat outside the project, status, commit,
merge or squash into the current branch with conflict and overlap refusal,
and removal.
The core already re-analyses files changed on disk; AnalysisService now
reports when a re-analysis finished, can wait for the scene to catch up and
computes what a turn did to the project's metrics.
…#269, #272, #275, #276)

Chats view, chat tabs and the Agent layout installed in the renderer; every
chat gets the Code-XR MCP server; an agent that dies reports its exit code
and stderr; built-in agents stay in the Agents view; README section.
…ated, not at startup (#268)

Creating the editor group at startup loaded Monaco early and replaced the
welcome view before the smoke probe saw it.
…#271 #274)

SessionChanges owns one CheckpointStore per project (userData/checkpoints)
and a persisted review base per chat (agent-sessions/review.json): the
first checkpoint of a chat is its base; pending, diff, keep, undo,
previewRestore and restoreCheckpoint work on top of it. Checkpoints that
are off degrade to no checkpoint and a reason.

AgentSessionService exposes the review calls (validated: the window must
own the chat, paths are normalised project-relative paths, only
checkpoints recorded on the chat's own messages can be restored, undo and
restore are refused while a turn runs) and refreshes the pending count
after each. The runtime wires beforePrompt/afterTurn to SessionChanges and
measures each turn against the window's scene (AF9): a compact
TurnMetricDeltaView is attached to the turn-end item through a new
'metric-delta' event. Six new IPC channels in AGENT_SESSION_CHANNELS and
the preload.
…nder a turn (#270 #271 #274)

A Changes tab per chat (chat-changes:<id>, resolved through
resolveCustomEditor, never created at startup) lists the pending files
with status and +/- counts, shows a lazily loaded Monaco side-by-side diff
of the selected one and offers Keep / Undo per file or for all. It
refreshes on pending-changes and turn-end events. The chat header's
Changes button opens it; Restore files to here lists the files inline
before restoring; a finished turn shows its metric delta compactly with
the per-file detail folded under it. Pure helpers in changesModel.ts,
tested. README updated.
…9m9bjg

# Conflicts:
#	apps/ide/README.md
#	apps/ide/THIRD_PARTY_NOTICES.md
#	apps/ide/src/main/index.ts
#	apps/ide/src/main/ipc.ts
#	apps/ide/src/renderer/workbench.ts
A chat created with a worktree runs its agent in a git worktree and branch
of its own under <userData>/worktrees: agent cwd, session/new cwd, fs access
and terminals are confined to the worktree, and the Changes tab and the
checkpoints work on it. The worktree record is persisted with the chat and
only acted on when it lies in the IDE's worktree folder; the renderer names
a chat by id. New IPC: worktreeAvailability, worktreeStatus, worktreeCommit,
worktreeMerge (merge/squash, refusals carry the reason and files) and
worktreeDiscard; create and remove take worktree options.
…277)

New chat offers Separate worktree when the folder can have one (the choice
is remembered). Worktree chats show their branch in the chat header and the
Chats list; the header's Worktree bar shows files changed, ahead/behind, and
offers Commit, Merge/Squash into the current branch and Discard (inline
confirmation). Deleting such a chat asks inline whether to remove its
worktree too. README documents the feature and its limits.
…9m9bjg

# Conflicts:
#	apps/ide/THIRD_PARTY_NOTICES.md
#	apps/ide/scripts/build.mjs
#	apps/ide/scripts/dev.mjs
#	apps/ide/scripts/viteConfigs.mjs
#	apps/ide/src/main/index.ts
#	apps/ide/tsconfig.node.json
…9m9bjg

# Conflicts:
#	apps/ide/src/renderer/workbench.ts
@aMonteSl
aMonteSl merged commit 933c68d into ide Nov 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants