Skip to content

Commit 0c154e6

Browse files
committed
Merge branch 'dev' into feat/canceled-prompts-in-history
2 parents 4f96975 + fcc927e commit 0c154e6

338 files changed

Lines changed: 25502 additions & 8462 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/actions/setup-bun/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
- name: Mount Bun Cache
77
uses: useblacksmith/stickydisk@v1
88
with:
9-
key: ${{ github.repository }}-bun-cache
9+
key: ${{ github.repository }}-bun-cache-${{ runner.os }}
1010
path: ~/.bun
1111

1212
- name: Setup Bun

.github/workflows/test.yml

Lines changed: 46 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,45 @@ on:
77
pull_request:
88
workflow_dispatch:
99
jobs:
10-
test:
11-
name: test (${{ matrix.settings.name }})
10+
unit:
11+
name: unit (linux)
12+
runs-on: blacksmith-4vcpu-ubuntu-2404
13+
defaults:
14+
run:
15+
shell: bash
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Setup Bun
23+
uses: ./.github/actions/setup-bun
24+
25+
- name: Configure git identity
26+
run: |
27+
git config --global user.email "bot@opencode.ai"
28+
git config --global user.name "opencode"
29+
30+
- name: Run unit tests
31+
run: bun turbo test
32+
33+
e2e:
34+
name: e2e (${{ matrix.settings.name }})
35+
needs: unit
1236
strategy:
1337
fail-fast: false
1438
matrix:
1539
settings:
1640
- name: linux
1741
host: blacksmith-4vcpu-ubuntu-2404
1842
playwright: bunx playwright install --with-deps
19-
workdir: .
20-
command: |
21-
git config --global user.email "bot@opencode.ai"
22-
git config --global user.name "opencode"
23-
bun turbo test
2443
- name: windows
25-
host: windows-latest
44+
host: blacksmith-4vcpu-windows-2025
2645
playwright: bunx playwright install
27-
workdir: packages/app
28-
command: bun test:e2e:local
2946
runs-on: ${{ matrix.settings.host }}
47+
env:
48+
PLAYWRIGHT_BROWSERS_PATH: 0
3049
defaults:
3150
run:
3251
shell: bash
@@ -43,87 +62,10 @@ jobs:
4362
working-directory: packages/app
4463
run: ${{ matrix.settings.playwright }}
4564

