ade windows and cli#281
Conversation
…ocs (#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) <[email protected]> * 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 <[email protected]> * Fix PR review findings for ade-code * refactor(ade-code): share action helpers between attached and embedded RPC Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Arul Sharma <[email protected]>
* 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) <[email protected]> * 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 <[email protected]> * Fix PR review feedback for diff viewer --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Arul Sharma <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> * 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 <[email protected]> * 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) <[email protected]> * 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) <[email protected]> * 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) <[email protected]> * 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) <[email protected]> * 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) <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Arul Sharma <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> * 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) <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Arul Sharma <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
* 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) <[email protected]>
* 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) <[email protected]>
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cursor review |
|
@greptile review |
|
@claude review |
|
Important Review skippedToo many files! This PR contains 296 files, which is 146 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (296)
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 |
|
@greptile review |
|
@claude review |
|
@claude review |
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
|
@claude review |
|
@claude review |
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 026fe07. Configure here.
|
@cursor review |
|
@claude review |
|
@greptile review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bfb8594. Configure here.
|
@cursor review |
|
@claude review |
|
@greptile review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 701efaf. Configure here.
Note
Medium Risk
Medium risk because it changes CI/release orchestration (new cross-platform runtime artifacts and gating dependencies), which can break packaging and releases if misconfigured.
Overview
This PR updates the build pipeline to produce and consume standalone ADE runtime binaries: CI adds a
build-runtime-binariesmatrix job (darwin/linux) that smoke-tests and uploadsade-<target>+*.native.tar.gz, and Windows/macOS packaging jobs now download and materialize these artifacts before building desktop releases.Release workflow is extended to build/notarize/sign runtime binaries, publish them alongside desktop artifacts (including a new
install.shruntime installer), and hardens macOS signing by rejecting insecurehttp://certificate URLs.Operational docs and Claude command playbooks are revised to reflect the runtime-daemon model (new
ade runtime/ade desktop/ade codeflows), move docs/mobile/CLI/TUI parity checks into/automate, and adjust ignore rules for new build outputs/runtime artifacts.Reviewed by Cursor Bugbot for commit 701efaf. Configure here.
Greptile Summary
This PR introduces a multi-platform ADE runtime binary build pipeline (
build-runtime-binariesmatrix job), a TUI terminal client (ade code), Windows Task Scheduler service management, and a materialize script that injects pre-built runtime artifacts into the desktop bundle before packaging.build-runtime-binariesjob (darwin-arm64/x64, linux-arm64/x64 via Node SEA) gated before Windows and macOS packaging; artifacts are downloaded, materialized, and shipped alongside the desktop installer. The macOS signing flow rejects plain-HTTP certificate URLs.installSystemd.ts,installWindows.ts, andinstallLaunchd.tsmodules manage the ADE daemon as a user-level service.installWindows.tsnow correctly scopes the scheduled task to the registering user via/RU, uses double-quote Windows cmd quoting (cmdQuote), and propagatesschtasks.exeexit codes on uninstall.ade code):connection.tsconnects to the daemon socket, falls back to auto-spawning the daemon viaprocess.execPath(supporting both dev and standalone SEA modes), and optionally loads an embedded runtime.Confidence Score: 5/5
The PR is safe to merge. All previously flagged issues have been addressed and no new blocking issues were found.
Each previously reported bug has a concrete fix in this diff. The spawnDaemon SEA fallback correctly threads through the SEA banner argv adjustment logic. The cmdQuote backslash-doubling algorithm is correct for Windows command-line parsing of paths without embedded double quotes.
No files require special attention. The most complex new files (connection.ts, installWindows.ts, materialize-runtime-resources.mjs) have been reviewed carefully and the logic is sound.
Important Files Changed
Sequence Diagram
sequenceDiagram participant CI as CI (build-runtime-binaries) participant Artifacts as GitHub Artifacts participant BuildWin as build-win / build-mac-release participant Materialize as materialize-runtime-resources.mjs participant Desktop as Desktop Bundle participant Publish as publish-release CI->>CI: "Build ade-{target} SEA binary (4 targets)" CI->>CI: Smoke test binary + native.tar.gz CI->>Artifacts: "Upload ade-runtime-{target} artifacts" BuildWin->>Artifacts: "Download ade-runtime-* artifacts" BuildWin->>Materialize: Run npm run materialize:runtime-resources Materialize->>Desktop: "Copy ade-{target} + ade-{target}.native.tar.gz to resources/runtime/" BuildWin->>Desktop: Package installer (NSIS/DMG) BuildWin->>Artifacts: Upload release artifacts Publish->>Artifacts: Download mac + win + runtime artifacts Publish->>Publish: cp install-runtime.sh to release-assets/runtime/install.sh Publish->>Publish: gh release upload (installers + standalone runtime binaries + install.sh)Reviews (6): Last reviewed commit: "Scope Windows runtime task to current us..." | Re-trigger Greptile