Skip to content

Commit 3bc3359

Browse files
authored
feat(desktop): 100% native macOS Swift desktop app (Zorp.app) and spec (#254)
* docs: add native mac swift app design spec * docs: add native mac swift app implementation plan * docs: add Zorp Developer Mode and local pretraining design spec * chore: ignore .worktrees/ directory * chore: ignore .worktrees as well * feat(desktop): scaffold zorp-desktop-bridge crate with C-ABI exports * chore(desktop): add build script for universal bridge static library * feat(desktop): add Swift package, bridge service, and tests * chore: untrack .build directory * chore: ignore .build directories in .gitignore * feat(desktop): add SSEStream parser, ZorpClient actor, and tests * feat(desktop): add SessionViewModel and AppState with full event handling * feat(desktop): add ConversationView, MarkdownView, MessageBubbleView, and ToolActivityView * feat(desktop): add ApprovalCardView and CheckpointCardView to ConversationView * feat(desktop): add 3-pane MainWindowView, SidebarView, AppCommands, and ZorpApp entrypoint * feat(desktop): add ComposerView and VoiceViewModel with live audio level visualizer * feat(desktop): add SandboxedWebView, LedgerTableView, and InspectorView * ci(desktop): add universal DMG packager and update desktop CI workflow
1 parent 961c55f commit 3bc3359

50 files changed

Lines changed: 2997 additions & 3673 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -663,21 +663,18 @@ jobs:
663663
- name: Install Rust
664664
if: steps.filter.outputs.run_desktop == 'true'
665665
uses: dtolnay/rust-toolchain@stable
666-
- name: Setup Node
667-
if: steps.filter.outputs.run_desktop == 'true'
668-
uses: actions/setup-node@v4
669666
with:
670-
node-version: 20
671-
- name: Build Web UI
672-
if: steps.filter.outputs.run_desktop == 'true'
673-
run: |
674-
cd web
675-
npm ci
676-
npm run build
677-
- name: Check and test zorp-desktop
667+
targets: x86_64-apple-darwin,aarch64-apple-darwin
668+
- name: Check and test zorp-desktop bridge
678669
if: steps.filter.outputs.run_desktop == 'true'
679670
run: |
680671
cargo check --manifest-path zorp-desktop/Cargo.toml
681672
cargo test --manifest-path zorp-desktop/Cargo.toml
673+
- name: Build universal bridge and test Swift app
674+
if: steps.filter.outputs.run_desktop == 'true'
675+
run: |
676+
bash zorp-desktop/scripts/build-bridge.sh
677+
cd zorp-desktop/Zorp
678+
swift test
682679
683680

‎.github/workflows/desktop.yml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,34 @@ jobs:
4141
with:
4242
targets: x86_64-apple-darwin,aarch64-apple-darwin
4343

44-
- uses: actions/setup-node@v4
45-
with:
46-
node-version: "22"
44+
- name: Check and test zorp-desktop bridge
45+
run: |
46+
cargo check --manifest-path zorp-desktop/Cargo.toml
47+
cargo test --manifest-path zorp-desktop/Cargo.toml
4748
48-
- name: Install Tauri CLI
49-
run: cargo install tauri-cli --version "^2.0.0" --locked
49+
- name: Build Universal Bridge
50+
run: |
51+
bash zorp-desktop/scripts/build-bridge.sh
5052
51-
- name: Build Web UI
53+
- name: Test Native Swift App
5254
run: |
53-
cd web
54-
npm ci
55-
npm run build
55+
cd zorp-desktop/Zorp
56+
swift test
5657
57-
- name: Build DMG
58+
- name: Build Universal DMG
5859
run: |
59-
cd zorp-desktop
60-
cargo tauri build --target universal-apple-darwin
60+
bash zorp-desktop/scripts/package-dmg.sh
6161
6262
- name: Checksum DMG
6363
run: |
64-
cd zorp-desktop/target/universal-apple-darwin/release/bundle/dmg
64+
cd zorp-desktop/build
6565
shasum -a 256 *.dmg > Zorp.dmg.sha256
6666
6767
- name: Upload Artifact
6868
uses: actions/upload-artifact@v4
6969
with:
7070
name: zorp-desktop-mac-dmg
71-
path: zorp-desktop/target/universal-apple-darwin/release/bundle/dmg/*
71+
path: zorp-desktop/build/*.dmg*
7272

7373
- name: Attach to GitHub Release
7474
if: ${{ inputs.publish || startsWith(github.ref, 'refs/tags/v') }}
@@ -86,4 +86,4 @@ jobs:
8686
fi
8787
sleep 5
8888
done
89-
gh release upload "$tag" zorp-desktop/target/universal-apple-darwin/release/bundle/dmg/*.dmg* --clobber
89+
gh release upload "$tag" zorp-desktop/build/*.dmg* --clobber

‎.gitignore‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,21 @@ docs/paper/zorp-paper.tex
4141
# Written into the repo root by the harness when jobs are driven by hand.
4242
/jobs/
4343

44-
# Desktop Tauri build outputs
44+
# Desktop build outputs
4545
zorp-desktop/target
4646
zorp-desktop/gen
47+
zorp-desktop/Zorp/Frameworks/
48+
zorp-desktop/Zorp/.build/
49+
zorp-desktop/build/
50+
.build/
51+
*.a
52+
53+
54+
55+
# Worktrees
56+
.worktrees
57+
.worktrees/
58+
59+
4760

4861

‎docs/superpowers/specs/2026-09-14-zorp-developer-mode-pretraining-design.md‎

Lines changed: 259 additions & 0 deletions
Large diffs are not rendered by default.

‎scripts/check-release-version.sh‎

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,38 @@ fi
127127

128128
# Check excluded product packages that manage their own manifests: zorp-desktop
129129
desktop_cargo="$dir/zorp-desktop/Cargo.toml"
130+
desktop_bridge_cargo="$dir/zorp-desktop/bridge/Cargo.toml"
131+
desktop_plist="$dir/zorp-desktop/Zorp/Info.plist"
130132
desktop_tauri="$dir/zorp-desktop/tauri.conf.json"
131133

132-
if [ -f "$desktop_cargo" ]; then
133-
desktop_cargo_version="v$(sed -n 's/^version = "\(.*\)"$/\1/p' "$desktop_cargo" | head -n 1)"
134+
if [ -f "$desktop_bridge_cargo" ]; then
135+
desktop_cargo_version="v$(sed -n 's/^version = "\(.*\)"$/\1/p' "$desktop_bridge_cargo" | head -n 1)"
134136
if [ "$tag" != "$desktop_cargo_version" ]; then
135-
echo "zorp-desktop/Cargo.toml: version is '${desktop_cargo_version#v}' but this release is '$tag'" >&2
137+
echo "zorp-desktop/bridge/Cargo.toml: version is '${desktop_cargo_version#v}' but this release is '$tag'" >&2
136138
fail=1
137139
else
138-
echo "zorp-desktop/Cargo.toml: version matches $tag"
140+
echo "zorp-desktop/bridge/Cargo.toml: version matches $tag"
141+
fi
142+
elif [ -f "$desktop_cargo" ]; then
143+
raw_version="$(sed -n 's/^version = "\(.*\)"$/\1/p' "$desktop_cargo" | head -n 1)"
144+
if [ -n "$raw_version" ]; then
145+
desktop_cargo_version="v$raw_version"
146+
if [ "$tag" != "$desktop_cargo_version" ]; then
147+
echo "zorp-desktop/Cargo.toml: version is '${desktop_cargo_version#v}' but this release is '$tag'" >&2
148+
fail=1
149+
else
150+
echo "zorp-desktop/Cargo.toml: version matches $tag"
151+
fi
152+
fi
153+
fi
154+
155+
if [ -f "$desktop_plist" ]; then
156+
desktop_plist_version="v$(sed -n '/<key>CFBundleShortVersionString<\/key>/{n;s/.*<string>\(.*\)<\/string>.*/\1/p;}' "$desktop_plist" | head -n 1)"
157+
if [ "$tag" != "$desktop_plist_version" ]; then
158+
echo "zorp-desktop/Zorp/Info.plist: version is '${desktop_plist_version#v}' but this release is '$tag'" >&2
159+
fail=1
160+
else
161+
echo "zorp-desktop/Zorp/Info.plist: version matches $tag"
139162
fi
140163
fi
141164

0 commit comments

Comments
 (0)