Skip to content

Commit e033f7b

Browse files
committed
fix(tui): add wl-paste text read for Wayland systems
Merge upstream/dev and re-apply Wayland clipboard fix to new file location. The original PR (anomalyco#29881) modified packages/opencode/src/cli/cmd/tui/util/clipboard.ts which was moved to packages/tui/src/clipboard.ts during the TUI package extraction. The clipboard read() function tries wl-paste for images on Linux, but falls back to clipboardy (xsel) for text. On Wayland systems without xsel, text paste silently fails. Add a wl-paste text read path before the clipboardy fallback, guarded by WAYLAND_DISPLAY, mirroring the existing write path. Closes anomalyco#29880
2 parents 8a22af6 + c51a158 commit e033f7b

1,824 files changed

Lines changed: 152419 additions & 61824 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.

‎.gitattributes‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages/core/migration/**/snapshot.json linguist-generated
2+
packages/core/src/database/migration.gen.ts linguist-generated

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# web + desktop packages
2-
packages/app/ @adamdotdevin
3-
packages/tauri/ @adamdotdevin
4-
packages/desktop/src-tauri/ @brendonovich
5-
packages/desktop/ @adamdotdevin
2+
packages/app/ @Hona @Brendonovich
3+
packages/desktop/ @Hona @Brendonovich

‎.github/ISSUE_TEMPLATE/bug-report.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug report
2-
description: Report an issue that should be fixed
2+
description: Report an issue that should be fixed (avoid pasting giant AI generated summaries or your issue may be closed/ignored)
33
body:
44
- type: textarea
55
id: description

‎.github/workflows/nix-hashes.yml‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,24 @@ jobs:
5656
BUILD_LOG=$(mktemp)
5757
trap 'rm -f "$BUILD_LOG"' EXIT
5858
59-
# Build with fakeHash to trigger hash mismatch and reveal correct hash
60-
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true
59+
HASH=""
60+
MAX_ATTEMPTS=3
61+
for ((ATTEMPT = 1; ATTEMPT <= MAX_ATTEMPTS; ATTEMPT++)); do
62+
# Build with fakeHash to trigger hash mismatch and reveal correct hash
63+
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true
6164
62-
# Extract hash from build log with portability
63-
HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
65+
HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
66+
67+
[ -n "$HASH" ] && break
68+
69+
if [ "$ATTEMPT" -lt "$MAX_ATTEMPTS" ]; then
70+
echo "::warning::Attempt ${ATTEMPT}/${MAX_ATTEMPTS} produced no hash for ${SYSTEM}; retrying in $((ATTEMPT * 10))s"
71+
sleep $((ATTEMPT * 10))
72+
fi
73+
done
6474
6575
if [ -z "$HASH" ]; then
66-
echo "::error::Failed to compute hash for ${SYSTEM}"
76+
echo "::error::Failed to compute hash for ${SYSTEM} after ${MAX_ATTEMPTS} attempts"
6777
cat "$BUILD_LOG"
6878
exit 1
6979
fi

‎.github/workflows/publish.yml‎

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
id: build
9191
run: |
9292
./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }}
93+
./packages/cli/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }}
9394
env:
9495
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
9596
OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
@@ -107,6 +108,12 @@ jobs:
107108
with:
108109
name: opencode-cli-windows
109110
path: packages/opencode/dist/opencode-windows*
111+
112+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
113+
with:
114+
name: opencode-preview-cli
115+
path: packages/cli/dist/cli-*
116+
110117
outputs:
111118
version: ${{ needs.version.outputs.version }}
112119

@@ -327,9 +334,9 @@ jobs:
327334
VITE_SENTRY_ENVIRONMENT: ${{ (github.ref_name == 'beta' && 'beta') || 'production' }}
328335
VITE_SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }}
329336

330-
- name: Package and publish
337+
- name: Package
331338
if: needs.version.outputs.release
332-
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
339+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
333340
working-directory: packages/desktop
334341
timeout-minutes: 60
335342
env:
@@ -349,11 +356,9 @@ jobs:
349356
env:
350357
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
351358

