Compare commits

...

3 commits

Author SHA1 Message Date
Philip Peterson
1d2feae11c
Fix ARM build (#230)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
2026-01-04 09:23:11 -05:00
Quine Global
098176dafb Upgrade electron-drag-click
Some checks are pending
CodeQL / Analyze (push) Waiting to run
2026-01-04 03:57:54 -05:00
Max Horvath
6331c14df9
Fix macOS 26 GPU performance issue by upgrading to Electron 38 (#222)
* Fix macOS 26 GPU performance issue by upgrading to Electron 38

Upgrades Electron from 34.5.1 to 38.6.0 to resolve excessive WindowServer
GPU usage on macOS 26 (Sequoia). This issue was caused by Electron's
override of the private _cornerMask API, which forced the compositor to
treat window masks as dynamic rather than static, resulting in persistent
high GPU load.

Changes:
- Upgrade electron: 34.5.1 → 38.6.0
- Upgrade electron-mksnapshot: 34.5.1 → 38.6.0
- Upgrade @electron/rebuild: ^3.7.1 → ^3.7.2
- Upgrade node-abi: ^3.67.0 → ^3.81.0 (required for Electron 38 support)

The fix was introduced in Electron 36.9.2, 37.6.0, 38.2.0, and all later
versions. We're upgrading to 38.6.0 as it's the latest stable version
compatible with Node 20.11.0.

Fixes: electron/electron#48376

* Use optional chaining

Signed-off-by: Philip Peterson <1326208+philip-peterson@users.noreply.github.com>

---------

Signed-off-by: Philip Peterson <1326208+philip-peterson@users.noreply.github.com>
Co-authored-by: Philip Peterson <1326208+philip-peterson@users.noreply.github.com>
2026-01-04 08:43:36 +00:00
11 changed files with 91 additions and 39 deletions

View file

@ -73,6 +73,11 @@ runs:
copy_artifact_path: target copy_artifact_path: target
copy_artifact_dest: target copy_artifact_dest: target
commands: | commands: |
# Install Python distutils in the ARM container
sudo apt-get update
sudo apt-get install -y python3-pip python3-setuptools python3-dev
pip3 install setuptools --break-system-packages || pip3 install setuptools
cd target cd target
# TODO upgrade node to 20.11.0 to match NODE_VERSION # TODO upgrade node to 20.11.0 to match NODE_VERSION
wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ inputs.matrix-name }}.tar.xz wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ inputs.matrix-name }}.tar.xz

View file

@ -84,7 +84,7 @@ jobs:
matrix-os: windows-latest matrix-os: windows-latest
matrix-name: win matrix-name: win
upload-artifact: false upload-artifact: false
# ARM Linux: # ARM Linux:
build-linux-armv7l: build-linux-armv7l:
@ -97,6 +97,28 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU and binfmt
run: |
# Install qemu-user-static
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support python3-setuptools
# Install distutils for node-gyp
sudo apt-get install -y python3-distutils || sudo apt-get install -y python3-dev python-is-python3
# Download and install binfmt configurations
wget https://github.com/qemu/qemu/raw/master/scripts/qemu-binfmt-conf.sh
chmod +x qemu-binfmt-conf.sh
sudo ./qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static --debian
# Import the binfmt configurations
sudo update-binfmts --import qemu-arm
sudo update-binfmts --import qemu-aarch64
# Verify they exist
ls -la /proc/sys/fs/binfmt_misc/qemu-arm* || true
- name: Build ARMv7l - name: Build ARMv7l
uses: ./.github/actions/build-linux-arm uses: ./.github/actions/build-linux-arm
env: env:

View file

@ -84,6 +84,27 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU and binfmt
run: |
# Install qemu-user-static
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support python3-setuptools
# Install distutils for node-gyp
sudo apt-get install -y python3-distutils || sudo apt-get install -y python3-dev python-is-python3
# Download and install binfmt configurations
wget https://github.com/qemu/qemu/raw/master/scripts/qemu-binfmt-conf.sh
chmod +x qemu-binfmt-conf.sh
sudo ./qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static --debian
# Import the binfmt configurations
sudo update-binfmts --import qemu-arm
sudo update-binfmts --import qemu-aarch64
# Verify they exist
ls -la /proc/sys/fs/binfmt_misc/qemu-arm* || true
- name: Build ARMv7l - name: Build ARMv7l
uses: ./.github/actions/build-linux-arm uses: ./.github/actions/build-linux-arm
env: env:
@ -134,7 +155,7 @@ jobs:
- name: List downloaded artifacts - name: List downloaded artifacts
run: ls -R ./artifacts run: ls -R ./artifacts
- name: Ensure non-empty artifacts - name: Ensure non-empty artifacts
run: | run: |
echo "Checking for zero-byte files in artifacts/..." echo "Checking for zero-byte files in artifacts/..."

