Skip to content

Commit b5561df

Browse files
donjor-agent[bot]rsi-pr-agent
authored andcommitted
feat(desktop): fork AppImages show T3 Code (hyprws) in launchers
## What Changed Fork Linux builds set the desktop entry `Name`: | Build | Launcher name | | --- | --- | | Stable | `T3 Code (hyprws)` | | Nightly | `T3 Code (hyprws Nightly)` | The name lives in `scripts/build-desktop-artifact.fork.ts`, behind two marked hooks. `productName`, the app id, the executable, and the URL schemes stay upstream's. ## Why Published fork AppImages show as `T3 Code (Alpha)` in app menus, the same as upstream. Only the entry `Name` changes, because `productName` also derives the user-data directory. electron-builder merges `linux.desktop.entry` over its defaults, so the key overrides `Name` alone. Refs #176: the published-AppImage condition proves on the next release. ## UI Changes Launcher text only, no app UI. ```text before v0.0.43-hyprws.5 t3code.desktop: Name=T3 Code (Alpha) after createBuildConfig linux entry: Name=T3 Code (hyprws) ``` ## Checklist - [x] This PR is small and focused - [x] I explained what changed and why - [x] I included before/after screenshots for any UI changes - [x] I included a video for animation/interaction changes ## Verification ```text vp test run scripts/build-desktop-artifact.fork.test.ts scripts/build-desktop-artifact.test.ts exit 0, 77 passed env -u ELECTRON_RUN_AS_NODE vp run fork:ci exit 0 ``` Claude Opus 5.5 in Claude Code, hosted by T3 Code. ## Fork trailers Squashes: - 86afa28 feat(desktop): fork AppImages show T3 Code (hyprws) in launchers (#1563) - 5e7a8cf fixup! feat(desktop): fork AppImages show T3 Code (hyprws) in launchers Fork-Domain: distribution Fork-Tier: qol
1 parent c8fba62 commit b5561df

3 files changed

Lines changed: 74 additions & 1 deletion

File tree

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,72 @@
1+
import * as NodeServices from "@effect/platform-node/NodeServices";
12
import { assert, it } from "@effect/vitest";
3+
import * as ConfigProvider from "effect/ConfigProvider";
4+
import * as Effect from "effect/Effect";
25

3-
import { resolveDesktopUpdateChannel } from "./build-desktop-artifact.ts";
6+
import {
7+
createBuildConfig,
8+
resolveDesktopUpdateChannel,
9+
resolveGitHubPublishConfig,
10+
} from "./build-desktop-artifact.ts";
411

512
it("resolves updater channels for upstream and fork release versions", () => {
613
assert.equal(resolveDesktopUpdateChannel("0.0.17-nightly.20260413.42"), "nightly");
714
assert.equal(resolveDesktopUpdateChannel("0.0.17-hyprws-nightly.20260413.42"), "nightly");
815
assert.equal(resolveDesktopUpdateChannel("0.0.17-hyprws.2"), "latest");
916
assert.equal(resolveDesktopUpdateChannel("0.0.17"), "latest");
1017
});
18+
19+
it.layer(NodeServices.layer)((it) => {
20+
it.effect("names the fork in the Linux launcher and keeps the app identity", () =>
21+
Effect.gen(function* () {
22+
const linuxEntry = (version: string) =>
23+
createBuildConfig("linux", "AppImage", version, false, false, undefined, undefined).pipe(
24+
Effect.map((config) => ({
25+
appId: config.appId,
26+
productName: config.productName,
27+
entry: (config.linux as { desktop: { entry: Record<string, string> } }).desktop.entry,
28+
})),
29+
);
30+
31+
const stable = yield* linuxEntry("0.0.43-hyprws.5");
32+
assert.deepStrictEqual(stable, {
33+
appId: "com.t3tools.t3code",
34+
productName: "T3 Code (Beta)",
35+
entry: { StartupWMClass: "t3code", Name: "T3 Code (hyprws)" },
36+
});
37+
38+
const nightly = yield* linuxEntry("0.0.43-hyprws-nightly.20260927.743");
39+
assert.equal(nightly.entry.Name, "T3 Code (hyprws Nightly)");
40+
assert.equal(nightly.productName, "T3 Code (Nightly)");
41+
}),
42+
);
43+
});
44+
45+
// electron-updater names the channel file after the release tag's first
46+
// prerelease identifier, so fork nightlies publish to `hyprws-nightly`.
47+
it.effect("publishes fork nightlies to the hyprws-nightly update channel", () =>
48+
Effect.gen(function* () {
49+
const publishConfig = (channel: "latest" | "nightly") =>
50+
resolveGitHubPublishConfig(channel).pipe(
51+
Effect.provide(
52+
ConfigProvider.layer(
53+
ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "RSI-Software/t3code-hyprws" } }),
54+
),
55+
),
56+
);
57+
58+
assert.deepStrictEqual(yield* publishConfig("latest"), {
59+
provider: "github",
60+
owner: "RSI-Software",
61+
repo: "t3code-hyprws",
62+
releaseType: "release",
63+
});
64+
assert.deepStrictEqual(yield* publishConfig("nightly"), {
65+
provider: "github",
66+
owner: "RSI-Software",
67+
repo: "t3code-hyprws",
68+
releaseType: "prerelease",
69+
channel: "hyprws-nightly",
70+
});
71+
}),
72+
);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Fork: the launcher name embedded in the Linux desktop entry, so a fork
3+
* AppImage reads as the fork in app menus (RSI-Software/t3code-hyprws#176).
4+
* Only the entry's `Name` changes: `productName` still derives the user-data
5+
* directory, and the app id, executable, and URL schemes stay upstream's.
6+
*/
7+
export function forkDesktopEntryName(channel: "latest" | "nightly"): string {
8+
return channel === "nightly" ? "T3 Code (hyprws Nightly)" : "T3 Code (hyprws)";
9+
}

‎scripts/build-desktop-artifact.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import * as Schema from "effect/Schema";
6060
import * as Stream from "effect/Stream";
6161
import { Command, Flag } from "effect/cli";
6262
import { ChildProcess, ChildProcessSpawner } from "effect/process";
63+
import { forkDesktopEntryName } from "./build-desktop-artifact.fork.ts"; // fork-hook: distribution/desktop-entry-name-import
6364

6465
const LINUX_ICON_SIZES = [16, 22, 24, 32, 48, 64, 128, 256, 512] as const;
6566
const DESKTOP_APP_ID = "com.t3tools.t3code";
@@ -2912,6 +2913,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
29122913
desktop: {
29132914
entry: {
29142915
StartupWMClass: "t3code",
2916+
Name: forkDesktopEntryName(resolveDesktopUpdateChannel(version)), // fork-hook: distribution/desktop-entry-name
29152917
},
29162918
},
29172919
};

0 commit comments

Comments
 (0)