Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/build-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
env:
GO_VERSION: "1.23"
GO_VERSION: "1.24"
NODE_VERSION: 22
jobs:
build-app:
Expand Down Expand Up @@ -67,14 +67,15 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
uses: nick-fields/retry@v3
cache: npm
cache-dependency-path: package-lock.json
- uses: nick-fields/retry@v3
name: npm ci
with:
command: |
corepack enable
yarn install
timeout_minutes: 5
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
run: |
corepack enable
yarn install
cache: npm
cache-dependency-path: package-lock.json
- uses: nick-fields/retry@v3
name: npm ci
with:
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:

env:
NODE_VERSION: 22
GO_VERSION: "1.22.5"
GO_VERSION: "1.24"

jobs:
analyze:
Expand Down Expand Up @@ -74,10 +74,15 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: |
corepack enable
yarn install
cache: npm
cache-dependency-path: package-lock.json
- uses: nick-fields/retry@v3
name: npm ci
with:
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5

- name: Setup Go
uses: actions/setup-go@v6
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/deploy-docsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,20 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
cache: npm
cache-dependency-path: package-lock.json
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install yarn
run: |
corepack enable
yarn install
- uses: nick-fields/retry@v3
name: npm ci
with:
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5
- name: Build docsite
run: task docsite:build:public
- name: Upload Build Artifact
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/testdriver-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
workflow_dispatch: null

env:
GO_VERSION: "1.23"
GO_VERSION: "1.24"
NODE_VERSION: 22

permissions:
Expand All @@ -50,14 +50,15 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
uses: nick-fields/retry@v3
cache: npm
cache-dependency-path: package-lock.json
- uses: nick-fields/retry@v3
name: npm ci
with:
command: |
corepack enable
yarn install
timeout_minutes: 5
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
191 changes: 95 additions & 96 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ on:
- completed

env:
GO_VERSION: "1.23"
GO_VERSION: "1.24"
NODE_VERSION: 22

permissions:
contents: read
statuses: write
contents: read
statuses: write


jobs:
context:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -48,95 +47,95 @@ jobs:
runs-on: windows-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: testdriverai/action@main
id: testdriver
env:
FORCE_COLOR: "3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
key: ${{ secrets.DASHCAM_API }}
prerun: |
$headers = @{
Authorization = "token ${{ secrets.GITHUB_TOKEN }}"
}

$downloadFolder = "./download"
$artifactFileName = "waveterm.exe"
$artifactFilePath = "$downloadFolder/$artifactFileName"

Write-Host "Starting the artifact download process..."

# Create the download directory if it doesn't exist
if (-not (Test-Path -Path $downloadFolder)) {
Write-Host "Creating download folder..."
mkdir $downloadFolder
} else {
Write-Host "Download folder already exists."
}

# Fetch the artifact upload URL
Write-Host "Fetching the artifact upload URL..."
$artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url

if ($artifactUrl) {
Write-Host "Artifact URL successfully fetched: $artifactUrl"
} else {
Write-Error "Failed to fetch the artifact URL."
exit 1
}