View file

@ -190,7 +190,7 @@ app.on('ready', () =>
} }
} }
]); ]);
app.dock.setMenu(dockMenu); app.dock?.setMenu(dockMenu);
} }
Menu.setApplicationMenu(AppMenu.buildMenu(menu)); Menu.setApplicationMenu(AppMenu.buildMenu(menu));

View file

@ -65,7 +65,10 @@ export const createMenu = (
Created by Guillermo Rauch Created by Guillermo Rauch
Copyright © 2022 Vercel, Inc. Copyright © 2022 Vercel, Inc.
`.split('\n').map(z => z.trim()).join('\n'), `
.split('\n')
.map((z) => z.trim())
.join('\n'),
buttons: [], buttons: [],
icon: icon as any icon: icon as any
}); });

View file

@ -21,7 +21,6 @@
"color": "4.2.3", "color": "4.2.3",
"default-shell": "1.0.1", "default-shell": "1.0.1",
"electron-devtools-installer": "3.2.1", "electron-devtools-installer": "3.2.1",
"quine-electron-drag-click": "1.0.6d",
"electron-fetch": "1.9.1", "electron-fetch": "1.9.1",
"electron-is-dev": "2.0.0", "electron-is-dev": "2.0.0",
"electron-store": "8.2.0", "electron-store": "8.2.0",
@ -34,6 +33,7 @@
"os-locale": "5.0.0", "os-locale": "5.0.0",
"parse-url": "9.2.0", "parse-url": "9.2.0",
"queue": "6.0.2", "queue": "6.0.2",
"quine-electron-drag-click": "2.0.0",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"recast": "0.23.11", "recast": "0.23.11",

View file

@ -27,7 +27,7 @@ import toElectronBackgroundColor from '../utils/to-electron-background-color';
import contextMenuTemplate from './contextmenu'; import contextMenuTemplate from './contextmenu';
if(process.platform === 'darwin') { if (process.platform === 'darwin') {
electronDragClick(); electronDragClick();
} }

View file

@ -353,10 +353,10 @@ eastasianwidth@^0.2.0:
resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
electron-devtools-installer@3.2.0: electron-devtools-installer@3.2.1:
version "3.2.0" version "3.2.1"
resolved "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-3.2.0.tgz#acc48d24eb7033fe5af284a19667e73b78d406d0" resolved "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-3.2.1.tgz#338a0ada7b4232ee42cd88fe5cf305c6be95cfe9"
integrity sha512-t3UczsYugm4OAbqvdImMCImIMVdFzJAHgbwHpkl5jmfu1izVgUcP/mnrPqJIpEeCK1uZGpt+yHgWEN+9EwoYhQ== integrity sha512-FaCi+oDCOBTw0gJUsuw5dXW32b2Ekh5jO8lI1NRCQigo3azh2VogsIi0eelMVrP1+LkN/bewyH3Xoo1USjO0eQ==
dependencies: dependencies:
rimraf "^3.0.2" rimraf "^3.0.2"
semver "^7.2.1" semver "^7.2.1"
@ -1219,10 +1219,10 @@ queue@6.0.2:
dependencies: dependencies:
inherits "~2.0.3" inherits "~2.0.3"
quine-electron-drag-click@1.0.6d: quine-electron-drag-click@2.0.0:
version "1.0.6-d" version "2.0.0"
resolved "https://registry.npmjs.org/quine-electron-drag-click/-/quine-electron-drag-click-1.0.6-d.tgz#210fc244fdf3a11b3ad1b2e2d7d7670176b5e19b" resolved "https://registry.npmjs.org/quine-electron-drag-click/-/quine-electron-drag-click-2.0.0.tgz#c6694a706b4c4eca75277ef2c34d7773476700e1"
integrity sha512-2geemTnPP3GuEGzOR/IbbXbTf+JX/VERjerA4r2TuXYHSanNiEbMWSSZ2wD8RllOnp/tBIE+O4CmmPfJ86rYQQ== integrity sha512-pieh1HawezFDn+cpBgs+RQXeR8wj0h/gZafB3sB9rYRQAHTs9V1R8gIq6u7SjGrn1esiM+iP4cknpzsbk/KQ9w==
dependencies: dependencies:
bindings "^1.5.0" bindings "^1.5.0"
node-addon-api "^3.0.2" node-addon-api "^3.0.2"

