Repository navigation
Conversation
Collaborator
Author
TestPR: #270 Setup: NethVoice with two users (A and B) with a NethLink device each; NethLink installed from this PR's build on Windows, macOS (13+) and Linux (AppImage). Run each test case on all three platforms unless the title says otherwise. For the upgrade cases, start from an existing install of the current release with a saved account. Test Case 1 - Upgrade keeps the saved account
Test Case 2 - Login, logout and password
Test Case 3 - Calls
Test Case 4 - Phone island window
Test Case 5 - Command bar
Test Case 6 - Call the selected number
Test Case 7 - tel:, callto: and nethlink: links
Test Case 8 - Screen share
Test Case 9 - Notifications and tray
Test Case 10 - Linux specific
Test Case 11 - Regression check on the rest of the UI
|
Since Electron 44 clipboard.writeText returns a promise. A failed write, for example with a value that is not a string, became an unhandled rejection in the main process. Log it as a warning. Assisted-by: Claude Code:Fable 5.2
The permissions are requested a first time at startup, before the translations are loaded, so the screen recording dialog showed the translation keys. It was then shown again by the request made before the auto login. Show the dialog only once the translations are ready, and one time. Assisted-by: Claude Code:Fable 5.2
tonyco97
force-pushed
the
chore/electron-upgrade
branch
from
November 23, 2026 13:14
afc2333 to
d062a78
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade Electron from 28.3.3 (EOL) to 45.4.1 (latest stable: Chromium 156, Node 24.22), move
safeStorageto the async API so the app no longer uses anything removed in Electron 46, and upgrade the build tooling (electron-vite 2 → 6, Vite 5 → 8). It was built on top of #267 and is now rebased onmain. It also includes two fixes by Edoardo Spadoni: errors when copying to the clipboard are caught and logged, and the macOS screen recording permission dialog is shown once, after the translations are loaded.The goal is a like-for-like upgrade: every change below is there to keep NethLink behaving as it does on Electron 28.
Changes
Dependencies (
package.json,package-lock.json)electron^28.2.0→^45.4.1.electron-vite^2.0.0→^6.0.0,vite^5.0.12→^8.3.8,@vitejs/plugin-react^4.2.1→^6.3.0,@types/node^18→^24(required by Vite 8, and it matches the Node.js inside Electron 45). Vite 8 bundles with Rolldown instead of esbuild + Rollup. Runtimedependenciesare unchanged.externalizeDepsPlugin()is removed fromelectron.vite.config.ts: it is deprecated, and electron-vite 6 externalizesdependenciesby default for main and preload with the same logic.postinstallnow runsinstall-electronbeforeelectron-builder install-app-deps. Since Electron 42 the binary is no longer downloaded at install time, and electron-vite (2 and 6) readsnode_modules/electron/path.txtdirectly, so without thisnpm run dev/npm startfail withElectron uninstall.desktopName: "nethlink.desktop". This is the value Electron already uses by default (${app.name}.desktop), so nothing changes at runtime and protocol registration (tel:,callto:,nethlink:) keeps using the same desktop id. It lets electron-builder writeStartupWMClass=nethlink, which matches the window class Electron 45 now derives from the desktop name (Electron 28 usedNethLink). Without it, launchers that integrate the AppImage would no longer link the window to its icon.API changes (
src/main)clipboard.readText('selection')→clipboard.selection.readText(). Electron 44 removed thetypeargument, so the old call silently read the CLIPBOARD instead of the PRIMARY selection on Linux (call shortcut).writeTextis now async and is awaited.console-message(PhoneIsland log forwarding) uses the event object. The positional arguments are deprecated (removal in 47). The log line format is unchanged (DEBUG/INFO/WARNING/ERROR).ready-to-showlistener has no argument (typing only).safeStorageuses the async API (isAsyncEncryptionAvailable,encryptStringAsync,decryptStringAsync). The sync methods are deprecated in 45 and removed in 46. The retry loop that waits for encryption, the stored format and the error handling are unchanged.Linux: stay on XWayland (
main.ts,electron.vite.config.ts)setPosition,setAlwaysOnTop,centerandmoveTopare not supported (BrowserWindow docs), which would break the phone island and the command bar.app.commandLine.appendSwitch('ozone-platform', 'x11')is applied too late to work, so when Electron picks Wayland and no--ozone-platform*flag was passed, the app relaunches itself once with--ozone-platform=x11. For the AppImage it relaunches$APPIMAGE. The flag goes first so thatsecond-instancestill receives thetel:URL as the last argument.ELECTRON_CLI_ARGS, sonpm run devkeeps working (a relaunch would end the dev process). The flag is prepended to any arguments already passed withnpm run dev -- -- <args>.Docs: the minimum macOS version in the README is now 13 (Ventura). See the notes below.
Tests (Linux, Ubuntu GNOME Wayland session, against a real NethVoice)
I ran Electron 28 (build from #267) and Electron 45 (this branch) side by side.
npm cifrom clean,npm run build(typecheck + build), eslint (0 errors, one warning fewer), prettieruiohook-napi(rebuilt from source),@nut-tree-fork/nut-js,koffiencryptString) auto-logs in withdecryptStringAsync(shouldReEncrypt: false)UPDATE_PASSWORD) encrypt withencryptStringAsync; restart auto-logs in. On Linux the blob is byte-for-byte identical to the one Electron 28 writes, and it is stored in the same JSON shape--trace-deprecation)_NET_WM_STATE_ABOVEand the same positionmonitortrackclipboard.selectionreads the same selection as Electron 28readText('selection'). Without the fix, Electron 45 returns the CLIPBOARD content.org.freedesktop.portal.Notification.AddNotificationcallIconName+IconThemePathinstead of an inline pixmap.$APPIMAGE --ozone-platform=x11 ...and runs on X11,WM_CLASSmatchesStartupWMClasstel:link through a second AppImage instance, relaunch included: the URL reaches the running instance and the call startsnpm run dev: Electron starts with--ozone-platform=x11and does not relaunchelectron-vite 6 / Vite 8: build before vs after, both on Electron 45
To isolate the bundler change, I compared this build with the same code built by electron-vite 2 + Vite 5, both on Electron 45. Same Chromium, so any pixel difference would come from the bundler.
requires. The files are larger only because Rolldown keeps the JSDoc comments; without comments and whitespace the code is slightly smaller (preload −1.8%, main −0.7%). CSS is byte-identical.Ctrlcommand bar (uiohook-napi) opens and closes; the call shortcut copies the selected number (nut-js Ctrl+C, PRIMARY selection) and starts the callnpm cifrom clean (Electron download and native rebuild inpostinstall),npm run build, eslint (0 errors), prettiernpm run devwith and without extra Electron arguments: X11, no relaunch, the app renders from the Vite 8 dev server (login identical to the build), real login and registration, the process exits cleanly.npm start(preview) works.tel:from a second instance starts the call (same timing behavior as the electron-vite 2 build)Notes for reviewers
build-dev.yml) builds all of them: Windows x64, macOS arm64 and x64, Linux x64. On Windowsuiohook-napiis rebuilt from source against Electron 45 (C++20) without errors. macOS builds are signed with the Developer ID certificate, and notarization is skipped as in every PR build. Windows builds of PRs are unsigned, as before.UNNotification(Electron 42) and need a signed app. Release builds are signed; unsigned local builds will not show notifications.encryptStringcan be read bydecryptStringAsync. Worth a check of auto-login after updating an existing install on both.electron@45and Vite 8). CI already uses Node 22.uiohookglobal hook does not see key events from native Wayland apps, the same as on Electron 28.