Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d5fce53
fix(desktop): include standard Linux AppImage icons
mwolson Apr 24, 2026
bfc4a7c
fix(desktop): select Linux secret storage backend
mwolson May 5, 2026
5cce063
Merge branch 'main' into fix/linux-secret-store-backend
juliusmarminge May 6, 2026
8ad0cc9
fix(web): preserve credential error after rollback failure
mwolson May 6, 2026
b133f59
refactor(web): simplify saved environment rollback error handling
mwolson May 6, 2026
23c7528
Merge remote-tracking branch 'upstream/main' into fix/linux-secret-st…
mwolson May 8, 2026
58ada8b
Merge remote-tracking branch 'upstream/main' into fix/linux-secret-st…
mwolson May 8, 2026
afc9110
Configure Linux desktop startup before Electron ready
mwolson May 9, 2026
b7c2e20
Harden saved SSH environment sessions
mwolson May 9, 2026
5f1fe13
Remove saved environments atomically
mwolson May 9, 2026
1676dd3
Merge remote-tracking branch 'upstream/main' into fix/linux-secret-st…
mwolson May 9, 2026
6fd6ad1
Preserve root paths in early desktop startup
mwolson May 9, 2026
46d0228
Address desktop Effect startup review
mwolson May 9, 2026
2489efc
Merge remote-tracking branch 'upstream/main' into fix/linux-secret-st…
mwolson May 9, 2026
a0a2a94
Tighten desktop pre-ready imports
mwolson May 9, 2026
4e4cc84
Sort desktop settings test fixture
mwolson May 9, 2026
27eadcd
Preserve desktop pre-ready layer ordering
mwolson May 9, 2026
6c34906
Isolate desktop pre-ready platform reads
mwolson May 9, 2026
0f7c19d
Accept JSONC in early desktop settings
mwolson May 9, 2026
749bc07
Remove prescriptive Electron startup guidance
mwolson May 10, 2026
4d69158
Guard missing desktop bridge SSH cleanup
mwolson May 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,32 @@ jobs:
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installPath = & $vswhere -products * -latest -property installationPath
$setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
$proc = Start-Process -FilePath $setupExe `
-ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
-Wait -PassThru -NoNewWindow
if ($null -eq $proc -or $proc.ExitCode -ne 0) {
$code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
Write-Error "Visual Studio Installer failed with exit code $code"
exit $code
}
$installPath = & $vswhere -products * -latest -property installationPath
$setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
$proc = Start-Process -FilePath $setupExe `
-ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
-Wait -PassThru -NoNewWindow
if ($null -eq $proc -or $proc.ExitCode -ne 0) {
$code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
Write-Error "Visual Studio Installer failed with exit code $code"
exit $code
}

- name: Install ImageMagick
if: matrix.platform == 'linux'
shell: bash
run: |
if ! command -v magick >/dev/null 2>&1 && ! command -v convert >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y imagemagick
fi

if command -v magick >/dev/null 2>&1; then
magick -version
else
convert -version
fi

