Fail closed on a missing microphone, release partial capture setup, menus show enumeration failures; deterministic packaged smoke launch; NSIS custom-profile update guard

This commit is contained in:
omar committed 2026-10-24 07:07:05 +03:00
1 parent 7afce5ab20
commit 2a71d63b7b
37 files changed
+838 -310

No files matched your search

+19
View File
@@ -63,3 +63,22 @@ logs show a connection and an opened microphone, but no burst logging existed th
user-controlled: hold the in-window push-to-talk button (or F8 with TeamsPeach focused) while the official
client listens. Synthetic two-TeamsPeach voice tests (fake capture, empty channel) pass and are not
hardware proof.
## Packaged smoke harness: launch race (found and fixed)
`runtime/2026-10-24-packaged-launch-race/` keeps the first packaged run of 0.1.2-rc.1 (7afce5a): `theme` and
`menus` passed; `devices` and `ui` failed with `electron.launch: Timeout`. Cause: with `executablePath`
Playwright cannot inject its `-r loader.js` (which in a dev run holds `ready` until it has attached); when it
attaches to the packaged app while the first page is committing, it loses its utility world and the launch
never completes (6 of 6 isolated probes hung; passing `-r loader.js` to the packaged exe is ignored, 5 of 5
hung). CI run #21 failed the same way. Fix: dev runs use Playwright's own loader (no `executablePath`);
packaged runs start with `TEAMSPEACH_TEST_HOLD_WINDOW=1`, which defers window creation until the harness
calls the main-process hook (`scripts/lib/electron-app.mjs`). Without that variable the app starts as before.
## Device choice and capture safety (rc.1 additions)
- A saved microphone that no longer exists fails closed (`device_unavailable`): no second `getUserMedia`
without the device id, no default microphone, nothing sent. Choosing an available device restarts capture
only while connected or during the microphone test. Tests: `test/voice-capture.test.mjs`,
`test/audio-engine.test.mjs`.
- A failure while building the capture graph after the microphone opened stops its tracks and disconnects the
partial nodes before rethrowing.
- A failed `enumerateDevices()` replaces the cached choices, so the menus show the failure, not an older list.
@@ -0,0 +1,10 @@
{
"steps": [
{
"name": "FAILED",
"error": "electron.launch: Timeout 180000ms exceeded.\nCall log:\n\u001b[2m - <launching> \"C:\\Users\\Admin\\Desktop\\projects\\TeamsPeach\\dist\\win-unpacked\\TeamsPeach.exe\" \"--inspect=0\" \"--remote-debugging-port=0\"\u001b[22m\n\u001b[2m - <launched> pid=4588\u001b[22m\n\u001b[2m - [pid=4588][out]\u001b[22m\n\u001b[2m - [pid=4588][err] Debugger listening on ws://127.0.0.1:63427/fe8be778-dfa5-4682-a04e-1fbfc456af8f\u001b[22m\n\u001b[2m - [pid=4588][err] For help, see: https://nodejs.org/learn/getting-started/debugging\u001b[22m\n\u001b[2m - <ws connecting> ws://127.0.0.1:63427/fe8be778-dfa5-4682-a04e-1fbfc456af8f\u001b[22m\n\u001b[2m - <ws connected> ws://127.0.0.1:63427/fe8be778-dfa5-4682-a04e-1fbfc456af8f\u001b[22m\n\u001b[2m - [pid=4588][err] Debugger attached.\u001b[22m\n\u001b[2m - [pid=4588][err]\u001b[22m\n\u001b[2m - [pid=4588][err] DevTools listening on ws://127.0.0.1:63429/devtools/browser/5f28a818-8da7-4cf7-a0ac-26a82d2ac4ef\u001b[22m\n\u001b[2m - <ws connecting> ws://127.0.0.1:63429/devtools/browser/5f28a818-8da7-4cf7-a0ac-26a82d2ac4ef\u001b[22m\n\u001b[2m - <ws connected> ws://127.0.0.1:63429/devtools/browser/5f28a818-8da7-4cf7-a0ac-26a82d2ac4ef\u001b[22m\n\n at async launch (C:\\Users\\Admin\\Desktop\\projects\\TeamsPeach\\scripts\\smoke-devices.mjs:27:15)\n at async file:///C:/Users/Admin/Desktop/projects/TeamsPeach/scripts/smoke-devices.mjs:59:20"
}
],
"console": [],
"ok": false
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

@@ -0,0 +1,95 @@
{
"steps": [
{
"name": "mic right-click",
"menu": true,
"inputMuted": false,
"capturing": false,
"framesSent": 0,
"items": [
{
"label": "System default (Mic/Line/Inst 1-2 (MiniFuse 4))",
"checked": "true"
},
{
"label": "Loopback Mix Left/Right (MiniFuse 4)",
"checked": "false"
},
{
"label": "Headset Microphone (Oculus Virtual Audio Device)",
"checked": "false"
},
{
"label": "Line 3-4 (MiniFuse 4)",
"checked": "false"
},
{
"label": "Микрофон (DroidCam Audio)",
"checked": "false"
},
{
"label": "Микрофон (Virtual Desktop Audio)",
"checked": "false"
},
{
"label": "Mic/Line/Inst 1-2 (MiniFuse 4)",
"checked": "false"
}
],
"insideViewport": true,
"focused": "menu-item"
},
{
"name": "menu choice reflected in settings",
"pick": "Headset Microphone (Oculus Virtual Audio Device)",
"settingsInput": "Headset Microphone (Oculus Virtual Audio Device)",
"same": true
},
{
"name": "headphones Shift+F10",
"menu": true,
"outputMuted": false,
"items": [
"System default (Main Left/Right (MiniFuse 4))",
"Main Left/Right (MiniFuse 4)",
"Realtek Digital Output (Realtek(R) Audio)",
"Virtual Left/Right (MiniFuse 4)",
"LG ULTRAGEAR (NVIDIA High Definition Audio)",
"Наушники (Oculus Virtual Audio Device)",
"Aux Left/Right (MiniFuse 4)"
],
"insideViewport": true
},
{
"name": "escape",
"menuClosed": true,
"focusRestored": true,
"outputMuted": false
},
{
"name": "left click still toggles mute",
"inputMuted": true
},
{
"name": "rapid mic → headphones while enumeration pending",
"menus": 1,
"outputExpanded": "true",
"inputExpanded": "false",
"items": 7
},
{
"name": "dismissed before enumeration finished",
"menus": 0,
"focused": "connect-address",
"expanded": "false"
},
{
"name": "after restart",
"checkedIn": "Headset Microphone (Oculus Virtual Audio Device)",
"checkedOut": "Realtek Digital Output (Realtek(R) Audio)",
"persisted": true
}
],
"console": [],
"ok": true
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

@@ -0,0 +1,43 @@
{
"steps": [
{
"name": "os app theme",
"appsUseTheme": "dark"
},
{
"name": "new profile: onboarding",
"themeSource": "dark",
"windowBackground": "#1A1817",
"prefersDark": true,
"bodyBackground": "rgb(27, 32, 41)",
"bg": "#1b2029"
},
{
"name": "settings shows dark selected",
"checked": "dark"
},
{
"name": "switched to light",
"themeSource": "light",
"windowBackground": "#1A1817",
"prefersDark": false,
"bodyBackground": "rgb(246, 243, 240)",
"bg": "#f6f3f0"
},
{
"name": "restart keeps light",
"themeSource": "light",
"windowBackground": "#F6F3F0",
"prefersDark": false,
"bodyBackground": "rgb(246, 243, 240)",
"bg": "#f6f3f0",
"stored": "light"
},
{
"name": "stored \"system\" kept",
"legacyStored": "system",
"prefersDark": true
}
],
"ok": true
}
+17
View File
@@ -46,6 +46,7 @@ preview that the channel hides.
| Installation | Detection | Behaviour |
|---|---|---|
| Windows x64, NSIS installer | `Uninstall TeamsPeach.exe` next to the executable | download, then silent NSIS update after the user confirms; the installer starts the new version |
| Windows x64, NSIS installer, started with `TEAMSPEACH_PROFILE_DIR` | as above + profile override | notification only (`mode: 'manual'`, `manualReason: 'custom-profile'`); never downloads or installs, `update:install` returns `custom-profile` even when the user confirms |
| Linux x64 / arm64 AppImage | `APPIMAGE` environment variable | download, then the AppImage file is replaced and the app relaunches after the user confirms |
| Windows x64 zip, Linux tar.gz | otherwise | notification only; "open release page"; the user replaces files manually |
| macOS, Windows ARM64, development runs | — | updates disabled (`disabledCode`) — no builds are published for them |
@@ -106,3 +107,19 @@ The service log is `logs/updater.log` in the profile directory (English).
profile under Xvfb with `APPIMAGE_EXTRACT_AND_RUN=1`, lets it update itself from the real release server,
and checks the relaunched version, the installed file against the feed sha512, and that UID, nickname,
bookmark and device preference are unchanged (`scripts/update-e2e.mjs`).
- `scripts/update-live-check.mjs --as <version>`: real check, download and sha512 verification against the
public release server through the platform's real updater (NSIS on Windows, AppImage on Linux) in a
dev-mode harness with a temp profile and cache. It never installs.
### Why the Windows install is not tested on a normal user account
A silent NSIS update with `--force-run` relaunches the app through `StdUtils.ExecShellAsUser`
(`templates/nsis/common.nsh`, `installSection.nsh`), i.e. `IShellDispatch2::ShellExecute` of the desktop shell
on the Start Menu shortcut. The new process inherits Explorer's environment, not the installer's, so a
`TEAMSPEACH_PROFILE_DIR` test profile is not carried over, and the installer writes to the per-user
installation registered for `dev.teamspeach.desktop`. An install test therefore needs a separate Windows
account or VM; on a normal account only check, download and verification are exercised
(`update-live-check.mjs`). For the same reason the product never self-updates an NSIS installation that runs
on a `TEAMSPEACH_PROFILE_DIR` profile: the updated app would come back on the default profile, so such a run
gets the release page and a reason instead (engine test scenario "custom profile"). The AppImage relaunch
uses `app.relaunch`, which keeps the environment, so a custom profile survives it.