46-
- name: Set OS-specific paths
47-
run: |
48-
if [ "${{ runner.os }}" = "Windows" ]; then
49-
printf '%s\n' "OPENCODE_E2E_ROOT=${{ runner.temp }}\\opencode-e2e" >> "$GITHUB_ENV"
50-
printf '%s\n' "OPENCODE_TEST_HOME=${{ runner.temp }}\\opencode-e2e\\home" >> "$GITHUB_ENV"
51-
printf '%s\n' "XDG_DATA_HOME=${{ runner.temp }}\\opencode-e2e\\share" >> "$GITHUB_ENV"
52-
printf '%s\n' "XDG_CACHE_HOME=${{ runner.temp }}\\opencode-e2e\\cache" >> "$GITHUB_ENV"
53-
printf '%s\n' "XDG_CONFIG_HOME=${{ runner.temp }}\\opencode-e2e\\config" >> "$GITHUB_ENV"
54-
printf '%s\n' "XDG_STATE_HOME=${{ runner.temp }}\\opencode-e2e\\state" >> "$GITHUB_ENV"
55-
else
56-
printf '%s\n' "OPENCODE_E2E_ROOT=${{ runner.temp }}/opencode-e2e" >> "$GITHUB_ENV"
57-
printf '%s\n' "OPENCODE_TEST_HOME=${{ runner.temp }}/opencode-e2e/home" >> "$GITHUB_ENV"
58-
printf '%s\n' "XDG_DATA_HOME=${{ runner.temp }}/opencode-e2e/share" >> "$GITHUB_ENV"
59-
printf '%s\n' "XDG_CACHE_HOME=${{ runner.temp }}/opencode-e2e/cache" >> "$GITHUB_ENV"
60-
printf '%s\n' "XDG_CONFIG_HOME=${{ runner.temp }}/opencode-e2e/config" >> "$GITHUB_ENV"
61-
printf '%s\n' "XDG_STATE_HOME=${{ runner.temp }}/opencode-e2e/state" >> "$GITHUB_ENV"
62-
fi
63-
64-
- name: Seed opencode data
65-
if: matrix.settings.name != 'windows'
66-
working-directory: packages/opencode
67-
run: bun script/seed-e2e.ts
68-
env:
69-
OPENCODE_DISABLE_SHARE: "true"
70-
OPENCODE_DISABLE_LSP_DOWNLOAD: "true"
71-
OPENCODE_DISABLE_DEFAULT_PLUGINS: "true"
72-
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: "true"
73-
OPENCODE_TEST_HOME: ${{ env.OPENCODE_TEST_HOME }}
74-
XDG_DATA_HOME: ${{ env.XDG_DATA_HOME }}
75-
XDG_CACHE_HOME: ${{ env.XDG_CACHE_HOME }}
76-
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}
77-
XDG_STATE_HOME: ${{ env.XDG_STATE_HOME }}
78-
OPENCODE_E2E_PROJECT_DIR: ${{ github.workspace }}
79-
OPENCODE_E2E_SESSION_TITLE: "E2E Session"
80-
OPENCODE_E2E_MESSAGE: "Seeded for UI e2e"
81-
OPENCODE_E2E_MODEL: "opencode/gpt-5-nano"
82-
83-
- name: Run opencode server
84-
if: matrix.settings.name != 'windows'
85-
working-directory: packages/opencode
86-
run: bun dev -- --print-logs --log-level WARN serve --port 4096 --hostname 127.0.0.1 &
87-
env:
88-
OPENCODE_DISABLE_SHARE: "true"
89-
OPENCODE_DISABLE_LSP_DOWNLOAD: "true"
90-
OPENCODE_DISABLE_DEFAULT_PLUGINS: "true"
91-
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: "true"
92-
OPENCODE_TEST_HOME: ${{ env.OPENCODE_TEST_HOME }}
93-
XDG_DATA_HOME: ${{ env.XDG_DATA_HOME }}
94-
XDG_CACHE_HOME: ${{ env.XDG_CACHE_HOME }}
95-
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}
96-
XDG_STATE_HOME: ${{ env.XDG_STATE_HOME }}
97-
OPENCODE_CLIENT: "app"
98-
99-
- name: Wait for opencode server
100-
if: matrix.settings.name != 'windows'
101-
run: |
102-
for i in {1..120}; do
103-
curl -fsS "http://127.0.0.1:4096/global/health" > /dev/null && exit 0
104-
sleep 1
105-
done
106-
exit 1
107-
108-
- name: run
109-
working-directory: ${{ matrix.settings.workdir }}
110-
run: ${{ matrix.settings.command }}
65+
- name: Run app e2e tests
66+
run: bun --cwd packages/app test:e2e:local
11167
env:
11268
CI: true
113-
OPENCODE_DISABLE_SHARE: "true"
114-
OPENCODE_DISABLE_LSP_DOWNLOAD: "true"
115-
OPENCODE_DISABLE_DEFAULT_PLUGINS: "true"
116-
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: "true"
117-
OPENCODE_TEST_HOME: ${{ env.OPENCODE_TEST_HOME }}
118-
XDG_DATA_HOME: ${{ env.XDG_DATA_HOME }}
119-
XDG_CACHE_HOME: ${{ env.XDG_CACHE_HOME }}
120-
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}
121-
XDG_STATE_HOME: ${{ env.XDG_STATE_HOME }}
122-
PLAYWRIGHT_SERVER_HOST: "127.0.0.1"
123-
PLAYWRIGHT_SERVER_PORT: "4096"
124-
VITE_OPENCODE_SERVER_HOST: "127.0.0.1"
125-
VITE_OPENCODE_SERVER_PORT: "4096"
126-
OPENCODE_CLIENT: "app"
12769
timeout-minutes: 30
12870

