Skip to content

Commit 79edaf8

Browse files
anandgupta42claude
andcommitted
feat: [AI] bring the desktop app into the fork (Tauri + Electron, fully branded)
Adopt the OpenCode desktop app (upstream v1.2.20) into altimate-code as a fully-branded Altimate Code desktop app with no OpenCode leaks. - Pull `packages/{app,ui,desktop,desktop-electron}`; add to the workspace (all `catalog:` deps already satisfied by the root catalog). - Un-skip these packages in `script/upstream/utils/config.ts`; add `keepOurs`, `requireMarkers`, and new branding rules (deep-link scheme `altimate://`, desktop Rust crate names) so future merges stay branded. - Sidecar wiring: the Tauri shell bundles our `altimate` binary as the `opencode-cli` sidecar. Adapt `scripts/{utils,predev,prepare,copy-bundles, finalize-latest-json}.ts` to our build output (`@altimateai/altimate-code-*/ bin/altimate`) and the CI artifact contract. - Branding (no leaks): rebrand the 3 `tauri.*.conf.json` (productName, identifier, scheme, NEW updater pubkey + AltimateAI endpoints), `index.html`, webmanifest, AppStream, Cargo crate names, `cli.rs` WSL install paths (`~/.altimate/bin`, `www.altimate.sh/install`), window title, and i18n (18 locales). Regenerate all icon sets, favicons, PWA icons, NSIS bitmaps, social images, and the `Logo`/`Mark` components from the Altimate brand mark. - Gateway: feature the Altimate LLM Gateway (`altimate-backend`) first in the provider picker with a branded icon + an in-app credential arm; remove the OpenCode Zen onboarding and filter the `opencode`/`opencode-go` providers. - Enhance the generic tool renderer to show full output for custom data tools. - Add `.github/workflows/publish-desktop.yml` (5-platform signed build + Tauri updater) and a publishing runbook in `packages/desktop/README.md`. Verified: typecheck (app/ui/desktop), runtime `/provider` smoke test, native `tauri build` (.app + .dmg, branded Info.plist), visual inspection in-browser and of the launched native app, branding audit (0 leaks), marker guard, and a codex deep review (all findings addressed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f0fb1e1 commit 79edaf8

2,331 files changed

Lines changed: 130797 additions & 21 deletions

File tree

Some content is hidden

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

‎.github/meta/issue.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The fork was created from OpenCode without the desktop app. We want a fully-functional, fully-branded **Altimate Code desktop app** that exposes everything the fork has built, with no OpenCode branding leaks, and a publish-ready CI pipeline.
2+
3+
### Scope
4+
- Adopt the Tauri desktop shell (`packages/desktop`, primary) + Electron shell (`packages/desktop-electron`, secondary) and the SolidJS web UI (`packages/app`, `packages/ui`) from upstream v1.2.20.
5+
- Bundle our `opencode`/`altimate` CLI as the Tauri sidecar so all server-side fork capabilities (SQL, dbt, FinOps, warehouse, altimate-core, the Altimate gateway) are exposed automatically.
6+
- Rebrand every user-facing surface to Altimate Code (names, icons, colors, deep-link scheme, updater endpoints + key) — zero OpenCode leaks.
7+
- Feature the **Altimate LLM Gateway** (`altimate-backend`) provider and remove the OpenCode Zen onboarding.
8+
- Keep future upstream merges branded (un-skip packages, branding rules, `altimate_change` markers).
9+
- Add a CI publish workflow (signed, auto-updating) — ready for org secrets.
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Build, sign, and publish the Altimate Code desktop app (Tauri).
2+
#
3+
# READY, NOT WIRED: this workflow is correct in structure but needs org-provided
4+
# secrets before the first real run. See packages/desktop/README.md for the
5+
# signing/keygen runbook. Required repo secrets/vars:
6+
# - APPLE_CERTIFICATE base64 of the Developer ID Application .p12
7+
# - APPLE_CERTIFICATE_PASSWORD password for that .p12
8+
# - APPLE_SIGNING_IDENTITY e.g. "Developer ID Application: Altimate Inc (TEAMID)"
9+
# - APPLE_API_KEY App Store Connect API key id (for notarization)
10+
# - APPLE_API_ISSUER App Store Connect API issuer id
11+
# - APPLE_API_KEY_BASE64 base64 of the AuthKey_XXXX.p8
12+
# - TAURI_SIGNING_PRIVATE_KEY our updater private key (scratchpad altimate-updater.key)
13+
# - TAURI_SIGNING_PRIVATE_KEY_PASSWORD (empty if the key has no password)
14+
# Windows code-signing (optional) can be added to the matrix later.
15+
#
16+
# The desktop build matrix below MUST stay in sync with `allTargets` in
17+
# packages/opencode/script/build.ts — the sidecar only builds for platforms that
18+
# have an @altimateai/altimate-core NAPI prebuild.
19+
20+
name: publish-desktop
21+
run-name: "desktop ${{ inputs.version || github.ref_name }}"
22+
23+
on:
24+
workflow_dispatch:
25+
inputs:
26+
version:
27+
description: "Release version (e.g. 0.8.11)"
28+
required: true
29+
type: string
30+
channel:
31+
description: "Release channel"
32+
required: true
33+
default: prod
34+
type: choice
35+
options:
36+
- prod
37+
- beta
38+
39+
concurrency: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.version }}
40+
41+
permissions:
42+
contents: write
43+
actions: read # prepare.ts uses `gh run download` to fetch the opencode-cli artifact
44+
45+
jobs:
46+
prepare-release:
47+
runs-on: ubuntu-latest
48+
outputs:
49+
version: ${{ inputs.version }}
50+
tag: v${{ inputs.version }}
51+
release_id: ${{ steps.release.outputs.id }}
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: Create draft release
55+
id: release
56+
env:
57+
GH_TOKEN: ${{ github.token }}
58+
run: |
59+
tag="v${{ inputs.version }}"
60+
existing=$(gh release view "$tag" --json databaseId --jq .databaseId 2>/dev/null || true)
61+
if [ -z "$existing" ]; then
62+
gh release create "$tag" --draft --title "Altimate Code $tag" --notes "Altimate Code desktop $tag"
63+
fi
64+
id=$(gh release view "$tag" --json databaseId --jq .databaseId)
65+
echo "id=$id" >> "$GITHUB_OUTPUT"
66+
67+
build-cli:
68+
# Builds the opencode/altimate sidecar binaries for every target and uploads
69+
# them as the `opencode-cli` artifact that packages/desktop/scripts/prepare.ts
70+
# downloads. Artifact name is internal — keep it `opencode-cli`.
71+
needs: prepare-release
72+
runs-on: macos-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
with:
76+
fetch-tags: true
77+
- uses: oven-sh/setup-bun@v2
78+
with:
79+
bun-version: "1.3.10"
80+
- name: Build CLI (all targets)
81+
run: bun ./packages/opencode/script/build.ts
82+
env:
83+
OPENCODE_VERSION: ${{ inputs.version }}
84+
- uses: actions/upload-artifact@v4
85+
with:
86+
name: opencode-cli
87+
path: packages/opencode/dist
88+
89+
build-tauri:
90+
needs: [prepare-release, build-cli]
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
settings:
95+
- host: macos-latest
96+
target: aarch64-apple-darwin
97+
- host: macos-latest
98+
target: x86_64-apple-darwin
99+
- host: windows-latest
100+
target: x86_64-pc-windows-msvc
101+
- host: ubuntu-latest
102+
target: x86_64-unknown-linux-gnu
103+
- host: ubuntu-24.04-arm
104+
target: aarch64-unknown-linux-gnu
105+
runs-on: ${{ matrix.settings.host }}
106+
steps:
107+
- uses: actions/checkout@v4
108+
with:
109+
fetch-tags: true
110+
111+
- uses: oven-sh/setup-bun@v2
112+
with:
113+
bun-version: "1.3.10"
114+
115+
- name: Install Linux deps
116+
if: contains(matrix.settings.host, 'ubuntu')
117+
run: |
118+
sudo apt-get update
119+
sudo apt-get install -y --no-install-recommends \
120+
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
121+
122+
- uses: dtolnay/rust-toolchain@stable
123+
with:
124+
targets: ${{ matrix.settings.target }}
125+
126+
- uses: Swatinem/rust-cache@v2
127+
with:
128+
workspaces: packages/desktop/src-tauri
129+
shared-key: ${{ matrix.settings.target }}
130+
131+
- name: Import Apple signing certificate
132+
if: runner.os == 'macOS'
133+
uses: apple-actions/import-codesign-certs@v3
134+
with:
135+
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
136+
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
137+
138+
- name: Stage notarization API key
139+
# `secrets.*` cannot be referenced in `if:` — pass it via env and check in bash.
140+
if: runner.os == 'macOS'
141+
env:
142+
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }}
143+
run: |
144+
if [ -n "$APPLE_API_KEY_BASE64" ]; then
145+
echo "$APPLE_API_KEY_BASE64" | base64 -d > "$RUNNER_TEMP/apple-api-key.p8"
146+
echo "APPLE_API_KEY_PATH=$RUNNER_TEMP/apple-api-key.p8" >> "$GITHUB_ENV"
147+
fi
148+
149+
- name: Prepare sidecar (download opencode-cli, copy into src-tauri/sidecars)
150+
run: |
151+
cd packages/desktop
152+
bun ./scripts/prepare.ts
153+
env:
154+
GH_TOKEN: ${{ github.token }}
155+
GITHUB_RUN_ID: ${{ github.run_id }}
156+
RUST_TARGET: ${{ matrix.settings.target }}
157+
OPENCODE_VERSION: ${{ inputs.version }}
158+
159+
- name: Build, sign, and upload
160+
uses: tauri-apps/tauri-action@v0
161+
env:
162+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
163+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
164+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
165+
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
166+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
167+
with:
168+
projectPath: packages/desktop
169+
releaseId: ${{ needs.prepare-release.outputs.release_id }}
170+
tagName: ${{ needs.prepare-release.outputs.tag }}
171+
releaseDraft: true
172+
updaterJsonPreferNsis: true
173+
releaseAssetNamePattern: altimate-code-desktop-[platform]-[arch][ext]
174+
args: >-
175+
--target ${{ matrix.settings.target }}
176+
--config ${{ (inputs.channel == 'beta' && './src-tauri/tauri.beta.conf.json') || './src-tauri/tauri.prod.conf.json' }}
177+
178+
finalize:
179+
needs: [prepare-release, build-tauri]
180+
runs-on: ubuntu-latest
181+
steps:
182+
- uses: actions/checkout@v4
183+
- uses: oven-sh/setup-bun@v2
184+
with:
185+
bun-version: "1.3.10"
186+
- name: Finalize latest.json (updater manifest)
187+
run: bun ./packages/desktop/scripts/finalize-latest-json.ts
188+
env:
189+
GH_TOKEN: ${{ github.token }}
190+
GH_REPO: ${{ github.repository }}
191+
OPENCODE_RELEASE: ${{ needs.prepare-release.outputs.release_id }}
192+
OPENCODE_VERSION: ${{ inputs.version }}

0 commit comments

Comments
 (0)