Skip to content

Commit 0d21b97

Browse files
committed
fixed GTK render issues for hyprland
1 parent ff976c1 commit 0d21b97

102 files changed

Lines changed: 20282 additions & 20181 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/build.ymlβ€Ž

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
name: Build
2-
3-
on:
4-
push:
5-
branches: ["*"]
6-
pull_request:
7-
branches: ["*"]
8-
9-
permissions:
10-
contents: read
11-
12-
jobs:
13-
build:
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
include:
18-
- platform: windows-latest
19-
args: ''
20-
- platform: ubuntu-22.04
21-
args: ''
22-
- platform: macos-latest
23-
args: '--target aarch64-apple-darwin'
24-
- platform: macos-latest
25-
args: '--target x86_64-apple-darwin'
26-
27-
runs-on: ${{ matrix.platform }}
28-
env:
29-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
30-
31-
steps:
32-
- uses: actions/checkout@v4
33-
34-
- name: Install system dependencies (Linux)
35-
if: matrix.platform == 'ubuntu-22.04'
36-
run: |
37-
sudo apt-get update
38-
sudo apt-get install -y \
39-
libwebkit2gtk-4.1-dev \
40-
libappindicator3-dev \
41-
librsvg2-dev \
42-
patchelf
43-
44-
- name: Install Rust stable
45-
uses: dtolnay/rust-toolchain@stable
46-
with:
47-
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
48-
49-
- name: Rust cache
50-
uses: swatinem/rust-cache@v2
51-
with:
52-
workspaces: './src-tauri -> target'
53-
54-
- name: Setup Bun
55-
uses: oven-sh/setup-bun@v2
56-
with:
57-
bun-version: latest
58-
59-
- name: Install frontend dependencies
60-
run: bun install
61-
62-
- name: Build with Tauri
63-
uses: tauri-apps/tauri-action@v0
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
with:
67-
args: ${{ matrix.args }}
68-
69-
- name: Upload artifacts
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: branchcode-${{ matrix.platform }}${{ matrix.args && format('-{0}', matrix.args) || '' }}
73-
path: |
74-
src-tauri/target/release/bundle/**/*.exe
75-
src-tauri/target/release/bundle/**/*.msi
76-
src-tauri/target/release/bundle/**/*.AppImage
77-
src-tauri/target/release/bundle/**/*.deb
78-
src-tauri/target/release/bundle/**/*.app
79-
src-tauri/target/release/bundle/**/*.dmg
80-
if-no-files-found: warn
81-
retention-days: 30
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
pull_request:
7+
branches: ["*"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- platform: windows-latest
19+
args: ''
20+
- platform: ubuntu-22.04
21+
args: ''
22+
- platform: macos-latest
23+
args: '--target aarch64-apple-darwin'
24+
- platform: macos-latest
25+
args: '--target x86_64-apple-darwin'
26+
27+
runs-on: ${{ matrix.platform }}
28+
env:
29+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Install system dependencies (Linux)
35+
if: matrix.platform == 'ubuntu-22.04'
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y \
39+
libwebkit2gtk-4.1-dev \
40+
libappindicator3-dev \
41+
librsvg2-dev \
42+
patchelf
43+
44+
- name: Install Rust stable
45+
uses: dtolnay/rust-toolchain@stable
46+
with:
47+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
48+
49+
- name: Rust cache
50+
uses: swatinem/rust-cache@v2
51+
with:
52+
workspaces: './src-tauri -> target'
53+
54+
- name: Setup Bun
55+
uses: oven-sh/setup-bun@v2
56+
with:
57+
bun-version: latest
58+
59+
- name: Install frontend dependencies
60+
run: bun install
61+
62+
- name: Build with Tauri
63+
uses: tauri-apps/tauri-action@v0
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
args: ${{ matrix.args }}
68+
69+
- name: Upload artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: branchcode-${{ matrix.platform }}${{ matrix.args && format('-{0}', matrix.args) || '' }}
73+
path: |
74+
src-tauri/target/release/bundle/**/*.exe
75+
src-tauri/target/release/bundle/**/*.msi
76+
src-tauri/target/release/bundle/**/*.AppImage
77+
src-tauri/target/release/bundle/**/*.deb
78+
src-tauri/target/release/bundle/**/*.app
79+
src-tauri/target/release/bundle/**/*.dmg
80+
if-no-files-found: warn
81+
retention-days: 30
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
name: Release
2-
3-
on:
4-
push:
5-
tags: ['v*']
6-
7-
permissions:
8-
contents: write
9-
10-
jobs:
11-
release:
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
include:
16-
- platform: windows-latest
17-
args: '--bundles nsis'
18-
- platform: ubuntu-22.04
19-
args: ''
20-
- platform: macos-latest
21-
args: '--target aarch64-apple-darwin'
22-
- platform: macos-latest
23-
args: '--target x86_64-apple-darwin'
24-
25-
runs-on: ${{ matrix.platform }}
26-
27-
steps:
28-
- uses: actions/checkout@v4
29-
30-
- name: Install system dependencies (Linux)
31-
if: matrix.platform == 'ubuntu-22.04'
32-
run: |
33-
sudo apt-get update
34-
sudo apt-get install -y \
35-
libwebkit2gtk-4.1-dev \
36-
libappindicator3-dev \
37-
librsvg2-dev \
38-
patchelf
39-
40-
- name: Install Rust stable
41-
uses: dtolnay/rust-toolchain@stable
42-
with:
43-
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
44-
45-
- name: Rust cache
46-
uses: swatinem/rust-cache@v2
47-
with:
48-
workspaces: './src-tauri -> target'
49-
50-
- name: Setup Bun
51-
uses: oven-sh/setup-bun@v2
52-
with:
53-
bun-version: latest
54-
55-
- name: Install frontend dependencies
56-
run: bun install
57-
58-
- name: Build with Tauri
59-
uses: tauri-apps/tauri-action@v0
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
63-
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''
64-
with:
65-
tagName: v__VERSION__
66-
releaseName: 'Branchcode v__VERSION__'
67-
releaseBody: 'See the changelog for details.'
68-
releaseDraft: false
69-
prerelease: false
70-
args: ${{ matrix.args }}
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: windows-latest
17+
args: '--bundles nsis'
18+
- platform: ubuntu-22.04
19+
args: ''
20+
- platform: macos-latest
21+
args: '--target aarch64-apple-darwin'
22+
- platform: macos-latest
23+
args: '--target x86_64-apple-darwin'
24+
25+
runs-on: ${{ matrix.platform }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install system dependencies (Linux)
31+
if: matrix.platform == 'ubuntu-22.04'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y \
35+
libwebkit2gtk-4.1-dev \
36+
libappindicator3-dev \
37+
librsvg2-dev \
38+
patchelf
39+
40+
- name: Install Rust stable
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
44+
45+
- name: Rust cache
46+
uses: swatinem/rust-cache@v2
47+
with:
48+
workspaces: './src-tauri -> target'
49+
50+
- name: Setup Bun
51+
uses: oven-sh/setup-bun@v2
52+
with:
53+
bun-version: latest
54+
55+
- name: Install frontend dependencies
56+
run: bun install
57+
58+
- name: Build with Tauri
59+
uses: tauri-apps/tauri-action@v0
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
63+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''
64+
with:
65+
tagName: v__VERSION__
66+
releaseName: 'Branchcode v__VERSION__'
67+
releaseBody: 'See the changelog for details.'
68+
releaseDraft: false
69+
prerelease: false
70+
args: ${{ matrix.args }}

β€ŽAGENTS.mdβ€Ž

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Branchcode β€” Agent Notes
2+
3+
## What this is
4+
5+
AI-native desktop IDE built with **Tauri v2** (Rust backend + React 19 frontend), packaging OpenCode as a local server. Early pre-beta; primarily tested on Windows.
6+
7+
## Developer commands
8+
9+
```
10+
bun install # install deps (packageManager: bun@1.3.11)
11+
bun run tauri dev # full dev: starts Vite (port 1420) + Tauri app window
12+
bun run dev # Vite only (port 1420)
13+
bun run build # Vite production build β†’ dist/
14+
bun run lint # tsc --noEmit (no ESLint, no Prettier)
15+
```
16+
17+
**Prerequisites:** Bun, Rust stable, OpenCode installed and in PATH.
18+
19+
## Architecture
20+
21+
```
22+
src/ β†’ React frontend (components, hooks, lib/tauri.ts IPC wrappers)
23+
src-tauri/src/ β†’ Rust backend (Tauri commands, OpenCode server/client, PTY, SSH, Git)
24+
```
25+
26+
- **Entry points:** `src/main.tsx` (React), `src-tauri/src/main.rs` β†’ `branchcode_lib::run()` (Rust)
27+
- **Frontend β†’ Backend:** All communication via Tauri `invoke_handler` (see `lib.rs` for command list)
28+
- **OpenCode server:** Started on port **4096** at app launch; restarted per-session when workdir changes
29+
- **Session metadata:** Persisted to `{data_dir}/branchcode/session_meta.json` (workdirs, SSH configs)
30+
31+
## Critical gotchas
32+
33+
- **OpenCode requires a git repo** β€” without `.git`, file tool calls hang indefinitely. SSH temp workspaces auto-init a repo.
34+
- **SSH sessions need `"permission":"allow"` in `opencode.json`** β€” without auto-approve, write/edit tools hang waiting for user approval that never comes (headless API mode).
35+
- **Server restarts on workdir change** β€” `send_message` detects workdir mismatch, stops old server, starts new one. SSH sessions use a separate temp workspace flow.
36+
- **Windows-only tested** β€” Linux/macOS builds exist in CI but are unverified. Do not assume cross-platform correctness.
37+
38+
## CI / Release
39+
40+
- **Build workflow:** `.github/workflows/build.yml` β€” Windows, Ubuntu 22.04, macOS (aarch64 + x86_64)
41+
- **Release workflow:** `.github/workflows/release.yml` β€” triggered on `v*` tags; Windows uses `--bundles nsis`
42+
- **Linux deps:** `libwebkit2gtk-4.1-dev`, `libappindicator3-dev`, `librsvg2-dev`, `patchelf`
43+
- **Release profile:** LTO=true, codegen-units=1, strip=true, opt-level="s"
44+
45+
## Repo boundaries
46+
47+
- `openchamber/` is a **separate nested git repo**, gitignored by the parent. Do not modify it as part of this project.
48+
- `src-tauri/target/` and `src-tauri/gen/` are build artifacts (gitignored).
49+
- `src-tauri/Cargo.toml`: Rust MSRV 1.77, edition 2021. Key deps: russh (SSH), portable-pty, tokio, reqwest.
50+
51+
## Style / conventions
52+
53+
- TypeScript strict mode: `noUnusedLocals`, `noUnusedParameters`, `noUncheckedIndexedAccess` all enabled
54+
- No ESLint or Prettier config β€” `tsc --noEmit` is the only lint gate
55+
- Frontend: Tailwind CSS v4 via `@tailwindcss/vite` plugin, no PostCSS
56+
- Follow existing patterns; dark theme with `#0a0a0a` base

0 commit comments

Comments
Β (0)