Skip to content

Commit be315b1

Browse files
committed
chore: merge beta into dev
Brings the desktop beta work into dev as a merge commit, so its history is kept. Core, server and client changes from beta were backported to dev one PR at a time first (#59081 to #59107). Left out of this merge, so dev keeps its current behaviour: - Generated UI, entirely: the plugin-genui package, its core registration and publishing, the session-ui surfaces, charts, form replies and streaming tool input, the app setting and its strings, tool-input delta publishing, and their tests. It lands on dev later through its own pull request. - The `ast-grep-ignore: no-star-import` comment in cross-spawn-spawner.ts, which lint:effect-patterns still needs. Notes: - Dev-channel builds now use their own service-dev.json, port and opencode-dev.db (#58331), so dev-build users start on a fresh database. - #56550 (plugin instruction entries) and #57527 (untracked folder rows) come in as on beta; follow-ups go to dev. - Docs from beta are pointed at check-test.yml, after the workflow rename. - #59132's fix (settings toggles MCP servers in the session's location) is ported onto beta's rewritten Extensions page, and #59131's browser title test joins beta's tab tests.
2 parents ec09e45 + ca7d60b commit be315b1

1,304 files changed

Lines changed: 76933 additions & 24446 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ runs:
5858
with:
5959
path: ${{ steps.cache.outputs.dir }}
6060
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ steps.cache.outputs.version }}-${{ hashFiles('bun.lock', 'patches/**') }}
61+
# Each dev merge changes beta's bun.lock. Beta falls back to the newest cache for the same Bun version
62+
# (Bun's cache stores every package version separately) instead of installing everything from npm.
63+
restore-keys: ${{ (github.ref_name == 'beta' && format('{0}-{1}-bun-{2}-', runner.os, runner.arch, steps.cache.outputs.version)) || '' }}
6164

6265
- name: Install setuptools for distutils compatibility
6366
run: python3 -m pip install setuptools || pip install setuptools || true

‎.github/pull_request_template.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ Please provide a description of the issue, the changes you made to fix it, and w
1717

1818
### How did you verify your code works?
1919

20+
### Visual
21+
22+
_Optional, for user-facing changes: a small looping animated SVG (240×72) of the change, shown in the desktop app's "What's new in beta". Replace the block below or delete this section._
23+
24+
```svg
25+
```
26+
2027
### Screenshots / recordings
2128

2229
_If this is a UI change, please include a screenshot or recording._

‎.github/workflows/check-storybook.yml‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

‎.github/workflows/check-test.yml‎

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ on:
44
push:
55
branches:
66
- dev
7+
- beta
78
pull_request:
89
types: [opened, synchronize, reopened, ready_for_review]
910
workflow_dispatch:
11+
inputs:
12+
quarantine:
13+
description: Run only the quarantined browser tests (packages/app/e2e/QUARANTINE.md)
14+
type: boolean
15+
default: false
1016

