Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

ci(release): run CI on release branches, and stage the STT binaries into installers

Etienne Lescot35462ee8947a
diff --git a/.github/workflows/build-whisper-stt.yml b/.github/workflows/build-whisper-stt.yml
index 46b528460..abc07fb5b 100644
--- a/.github/workflows/build-whisper-stt.yml
+++ b/.github/workflows/build-whisper-stt.yml
@@ -182,7 +182,10 @@ jobs:
name: whisper-stt-${{ matrix.tag }}
path: whisper-stt-${{ matrix.tag }}.tar.gz
if-no-files-found: error
- retention-days: 30
+ # build.yml now stages these into the installers
+ # (scripts/stage-whisper-stt.sh), so an expired artifact fails a
+ # release build. 90 days instead of 30 to make that rarer.
+ retention-days: 90
- name: Workflow summary
if: always()
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8ba60c0cf..744c1f7c5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,9 +38,16 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup
- # ponytail: STT is handled by the bundled whisper-stt-server (whisper.cpp
- # with native DTW token timestamps). No separate VAD model is fetched
- # here. See technical-documentation/architecture/transcription-and-captions.md for the full architecture.
+ # STT is the bundled whisper-stt-server (whisper.cpp with native DTW token
+ # timestamps); no VAD model is fetched here. The binary is built by
+ # build-whisper-stt.yml and staged below — without that step the installer
+ # ships without speech-to-text. See
+ # technical-documentation/architecture/transcription-and-captions.md.
+ - name: Stage whisper-stt binaries
+ shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: bash scripts/stage-whisper-stt.sh win32-x64
- name: Build Windows app
run: npm run build:win -- --publish never
@@ -63,9 +70,11 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup
- # ponytail: STT is handled by the bundled whisper-stt-server (whisper.cpp
- # with native DTW token timestamps). No separate VAD model is fetched
- # here. See technical-documentation/architecture/transcription-and-captions.md for the full architecture.
+ - name: Stage whisper-stt binaries
+ shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: bash scripts/stage-whisper-stt.sh win32-x64
- name: Build Windows Store package
run: npm run build:win:store -- --publish never
@@ -102,8 +111,12 @@ jobs:
env:
npm_config_build_from_source: "false"
- # ponytail: STT is handled by the bundled whisper-stt-server (see the
- # build-windows comment); no VAD model is fetched here.
+ - name: Stage whisper-stt binaries
+ shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: bash scripts/stage-whisper-stt.sh darwin-${{ matrix.arch }}
+
- name: Resolve macOS signing
id: signing
env:
@@ -261,7 +274,12 @@ jobs:
- name: Install pacman build dependencies
run: sudo apt-get update && sudo apt-get install -y libarchive-tools
- # ponytail: no VAD fetch here either (see build-windows comment).
+ - name: Stage whisper-stt binaries
+ shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: bash scripts/stage-whisper-stt.sh linux-x64
+
- name: Build Linux app
run: npm run build:linux -- --publish never
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 95d9d0c22..f72f826f5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,81 +1,101 @@
-name: CI
-
-# feat/ai-edition is a long-lived integration branch that PRs land on for
-# months at a time. Without it listed here, every one of those PRs merged with
-# no lint, no typecheck, no tests and no PR-title check.
-on:
- pull_request:
- branches: [main, feat/ai-edition]
- push:
- branches: [main, feat/ai-edition]
-
-jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: ./.github/actions/setup
- - run: npm run lint
-
- typecheck:
- name: Type Check
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: ./.github/actions/setup
- - run: npx tsc --noEmit
-
- docs:
- name: Docs
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- # No ./.github/actions/setup: check-docs.mjs imports only node builtins,
- # so npm ci would be a minute of install for nothing. Node 22 is here for
- # import.meta.dirname (needs >= 20.11).
- - uses: actions/setup-node@v4
- with:
- node-version: 22
- - run: npm run docs:check
-
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: ./.github/actions/setup
- - run: npm run test
- - run: npm run test:browser:install
- - run: npm run test:browser
-
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: ./.github/actions/setup
- - run: npx vite build
-
- semantic-pr:
- name: Validate PR title (semantic)
- runs-on: ubuntu-latest
- if: github.event_name == 'pull_request'
- steps:
- - uses: amannn/action-semantic-pull-request@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- types: |
- feat
- fix
- chore
- refactor
- perf
- docs
- test
- build
- ci
- style
- revert
- requireScope: false
+name: CI
+
+# feat/ai-edition is a long-lived integration branch that PRs land on for
+# months at a time. Without it listed here, every one of those PRs merged with
+# no lint, no typecheck, no tests and no PR-title check.
+#
+# release/** is here for the same reason and it cost more: PRs #167, #168 and
+# #169 — 30k+ lines of deletion and refactor — merged into release/1.8.0 with
+# every one of those jobs skipped, because a release branch matched neither
+# pattern. A release branch is the LAST place to run a build unguarded.
+on:
+ pull_request:
+ branches: [main, feat/ai-edition, "release/**"]
+ push:
+ branches: [main, feat/ai-edition, "release/**"]
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - run: npm run lint
+
+ typecheck:
+ name: Type Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - run: npx tsc --noEmit
+
+ typecheck-tests:
+ name: Typecheck (tests, advisory)
+ runs-on: ubuntu-latest
+ # ADVISORY, NOT A GATE — 82 pre-existing errors as of this commit. The main
+ # Typecheck job cannot see test files at all (tsconfig.json excludes
+ # **/*.test.ts and includes only src + electron), and vitest transpiles
+ # without checking, so fixture types have drifted from the schemas they
+ # claim to build for years. This job makes the drift visible and stops it
+ # growing silently; flip `continue-on-error` off once the count is zero.
+ continue-on-error: true
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - run: npx tsc -p tsconfig.test.json --noEmit
+
+ docs:
+ name: Docs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ # No ./.github/actions/setup: check-docs.mjs imports only node builtins,
+ # so npm ci would be a minute of install for nothing. Node 22 is here for
+ # import.meta.dirname (needs >= 20.11).
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ - run: npm run docs:check
+
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - run: npm run test
+ - run: npm run test:browser:install
+ - run: npm run test:browser
+
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - run: npx vite build
+
+ semantic-pr:
+ name: Validate PR title (semantic)
+ runs-on: ubuntu-latest
+ if: github.event_name == 'pull_request'
+ steps:
+ - uses: amannn/action-semantic-pull-request@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ types: |
+ feat
+ fix
+ chore
+ refactor
+ perf
+ docs
+ test
+ build
+ ci
+ style
+ revert
+ requireScope: false
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
new file mode 100644
index 000000000..a1c2de27f
--- /dev/null
+++ b/THIRD-PARTY-NOTICES.md
@@ -0,0 +1,61 @@
+# Third-party notices
+
+OpenScreen is MIT licensed (see [LICENSE](LICENSE)). The installers additionally
+bundle the pre-built native components below. This file ships inside the
+application resources and satisfies the attribution and source-offer obligations
+that come with them.
+
+npm dependencies are not listed here: they are resolved from `package.json` and
+distributed by their own registries, not redistributed inside our binaries.
+
+---
+
+## FFmpeg — shared libraries (Windows only)
+
+- **Components**: `avcodec-*.dll`, `avformat-*.dll`, `avutil-*.dll`,
+ `swresample-*.dll`, `swscale-*.dll` and their siblings, under
+ `resources/electron/native/bin/win32-*/`.
+- **Used by**: the native D3D11 compositor addon, which links against them at
+ load time.
+- **License**: **GNU Lesser General Public License v2.1 or later**
+ (<https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>). FFmpeg's own
+ licensing page: <https://ffmpeg.org/legal.html>.
+- **This is an LGPL build, not a GPL one.** It is configured without
+ `--enable-gpl` and without `--enable-nonfree`, and links no GPL-only library
+ (x264, x265, xvid, vidstab, rubberband, frei0r, …). `scripts/fetch-ffmpeg.mjs`
+ verifies this before vendoring — it reads `ffmpeg -L`, `-buildconf` and
+ `-encoders` and refuses any binary that reports otherwise.
+- **Upstream binaries**: BtbN/FFmpeg-Builds, release
+ `autobuild-2026-07-15-14-01`, the `*-lgpl-shared-8.1` assets. Pinned by
+ SHA-256 in `scripts/fetch-ffmpeg.mjs`; the digests there identify the exact
+ artifacts we ship.
+ <https://github.com/BtbN/FFmpeg-Builds/releases/tag/autobuild-2026-07-15-14-01>
+- **Corresponding source**: FFmpeg n8.1.2, commit `94138f6973`, from
+ <https://github.com/FFmpeg/FFmpeg>. The build configuration and scripts that
+ produced these exact binaries are published at
+ <https://github.com/BtbN/FFmpeg-Builds>.
+- **Relinking**: as required by the LGPL, these are dynamic libraries. You may
+ replace them with your own build of the same FFmpeg version by overwriting the
+ DLLs in `resources/electron/native/bin/win32-*/`.
+
+## whisper.cpp and ggml
+
+- **Components**: `whisper-stt-server` and its ggml backend sidecars, under
+ `resources/electron/native/bin/<platform>-<arch>/`.
+- **License**: MIT — <https://github.com/ggml-org/whisper.cpp> and
+ <https://github.com/ggml-org/ggml>.
+- Built from source by `scripts/build-whisper-stt.sh`; the pinned upstream
+ revision is in `electron/native/whisper-stt/CMakeLists.txt`.
+- The speech model (`ggml-*.bin`) is **not** bundled — it is downloaded into the
+ user's data directory on first use by `electron/stt/modelManager.ts`.
+
+## OpenScreen native helpers
+
+`wgc-capture` (Windows Graphics Capture), the ScreenCaptureKit helper (macOS)
+and the D3D11 compositor addon are part of this repository and are covered by
+[LICENSE](LICENSE).
+
+---
+
+To report an omission or request source for anything bundled here, open an issue
+at <https://github.com/getopenscreen/openscreen/issues>.
diff --git a/electron-builder.json5 b/electron-builder.json5
index cbce12e3e..1a2f8d9d4 100644
--- a/electron-builder.json5
+++ b/electron-builder.json5
@@ -1,140 +1,158 @@
-// @see - https://www.electron.build/configuration/configuration
-{
- "$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
- "appId": "com.etiennelescot.openscreen",
- "asar": true,
- // .node binaries can't be dlopen'd from inside an asar — must live unpacked.
- // onnxruntime-node distributes as a `.node` shared object that whisper.cpp
- // helpers run from process spawn, so they all unpack via the same glob.
- "asarUnpack": [
- "**/*.node"
- ],
- "productName": "Openscreen",
- "npmRebuild": true,
- // sharp ships ABI-stable (napi) prebuilt binaries with bundled libvips. Building it from source
- // needs a system libvips we don't provide and breaks on CI/local ("vips-cpp.42 not found"), so we
- // let electron-builder use the prebuilt instead of recompiling.
- "buildDependenciesFromSource": false,
- "compression": "normal",
- "directories": {
- "output": "release/${version}"
- },
- "files": [
- "dist",
- "dist-electron",
- "!*.png",
- "!preview*.png",
- "!*.md",
- "!README.md",
- "!CONTRIBUTING.md",
- "!LICENSE"
- ],
- // Asset layout contract: "wallpapers/" and "cursors/" under resourcesPath must
- // align with assetBaseDir in electron/preload.ts (packaged branch).
- // Native capture helpers + whisper-stt-server binaries (and their ggml
- // backend sidecars) live under `electron/native/bin/<platform>-<arch>/`
- // and the per-platform sections below limit them to the matching arch in
- // each installer.
- //
- // ponytail: the STT model (ggml-small-q8_0.bin) is downloaded into the
- // userData cache on first use by electron/stt/modelManager.ts, so no model
- // files are bundled at build time.
- "extraResources": [
- {
- "from": "public/wallpapers",
- "to": "wallpapers"
- },
- {
- "from": "public/cursors",
- "to": "cursors"
- }
- ],
-
- "mac": {
- "notarize": false,
- "hardenedRuntime": true,
- "entitlements": "macos.entitlements",
- "entitlementsInherit": "macos.entitlements",
- "target": [
- {
- "target": "dmg",
- "arch": ["x64", "arm64"]
- }
- ],
- "icon": "icons/icons/mac/icon.icns",
- "artifactName": "${productName}-Mac-${arch}-${version}-Installer.${ext}",
- "extraResources": [
- {
- "from": "electron/native/bin",
- "to": "electron/native/bin",
- "filter": ["darwin-*/*"]
- }
- ],
- "extendInfo": {
- "NSAudioCaptureUsageDescription": "OpenScreen needs audio capture permission to record system audio.",
- "NSMicrophoneUsageDescription": "OpenScreen needs microphone access to record voice audio.",
- "NSCameraUsageDescription": "OpenScreen needs camera access to record webcam video.",
- "NSScreenCaptureUsageDescription": "OpenScreen needs screen recording permission to detect and capture windows.",
- "NSCameraUseContinuityCameraDeviceType": true
- }
- },
- "linux": {
- "target": [
- "AppImage",
- "deb",
- "pacman"
- ],
- "icon": "icons/icons/png",
- "artifactName": "${productName}-Linux-${version}.${ext}",
- "maintainer": "Etienne Lescot <[email protected]>",
- "category": "AudioVideo",
- "extraResources": [
- {
- "from": "electron/native/bin",
- "to": "electron/native/bin",
- "filter": ["linux-*/*"]
- }
- ]
- },
- "win": {
- "target": [
- "nsis"
- ],
- "icon": "icons/icons/win/icon.ico",
- "artifactName": "${productName}.Setup.${version}.${ext}",
- "extraResources": [
- {
- "from": "electron/native/bin",
- "to": "electron/native/bin",
- "filter": ["win32-*/*"]
- }
- ],
- // Native D3D11 compositor addon (Windows-only). Built by
- // `npm run build:native:compositor` (scripts/build-windows-compositor-addon.mjs)
- // before packaging. Packed into asar, then auto-unpacked by the top-level
- // `asarUnpack: ["**/*.node"]` rule to app.asar.unpacked/... — matches the
- // `.asar` -> `.asar.unpacked` rewrite compositorViewService.ts's
- // buildCandidatePaths() already applies for packaged builds. Appends to
- // (doesn't replace) the top-level `files` list.
- "files": [
- "electron/native/compositor-view/build"
- ]
- },
- "nsis": {
- "oneClick": false,
- "allowToChangeInstallationDirectory": true
- },
- // Microsoft Store packaging identity, from Partner Center's "Product identity" page
- // (Applications et jeux > OpenScreen > Product identity).
- "appx": {
- "identityName": "EtienneLescot.OpenScreen",
- "publisher": "CN=03B0FC8C-2067-45D9-BE82-9F15CE264B4A",
- "publisherDisplayName": "Etienne Lescot",
- "applicationId": "Openscreen",
- "displayName": "OpenScreen",
- "backgroundColor": "transparent",
- "capabilities": ["runFullTrust", "microphone", "webcam"],
- "languages": ["en-US", "fr-FR"],
- "showNameOnTiles": true
- }
-}
+// @see - https://www.electron.build/configuration/configuration
+{
+ "$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
+ "appId": "com.etiennelescot.openscreen",
+ "asar": true,
+ // .node binaries can't be dlopen'd from inside an asar — must live unpacked.
+ // onnxruntime-node distributes as a `.node` shared object that whisper.cpp
+ // helpers run from process spawn, so they all unpack via the same glob.
+ "asarUnpack": [
+ "**/*.node"
+ ],
+ "productName": "Openscreen",
+ "npmRebuild": true,
+ // sharp ships ABI-stable (napi) prebuilt binaries with bundled libvips. Building it from source
+ // needs a system libvips we don't provide and breaks on CI/local ("vips-cpp.42 not found"), so we
+ // let electron-builder use the prebuilt instead of recompiling.
+ "buildDependenciesFromSource": false,
+ "compression": "normal",
+ "directories": {
+ "output": "release/${version}"
+ },
+ "files": [
+ "dist",
+ "dist-electron",
+ "!*.png",
+ "!preview*.png",
+ "!*.md",
+ "!README.md",
+ "!CONTRIBUTING.md",
+ "!LICENSE"
+ ],
+ // Asset layout contract: "wallpapers/" and "cursors/" under resourcesPath must
+ // align with assetBaseDir in electron/preload.ts (packaged branch).
+ // Native capture helpers + whisper-stt-server binaries (and their ggml
+ // backend sidecars) live under `electron/native/bin/<platform>-<arch>/`
+ // and the per-platform sections below limit them to the matching arch in
+ // each installer.
+ //
+ // ponytail: the STT model (ggml-small-q8_0.bin) is downloaded into the
+ // userData cache on first use by electron/stt/modelManager.ts, so no model
+ // files are bundled at build time.
+ "extraResources": [
+ // Attribution + LGPL source offer for the bundled ffmpeg DLLs and
+ // whisper.cpp binaries. Redistributing LGPL libraries obliges us to ship
+ // the notice with them, so it goes in resources/, not just in the repo.
+ {
+ "from": "THIRD-PARTY-NOTICES.md",
+ "to": "THIRD-PARTY-NOTICES.md"
+ },
+ {
+ "from": "LICENSE",
+ "to": "LICENSE"
+ },
+ {
+ "from": "public/wallpapers",
+ "to": "wallpapers"
+ },
+ {
+ "from": "public/cursors",
+ "to": "cursors"
+ }
+ ],
+
+ "mac": {
+ "notarize": false,
+ "hardenedRuntime": true,
+ "entitlements": "macos.entitlements",
+ "entitlementsInherit": "macos.entitlements",
+ "target": [
+ {
+ "target": "dmg",
+ "arch": ["x64", "arm64"]
+ }
+ ],
+ "icon": "icons/icons/mac/icon.icns",
+ "artifactName": "${productName}-Mac-${arch}-${version}-Installer.${ext}",
+ "extraResources": [
+ {
+ "from": "electron/native/bin",
+ "to": "electron/native/bin",
+ "filter": ["darwin-*/*"]
+ }
+ ],
+ "extendInfo": {
+ "NSAudioCaptureUsageDescription": "OpenScreen needs audio capture permission to record system audio.",
+ "NSMicrophoneUsageDescription": "OpenScreen needs microphone access to record voice audio.",
+ "NSCameraUsageDescription": "OpenScreen needs camera access to record webcam video.",
+ "NSScreenCaptureUsageDescription": "OpenScreen needs screen recording permission to detect and capture windows.",
+ "NSCameraUseContinuityCameraDeviceType": true
+ }
+ },
+ "linux": {
+ "target": [
+ "AppImage",
+ "deb",
+ "pacman"
+ ],
+ "icon": "icons/icons/png",
+ "artifactName": "${productName}-Linux-${version}.${ext}",
+ "maintainer": "Etienne Lescot <[email protected]>",
+ "category": "AudioVideo",
+ "extraResources": [
+ {
+ "from": "electron/native/bin",
+ "to": "electron/native/bin",
+ "filter": ["linux-*/*"]
+ }
+ ]
+ },
+ "win": {
+ "target": [
+ "nsis"
+ ],
+ "icon": "icons/icons/win/icon.ico",
+ "artifactName": "${productName}.Setup.${version}.${ext}",
+ "extraResources": [
+ {
+ "from": "electron/native/bin",
+ "to": "electron/native/bin",
+ // The static ffmpeg.exe is excluded on purpose. scripts/fetch-ffmpeg.mjs
+ // vendors two artifacts into this directory: the shared av*.dll set,
+ // which the D3D11 compositor addon dlopens at require() time and
+ // therefore MUST ship, and a standalone static ffmpeg.exe that nothing
+ // in the app spawns — it exists for scripts/bench-export.mjs. Shipping
+ // it added a large binary to every Windows installer, plus an LGPL
+ // redistribution obligation, for a file no shipped code opens.
+ "filter": ["win32-*/*", "!win32-*/ffmpeg.exe"]
+ }
+ ],
+ // Native D3D11 compositor addon (Windows-only). Built by
+ // `npm run build:native:compositor` (scripts/build-windows-compositor-addon.mjs)
+ // before packaging. Packed into asar, then auto-unpacked by the top-level
+ // `asarUnpack: ["**/*.node"]` rule to app.asar.unpacked/... — matches the
+ // `.asar` -> `.asar.unpacked` rewrite compositorViewService.ts's
+ // buildCandidatePaths() already applies for packaged builds. Appends to
+ // (doesn't replace) the top-level `files` list.
+ "files": [
+ "electron/native/compositor-view/build"
+ ]
+ },
+ "nsis": {
+ "oneClick": false,
+ "allowToChangeInstallationDirectory": true
+ },
+ // Microsoft Store packaging identity, from Partner Center's "Product identity" page
+ // (Applications et jeux > OpenScreen > Product identity).
+ "appx": {
+ "identityName": "EtienneLescot.OpenScreen",
+ "publisher": "CN=03B0FC8C-2067-45D9-BE82-9F15CE264B4A",
+ "publisherDisplayName": "Etienne Lescot",
+ "applicationId": "Openscreen",
+ "displayName": "OpenScreen",
+ "backgroundColor": "transparent",
+ "capabilities": ["runFullTrust", "microphone", "webcam"],
+ "languages": ["en-US", "fr-FR"],
+ "showNameOnTiles": true
+ }
+}
diff --git a/electron/ai-edition/llm-provider-auth.test.ts b/electron/ai-edition/llm-provider-auth.test.ts
index afb7c4162..b6621bb23 100644
--- a/electron/ai-edition/llm-provider-auth.test.ts
+++ b/electron/ai-edition/llm-provider-auth.test.ts
@@ -1,26 +1,9 @@
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { afterEach, describe, expect, it, vi } from "vitest";
import { probeMiniMaxModels } from "./llm-provider-auth";
const ORIGINAL_FETCH = globalThis.fetch;
-function mockFetchSequence(
- responses: Array<{ ok: boolean; status?: number; body: unknown; delayMs?: number }>,
-) {
- const queue = [...responses];
- vi.spyOn(globalThis, "fetch").mockImplementation(async () => {
- const next = queue.shift();
- if (!next) throw new Error("mock fetch: no response queued");
- const init = next.delayMs ? await new Promise<void>((r) => setTimeout(r, next.delayMs)) : null;
- void init;
- const status = next.status ?? (next.ok ? 200 : 500);
- return new Response(JSON.stringify(next.body), {
- status,
- headers: { "Content-Type": "application/json" },
- });
- });
-}
-
afterEach(() => {
vi.restoreAllMocks();
globalThis.fetch = ORIGINAL_FETCH;
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts
index 54c195a6f..d2facad8f 100644
--- a/electron/ipc/handlers.ts
+++ b/electron/ipc/handlers.ts
@@ -3401,14 +3401,7 @@ export function registerIpcHandlers(
getAiEditionDocuments: () => aiEditionDocuments,
getAiEditionLlmConfig: () => aiEditionLlmConfig,
runAiEditionChat: (projectId, sessionId, message, document, sink) =>
- runChat(
- projectId,
- sessionId,
- message,
- aiEditionLlmConfig,
- document,
- sink,
- ),
+ runChat(projectId, sessionId, message, aiEditionLlmConfig, document, sink),
undoAiEditionToolBatch: (_projectId, _sessionId) => ({
success: false,
error: "Per-tool-batch undo retired in favor of per-message rewind.",
@@ -3418,13 +3411,7 @@ export function registerIpcHandlers(
compactNow: (projectId, sessionId) =>
compactSessionNow(projectId, sessionId, aiEditionLlmConfig),
runTimelineOperation: (projectId, sessionId, op, conversationMessage) =>
- runTimelineOperation(
- projectId,
- sessionId,
- op,
- conversationMessage,
- aiEditionDocuments,
- ),
+ runTimelineOperation(projectId, sessionId, op, conversationMessage, aiEditionDocuments),
getContextUsage: getSessionContextUsage,
runAiEditionChatDefault: (projectId, message, sink) =>
runChatDefault(projectId, message, aiEditionLlmConfig, sink),
diff --git a/scripts/fetch-ffmpeg.mjs b/scripts/fetch-ffmpeg.mjs
index 0584d03bf..1f438242d 100644
--- a/scripts/fetch-ffmpeg.mjs
+++ b/scripts/fetch-ffmpeg.mjs
@@ -29,6 +29,8 @@
// tag, asset name and digest are one unit.
// Source approved by Etienne (2026-07-16). BtbN is linked from ffmpeg.org's
// download page and published on winget as BtbN.FFmpeg.LGPL.
+// Attribution + source offer for what we redistribute: THIRD-PARTY-NOTICES.md,
+// which electron-builder ships into resources/.
//
// LICENSING — the other thing this script exists to protect:
// ffmpeg is LGPL *by default*. It becomes GPL only when built with
@@ -38,6 +40,12 @@
// we got before vendoring. Never swap in a "gpl" asset for the extra encoders:
// there is nothing in them we need — the hardware encoders are all LGPL.
//
+// WHAT ACTUALLY SHIPS: only the shared av*.dll set, which the compositor addon
+// dlopens. electron-builder excludes the static ffmpeg.exe from the installer
+// ("!win32-*/ffmpeg.exe") — it is a bench tool, and shipping a large binary no
+// runtime code opens is cost with no benefit. It still lands in this directory
+// so scripts/bench-export.mjs can use a local checkout.
+//
// NOTE: the plan this was vendored for is REFUTED. Feeding native ffmpeg from
// the renderer measured 2.1x SLOWER than the WebCodecs path it was to replace —
// the wall is the compositor, not the encoder. See
@@ -133,9 +141,10 @@ function run(cmd, args, opts = {}) {
}
/**
- * Refuses to vendor anything that would relicense the app. Mirrors isLgplBuild()
- * in electron/media/ffmpegCapabilities.ts on purpose: that one guards at
- * runtime, this one at build time. If they ever disagree, one of them drifted.
+ * Refuses to vendor anything that would relicense the app. This is now the only
+ * licence gate — the runtime twin it used to mirror
+ * (electron/media/ffmpegCapabilities.ts) went with the web export pipeline, and
+ * nothing in the app spawns ffmpeg any more.
*/
function assertLgpl(exePath) {
const problems = [];
diff --git a/scripts/stage-whisper-stt.sh b/scripts/stage-whisper-stt.sh
new file mode 100755
index 000000000..226024111
--- /dev/null
+++ b/scripts/stage-whisper-stt.sh
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+# Stages the whisper-stt-server binary (plus its ggml backend sidecars) into
+# electron/native/bin/<tag>/ so electron-builder's extraResources picks it up.
+#
+# WHY THIS EXISTS. electron/native/bin/ is gitignored and build-whisper-stt.yml
+# publishes the binaries as GitHub *artifacts* of its own workflow run. Nothing
+# carried them into build.yml, so every installer built before this script
+# shipped with no STT binary at all: resolveBinaryPath() found nothing,
+# transcription and captions failed with "whisper-stt-server binary not found;
+# build it via scripts/build-whisper-stt.sh" — a developer message, shown to
+# end users. The model is fetched at runtime by modelManager.ts; the binary is
+# not, and never was.
+#
+# Fails loudly on purpose. A release without STT is worse than a red build, and
+# the failure mode this replaces was completely silent.
+#
+# Usage: bash scripts/stage-whisper-stt.sh <tag>
+# tag: darwin-arm64 | darwin-x64 | linux-x64 | win32-x64
+# Requires: gh (preinstalled on GitHub runners), GH_TOKEN in the environment.
+
+set -euo pipefail
+
+TAG="${1:?usage: stage-whisper-stt.sh <platform-arch tag>}"
+ARTIFACT="whisper-stt-${TAG}"
+DEST="electron/native/bin/${TAG}"
+REPO="${GITHUB_REPOSITORY:-getopenscreen/openscreen}"
+
+# A locally built binary wins: `npm run build:whisper-binaries` puts one here,
+# and a developer testing a change should not have it silently replaced by CI's.
+if compgen -G "${DEST}/whisper-stt-server*" > /dev/null; then
+ echo "whisper-stt-server already present in ${DEST} — leaving it alone."
+ exit 0
+fi
+
+TMP="$(mktemp -d)"
+trap 'rm -rf "${TMP}"' EXIT
+
+echo "Fetching ${ARTIFACT} from the latest successful build-whisper-stt run..."
+# No run id: gh resolves the most recent run that published this artifact.
+# Artifacts expire (retention-days in build-whisper-stt.yml), so a stale branch
+# can legitimately find nothing — say so in terms someone can act on.
+if ! gh run download --repo "${REPO}" --name "${ARTIFACT}" --dir "${TMP}" 2>"${TMP}/err"; then
+ cat "${TMP}/err" >&2
+ cat >&2 <<EOF
+
+FATAL: could not fetch ${ARTIFACT}.
+
+The binaries come from the "Build whisper-stt binaries" workflow, and its
+artifacts expire. Re-run it against this branch, then re-run this build:
+
+ gh workflow run build-whisper-stt.yml --repo ${REPO}
+
+Refusing to package: the installer would ship with speech-to-text silently
+dead (no transcription, no captions).
+EOF
+ exit 1
+fi
+
+# The workflow uploads one .tar.gz holding a directory of the same name.
+ARCHIVE="$(find "${TMP}" -name "${ARTIFACT}.tar.gz" -print -quit)"
+[ -n "${ARCHIVE}" ] || { echo "FATAL: ${ARTIFACT}.tar.gz not in the artifact" >&2; exit 1; }
+
+tar -xzf "${ARCHIVE}" -C "${TMP}"
+mkdir -p "${DEST}"
+cp -v "${TMP}/${ARTIFACT}"/* "${DEST}/"
+
+# Verify what we actually staged rather than trusting the copy: this is the
+# check whose absence is the whole reason for this script.
+BIN="$(find "${DEST}" -maxdepth 1 -name 'whisper-stt-server*' -print -quit)"
+[ -n "${BIN}" ] || { echo "FATAL: no whisper-stt-server binary in ${DEST}" >&2; exit 1; }
+[ "${TAG#win32}" = "${TAG}" ] && chmod +x "${BIN}"
+
+echo "Staged $(basename "${BIN}") + $(( $(ls -1 "${DEST}" | wc -l) - 1 )) sidecar(s) -> ${DEST}"
diff --git a/src/components/ai-edition/ProviderSettings.tsx b/src/components/ai-edition/ProviderSettings.tsx
index bf0db0565..77000be35 100644
--- a/src/components/ai-edition/ProviderSettings.tsx
+++ b/src/components/ai-edition/ProviderSettings.tsx
@@ -295,18 +295,14 @@ function ProviderForm({
}) {
const te = useScopedT("editor");
const showBaseUrl = def.id === "openai-compatible" || Boolean(def.baseUrl);
- // Every provider now exposes a live model list once connected (matching
- // axcut's `screen === 'models' && activeProvider?.connected` gate) — API-key
- // providers hit their own /models endpoint (or, for MiniMax, a probe call)
- // same as OAuth/PAT providers do.
- const supportsDynamicModels = true;
-
+ // Every provider exposes a live model list once connected: each hits its own
+ // /models endpoint, or a probe call for MiniMax.
const [modelOptions, setModelOptions] = useState<string[]>([]);
const [modelsLoading, setModelsLoading] = useState(false);
const [modelsError, setModelsError] = useState<string | null>(null);
useEffect(() => {
- if (!supportsDynamicModels || !isConnected) {
+ if (!isConnected) {
setModelOptions([]);
setModelsError(null);
return;
@@ -331,7 +327,7 @@ function ProviderForm({
return () => {
cancelled = true;
};
- }, [def.id, isConnected, supportsDynamicModels, listProviderModels]);
+ }, [def.id, isConnected, listProviderModels]);
const modelSelectable = modelOptions.length > 0;
@@ -370,7 +366,7 @@ function ProviderForm({
? te("providerSettings.modelHintLive")
: modelsError
? te("providerSettings.modelHintError", { error: modelsError })
- : supportsDynamicModels && isConnected
+ : isConnected
? te("providerSettings.modelHintLoading")
: undefined
}
diff --git a/src/native/useNativePlaybackSync.ts b/src/native/useNativePlaybackSync.ts
index f7ea7dd29..64e877b63 100644
--- a/src/native/useNativePlaybackSync.ts
+++ b/src/native/useNativePlaybackSync.ts
@@ -62,7 +62,6 @@ export function useNativePlaybackSync(
const lastSyncedWallTimeRef = useRef<number>(0);
const lastActiveClipIdRef = useRef<string | null>(null);
- // biome-ignore lint/correctness/useExhaustiveDependencies: ref values
useEffect(() => {
if (!active || sourceTimeSec === null || !activeClipId) {
return;
diff --git a/tsconfig.test.json b/tsconfig.test.json
new file mode 100644
index 000000000..654a9f6fa
--- /dev/null
+++ b/tsconfig.test.json
@@ -0,0 +1,23 @@
+// Typechecks what tsconfig.json deliberately leaves out.
+//
+// The main config is `include: ["src", "electron"]` with
+// `exclude: ["**/*.test.ts", "**/*.test.tsx"]`, so no test file and nothing
+// under tests/ ever reaches `tsc --noEmit` — and vitest transpiles without
+// checking. A schema refactor on release/1.8.0 rewrote fixtures by hand and
+// left a `preview.playbackRate` that was never in the schema; the typecheck
+// gate it leaned on could not see the files it had edited.
+//
+// Kept separate from tsconfig.json rather than folded in: test files use
+// vitest globals and `any`-ish mock shapes that would have to be loosened for
+// the whole app if they shared one config. Same strictness, wider include.
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ // Vitest's `describe`/`it`/`expect` are ambient in test files only.
+ "types": ["vitest/globals", "node"],
+ // Mocks legitimately shadow parameters they never read.
+ "noUnusedParameters": false
+ },
+ "include": ["src", "electron", "tests", "scripts"],
+ "exclude": []
+}
diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx
index 5cc38b0b3..1b02713b7 100644
--- a/website/src/pages/index.tsx
+++ b/website/src/pages/index.tsx
@@ -182,7 +182,6 @@ export default function Home() {
<div className={styles.miniClip} style={{ flex: 5 }}>
<div className={styles.miniWaveform}>
{MINI_WAVEFORM_A.map((h, i) => (
- // biome-ignore lint/suspicious/noArrayIndexKey: static decorative bars
<span key={i} style={{ height: `${h}%` }} />
))}
</div>
@@ -190,7 +189,6 @@ export default function Home() {
<div className={styles.miniClip} style={{ flex: 6 }}>
<div className={styles.miniWaveform}>
{MINI_WAVEFORM_B.map((h, i) => (
- // biome-ignore lint/suspicious/noArrayIndexKey: static decorative bars
<span key={i} style={{ height: `${h}%` }} />
))}
</div>