# Download the artifact (zipped file)
Write-Host "Starting artifact download..."
$artifactZipPath = "$env:TEMP\artifact.zip"
try {
Invoke-WebRequest -Uri $artifactUrl `
-Headers $headers `
-OutFile $artifactZipPath `
-MaximumRedirection 5

Write-Host "Artifact downloaded successfully to $artifactZipPath"
} catch {
Write-Error "Error downloading artifact: $_"
exit 1
}

# Unzip the artifact
$artifactUnzipPath = "$env:TEMP\artifact"
Write-Host "Unzipping the artifact to $artifactUnzipPath..."
try {
Expand-Archive -Path $artifactZipPath -DestinationPath $artifactUnzipPath -Force
Write-Host "Artifact unzipped successfully to $artifactUnzipPath"
} catch {
Write-Error "Failed to unzip the artifact: $_"
exit 1
}

# Find the installer or app executable
$artifactInstallerPath = Get-ChildItem -Path $artifactUnzipPath -Filter *.exe -Recurse | Select-Object -First 1

if ($artifactInstallerPath) {
Write-Host "Executable file found: $($artifactInstallerPath.FullName)"
} else {
Write-Error "Executable file not found. Exiting."
exit 1
}

# Run the installer and log the result
Write-Host "Running the installer: $($artifactInstallerPath.FullName)..."
try {
Start-Process -FilePath $artifactInstallerPath.FullName -Wait
Write-Host "Installer ran successfully."
} catch {
Write-Error "Failed to run the installer: $_"
exit 1
}

# Optional: If the app executable is different from the installer, find and launch it
$wavePath = Join-Path $env:USERPROFILE "AppData\Local\Programs\waveterm\Wave.exe"

Write-Host "Launching the application: $($wavePath)"
Start-Process -FilePath $wavePath
Write-Host "Application launched."

prompt: |
1. /run testdriver/onboarding.yml
- uses: testdriverai/action@main
id: testdriver
env:
FORCE_COLOR: "3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
key: ${{ secrets.DASHCAM_API }}
Comment on lines +50 to +56
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin the TestDriver action to a tag or commit SHA (avoid @main).

Prevents supply-chain breakage from upstream changes.

Apply:

-            - uses: testdriverai/action@main
+            - uses: testdriverai/action@<tag-or-commit>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: testdriverai/action@main
id: testdriver
env:
FORCE_COLOR: "3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
key: ${{ secrets.DASHCAM_API }}
- uses: testdriverai/action@<tag-or-commit>
id: testdriver
env:
FORCE_COLOR: "3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
key: ${{ secrets.DASHCAM_API }}
🤖 Prompt for AI Agents
.github/workflows/testdriver.yml around lines 50 to 56: the workflow currently
references the TestDriver action with an unpinned ref
("testdriverai/action@main"), which risks supply-chain breakage; update the uses
line to pin the action to a stable tag (e.g., @v1.2.3) or a specific commit SHA
(e.g., @<commit-sha>) and update any documentation or workflow comments noting
the chosen pinned ref; ensure the chosen tag/SHA exists in the
testdriverai/action repo and consider adding a brief comment explaining why the
ref is pinned for future maintenance.

prerun: |
$headers = @{
Authorization = "token ${{ secrets.GITHUB_TOKEN }}"
}

$downloadFolder = "./download"
$artifactFileName = "waveterm.exe"
$artifactFilePath = "$downloadFolder/$artifactFileName"

Write-Host "Starting the artifact download process..."

# Create the download directory if it doesn't exist
if (-not (Test-Path -Path $downloadFolder)) {
Write-Host "Creating download folder..."
mkdir $downloadFolder
} else {
Write-Host "Download folder already exists."
}

# Fetch the artifact upload URL
Write-Host "Fetching the artifact upload URL..."
$artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url

if ($artifactUrl) {
Write-Host "Artifact URL successfully fetched: $artifactUrl"
} else {
Write-Error "Failed to fetch the artifact URL."
exit 1
}

# Download the artifact (zipped file)
Write-Host "Starting artifact download..."
$artifactZipPath = "$env:TEMP\artifact.zip"
try {
Invoke-WebRequest -Uri $artifactUrl `
-Headers $headers `
-OutFile $artifactZipPath `
-MaximumRedirection 5

Write-Host "Artifact downloaded successfully to $artifactZipPath"
} catch {
Write-Error "Error downloading artifact: $_"
exit 1
}

# Unzip the artifact
$artifactUnzipPath = "$env:TEMP\artifact"
Write-Host "Unzipping the artifact to $artifactUnzipPath..."
try {
Expand-Archive -Path $artifactZipPath -DestinationPath $artifactUnzipPath -Force
Write-Host "Artifact unzipped successfully to $artifactUnzipPath"
} catch {
Write-Error "Failed to unzip the artifact: $_"
exit 1
}