352-
- name: Create and upload macOS .app.tar.gz
359+
- name: Create macOS .app.tar.gz
353360
if: runner.os == 'macOS' && needs.version.outputs.release
354361
working-directory: packages/desktop/dist
355-
env:
356-
GH_TOKEN: ${{ steps.committer.outputs.token }}
357362
run: |
358363
if [[ "${{ matrix.settings.target }}" == "x86_64-apple-darwin" ]]; then
359364
APP_DIR="mac"
@@ -371,7 +376,6 @@ jobs:
371376
exit 1
372377
fi
373378
tar -czf "$OUT_NAME" -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"
374-
gh release upload "v${{ needs.version.outputs.version }}" "$OUT_NAME" --clobber --repo "${{ needs.version.outputs.repo }}"
375379
376380
- name: Verify signed Windows Electron artifacts
377381
if: runner.os == 'Windows'
@@ -446,12 +450,24 @@ jobs:
446450
name: opencode-cli-signed-windows
447451
path: packages/opencode/dist
448452

453+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
454+
with:
455+
name: opencode-preview-cli
456+
path: packages/cli/dist
457+
449458
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
450459
if: needs.version.outputs.release
451460
with:
452461
pattern: latest-yml-*
453462
path: /tmp/latest-yml
454463

464+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
465+
if: needs.version.outputs.release
466+
with:
467+
pattern: opencode-desktop-*
468+
path: /tmp/desktop
469+
merge-multiple: true
470+
455471
- name: Setup git committer
456472
id: committer
457473
uses: ./.github/actions/setup-git-committer
@@ -478,6 +494,19 @@ jobs:
478494
git config --global user.name "opencode"
479495
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true
480496
497+
- name: Upload desktop release assets
498+
if: needs.version.outputs.release
499+
env:
500+
GH_TOKEN: ${{ steps.committer.outputs.token }}
501+
run: |
502+
shopt -s nullglob
503+
files=(/tmp/desktop/*.{exe,blockmap,dmg,zip,AppImage,deb,rpm} /tmp/desktop/*.app.tar.gz)
504+
if (( ${#files[@]} == 0 )); then
505+
echo "No desktop release assets found"
506+
exit 1
507+
fi
508+
gh release upload "v${{ needs.version.outputs.version }}" "${files[@]}" --clobber --repo "${{ needs.version.outputs.repo }}"
509+
481510
- run: ./script/publish.ts
482511
env:
483512
OPENCODE_VERSION: ${{ needs.version.outputs.version }}

‎.github/workflows/sync-zed-extension.yml‎

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

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ jobs:
6464
turbo-${{ runner.os }}-
6565
6666
- name: Run unit tests
67-
run: bun turbo test:ci
67+
timeout-minutes: 20
68+
run: bun turbo test --output-logs=errors-only --log-order=grouped --log-prefix=task
6869
env:
6970
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
7071

@@ -73,26 +74,6 @@ jobs:
7374
working-directory: packages/opencode
7475
run: bun run test:httpapi
7576

76-
- name: Publish unit reports
77-
if: always()
78-
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0
79-
with:
80-
report_paths: packages/*/.artifacts/unit/junit.xml
81-
check_name: "unit results (${{ matrix.settings.name }})"
82-
detailed_summary: true
83-
include_time_in_summary: true
84-
fail_on_failure: false
85-
86-
- name: Upload unit artifacts
87-
if: always()
88-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
89-
with:
90-
name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }}
91-
include-hidden-files: true
92-
if-no-files-found: ignore
93-
retention-days: 7
94-
path: packages/*/.artifacts/unit/junit.xml
95-
9677
e2e:
9778
name: e2e (${{ matrix.settings.name }})
9879
strategy:
@@ -150,7 +131,6 @@ jobs:
150131
run: bun --cwd packages/app test:e2e:local
151132
env:
152133
CI: true
153-
PLAYWRIGHT_JUNIT_OUTPUT: e2e/junit-${{ matrix.settings.name }}.xml
154134
timeout-minutes: 30
155135

156136
- name: Upload Playwright artifacts
@@ -161,6 +141,5 @@ jobs:
161141
if-no-files-found: ignore
162142
retention-days: 7
163143
path: |
164-
packages/app/e2e/junit-*.xml
165144
packages/app/e2e/test-results
166145
packages/app/e2e/playwright-report

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ts-dist
1515
.turbo
1616
**/.serena
1717
.serena/
18+
**/.omo
19+
.omo/
1820
/result
1921
refs
2022
Session.vim

‎.opencode/agent/triage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
mode: primary
33
hidden: true
4-
model: opencode/gpt-5.4-nano
4+
model: opencode/gpt-5.4-mini
55
color: "#44BA81"
66
tools:
77
"*": false

‎.opencode/command/translate.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: translate English to other languages
3-
model: opencode/claude-opus-4-7
3+
model: opencode/claude-opus-4-8
44
---
55

66
run git diff and translate changed english doc and UI copy files to other international languages. Translate all languages in parallel to save time.

0 commit comments

Comments
 (0)