View file

@ -1,7 +1,8 @@
import React, {forwardRef} from 'react'; import React, {forwardRef} from 'react';
import {useDevicePixelRatio} from 'use-device-pixel-ratio';
import type {StyleSheetProps} from '../../typings/hyper'; import type {StyleSheetProps} from '../../typings/hyper';
import { useDevicePixelRatio } from 'use-device-pixel-ratio';
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => { const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
const {borderColor} = props; const {borderColor} = props;

View file

@ -92,7 +92,7 @@
"@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-proposal-optional-chaining": "7.21.0",
"@babel/preset-react": "7.25.9", "@babel/preset-react": "7.25.9",
"@babel/preset-typescript": "7.26.0", "@babel/preset-typescript": "7.26.0",
"@electron/rebuild": "^3.7.1", "@electron/rebuild": "^3.7.2",
"@types/args": "5.0.3", "@types/args": "5.0.3",
"@types/async-retry": "1.4.9", "@types/async-retry": "1.4.9",
"@types/color": "3.0.6", "@types/color": "3.0.6",
@ -115,10 +115,10 @@
"copy-webpack-plugin": "12.0.2", "copy-webpack-plugin": "12.0.2",
"cpy-cli": "^5.0.0", "cpy-cli": "^5.0.0",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"electron": "34.5.1", "electron": "38.6.0",
"electron-builder": "26.0.13", "electron-builder": "26.0.13",
"electron-link": "^0.6.0", "electron-link": "^0.6.0",
"electron-mksnapshot": "34.5.1", "electron-mksnapshot": "38.6.0",
"electronmon": "^2.0.3", "electronmon": "^2.0.3",
"eslint": "8.57.0", "eslint": "8.57.0",
"eslint-config-prettier": "9.1.0", "eslint-config-prettier": "9.1.0",
@ -158,7 +158,7 @@
}, },
"resolutions": { "resolutions": {
"@types/retry": "0.12.5", "@types/retry": "0.12.5",
"node-abi": "^3.67.0" "node-abi": "^3.81.0"
}, },
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
} }

View file