# Find the installer or app executable
$artifactInstallerPath = Get-ChildItem -Path $artifactUnzipPath -Filter *.exe -Recurse | Select-Object -First 1

if ($artifactInstallerPath) {
Write-Host "Executable file found: $($artifactInstallerPath.FullName)"
} else {
Write-Error "Executable file not found. Exiting."
exit 1
}
Comment on lines +58 to +121
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Artifact selection is brittle; pick by name instead of index and remove unused vars.

artifacts[0] can be the wrong file if multiple artifacts exist. Also $artifactFileName/$artifactFilePath are unused.

Apply:

-                      $downloadFolder = "./download"
-                      $artifactFileName = "waveterm.exe"
-                      $artifactFilePath = "$downloadFolder/$artifactFileName"
+                      $downloadFolder = "./download"

-                      # Fetch the artifact upload URL
-                      Write-Host "Fetching the artifact upload URL..."
-                      $artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url
+                      # Fetch artifacts and select the Windows EXE bundle by name
+                      Write-Host "Fetching the artifact metadata..."
+                      $artifacts = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts
+                      $artifact = $artifacts | Where-Object { $_.name -eq "windows-exe" } | Select-Object -First 1
+                      if (-not $artifact) {
+                          Write-Error "Artifact named 'windows-exe' not found."
+                          exit 1
+                      }
+                      $artifactUrl = $artifact.archive_download_url
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$headers = @{
Authorization = "token ${{ secrets.GITHUB_TOKEN }}"
}
$downloadFolder = "./download"
$artifactFileName = "waveterm.exe"
$artifactFilePath = "$downloadFolder/$artifactFileName"
Write-Host "Starting the artifact download process..."
# Create the download directory if it doesn't exist
if (-not (Test-Path -Path $downloadFolder)) {
Write-Host "Creating download folder..."
mkdir $downloadFolder
} else {
Write-Host "Download folder already exists."
}
# Fetch the artifact upload URL
Write-Host "Fetching the artifact upload URL..."
$artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url
if ($artifactUrl) {
Write-Host "Artifact URL successfully fetched: $artifactUrl"
} else {
Write-Error "Failed to fetch the artifact URL."
exit 1
}
# Download the artifact (zipped file)
Write-Host "Starting artifact download..."
$artifactZipPath = "$env:TEMP\artifact.zip"
try {
Invoke-WebRequest -Uri $artifactUrl `
-Headers $headers `
-OutFile $artifactZipPath `
-MaximumRedirection 5
Write-Host "Artifact downloaded successfully to $artifactZipPath"
} catch {
Write-Error "Error downloading artifact: $_"
exit 1
}
# Unzip the artifact
$artifactUnzipPath = "$env:TEMP\artifact"
Write-Host "Unzipping the artifact to $artifactUnzipPath..."
try {
Expand-Archive -Path $artifactZipPath -DestinationPath $artifactUnzipPath -Force
Write-Host "Artifact unzipped successfully to $artifactUnzipPath"
} catch {
Write-Error "Failed to unzip the artifact: $_"
exit 1
}
# Find the installer or app executable
$artifactInstallerPath = Get-ChildItem -Path $artifactUnzipPath -Filter *.exe -Recurse | Select-Object -First 1
if ($artifactInstallerPath) {
Write-Host "Executable file found: $($artifactInstallerPath.FullName)"
} else {
Write-Error "Executable file not found. Exiting."
exit 1
}
$headers = @{
Authorization = "token ${{ secrets.GITHUB_TOKEN }}"
}
$downloadFolder = "./download"
Write-Host "Starting the artifact download process..."
# Create the download directory if it doesn't exist
if (-not (Test-Path -Path $downloadFolder)) {
Write-Host "Creating download folder..."
mkdir $downloadFolder
} else {
Write-Host "Download folder already exists."
}
# Fetch artifacts and select the Windows EXE bundle by name
Write-Host "Fetching the artifact metadata..."
$artifacts = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts
$artifact = $artifacts | Where-Object { $_.name -eq "windows-exe" } | Select-Object -First 1
if (-not $artifact) {
Write-Error "Artifact named 'windows-exe' not found."
exit 1
}
$artifactUrl = $artifact.archive_download_url
if ($artifactUrl) {
Write-Host "Artifact URL successfully fetched: $artifactUrl"
} else {
Write-Error "Failed to fetch the artifact URL."
exit 1
}
# Download the artifact (zipped file)
Write-Host "Starting artifact download..."
$artifactZipPath = "$env:TEMP\artifact.zip"
try {
Invoke-WebRequest -Uri $artifactUrl `
-Headers $headers `
-OutFile $artifactZipPath `
-MaximumRedirection 5
Write-Host "Artifact downloaded successfully to $artifactZipPath"
} catch {
Write-Error "Error downloading artifact: $_"
exit 1
}
# Unzip the artifact
$artifactUnzipPath = "$env:TEMP\artifact"
Write-Host "Unzipping the artifact to $artifactUnzipPath..."
try {
Expand-Archive -Path $artifactZipPath -DestinationPath $artifactUnzipPath -Force
Write-Host "Artifact unzipped successfully to $artifactUnzipPath"
} catch {
Write-Error "Failed to unzip the artifact: $_"
exit 1
}
# Find the installer or app executable
$artifactInstallerPath = Get-ChildItem -Path $artifactUnzipPath -Filter *.exe -Recurse | Select-Object -First 1
if ($artifactInstallerPath) {
Write-Host "Executable file found: $($artifactInstallerPath.FullName)"
} else {
Write-Error "Executable file not found. Exiting."
exit 1
}
🤖 Prompt for AI Agents
.github/workflows/testdriver.yml around lines 58 to 121: the current script
selects the first artifact by index (artifacts[0]) and declares unused variables
($artifactFileName, $artifactFilePath), which is brittle when multiple artifacts
exist; update the artifact selection to search the returned artifacts array for
the artifact whose name matches the expected artifact name (e.g., "waveterm" or
the exact filename) and use its archive_download_url, remove the unused
$artifactFileName and $artifactFilePath variables, and ensure the rest of the
download/unzip flow uses the selected artifact URL variable.


