fix(desktop): restore Linux launcher identity (#4649)

* fix(desktop): restore Linux launcher identity

Electron now derives Linux window identity from the scoped package name before app startup. Pin the existing Paseo.desktop identity in packaged metadata and check the built archive in the packaged-app smoke test.

* test(desktop): declare packaged smoke archive dependency

* fix(desktop): update Nix hash for smoke dependency
This commit is contained in:
Mohamed Boudra
2026-09-10 11:42:09 +02:00
committed by GitHub
parent 94fc4e5d49
commit f7e68e32d1
4 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
sha256-8P7kk9B2A81e13IIyyfo8fIoNGlrutfV/WGKAFHscUc=
sha256-j8U5S71SJoC+5yh7IjkadrRZaHOYeMsi1z8B6K7j4R4=
+1
View File
@@ -37538,6 +37538,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@electron/asar": "3.4.1",
"@types/node": "24.6.0",
"@types/ws": "^8.5.14",
"electron": "44.2.0",
@@ -5,6 +5,7 @@ const os = require("node:os");
const path = require("node:path");
const { setTimeout: delay } = require("node:timers/promises");
const { chromium } = require("playwright");
const { extractFile } = require("@electron/asar");
const EXECUTABLE_NAME = "Paseo";
const SMOKE_TIMEOUT_MS = 60_000;
@@ -805,9 +806,23 @@ async function stopCliDaemon({ appPath, env }) {
});
}
function assertLinuxDesktopIdentity(appPath) {
if (process.platform === "linux") {
const metadata = JSON.parse(
extractFile(path.join(appPath, "resources", "app.asar"), "package.json").toString(),
);
if (metadata.desktopName !== `${EXECUTABLE_NAME}.desktop`) {
throw new Error(
`Packaged Linux desktop identity ${JSON.stringify(metadata.desktopName)} does not match ${EXECUTABLE_NAME}.desktop`,
);
}
}
}
async function smokePackagedDesktopApp({ appPath }) {
const executablePath = getExecutablePath(appPath);
assertExecutable(executablePath, "Packaged app executable");
assertLinuxDesktopIdentity(appPath);
ensureLinuxSandboxPermissions(appPath);
await smokeColdCliDaemonStart({ appPath });
+3 -1
View File
@@ -35,6 +35,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@electron/asar": "3.4.1",
"@types/node": "24.6.0",
"@types/ws": "^8.5.14",
"electron": "44.2.0",
@@ -43,5 +44,6 @@
"unzip-crx-3": "^0.2.0",
"vitest": "^4.1.6",
"wait-on": "8.0.5"
}
},
"desktopName": "Paseo.desktop"
}