Skip to content

Commit 8b38b5a

Browse files
author
Shaw
committed
fix(release): restore desktop release inputs
1 parent c10c78b commit 8b38b5a

6 files changed

Lines changed: 124 additions & 8 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Desktop Release Regression Inventory
2+
3+
This inventory records desktop regression coverage that is intentionally outside
4+
the deterministic PR gate. The release matrix validator keeps these entries
5+
visible so they are reviewed before a production desktop release.
6+
7+
## Packaged and E2E Coverage
8+
9+
- gameOpenWindow — full round-trip with openGameWindow mock (needs canvas mock update)
10+
- Abnormal window position (off-screen) is corrected to safe defaults (e2e)
11+
- Deep link received while app is closed causes app to launch (e2e)
12+
- Deep link received while app is open does not launch second instance (e2e)
13+
- Shortcuts survive window focus changes (e2e)
14+
- App launches automatically after system restart (e2e)
15+
- Auto-launch survives app updates (e2e)
16+
- Keyboard shortcut Cmd+Q triggers quit (e2e)
17+
- Keyboard shortcut Cmd+R triggers reload (e2e)
18+
- Keyboard shortcut Cmd+Option+I opens devtools (e2e)
19+
- Gateway discovery sends gatewayDiscovery push event to renderer (integration)
20+
- Canvas window is sandboxed — cannot access main app origin (integration)
21+
- Canvas navigate blocks external URLs (integration)
22+
- Agent port is reachable via HTTP after status reaches 'running' (integration)
23+
- Agent crash triggers automatic restart (integration)
24+
- Stopping agent while starting does not leave zombie process (integration)
25+
- Check for updates contacts the release server (network)
26+
- Applying update relaunches the app (e2e)
27+
- Update check works on both canary and stable channels (network)
28+
- Tray icon persists after main window is closed (e2e)
29+
- Main window has native vibrancy effect on macOS (e2e)
30+
- Context menu closes when clicking elsewhere (e2e)
31+
32+
## Hardware and Manual Coverage
33+
34+
- Microphone input works after permission is granted (hardware)
35+
- Swabble fires 'wakeWordDetected' event when wake word is spoken (hardware)
36+
- Audio transcription produces non-empty text for clear speech (hardware)
37+
- Camera preview renders in the UI when stream is started (hardware)
38+
- Switching between front/rear camera works (hardware)
39+
- takeScreenshot returns a non-empty base64 PNG (hardware)
40+
- Frame capture mode streams frames at configured interval (hardware)
41+
- Left-clicking the tray icon opens the companion window (visual)
42+
- Right-clicking the tray icon shows the tray context menu (visual)
43+
- Window can be dragged by clicking the header region (visual)
44+
- Photo quality is acceptable at default settings (hardware)
45+
- Requesting accessibility opens System Preferences (OS interaction)
46+
- Permission status reflects actual system state (OS interaction)
47+
- Context menu appears at cursor position (visual)
48+
- Power state reflects actual battery status (hardware)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Desktop Release Regression Checklist
2+
3+
Complete these manual checks for desktop release candidates after packaged smoke
4+
tests pass on the target platform.
5+
6+
- [ ] Left-clicking the tray icon opens the companion window (visual)
7+
- [ ] Right-clicking the tray icon shows the tray context menu (visual)
8+
- [ ] Window can be dragged by clicking the header region (visual)
9+
- [ ] Photo quality is acceptable at default settings (hardware)
10+
- [ ] Requesting accessibility opens System Preferences (OS interaction)
11+
- [ ] Permission status reflects actual system state (OS interaction)
12+
- [ ] Context menu appears at cursor position (visual)
13+
- [ ] Power state reflects actual battery status (hardware)

packages/app-core/scripts/desktop-build.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const CORE_PACKAGE_DIR = resolveWorkspacePackageDir("core");
6363
const ELECTROBUN_CARROTS_PACKAGE_DIR =
6464
resolveWorkspacePackageDir("electrobun-carrots");
6565
const SHARED_PACKAGE_DIR = resolveWorkspacePackageDir("shared");
66+
const UI_PACKAGE_DIR = resolveWorkspacePackageDir("ui");
6667
const VAULT_PACKAGE_DIR = resolveWorkspacePackageDir("vault");
6768

6869
const argv = process.argv.slice(2);
@@ -598,6 +599,13 @@ function ensureWorkspaceRuntimePackagesBuilt() {
598599
ensureWorkspaceRuntimePackageBuilt("@elizaos/app-core", APP_CORE_PACKAGE_DIR);
599600
}
600601

602+
function ensureUiGeneratedAssets() {
603+
runBun(["run", "generate:css-strings"], {
604+
cwd: UI_PACKAGE_DIR,
605+
label: "Generating @elizaos/ui CSS string modules",
606+
});
607+
}
608+
601609
function stageDesktopBuild() {
602610
ensureAppDirs();
603611

@@ -648,6 +656,8 @@ function stageDesktopBuild() {
648656
allowFailure: true,
649657
});
650658