1117
concurrency:
12-
# Keep every run on dev so cancelled checks do not pollute the default branch
13-
# commit history. PRs and other branches still share a group and cancel stale runs.
14-
group: ${{ case(github.ref == 'refs/heads/dev', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }}
18+
# A new push to a pull request cancels its stale run. Every push and manual run keeps its own group, so each
19+
# dev and beta commit gets a verdict and a quarantine run never cancels a normal one.
20+
group: ${{ case(github.event_name == 'pull_request', format('{0}-{1}', github.workflow, github.event.pull_request.number), format('{0}-{1}', github.workflow, github.run_id)) }}
1521
cancel-in-progress: true
1622

1723
permissions:
@@ -51,13 +57,13 @@ jobs:
5157
echo "app=true" >> "$GITHUB_OUTPUT"
5258
exit 0
5359
fi
54-
# Storybook hosts the component tests, but no app package depends on it.
55-
bun x turbo@2.10.2 ls --affected --filter=@opencode/app --filter=@opencode/storybook --output=json > affected.json
60+
# packages/stories hosts the component tests, but no app package depends on it.
61+
bun x turbo@2.10.2 ls --affected --filter=@opencode/app --filter=@opencode/stories --output=json > affected.json
5662
bun -e 'const result = await Bun.file("affected.json").json(); console.log(`app=${result.packages.count > 0}`)' >> "$GITHUB_OUTPUT"
5763
5864
unit:
5965
name: unit (${{ matrix.settings.name }})
60-
if: ${{ !github.event.pull_request.draft }}
66+
if: ${{ !inputs.quarantine && !github.event.pull_request.draft }}
6167
strategy:
6268
fail-fast: false
6369
matrix:
@@ -143,7 +149,7 @@ jobs:
143149

144150
build:
145151
name: build (${{ matrix.settings.name }})
146-
if: ${{ !github.event.pull_request.draft }}
152+
if: ${{ !inputs.quarantine && !github.event.pull_request.draft }}
147153
strategy:
148154
fail-fast: false
149155
matrix:
@@ -209,21 +215,21 @@ jobs:
209215
bun run script/service-smoke.ts --node
210216
211217
e2e-suite:
212-
name: e2e (${{ matrix.settings.name }}, ${{ matrix.suite.id }})
218+
name: e2e (${{ matrix.settings.name }}, ${{ matrix.suite.id }}${{ matrix.quarantine && ', quarantine' || '' }})
213219
needs: affected
214220
if: needs.affected.outputs.e2e == 'true'
221+
# Quarantined tests are known red; their legs report without failing the e2e checks.
222+
continue-on-error: ${{ matrix.quarantine }}
215223
strategy:
216224
fail-fast: false
217225
matrix:
218-
settings:
219-
- name: linux
220-
host: blacksmith-4vcpu-ubuntu-2404
221-
- name: windows
222-
host: blacksmith-4vcpu-windows-2025
226+
# Beta PRs gate on Linux; Windows runs on pushes and manual runs (nightly-beta.yml dispatches beta).
227+
settings: ${{ fromJSON(github.base_ref == 'beta' && '[{"name":"linux","host":"blacksmith-4vcpu-ubuntu-2404"}]' || '[{"name":"linux","host":"blacksmith-4vcpu-ubuntu-2404"},{"name":"windows","host":"blacksmith-4vcpu-windows-2025"}]') }}
228+
quarantine: ${{ fromJSON(inputs.quarantine && '[true]' || '[false]') }}
223229
# Playwright splits whole spec files across shards by test count, not duration. Every app-N
224230
# entry must use the same total, and the entries must cover 1..total. The service worker suite
225231
# reuses shard 2's production build. Each component suite runs once per OS in its own leg, so the
226-
# two suites' Storybook servers and test time are not added up on one runner.
232+
# two suites' story servers and test time are not added up on one runner.
227233
suite:
228234
- id: app-1
229235
shard: 1/2
@@ -234,6 +240,9 @@ jobs:
234240
runs-on: ${{ matrix.settings.host }}
235241
env:
236242
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
243+
# Beta only (packages/app/e2e/QUARANTINE.md): gate legs skip quarantined tests, retry once and stop after 8
244+
# failures; quarantine legs run only those tests, to the end. Other branches keep the config defaults.
245+
PLAYWRIGHT_ARGS: ${{ matrix.quarantine && '--grep @quarantine --pass-with-no-tests --retries=1' || (github.base_ref == 'beta' || github.ref == 'refs/heads/beta') && '--grep-invert @quarantine --max-failures=8 --retries=1' || '' }}
237246
defaults:
238247
run:
239248
shell: bash
@@ -277,36 +286,36 @@ jobs:
277286

278287
- name: Run app e2e tests against production build
279288
if: matrix.suite.shard
280-
run: bun --cwd packages/app test:e2e:built --shard=${{ matrix.suite.shard }}
289+
run: bun --cwd packages/app test:e2e:built --shard=${{ matrix.suite.shard }} ${{ env.PLAYWRIGHT_ARGS }}
281290
env:
282291
CI: true
283-
timeout-minutes: 15
292+
timeout-minutes: ${{ (matrix.quarantine || github.base_ref == 'beta' || github.ref == 'refs/heads/beta') && 10 || 15 }}
284293

285294
- name: Verify service worker precaching and upgrades
286-
if: matrix.suite.shard == '2/2'
295+
if: matrix.suite.shard == '2/2' && !matrix.quarantine
287296
working-directory: packages/app
288297
run: bunx playwright test --config e2e/service-worker/playwright.config.ts
289298
timeout-minutes: 5
290299

291300
- name: Run session UI component tests
292301
if: matrix.suite.id == 'session-ui-components'
293-
run: bun --cwd packages/session-ui test:components
302+
run: bun --cwd packages/session-ui test:components ${{ env.PLAYWRIGHT_ARGS }}
294303
env:
295304
CI: true
296-
timeout-minutes: 15
305+
timeout-minutes: ${{ (matrix.quarantine || github.base_ref == 'beta' || github.ref == 'refs/heads/beta') && 10 || 15 }}
297306

298307
- name: Run app component tests
299308
if: matrix.suite.id == 'app-components'
300-
run: bun --cwd packages/app test:components
309+
run: bun --cwd packages/app test:components ${{ env.PLAYWRIGHT_ARGS }}
301310
env:
302311
CI: true
303-
timeout-minutes: 15
312+
timeout-minutes: ${{ (matrix.quarantine || github.base_ref == 'beta' || github.ref == 'refs/heads/beta') && 10 || 15 }}
304313

305314
- name: Upload Playwright artifacts
306315
if: always()
307316
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
308317
with:
309-
name: playwright-${{ matrix.settings.name }}-${{ matrix.suite.id }}-${{ github.run_attempt }}
318+
name: playwright-${{ matrix.settings.name }}-${{ matrix.suite.id }}${{ matrix.quarantine && '-quarantine' || '' }}-${{ github.run_attempt }}
310319
if-no-files-found: ignore
311320
retention-days: 7
312321
path: |
@@ -322,7 +331,7 @@ jobs:
322331
e2e:
323332
name: e2e (${{ matrix.os }})
324333
needs: [affected, e2e-suite]
325-
if: ${{ !cancelled() && !github.event.pull_request.draft }}
334+
if: ${{ !cancelled() && !inputs.quarantine && !github.event.pull_request.draft }}
326335
strategy:
327336
fail-fast: false
328337
matrix:
@@ -335,5 +344,9 @@ jobs:
335344
SUITES: ${{ needs.e2e-suite.result }}
336345
EXPECTED: ${{ needs.affected.outputs.e2e == 'true' && 'success' || 'skipped' }}
337346
run: |
347+
if [ "${{ matrix.os }}" = windows ] && [ "${{ github.base_ref }}" = beta ]; then
348+
echo "Windows browser tests run on beta pushes and nightly, not on beta pull requests"
349+
exit 0
350+
fi
338351
echo "affected packages: $AFFECTED, browser test legs: $SUITES (expected $EXPECTED)"
339352
test "$AFFECTED" = success && test "$SUITES" = "$EXPECTED"

‎.github/workflows/nightly-beta.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: nightly-beta
2+
3+
# GitHub runs schedules only from the default branch (dev), so this fires once this file is on dev.
4+
# It tests beta with the full suite on both OSes, then runs beta's quarantined browser tests.
5+
on:
6+
schedule:
7+
- cron: "17 9 * * *"
8+
workflow_dispatch:
9+
10+
permissions:
11+
actions: write
12+
13+
jobs:
14+
dispatch:
15+
if: github.repository == 'anomalyco/opencode'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Dispatch beta test runs
19+
env:
20+
GH_TOKEN: ${{ github.token }}
21+
run: |
22+
gh workflow run check-test.yml --repo "$GITHUB_REPOSITORY" --ref beta
23+
gh workflow run check-test.yml --repo "$GITHUB_REPOSITORY" --ref beta -f quarantine=true

0 commit comments

Comments
 (0)