@ -571,7 +571,7 @@
minimist "^1.2.6" minimist "^1.2.6"
plist "^3.0.5" plist "^3.0.5"
"@electron/rebuild@3.7.2", "@electron/rebuild@^3.7.1": "@electron/rebuild@3.7.2", "@electron/rebuild@^3.7.2":
version "3.7.2" version "3.7.2"
resolved "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.7.2.tgz#8d808b29159c50086d27a5dec72b40bf16b4b582" resolved "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.7.2.tgz#8d808b29159c50086d27a5dec72b40bf16b4b582"
integrity sha512-19/KbIR/DAxbsCkiaGMXIdPnMCJLkcf8AvGnduJtWBs/CBwiAjY1apCqOLVxrXg+rtXFCngbXhBanWjxLUt1Mg== integrity sha512-19/KbIR/DAxbsCkiaGMXIdPnMCJLkcf8AvGnduJtWBs/CBwiAjY1apCqOLVxrXg+rtXFCngbXhBanWjxLUt1Mg==
@ -1285,12 +1285,12 @@
dependencies: dependencies:
undici-types "~5.26.4" undici-types "~5.26.4"
"@types/node@^20.9.0": "@types/node@^22.7.7":
version "20.17.30" version "22.19.1"
resolved "https://registry.npmjs.org/@types/node/-/node-20.17.30.tgz#1d93f656d3b869dbef7b796568ac457606ba58d0" resolved "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz#1188f1ddc9f46b4cc3aec76749050b4e1f459b7b"
integrity sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg== integrity sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==
dependencies: dependencies:
undici-types "~6.19.2" undici-types "~6.21.0"
"@types/parse-path@^7.0.0": "@types/parse-path@^7.0.0":
version "7.0.3" version "7.0.3"
@ -3354,10 +3354,10 @@ electron-link@^0.6.0:
resolve "^1.19.0" resolve "^1.19.0"
source-map "^0.7.3" source-map "^0.7.3"
electron-mksnapshot@34.5.1: electron-mksnapshot@38.6.0:
version "34.5.1" version "38.6.0"
resolved "https://registry.npmjs.org/electron-mksnapshot/-/electron-mksnapshot-34.5.1.tgz#25fd5e935e9566d8ce157cb173643b0a9cf904e4" resolved "https://registry.npmjs.org/electron-mksnapshot/-/electron-mksnapshot-38.6.0.tgz#ae9b20caa38087e157aba01607a85326d14d26d9"
integrity sha512-kD8VQLe/7vMw3ddAnJqcnseFQohTdZJSUgyoQpPwRa9fUf2Ko1sXBP9mriQjjw4Ho5SmKqaAz4rJMAUgsxf51Q== integrity sha512-2/TpAa4iZ9roln5fTcAEsZrgaUSliglbWkyow/ae+yij6RHJO0dFzKihynSynLnEXgOPRQT6zrqKV53TTQOufA==
dependencies: dependencies:
"@electron/get" "^2.0.1" "@electron/get" "^2.0.1"
extract-zip "^2.0.0" extract-zip "^2.0.0"
@ -3403,13 +3403,13 @@ electron-to-chromium@^1.5.73:
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.139.tgz#56ae7d42439e2967a54badbadaeb12f748987f37" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.139.tgz#56ae7d42439e2967a54badbadaeb12f748987f37"
integrity sha512-GGnRYOTdN5LYpwbIr0rwP/ZHOQSvAF6TG0LSzp28uCBb9JiXHJGmaaKw29qjNJc5bGnnp6kXJqRnGMQoELwi5w== integrity sha512-GGnRYOTdN5LYpwbIr0rwP/ZHOQSvAF6TG0LSzp28uCBb9JiXHJGmaaKw29qjNJc5bGnnp6kXJqRnGMQoELwi5w==
electron@34.5.1: electron@38.6.0:
version "34.5.1" version "38.6.0"
resolved "https://registry.npmjs.org/electron/-/electron-34.5.1.tgz#c7ce7b6f054eae6c7ef2d4ee933277db5bf069b3" resolved "https://registry.npmjs.org/electron/-/electron-38.6.0.tgz#c862bff41d42776e307bf5cc92503dda23612339"
integrity sha512-z2Wm7QjhnJ5592fLITynj8UwIk1mBiT402mOakxSYiADrERIci3IOPk7xWHAFOMvt/eoG5RW16PPhgJiedZcGA== integrity sha512-68OFNxJlrEStA+t8k5atzf4frJddvRR1N1oalr49Ll8YZ0+0nEsDhw4UNhTCoZKTjSYcxFF/4rt+sco+OlnB3g==
dependencies: dependencies:
"@electron/get" "^2.0.0" "@electron/get" "^2.0.0"
"@types/node" "^20.9.0" "@types/node" "^22.7.7"
extract-zip "^2.0.1" extract-zip "^2.0.1"
electronmon@^2.0.3: electronmon@^2.0.3:
@ -6085,10 +6085,10 @@ nested-error-stacks@^2.1.1:
resolved "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz#26c8a3cee6cc05fbcf1e333cd2fc3e003326c0b5" resolved "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz#26c8a3cee6cc05fbcf1e333cd2fc3e003326c0b5"
integrity sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw== integrity sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==
node-abi@^3.0.0, node-abi@^3.45.0, node-abi@^3.67.0: node-abi@^3.0.0, node-abi@^3.45.0, node-abi@^3.81.0:
version "3.74.0" version "3.81.0"
resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.74.0.tgz#5bfb4424264eaeb91432d2adb9da23c63a301ed0" resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.81.0.tgz#176a80904b2d382f5e5d1abcfb44d681cf9105c5"
integrity sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w== integrity sha512-I+SHs7vmUV9ooMDHVzFfUxFQRWeiBCGbI02+XB503WBS8RCDJl4vXSoAXzcnSWpzgItirp2EraDq7jQ2c7CIiA==
dependencies: dependencies:
semver "^7.3.5" semver "^7.3.5"
@ -8274,7 +8274,7 @@ undici-types@~5.26.4:
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
undici-types@~6.19.2, undici-types@~6.19.8: undici-types@~6.19.8:
version "6.19.8" version "6.19.8"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==