- name: Build desktop artifact
shell: bash
Expand Down
15 changes: 15 additions & 0 deletions apps/desktop/src/desktopSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe("desktopSettings", () => {

it("defaults packaged nightly builds to the nightly update channel", () => {
expect(resolveDefaultDesktopSettings("0.0.17-nightly.20260415.1")).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -47,6 +48,7 @@ describe("desktopSettings", () => {
const settingsPath = makeSettingsPath();

writeDesktopSettings(settingsPath, {
linuxPasswordStore: "gnome-libsecret",
serverExposureMode: "network-accessible",
tailscaleServeEnabled: true,
tailscaleServePort: 8443,
Expand All @@ -55,6 +57,7 @@ describe("desktopSettings", () => {
});

expect(readDesktopSettings(settingsPath, "0.0.17")).toEqual({
linuxPasswordStore: "gnome-libsecret",
serverExposureMode: "network-accessible",
tailscaleServeEnabled: true,
tailscaleServePort: 8443,
Expand All @@ -67,6 +70,7 @@ describe("desktopSettings", () => {
expect(
setDesktopServerExposurePreference(
{
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -76,6 +80,7 @@ describe("desktopSettings", () => {
"network-accessible",
),
).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "network-accessible",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -88,6 +93,7 @@ describe("desktopSettings", () => {
expect(
setDesktopTailscaleServePreference(
{
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -97,6 +103,7 @@ describe("desktopSettings", () => {
{ enabled: true, port: 8443 },
),
).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: true,
tailscaleServePort: 8443,
Expand All @@ -109,6 +116,7 @@ describe("desktopSettings", () => {
expect(
setDesktopTailscaleServePreference(
{
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 8443,
Expand All @@ -118,6 +126,7 @@ describe("desktopSettings", () => {
{ enabled: true },
),
).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: true,
tailscaleServePort: 8443,
Expand All @@ -130,6 +139,7 @@ describe("desktopSettings", () => {
expect(
setDesktopUpdateChannelPreference(
{
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -139,6 +149,7 @@ describe("desktopSettings", () => {
"nightly",
),
).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -159,6 +170,7 @@ describe("desktopSettings", () => {
fs.writeFileSync(settingsPath, JSON.stringify({ serverExposureMode: "local-only" }), "utf8");

expect(readDesktopSettings(settingsPath, "0.0.17-nightly.20260415.1")).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -179,6 +191,7 @@ describe("desktopSettings", () => {
);

expect(readDesktopSettings(settingsPath, "0.0.17-nightly.20260415.1")).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -200,6 +213,7 @@ describe("desktopSettings", () => {
);

expect(readDesktopSettings(settingsPath, "0.0.17-nightly.20260415.1")).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: 443,
Expand All @@ -220,6 +234,7 @@ describe("desktopSettings", () => {
);

expect(readDesktopSettings(settingsPath, "0.0.17")).toEqual({
linuxPasswordStore: "auto",
serverExposureMode: "local-only",
tailscaleServeEnabled: true,
tailscaleServePort: 443,
Expand Down
9 changes: 9 additions & 0 deletions apps/desktop/src/desktopSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ import * as FS from "node:fs";
import * as Path from "node:path";
import type { DesktopServerExposureMode, DesktopUpdateChannel } from "@t3tools/contracts";

import {
DEFAULT_LINUX_PASSWORD_STORE,
normalizeLinuxPasswordStorePreference,
type LinuxPasswordStorePreference,
} from "./linuxSecretStorage.ts";
import { resolveDefaultDesktopUpdateChannel } from "./updateChannels.ts";

export interface DesktopSettings {
readonly linuxPasswordStore: LinuxPasswordStorePreference;
readonly serverExposureMode: DesktopServerExposureMode;
readonly tailscaleServeEnabled: boolean;
readonly tailscaleServePort: number;
Expand All @@ -15,6 +21,7 @@ export interface DesktopSettings {
export const DEFAULT_TAILSCALE_SERVE_PORT = 443;

export const DEFAULT_DESKTOP_SETTINGS: DesktopSettings = {
linuxPasswordStore: DEFAULT_LINUX_PASSWORD_STORE,
serverExposureMode: "local-only",
tailscaleServeEnabled: false,
tailscaleServePort: DEFAULT_TAILSCALE_SERVE_PORT,
Expand Down Expand Up @@ -85,6 +92,7 @@ export function readDesktopSettings(settingsPath: string, appVersion: string): D

const raw = FS.readFileSync(settingsPath, "utf8");
const parsed = JSON.parse(raw) as {
readonly linuxPasswordStore?: unknown;
readonly serverExposureMode?: unknown;
readonly tailscaleServeEnabled?: unknown;
readonly tailscaleServePort?: unknown;
Expand All @@ -101,6 +109,7 @@ export function readDesktopSettings(settingsPath: string, appVersion: string): D
(isLegacySettings && parsedUpdateChannel === "nightly");

return {
linuxPasswordStore: normalizeLinuxPasswordStorePreference(parsed.linuxPasswordStore),
serverExposureMode:
parsed.serverExposureMode === "network-accessible" ? "network-accessible" : "local-only",
tailscaleServeEnabled: parsed.tailscaleServeEnabled === true,
Expand Down
98 changes: 98 additions & 0 deletions apps/desktop/src/linuxSecretStorage.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { describe, expect, it } from "vitest";

import {
normalizeLinuxPasswordStorePreference,
resolveLinuxPasswordStoreSwitch,
resolveLinuxSecretStorageUnavailableMessage,
} from "./linuxSecretStorage.ts";

describe("linuxSecretStorage", () => {
it("preserves explicit supported password-store preferences", () => {
expect(normalizeLinuxPasswordStorePreference("gnome-libsecret")).toBe("gnome-libsecret");
expect(normalizeLinuxPasswordStorePreference("kwallet")).toBe("kwallet");
expect(normalizeLinuxPasswordStorePreference("kwallet5")).toBe("kwallet5");
expect(normalizeLinuxPasswordStorePreference("kwallet6")).toBe("kwallet6");
});

it("falls back to auto for missing or unsupported preferences", () => {
expect(normalizeLinuxPasswordStorePreference(undefined)).toBe("auto");
expect(normalizeLinuxPasswordStorePreference("basic")).toBe("auto");
});

it("does not force a password-store for desktops Electron already recognizes", () => {
expect(
resolveLinuxPasswordStoreSwitch({
preference: "auto",
env: { XDG_CURRENT_DESKTOP: "GNOME" },
}),
).toBeNull();
expect(
resolveLinuxPasswordStoreSwitch({
preference: "auto",
env: { XDG_CURRENT_DESKTOP: "KDE", KDE_SESSION_VERSION: "6" },
}),
).toBeNull();
});

it("forces gnome-libsecret for unrecognized Linux desktop sessions", () => {
expect(
resolveLinuxPasswordStoreSwitch({
preference: "auto",
env: { XDG_CURRENT_DESKTOP: "niri" },
}),
).toBe("gnome-libsecret");
});

it("uses explicit preferences instead of the auto heuristic", () => {
expect(
resolveLinuxPasswordStoreSwitch({
preference: "kwallet6",
env: { XDG_CURRENT_DESKTOP: "niri" },
}),
).toBe("kwallet6");
});

it("uses GNOME Keyring remediation for libsecret and unknown backends", () => {
expect(
resolveLinuxSecretStorageUnavailableMessage({
configuredPreference: "auto",
selectedBackend: "gnome_libsecret",
env: { XDG_CURRENT_DESKTOP: "niri" },
}),
).toContain("GNOME Keyring");
});

it("prefers explicit libsecret selection over KDE desktop heuristics", () => {
expect(
resolveLinuxSecretStorageUnavailableMessage({
configuredPreference: "gnome-libsecret",
selectedBackend: "unknown",
env: { XDG_CURRENT_DESKTOP: "KDE" },
}),
).toContain("GNOME Keyring");
expect(
resolveLinuxSecretStorageUnavailableMessage({
configuredPreference: "auto",
selectedBackend: "gnome_libsecret",
env: { XDG_CURRENT_DESKTOP: "KDE" },
}),
).toContain("GNOME Keyring");
});

it("uses KWallet remediation for KDE desktops and selected backends", () => {
expect(
resolveLinuxSecretStorageUnavailableMessage({
configuredPreference: "auto",
selectedBackend: "kwallet6",
env: {},
}),
).toContain("KWallet");
expect(
resolveLinuxSecretStorageUnavailableMessage({
configuredPreference: "auto",
selectedBackend: "unknown",
env: { XDG_CURRENT_DESKTOP: "KDE" },
}),
).toContain("KWallet");
});
});
Loading
Loading