Skip to content

Commit 17b0abe

Browse files
synleclaude
andcommitted
docs: update sidecar binary setup, CI workflow, and troubleshooting
- CLAUDE.md: document sidecar binary strategy (download first, committed fallback), add curl commands for updating all 6 platform binaries, note PR artifact comments in CI section - DEV.md: update sidecar section to reflect download-first strategy, add System Events permission prompt to troubleshooting table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 37452d1 commit 17b0abe

2 files changed

Lines changed: 34 additions & 17 deletions

File tree

CLAUDE.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cd src-tauri && cargo test # Run all Rust backend tests
4343

4444
### CI
4545

46-
GitHub Actions (`build.yml`) runs `npm test` and `cargo test` on all platforms (macOS ARM/Intel, Windows, Linux) for every push and PR.
46+
GitHub Actions (`build.yml`) runs `npm test` and `cargo test` on all platforms (macOS ARM/Intel, Windows, Linux) for every push and PR. On PRs, a comment is posted with download links for each platform's build artifacts.
4747

4848
## Formatting
4949

@@ -85,17 +85,31 @@ These are documented inline in `config.rs` with WARNING comments.
8585

8686
The display-dj CLI sidecar handles all platform-specific display dependencies internally. No external tools need to be installed for display control.
8787

88-
The sidecar version is defined in `package.json` under `displayDjCliVersion`. The Rust build script (`src-tauri/build.rs`) reads this at compile time and downloads the matching release from GitHub. The `DISPLAY_DJ_CLI_VERSION` env var can override it (used by CI `workflow_dispatch`).
88+
### Sidecar binaries
8989

90-
For manual builds, download from [display-dj-cli releases](https://github.com/synle/display-dj-cli/releases) or build from source:
90+
Pre-built sidecar binaries for all 6 platforms are committed in `src-tauri/binaries/`. The build script (`src-tauri/build.rs`) tries to download the latest from GitHub releases first, then falls back to the committed binary if the download fails (offline, timeout, etc.).
91+
92+
The sidecar version is defined in `package.json` under `displayDjCliVersion`. The `DISPLAY_DJ_CLI_VERSION` env var can override it (used by CI `workflow_dispatch`).
93+
94+
To update the committed binaries after a version bump, run from the project root:
9195

9296
```bash
93-
git clone https://github.com/synle/display-dj-cli.git
94-
cd display-dj-cli
95-
cargo build --release
96-
cp target/release/display-dj ../display-dj2/src-tauri/binaries/display-dj-server-<target-triple>
97+
VERSION=$(node -p "require('./package.json').displayDjCliVersion")
98+
cd src-tauri/binaries
99+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-macos-arm64" -o display-dj-server-aarch64-apple-darwin
100+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-macos-x64" -o display-dj-server-x86_64-apple-darwin
101+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-windows-x64.exe" -o display-dj-server-x86_64-pc-windows-msvc.exe
102+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-windows-arm64.exe" -o display-dj-server-aarch64-pc-windows-msvc.exe
103+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-linux-x64" -o display-dj-server-x86_64-unknown-linux-gnu
104+
curl -fSL "https://github.com/synle/display-dj-cli/releases/download/${VERSION}/display-dj-linux-arm64" -o display-dj-server-aarch64-unknown-linux-gnu
105+
chmod 755 display-dj-server-*
97106
```
98107

108+
### CI
109+
110+
- **`build.yml`**: Runs tests and builds on all platforms for every push and PR. On PRs, posts a comment with artifact download links.
111+
- **`release.yml`**: Triggered by `v*` tags. Builds all platforms and uploads artifacts to a GitHub release (created as draft, publish manually).
112+
99113
### Linux (additional)
100114

101115
```bash

DEV.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,9 @@ Format: `command/<action>/<value>`
584584

585585
## display-dj CLI Sidecar
586586

587-
The [display-dj CLI](https://github.com/synle/display-dj-cli) is bundled as a Tauri sidecar. The version is defined in `package.json` under `displayDjCliVersion`. The build script (`src-tauri/build.rs`) downloads the matching release at compile time.
587+
The [display-dj CLI](https://github.com/synle/display-dj-cli) is bundled as a Tauri sidecar. The version is defined in `package.json` under `displayDjCliVersion`.
588+
589+
Pre-built binaries for all 6 platforms are committed to the repo. The build script (`src-tauri/build.rs`) tries to download the latest from GitHub releases first (10s timeout), then falls back to the committed binary if the download fails. This enables offline builds and faster CI.
588590

589591
### Sidecar binaries
590592

@@ -633,12 +635,13 @@ kill %1
633635

634636
## Troubleshooting
635637

636-
| Problem | Fix |
637-
| ------------------------------------- | ----------------------------------------------------------------------------------------------- |
638-
| `command not found: rustc` | Run `source "$HOME/.cargo/env"` or reopen terminal |
639-
| First build takes 5+ minutes | Normal. Rust compiles from source. Subsequent runs are ~5-15s |
640-
| App launched but can't find it | System tray app. macOS: menu bar top-right. Windows: system tray bottom-right. Linux: top panel |
641-
| "sidecar not found" | Binary missing from `src-tauri/binaries/`. See [sidecar section](#display-dj-cli-sidecar) |
642-
| "server did not become ready" | Check binary is executable (`chmod +x`), port available (`lsof -i :51337`), test directly |
643-
| "No displays found" | Run `./src-tauri/binaries/display-dj-server-* list` directly. Linux: check `ddcutil detect` |
644-
| Dark mode toggle does nothing (Linux) | Requires GNOME. Check `echo $XDG_CURRENT_DESKTOP` |
638+
| Problem | Fix |
639+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
640+
| `command not found: rustc` | Run `source "$HOME/.cargo/env"` or reopen terminal |
641+
| First build takes 5+ minutes | Normal. Rust compiles from source. Subsequent runs are ~5-15s |
642+
| App launched but can't find it | System tray app. macOS: menu bar top-right. Windows: system tray bottom-right. Linux: top panel |
643+
| "sidecar not found" | Binary missing from `src-tauri/binaries/`. See [sidecar section](#display-dj-cli-sidecar) |
644+
| "server did not become ready" | Check binary is executable (`chmod +x`), port available (`lsof -i :51337`), test directly |
645+
| "No displays found" | Run `./src-tauri/binaries/display-dj-server-* list` directly. Linux: check `ddcutil detect` |
646+
| Dark mode toggle does nothing (Linux) | Requires GNOME. Check `echo $XDG_CURRENT_DESKTOP` |
647+
| macOS "System Events" permission prompt | Expected on first launch. Volume control uses `osascript` which requires System Events access. Click Allow — only prompts once |

0 commit comments

Comments
 (0)