12971
- name: Upload Playwright artifacts
@@ -136,3 +78,18 @@ jobs:
13678
path: |
13779
packages/app/e2e/test-results
13880
packages/app/e2e/playwright-report
81+
82+
required:
83+
name: test (linux)
84+
runs-on: blacksmith-4vcpu-ubuntu-2404
85+
needs:
86+
- unit
87+
- e2e
88+
if: always()
89+
steps:
90+
- name: Verify upstream test jobs passed
91+
run: |
92+
echo "unit=${{ needs.unit.result }}"
93+
echo "e2e=${{ needs.e2e.result }}"
94+
test "${{ needs.unit.result }}" = "success"
95+
test "${{ needs.e2e.result }}" = "success"

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sst-env.d.ts
2-
desktop/src/bindings.ts
2+
packages/desktop/src/bindings.ts

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- To regenerate the JavaScript SDK, run `./packages/sdk/js/script/build.ts`.
22
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
33
- The default branch in this repo is `dev`.
4+
- Local `main` ref may not exist; use `dev` or `origin/dev` for diffs.
45
- Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
56

67
## Style Guide

bun.lock

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-ufEpxjmlJeft9tI+WxxO+Zbh1pdAaLOURCDBpoQqR0w=",
4-
"aarch64-linux": "sha256-z3K6W5oYZNUdV0rjoAZjvNQcifM5bXamLIrD+ZvJ4kA=",
5-
"aarch64-darwin": "sha256-+QikplmNhxGF2Nd4L1BG/xyl+24GVhDYMTtK6xCKy/s=",
6-
"x86_64-darwin": "sha256-hAcrCT2X02ymwgj/0BAmD2gF66ylGYzbfcqPta/LVEU="
3+
"x86_64-linux": "sha256-FMrW0aXYOgRe3ginr4l1LwCszsD/r5CQkvRU6HHA7iw=",
4+
"aarch64-linux": "sha256-NZTtIsFZshWOp5mVFvrcVeHUlx62QcsSJKPYjwPhmYk=",
5+
"aarch64-darwin": "sha256-6cWt8KaqojTJ/b3WSYb3dDPTNuKBDt9Fxx6p/WGBnik=",
6+
"x86_64-darwin": "sha256-F6zuxV34RQ9RTjH0c22rGZaPrhemhRUPi+OkF+Y0ytM="
77
}
88
}

packages/app/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
22
"name": "@opencode-ai/app",
3-
"version": "1.1.52",
3+
"version": "1.1.53",
44
"description": "",
55
"type": "module",
66
"exports": {
77
".": "./src/index.ts",
8-
"./vite": "./vite.js"
8+
"./vite": "./vite.js",
9+
"./index.css": "./src/index.css"
910
},
1011
"scripts": {
1112
"typecheck": "tsgo -b",
1213
"start": "vite",
1314
"dev": "vite",
1415
"build": "vite build",
1516
"serve": "vite preview",
16-
"test": "playwright test",
17+
"test": "bun run test:unit",
18+
"test:unit": "bun test --preload ./happydom.ts ./src",
19+
"test:unit:watch": "bun test --watch --preload ./happydom.ts ./src",
1720
"test:e2e": "playwright test",
1821
"test:e2e:local": "bun script/e2e-local.ts",
1922
"test:e2e:ui": "playwright test --ui",

packages/app/src/addons/serialize.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function writeAndWait(term: Terminal, data: string): Promise<void> {
3636
})
3737
}
3838

39-
describe.skip("SerializeAddon", () => {
39+
describe("SerializeAddon", () => {
4040
describe("ANSI color preservation", () => {
4141
test("should preserve text attributes (bold, italic, underline)", async () => {
4242
const { term, addon } = createTerminal()

0 commit comments

Comments
 (0)