Multi-window scaffolding, ade-code terminal client, and finalize CI/docs#273
Conversation
Add multi-window project tab management to the desktop app, the `ade code` headless launcher backed by a new ade-code Ink terminal client, and an `app/navigate` RPC that routes external clients into a desktop window. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…guard Point ade-code imports at shared/types modules and load embedded ade-cli via dynamic import so apps/ade-code tsc stays bounded. Extend CI install cache and add typecheck/test/build jobs for ade-code. Document ade-code in ARCHITECTURE, PRD, chat feature map, new docs/features/ade-code, and ade-cli README (ade code socket semantics). Guard AppNavigationBridge when preload app API is absent (tests and early bootstrap). Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 09c9594. Configure here.
| }, | ||
| onChatEvent: (callback: (event: AgentChatEventEnvelope) => void) => ( | ||
| connectedClient.onNotification("chat/event", (params) => callback(params as AgentChatEventEnvelope)) | ||
| ), |
There was a problem hiding this comment.
Duplicated tool/action/actionList helpers in connection modes
Low Severity
The tool, action, and actionList helper implementations are identical between the attached-mode and embedded-mode return objects. Both closures only differ in which request function they capture, but the wrapper logic (calling ade/actions/call, unwrapping results, error handling) is copy-pasted. Extracting these into shared factory functions that take request as a parameter would eliminate the duplication.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 09c9594. Configure here.
…d RPC Co-authored-by: Cursor <cursoragent@cursor.com>
| }, []); | ||
|
|
||
| const handleDrop = useCallback((e: React.DragEvent, targetIdx: number) => { | ||
| if (dragIdx === null && Array.from(e.dataTransfer.types).includes(ADE_PROJECT_TAB_ROOT_MIME)) { | ||
| return; | ||
| } | ||
| e.preventDefault(); | ||
| e.stopPropagation(); | ||
| setDropIdx(null); | ||
| if (dragIdx === null || dragIdx === targetIdx) { | ||
| setDragIdx(null); | ||
| return; | ||
| } | ||
| const items = [...recentProjects]; | ||
| const items = [...openProjectTabRoots]; | ||
| const [moved] = items.splice(dragIdx, 1); | ||
| items.splice(targetIdx, 0, moved); | ||
| setRecentProjects(items); | ||
| setOpenProjectTabRoots(items); | ||
| setDragIdx(null); | ||
| }, [dragIdx, openProjectTabRoots]); | ||
|
|
||
| const handleProjectTabDrop = useCallback((e: React.DragEvent) => { | ||
| const rootPath = e.dataTransfer.getData(ADE_PROJECT_TAB_ROOT_MIME); | ||
| if (!rootPath) return; | ||
| e.preventDefault(); | ||
| setDropIdx(null); | ||
| setDragIdx(null); | ||
| window.ade.project.reorderRecent(items.map((r) => r.rootPath)).catch(() => {}); | ||
| }, [dragIdx, recentProjects]); | ||
|
|
||
| const handleDragEnd = useCallback(() => { | ||
| const sourceWindowIdRaw = e.dataTransfer.getData(ADE_PROJECT_TAB_WINDOW_MIME); | ||
| const parsedSourceWindowId = sourceWindowIdRaw ? Number(sourceWindowIdRaw) : null; | ||
| const sourceWindowId = parsedSourceWindowId != null && Number.isFinite(parsedSourceWindowId) | ||
| ? parsedSourceWindowId | ||
| : null; | ||
| if (sourceWindowId != null && sourceWindowId === windowId) return; | ||
|
|
||
| if (project?.rootPath === rootPath) { | ||
| if (sourceWindowId != null) { | ||
| window.ade.app.closeWindow(sourceWindowId).catch(() => {}); |
There was a problem hiding this comment.
Cross-window tab drop leaves source tab dangling
handleProjectTabDrop switches the destination window to the dropped project but never removes rootPath from the source window's openProjectTabRoots. The only case where the source window is affected is when project?.rootPath === rootPath — i.e., the dropped project is already the destination's active project — in which case closeWindow is called for the source. For every other drop (dragging to a window with a different active project), the drag semantics are "move" (effectAllowed = "move", dropEffect = "move") but the tab stays in both windows simultaneously.
To close the source window's tab, handleProjectTabDrop needs to call something like window.ade.app.closeProjectTabInWindow(sourceWindowId, rootPath) (a new IPC channel), or at a minimum closeWindow(sourceWindowId) when a successful cross-window move occurs, so the source window can reconcile its tab list.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/components/app/TopBar.tsx
Line: 764-800
Comment:
**Cross-window tab drop leaves source tab dangling**
`handleProjectTabDrop` switches the destination window to the dropped project but never removes `rootPath` from the source window's `openProjectTabRoots`. The only case where the source window is affected is when `project?.rootPath === rootPath` — i.e., the dropped project is already the destination's active project — in which case `closeWindow` is called for the source. For every other drop (dragging to a window with a different active project), the drag semantics are `"move"` (`effectAllowed = "move"`, `dropEffect = "move"`) but the tab stays in both windows simultaneously.
To close the source window's tab, `handleProjectTabDrop` needs to call something like `window.ade.app.closeProjectTabInWindow(sourceWindowId, rootPath)` (a new IPC channel), or at a minimum `closeWindow(sourceWindowId)` when a successful cross-window move occurs, so the source window can reconcile its tab list.
How can I resolve this? If you propose a fix, please make it concise.* Multi-window scaffolding, ade-code terminal client, and finalize CI/docs (#273) * Multi-window scaffolding and ade-code launcher Add multi-window project tab management to the desktop app, the `ade code` headless launcher backed by a new ade-code Ink terminal client, and an `app/navigate` RPC that routes external clients into a desktop window. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Finalize ade-code: isolated typecheck, CI jobs, docs, and navigation guard Point ade-code imports at shared/types modules and load embedded ade-cli via dynamic import so apps/ade-code tsc stays bounded. Extend CI install cache and add typecheck/test/build jobs for ade-code. Document ade-code in ARCHITECTURE, PRD, chat feature map, new docs/features/ade-code, and ade-cli README (ade code socket semantics). Guard AppNavigationBridge when preload app API is absent (tests and early bootstrap). Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> * Fix PR review findings for ade-code * refactor(ade-code): share action helpers between attached and embedded RPC Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> * Remote runtime architecture spec (#275) * Virtualized file tree, shared Ade diff viewer, and finalize (CLI + docs) (#272) * feat: virtualized file tree explorer + shared Ade diff viewer Splits FilesPage into a virtualized FilesExplorer with local path filter, inline F2 rename, and per-row git status badges, and replaces direct MonacoDiffView usage in LaneDiffPane / PrDetailPane / ChatFileChangesPanel with a shared AdeDiffViewer that supports split/unified/wrap toggles and read-only patch rendering. Diff service gains getChanges (numstat + renames) and getFilePatch with bounded output and worktree-escape checks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(finalize): allow diff.getFilePatch, CLI patch command, and docs - Extend ADE_ACTION_ALLOWLIST.diff with getFilePatch for ade actions/CLI. - Add ade diff patch wired to diff.getFilePatch; update README and tests. - Refresh internal docs for files editor, lanes diff, chat composer, architecture IPC. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> * Fix PR review feedback for diff viewer --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * path to merge audit (#260) * Route path-to-merge through ADE actions * Keep polling after GitHub auto-merge is armed * Remove generated dev log from PtM lane * Align PtM pipeline defaults in tests and iOS bootstrap * Respect max rounds when starting PtM from PR panel * Backfill legacy PtM pipeline defaults once * Persist PtM review bot wait state * Address PtM review automation gaps * Fix PtM desktop typecheck import * Keep admin merge behind explicit force policy * Ignore Capy spend-limit notices in PR inventory * Retire noisy PR issue comments during inventory sync * Throttle GitHub PR hot refresh polling * Limit GitHub PR hot refresh to one follow-up * Avoid GitHub snapshot refreshes for PR status ticks * Avoid duplicate review bot pings * Refresh PR detail checks on status updates * Keep action run polling results live * Fix Path to Merge readiness refresh * Fix PtM readiness test label * Make PtM readiness test less brittle * Refresh PtM external checks while polling * Reuse Vite optimizer cache in dev * Keep review gates on at-cap PtM merges * Add Linear issue dropdown to lane creation (#274) * Add Linear issue lane workflows * Fix lane git mocks for branch validation; sync iOS bootstrap SQL - Add defaultLaneBranchGitStub for check-ref-format and show-ref ade/* probes from resolveCreateBranchRef so laneService tests stub git consistently. - Drop overly broad show-ref and ls-remote stubs that broke getDeleteRisk and remote-branch checks. - Regenerate DatabaseBootstrap.sql from kvDb migrate SQL for lane_linear_issues table. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> * Add Linear issue dropdown to lane creation Surface a searchable Linear issue picker in the new-lane dialog so users can attach a Linear issue at lane creation time instead of pasting an identifier. Adds the supporting Linear browser, CLI plumbing, and doc updates for the workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ship: iteration 1 — rebase + address Greptile/CodeRabbit/Cursor review - N+1 fix: batch lane_linear_issues lookup in listLanes - GraphQL: pass IssueFilter via variables, not string interpolation - Branch sanitizer: strip @{, .., trailing .lock - Magic words: skip duplicate ID prefix on commit messages - RPC schema: nullable url/assignee* fields; validate first cap; reject non-object linearIssue payload; CLI mirrors the validation - Empty-text steer allowed when context attachments present - IPC picker/search return empty when tracker unavailable (no throw) - Lane teardown deletes lane_linear_issues; full payload validated - Adopted PR bodies now patched with Linear references too - kvDb: unique index on (project_id, lane_id) for lane_linear_issues - AgentChatPane resets context attachments on lane change - LinearIssueBadge keyboard-focusable; popover open via focus-within - LinearIssuePicker seeds pendingIssue from active selection too - CreatePrModal clears Linear close-toggle and refs when issue dropped - chatContextAttachments wraps Linear text as untrusted prompt data - CLI Linear connection status forwards organization fields * ship: iteration 2 — fix CI shards 1 & 3, align Linear RPC schema - linearAuth.test.ts: assert filter via body.variables.filter to match the variables-based GraphQL contract from iter 1 - laneService.test.ts: stub check-ref-format --branch in the runGit mock so the new branch sanitizer round-trip is allowed - kvDb.ts: replace UNIQUE index on lane_linear_issues with a bootstrap-time duplicate-coalescing sweep (CRRs disallow non-PK unique indices); app-layer enforcement remains - adeRpcServer.ts: searchLinearIssues schema first.max 200 -> 50 to match runtime clamp + error message Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ship: iteration 3 — bootstrap SQL refresh + 4 new review fixes - iOS DatabaseBootstrap.sql regenerated to track kvDb dedupe sweep - agentChatService: Codex steer uses preparedSteer.submittedText so context-only steers send the fallback prompt - agentChatService: Droid busy-steer routes through prepareSendMessage (allowActiveSession: true) like Cursor's busy path - linearClient.normalizeSdkIssue: labels now accepts resolved connection objects, not just callable thunks - prService.createFromLane: pass preserveExisting:false to ensureLinearPrReference so Refs upgrades to Fixes when closeLinearIssueOnMerge is true Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ship: iteration 4 — XML-escape untrusted text, fix adopt path Refs->Fixes, drop searchIssues min clamp - chatContextAttachments.wrapUntrustedLinearText: HTML-entity-escape &/</>/"/' before wrapping so Linear titles can't break out of the <untrusted-data> tag (Greptile P1/security) - prService adoption branch: pass preserveExisting:false to ensureLinearPrReference when closeLinearIssueOnMerge is true so Refs upgrades to Fixes on adopted PRs too (CodeRabbit Major) - linearClient.searchIssues: lower clamp 10 -> 1 to match the schema contract (Cursor Low) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ship: iteration 5 — wrap all untrusted Linear fields, raw-GraphQL quick view, drop dead helpers - chatContextAttachments: wrap assignee/creator/team/project/state/ labels/branchName/url through wrapUntrustedLinearText so user- controlled Linear fields can't break out of the prompt sandbox (Greptile P1/security) - linearClient.getQuickView: replace SDK lazy-loaded issues calls with searchIssues raw GraphQL using ISSUE_FIELDS_FRAGMENT (was ~168 round-trips per call, now 2) (Cursor Medium) - linearClient: drop unused gqlString / gqlStringArray helpers (Cursor Low) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Add remote runtime architecture spec Comprehensive engineering specification for the runtime extraction, multi-project unification, and SSH-tunneled remote runtime feature. Captures all architectural decisions, audit findings, phased implementation plan with file-level detail, migration path, and parallelization tracks for the dev team. * Address PR #275 review comments - Linear tool schema: add nullable optional properties (description, url, projectName, teamName, assigneeId, assigneeName, creatorId, creatorName, dueDate, estimate, branchName) to required so OpenAI strict mode accepts create_lane calls. The anyOf [type, null] entries already make them safely omittable at the value level. - linearClient.metadataTags: defensively read from node.metadata.tags so any populated data is preserved instead of silently dropped to []. Falls back to [] when the field is absent. - kvDb pr_pipeline_settings backfill: log via console.warn on failure instead of swallowing silently. Documents that an invisible state split (existing rows on legacy defaults vs new rows on new defaults) could otherwise occur. ALTER TABLE catches stay silent because column-already-exists is the expected re-run path. - laneService.resolveCreateBranchRef: don't blame Linear when the conflicting branch came from an explicit branchName arg or the fallback path. Differentiate the error message based on the source of the suggested branch. - bootstrap.createPathToMergeOrchestrator: replace `as never` with a typed cast through Parameters<typeof createPathToMergeOrchestrator>[0] so any future tightening of PathToMergeDeps surfaces as a type error. Also drop a gratuitous `as never` on a call whose target accepts unknown. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Runtime refactor desktop and CLI sync support (#279) * Implement remote runtime packaging and remove OpenClaw Add remote/local runtime orchestration, packaged runtime resources, standalone runtime release assets, runtime action routing, and remove legacy OpenClaw surfaces. * Add runtime daemon docs and CLI/runtime features Rework documentation and CLI to center on the per-machine ADE runtime daemon: extensive README and apps/ade-cli/README.md updates describe daemon/socket modes, new dev and packaging scripts, and the `ade runtime` / `ade desktop` command surface. Implement operational changes in the CLI/tests to support runtime/socket routing (tests updated to assert new plan kinds and to read ADE_RUNTIME_SOCKET_PATH), add runtime-related helper files (reactDevtools stub) and desktop runtime artifacts/scripts. Add @linear/sdk to ade-cli dependencies (package.json + lockfile updated). Minor housekeeping: remove openclawContextPolicy from .ade/cto/identity.yaml and add /apps/desktop/release-alpha to .gitignore. * Polish runtime-refactor surface and consolidate runtime tests Combines /finalize cleanups (lane UI, ade-cli rpc/tui touch-ups, runtime docs) with /automate test-suite hygiene: merge remoteBootstrap upload flow back into remoteBootstrap.test.ts and fold ade-cli sync host discovery tests into syncHostService.test.ts to remove forbidden {service}.{minor}.test.ts fragmentation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Use materialize runtime resources with host env Replace the previous apps/ade-cli build step with an apps/desktop npm task that runs materialize:runtime-resources and set ADE_RUNTIME_RESOURCES_ALLOW_HOST_ONLY=1 in the env. Keeps dryRun behavior and runtime artifact assertions, and cleans build intermediates as before. Also add .claude/scheduled_tasks.lock (scheduler lock file). * Add Tailscale discovery and default SSH identity Add Tailscale peer discovery and merge results with mDNS discovery, including parsing of `tailscale status --json` and a discoverTailscalePeers helper that calls the Tailscale CLI. Update discovery to run Bonjour browsing and Tailscale discovery in parallel and add tests for Tailscale peer-to-SSH conversion. Change registry path resolution to use resolveMachineAdeLayout (and add a test that registry files are stored under the active ADE_HOME). Improve SSH transport to pick the first readable OpenSSH default identity when no explicit key is set, allow injecting homeDir for testing, and add a test for default identity selection. Update UI labels to surface Tailscale targets. Modify package-channel script to read desktop version, clean host runtime artifacts, propagate a composed env (setting ADE_CLI_VERSION), and ensure host runtime resources are rebuilt with the proper environment. * Handle scope dispose, SSH retries, and UI tweaks Add disposal propagation and cache cleanup for project-scoped runtimes, plus tests: multiProjectRpcServer now registers a scope onDispose listener to drop cached handlers and event subscriptions when a ProjectScope is disposed; ProjectScopeRegistry exposes onDispose listeners and invokes provided onDisposeProject callback and registered listeners when a scope is disposed. Cleanup of the listener occurs on handler disposal. Tests updated/added to cover cache eviction on scope disposal and project-scope disposal callbacks. Improve SSH transport resiliency and username handling: introduce username candidates and config candidates, prefer explicit SSH config user but fall back to local user and an "admin" retry, and retry connection attempts across username candidates while handling authentication failures. Refactor connectSsh to try multiple configs and add helpers (uniqueUsernames, isSshAuthenticationFailure), plus unit tests for username/config candidate behavior. Remote targets UI/UX improvements: RemoteTargetForm now supports targetId in prefill and customizable busy/submit labels. RemoteTargetList prepares and applies prefill for editing saved targets, sets formprefill when selecting a target or discovered machine, removes replaced targets when saving edits, improves connection label hints (more granular default hints), and updates copy for discovered machines. Related tests/files updated accordingly. * Refactor CLI tests and add auto-register check Massively refactors apps/ade-cli/src/cli.test.ts to standardize multi-line arrays/objects and improve readability of assertions, JSON quoting and formatting. Adds a new test to assert shouldAutoRegisterProjectForPlan behavior for machine-scoped registry commands and introduces apps/ade-cli/src/services/projects/projectRegistry.test.ts. Also includes supporting changes across desktop and runtime code (new remoteConnectionService, tests/adjustments to resolveTailscaleCliPath, runtimeBridge, remoteConnectionPool, renderer components and IPC types) to align with test updates and tighten behavior. These changes improve test clarity and add coverage for project auto-registration logic. * ship: prepare lane for review * ship: iteration 1 address cursor review * ship: iteration 2 fix runtime release workflow --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Port ade code TUI branch onto runtime refactor (#280) Port the ade-windows-and-cli-2 TUI, slash-command, sync, and docs changes onto ade-windows-and-cli after the runtime refactor. Includes review fixes from Cursor and Greptile. * Fix static runtime dependency packaging * Fix remote runtime native deps test fixture * Harden project root restoration * Address runtime release review findings * Fix runtime service manager review findings * Fix standalone daemon spawn fallback * Scope Windows runtime task to current user --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Arul Sharma <arul28@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>


Summary
Multi-window Electron scaffolding,
ade-codeterminal Work chat client (Ink + RPC),ade codelauncher in the CLI, and a finalize pass: ade-code CI (typecheck/test/build), bounded TypeScript imports + dynamic embeddedade-cliload, internal docs (docs/features/ade-code, ARCHITECTURE/PRD/chat updates),ade-cliREADME forade code, and a safeAppNavigationBridgewhenwindow.ade.appis not yet present.Key changes
main.ts, TopBar, IPC/preload/shared types for multi-window +app/navigate;App.tsxoptional chaining for navigation subscription.apps/ade-code: New package; connects socket or embedded headless runtime.apps/ade-cli:ade codeand launch resolution.apps/ade-codein install cache and jobs (typecheck-ade-code,test-ade-code, build step).Validation
Desktop typecheck, lint, vitest (8 shards), ade-cli + ade-code tests and builds,
node scripts/validate-docs.mjs, internal doc map checks.Greptile Summary
This PR introduces multi-window Electron scaffolding, the new
ade-codeterminal Work chat client (Ink + JSON-RPC), theade codelauncher inade-cli, and a finalize pass covering CI jobs, IPC types, and internal docs.getWindowSession,newWindow,openProjectInNewWindow,closeWindow,appNavigate) with window-scope wrapping inregisterIpc.ts;TopBargains per-window tab state (openProjectTabRoots), a new-window button, and cross-window drag-and-drop.apps/ade-code: New package providing an Ink-based TUI that connects via socket (attached mode) or in-process embedded runtime; includesJsonRpcClient, heartbeat, format, andadeApihelpers.apps/ade-cli:ade codesubcommand resolves and spawnsade-codevia env override → siblingdist/→ PATH;AppNavigationBridgesubscribes toonNavigatewith a safe optional-chaining guard.Confidence Score: 4/5
Safe to merge with the cross-window tab drag fix; the rest of the multi-window scaffolding and ade-code TUI are well-structured.
The cross-window drag-and-drop in TopBar sets effectAllowed = move and dropEffect = move, but when a tab is successfully dropped onto another window, the source window's openProjectTabRoots is never updated — the tab appears in both windows. The only branch that closes the source window is the narrow case where the dropped project is already the destination's active project. This leaves the multi-window tab feature in a broken state for the common drag-between-windows flow.
apps/desktop/src/renderer/components/app/TopBar.tsx — specifically handleProjectTabDrop and handleDragEnd need to reconcile the source window's tab list after a successful cross-window move.
Important Files Changed
Sequence Diagram
sequenceDiagram participant CLI as ade-cli (ade code) participant AdeCode as ade-code TUI participant Conn as connection.ts participant Socket as Desktop RPC socket participant Embedded as Embedded ade-cli runtime CLI->>AdeCode: spawnSync(ade-code dist/cli.js, args) AdeCode->>Conn: "connectToAde({ project, forceEmbedded })" alt Socket exists Conn->>Socket: JsonRpcClient.connect(socketPath) Socket-->>Conn: connected Conn->>Socket: ade/initialize + ade/initialized Socket-->>Conn: AdeCodeConnection (attached) else No socket / embedded mode Conn->>Embedded: loadEmbeddedAdeCli() Embedded-->>Conn: createAdeRuntime + createAdeRpcRequestHandler Conn->>Embedded: createAdeRuntime(project) Conn->>Embedded: createAdeRpcRequestHandler(runtime) Conn->>Embedded: ade/initialize (direct call) Embedded-->>Conn: AdeCodeConnection (embedded) end AdeCode->>Conn: listLanes / listChatSessions / sendChatMessage Conn-->>AdeCode: streaming AgentChatEventEnvelope participant WinA as Window A (TopBar) participant WinB as Window B (TopBar) participant Main as Electron main WinA->>Main: appNewWindow / appOpenProjectInNewWindow Main-->>WinB: new BrowserWindow created WinA->>WinB: dragstart (ADE_PROJECT_TAB_ROOT_MIME + window id) WinB->>WinB: "handleProjectTabDrop -> switchProjectToPath" Note over WinA: Tab NOT removed from WinA (bug)Prompt To Fix All With AI
Reviews (3): Last reviewed commit: "refactor(ade-code): share action helpers..." | Re-trigger Greptile