659+
ensureUiGeneratedAssets();
660+
651661
runPackageBinary("vite", ["build"], {
652662
cwd: APP_DIR,
653663
env: {

packages/app-core/scripts/run-mobile-build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
findForbiddenRuntimeImportGroups,
5353
findForbiddenRuntimeStrings,
5454
formatForbiddenRuntimeFindings,
55-
} from "../../bun-ios-runtime/scripts/ios-app-store-runtime-policy.mjs";
55+
} from "../../native/bun-runtime/scripts/ios-app-store-runtime-policy.mjs";
5656
import {
5757
loadAospVariantConfig,
5858
resolveAppConfigPath,

packages/scripts/patch-llama-cpp-capacitor.mjs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* when already applied, which is treated as success.
2020
*/
2121

22-
import { execFileSync, spawnSync } from "node:child_process";
23-
import { existsSync, readFileSync, readdirSync } from "node:fs";
22+
import { spawnSync } from "node:child_process";
23+
import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
2424
import { dirname, join, resolve } from "node:path";
2525
import { fileURLToPath } from "node:url";
2626

@@ -84,6 +84,7 @@ for (const { label, dir: pkgDir } of candidates) {
8484
try {
8585
const contents = readFileSync(buildGradle, "utf8");
8686
if (contents.includes("'arm64-v8a', 'riscv64'")) {
87+
ensureAndroidSkipPatch(pkgDir);
8788
skipped++;
8889
continue;
8990
}
@@ -102,6 +103,7 @@ for (const { label, dir: pkgDir } of candidates) {
102103
);
103104

104105
if (result.status === 0 || result.status === 1) {
106+
ensureAndroidSkipPatch(pkgDir);
105107
patched++;
106108
} else {
107109
failed++;
@@ -116,3 +118,27 @@ if (patched > 0 || skipped > 0 || failed > 0) {
116118
`[patch-llama-cpp-capacitor] patched=${patched} already-applied=${skipped} failed=${failed}`,
117119
);
118120
}
121+
122+
function ensureAndroidSkipPatch(pkgDir) {
123+
const cmakeLists = join(pkgDir, "android", "src", "main", "CMakeLists.txt");
124+
if (!existsSync(cmakeLists)) return;
125+
const current = readFileSync(cmakeLists, "utf8");
126+
if (current.includes("ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB")) return;
127+
const marker =
128+
'if(NOT DEFINED ELIZA_REPO_ROOT)\n message(FATAL_ERROR "ELIZA_REPO_ROOT is required for the Eliza DFlash Android JNI bridge")\nendif()\n';
129+
if (!current.includes(marker)) return;
130+
const skipBlock =
131+
'if(DEFINED ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB} AND "$ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB}" STREQUAL "1")\n' +
132+
' file(WRITE "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp" "extern \\"C\\" int eliza_dflash_smoke_stub() { return 0; }\\n")\n' +
133+
' add_library(llama-cpp-arm64 SHARED "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp")\n' +
134+
' set_target_properties(\n' +
135+
' llama-cpp-arm64\n' +
136+
' PROPERTIES\n' +
137+
' OUTPUT_NAME "llama-cpp-arm64"\n' +
138+
' LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/jniLibs/arm64-v8a"\n' +
139+
' )\n' +
140+
' message(STATUS "Skipping Eliza DFlash JNI bridge for Android smoke build")\n' +
141+
' return()\n' +
142+
'endif()\n\n';
143+
writeFileSync(cmakeLists, current.replace(marker, skipBlock + marker));
144+
}

patches/llama-cpp-capacitor@0.1.5.patch

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,28 @@ diff --git a/android/build.gradle b/android/build.gradle
6565
externalNativeBuild {
6666
cmake {
6767
path "src/main/CMakeLists.txt"
68-
@@ -40,23 +81,23 @@
69-
ndkVersion = "29.0.13113456"
68+
@@ -40,25 +81,25 @@
69+
- version "3.22.1"
70+
+ version = "3.22.1"
71+
// Explicitly set NDK version to avoid Windows dependencies
72+
- ndkVersion "29.0.13113456"
73+
+ ndkVersion = "29.0.13113456"
7074
}
7175
}
7276
-
7377
+
7478
buildTypes {
7579
release {
7680
minifyEnabled false
77-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
81+
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
82+
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
7883
}
7984
}
8085
-
8186
+
8287
lintOptions {
83-
abortOnError = false
88+
- abortOnError false
89+
+ abortOnError = false
8490
}
8591
-
8692
+
@@ -110,7 +116,7 @@ diff --git a/android/build.gradle b/android/build.gradle
110116
diff --git a/android/src/main/CMakeLists.txt b/android/src/main/CMakeLists.txt
111117
--- a/android/src/main/CMakeLists.txt
112118
+++ b/android/src/main/CMakeLists.txt
113-
@@ -1,131 +1,129 @@
119+
@@ -1,131 +1,142 @@
114120
-cmake_minimum_required(VERSION 3.10)
115121
+cmake_minimum_required(VERSION 3.22)
116122

@@ -120,6 +126,19 @@ diff --git a/android/src/main/CMakeLists.txt b/android/src/main/CMakeLists.txt
120126
set(CMAKE_CXX_STANDARD 17)
121127
-set(LLAMACPP_LIB_DIR ${CMAKE_SOURCE_DIR}/../../../cpp)
122128
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
129+
+
130+
+if(DEFINED ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB} AND "$ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB}" STREQUAL "1")
131+
+ file(WRITE "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp" "extern \"C\" int eliza_dflash_smoke_stub() { return 0; }\n")
132+
+ add_library(llama-cpp-arm64 SHARED "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp")
133+
+ set_target_properties(
134+
+ llama-cpp-arm64
135+
+ PROPERTIES
136+
+ OUTPUT_NAME "llama-cpp-arm64"
137+
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/jniLibs/arm64-v8a"
138+
+ )
139+
+ message(STATUS "Skipping Eliza DFlash JNI bridge for Android smoke build")
140+
+ return()
141+
+endif()
123142

124143
-include_directories(
125144
- ${LLAMACPP_LIB_DIR}

0 commit comments

Comments
 (0)