Skip to content

how to contribute development workflow

Nik edited this page May 30, 2026 · 2 revisions

Development workflow

The branch → code → build → test → PR cycle for DroidProxy.

Clone and build

git clone https://github.com/anand-92/droidproxy.git
cd droidproxy/src
swift build

The Swift package lives in /Users/nikhilanand/droidproxy/src, so run every swift build, swift test, and swift package command from there. swift build produces a debug binary at src/.build/debug/CLIProxyMenuBar, which is enough to confirm the code compiles but does not produce a runnable app (see below).

Run it: the dev loop

DroidProxy is an LSUIElement (menu-bar / agent) app, so swift run does not work — there is no Dock icon or main window for SwiftPM to attach to. You must build a real .app bundle and open it.

The preferred dev loop is /Users/nikhilanand/droidproxy/dev-relaunch.sh, run from the repo root:

./dev-relaunch.sh

It performs, in order:

  1. Kills any running menu-bar process and backend: pkill -x CLIProxyMenuBar and pkill -x cli-proxy-api (then a -9 follow-up after a 1s grace period). This guarantees the old menu-bar process and bundled cli-proxy-api are stopped before the new app starts.
  2. Calls /Users/nikhilanand/droidproxy/create-app-bundle.sh, which runs swift build -c release and assembles the signed DroidProxy.app at the repo root.
  3. Runs open DroidProxy.app to launch the fresh build.

Use this instead of running create-app-bundle.sh + open by hand. Do not use dev-relaunch.sh for releases — releases go through CI (.github/workflows/release.yml). See Deployment.

If you only need to confirm compilation (not run the UI), cd src && swift build is faster.

Test

cd src && swift test

The XCTest suite lives in /Users/nikhilanand/droidproxy/src/Tests/CLIProxyMenuBarTests/. See Testing for coverage and what to add when you touch the proxy's JSON editing.

Code conventions

Before editing, read Patterns and conventions. Key rules: use NSLog (not print/os_log); never re-serialize request JSON in ThinkingProxy (string-insertion edits only, to preserve Anthropic's prompt cache); keep source-of-truth edits under src/.

Open a PR

Branch off main, push, and open a PR against main.

  • Compile checkpr-build.yml runs swift build -c release --arch arm64 on a macos-26 runner for PRs that touch src/**, create-app-bundle.sh, or the workflow itself. It is compile-only: no signing, notarization, or release. The same invocation create-app-bundle.sh uses, so a green check means the release build compiles too. In-progress runs are cancelled when you push new commits to the branch.
  • Automated reviewdroid-review.yml runs Droid Auto Review on every non-draft PR and comments findings. droid.yml runs when a comment, review, issue, or PR body mentions @droid. (junie-review.yml / junie-tag.yml provide a second automated reviewer.)

After merge

Merging changes under src/** (or create-app-bundle.sh, entitlements.plist, sparkle-entitlements.plist) into main triggers release.yml, which builds, signs, notarizes, Sparkle-signs, updates the appcast, tags, and publishes a GitHub release on a macos-26 runner. The full pipeline is documented in Deployment. Documentation-only or workflow-only changes do not trigger a release.

Clone this wiki locally