# Run the installer and log the result
Write-Host "Running the installer: $($artifactInstallerPath.FullName)..."
try {
Start-Process -FilePath $artifactInstallerPath.FullName -Wait
Write-Host "Installer ran successfully."
} catch {
Write-Error "Failed to run the installer: $_"
exit 1
}

# Optional: If the app executable is different from the installer, find and launch it
$wavePath = Join-Path $env:USERPROFILE "AppData\Local\Programs\waveterm\Wave.exe"

Write-Host "Launching the application: $($wavePath)"
Start-Process -FilePath $wavePath
Write-Host "Application launched."

prompt: |
1. /run testdriver/onboarding.yml
2 changes: 0 additions & 2 deletions .roo/rules/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Wave Terminal is a modern terminal which provides graphical blocks, dynamic layo

It has a TypeScript/React frontend and a Go backend. They talk together over `wshrpc` a custom RPC protocol that is implemented over websocket (and domain sockets).

The frontend uses yarn (berry).

### Coding Guidelines

- **Go Conventions**:
Expand Down
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

19 changes: 1 addition & 18 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,7 @@ Make sure you have a NodeJS 22 LTS installed.

See NodeJS's website for platform-specific instructions: https://nodejs.org/en/download

### Yarn Modern

Once you have NodeJS installed, you'll need to enable Corepack so that Yarn Modern can work:

```sh
corepack enable
```

If your NodeJS distribution does not ship with Corepack, you can install it manually using NPM:

```sh
npm install -g corepack
corepack enable
```

Corepack's official documentation says to uninstall Yarn and PnPM first, but this is probably overkill. If you have any issues, try removing them from your system before continuing.

For more information on Corepack, check out [this link](https://yarnpkg.com/corepack).
We now use `npm`, so you can just run an `npm install` to install node dependencies.

## Clone the Repo

Expand Down
Loading
Loading