Skip to content

Commit 2666bcd

Browse files
radroidclaude
andcommitted
feat(coil): rename the app to T3 Coil, with its own bundle id and certificate (#71)
APP_BASE_NAME T3 Code -> T3 Coil (DesktopEnvironment.ts) productName T3 Code (Alpha) -> T3 Coil (Alpha) (apps/desktop/package.json) bundle id dev.curlycloud.coil -> dev.curlycloud.t3coil signing certificate T3X Code Signing -> T3 Coil Code Signing APP_BASE_NAME is the one that matters: displayName is derived from it, and that reaches app.setName(), the About panel, every window title, the Linux .desktop entry, and — through getAppBranding() — the web UI, which reads the injected value rather than hardcoding one. So renaming one literal renames the app almost everywhere it is computed. Almost. 31 upstream-owned files still say "T3 Code" in body copy ("T3 Code needs the relay client..."). Renaming those means displacement edits on 31 more upstream files for prose, which is a bad trade against the sync cost; left alone deliberately, not missed. Three things that look like they should have moved and must not: - legacyUserDataDirName stays "T3 Code (Alpha)". It names a directory that already exists on disk and is a hardcoded literal, not derived from APP_BASE_NAME. That is why #85 moved nobody's threads and why this does not either. DesktopAppIdentity.test.ts now asserts both spellings a few lines apart, with a comment, because the pair looks like a typo and is not. - branding.test.ts's injected-branding case keeps "T3 Code" fixtures. It asserts that injection WINS over the module constant; matching the fixture to the constant would make it pass whether injection works or not. - resolveDesktopProductName's "T3 Code (Nightly)" is upstream's literal on a branch this fork never reaches, since nothing here builds a -nightly.<d>.<d> version. The bundle id and certificate each invalidate every macOS TCC grant, because the designated requirement names both. Done together so the user pays one round of permission dialogs rather than two. The certificate half is NOT complete in code alone: a new name means a new certificate, so setup-mac-signing.sh --rotate has to run before this merges, and designated-requirement.txt has to be re-recorded from it. What is committed here has the new identifier and the CURRENT leaf hash, which is exactly right until the rotation happens and loudly wrong after it — the release compares that file byte for byte. Also renames the pnpm-lock.yaml importer for the relay directory move in the previous commit; without it `pnpm install --frozen-lockfile` fails, which is how it was caught. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent bb20d52 commit 2666bcd

20 files changed

Lines changed: 118 additions & 79 deletions

‎.github/workflows/t3x-release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ jobs:
265265
env:
266266
CSC_P12_BASE64: ${{ secrets.T3X_MAC_CSC_P12_BASE64 }}
267267
CSC_P12_PASSWORD: ${{ secrets.T3X_MAC_CSC_PASSWORD }}
268-
IDENTITY_NAME: T3X Code Signing
268+
IDENTITY_NAME: T3 Coil Code Signing
269269
run: |
270270
set -euo pipefail
271271
@@ -426,7 +426,7 @@ jobs:
426426
# last owned the grants and the other got re-prompted, however well either was signed.
427427
# Keep this in step with DESKTOP_BUNDLE_IDENTIFIER in scripts/coil/mac-signature.ts; a test
428428
# asserts the two agree, and the verify step below fails an artifact carrying the wrong id.
429-
T3X_DESKTOP_APP_ID: dev.curlycloud.coil
429+
T3X_DESKTOP_APP_ID: dev.curlycloud.t3coil
430430
run: |
431431
set -euo pipefail
432432
node scripts/build-desktop-artifact.ts \

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
"tailwindcss": "^4.0.0",
3636
"vite-plus": "catalog:"
3737
},
38-
"productName": "T3 Code (Alpha)"
38+
"productName": "T3 Coil (Alpha)"
3939
}

‎apps/desktop/scripts/electron-launcher.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const repoRoot = NodePath.resolve(desktopDir, "..", "..");
1515
const devBundleIdSuffix = NodePath.basename(repoRoot)
1616
.toLowerCase()
1717
.replaceAll(/[^a-z0-9]+/g, "");
18-
export const APP_DISPLAY_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Alpha)";
18+
export const APP_DISPLAY_NAME = isDevelopment ? "T3 Coil (Dev)" : "T3 Coil (Alpha)";
1919
export const APP_BUNDLE_ID = isDevelopment
2020
? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}`
2121
: "com.t3tools.t3code";

‎apps/desktop/src/app/DesktopAppIdentity.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,11 @@ describe("DesktopAppIdentity", () => {
194194
const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
195195
yield* identity.configure;
196196

197-
assert.deepEqual(calls.setName, ["T3 Code (Alpha)"]);
198-
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Code (Alpha)");
197+
// "T3 Coil (Alpha)" here while the legacy-userData assertions above still say
198+
// "T3 Code (Alpha)". Not an inconsistency: this one is computed from APP_BASE_NAME and
199+
// follows the rename, that one names a directory already on disk and must not.
200+
assert.deepEqual(calls.setName, ["T3 Coil (Alpha)"]);
201+
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Coil (Alpha)");
199202
assert.equal(calls.setAboutPanelOptions[0]?.applicationVersion, "1.2.3");
200203
assert.equal(calls.setAboutPanelOptions[0]?.version, "0123456789ab");
201204
assert.deepEqual(calls.setDockIcon, ["/icon.png"]);

‎apps/desktop/src/app/DesktopEnvironment.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ export class DesktopEnvironment extends Context.Service<
7979
}
8080
>()("@t3tools/desktop/app/DesktopEnvironment") {}
8181

82-
const APP_BASE_NAME = "T3 Code";
82+
// coil fork seam (issue #71). One of only two places the fork REPLACES upstream content rather
83+
// than appending to it — see docs/coil/SEAMS.md. This literal is the source of truth for the
84+
// app's visible name: it feeds `displayName`, which reaches `app.setName()`, the About panel,
85+
// every window title, the Linux .desktop entry, and — through `getAppBranding()` — the whole web
86+
// UI, which reads it rather than hardcoding one.
87+
//
88+
// `legacyUserDataDirName` below still says "T3 Code (Alpha)" and MUST keep saying it. It names a
89+
// directory that already exists on disk; it is not derived from this constant and never was.
90+
const APP_BASE_NAME = "T3 Coil";
8391

8492
function resolveDesktopAppStageLabel(input: {
8593
readonly isDevelopment: boolean;

‎apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const makeEnvironment = (overrides: Record<string, unknown> = {}) =>
2222
platform: "linux",
2323
isPackaged: true,
2424
isDevelopment: false,
25-
displayName: "T3 Code (Alpha)",
25+
displayName: "T3 Coil (Alpha)",
2626
linuxWmClass: "t3code",
2727
linuxApplicationsDir: "/home/alice/.local/share/applications",
2828
appImagePath: Option.some("/home/alice/Applications/T3-Code.AppImage"),

‎apps/desktop/src/coil/updateDelivery/installCommands.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
const MAC = {
1111
dmgPath: "/Users/me/Library/Application Support/T3/staging/T3Code-abc123def456-arm64.dmg",
1212
mountPoint: "/var/folders/x9/T/coil-dmg-abc123",
13-
sourceAppPath: "/var/folders/x9/T/coil-dmg-abc123/T3 Code (Alpha).app",
14-
stagedAppPath: "/Applications/T3 Code (Alpha).app.coil-new",
13+
sourceAppPath: "/var/folders/x9/T/coil-dmg-abc123/T3 Coil (Alpha).app",
14+
stagedAppPath: "/Applications/T3 Coil (Alpha).app.coil-new",
1515
};
1616

1717
describe("macStagingCommands", () => {
@@ -62,8 +62,8 @@ describe("macStagingCommands", () => {
6262

6363
describe("macSwapCommands", () => {
6464
const commands = macSwapCommands({
65-
targetAppPath: "/Applications/T3 Code (Alpha).app",
66-
stagedAppPath: "/Applications/T3 Code (Alpha).app.coil-new",
65+
targetAppPath: "/Applications/T3 Coil (Alpha).app",
66+
stagedAppPath: "/Applications/T3 Coil (Alpha).app.coil-new",
6767
});
6868

6969
it("deletes the target, then renames onto it", () => {

‎apps/desktop/src/coil/updateDelivery/installTarget.test.ts‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
stagedBundlePath,
88
} from "./installTarget.ts";
99

10-
const APP = "/Applications/T3 Code (Alpha).app";
11-
const EXEC = `${APP}/Contents/MacOS/T3 Code (Alpha)`;
10+
const APP = "/Applications/T3 Coil (Alpha).app";
11+
const EXEC = `${APP}/Contents/MacOS/T3 Coil (Alpha)`;
1212

1313
describe("isTranslocatedPath", () => {
1414
it("detects a translocated execPath", () => {
1515
expect(
1616
isTranslocatedPath(
17-
"/private/var/folders/x9/abc/T/AppTranslocation/1E2D-4F/d/T3 Code (Alpha).app/Contents/MacOS/T3 Code (Alpha)",
17+
"/private/var/folders/x9/abc/T/AppTranslocation/1E2D-4F/d/T3 Coil (Alpha).app/Contents/MacOS/T3 Coil (Alpha)",
1818
),
1919
).toBe(true);
2020
});
@@ -34,8 +34,8 @@ describe("findEnclosingAppBundle", () => {
3434
});
3535

3636
it("works for an app installed outside /Applications", () => {
37-
const home = "/Users/me/Applications/T3 Code (Alpha).app";
38-
expect(findEnclosingAppBundle(`${home}/Contents/MacOS/T3 Code (Alpha)`)).toBe(home);
37+
const home = "/Users/me/Applications/T3 Coil (Alpha).app";
38+
expect(findEnclosingAppBundle(`${home}/Contents/MacOS/T3 Coil (Alpha)`)).toBe(home);
3939
});
4040

4141
it("returns undefined when there is no enclosing bundle", () => {
@@ -47,22 +47,22 @@ describe("resolveMacInstallTarget", () => {
4747
it("resolves the bundle from the running executable", () => {
4848
const result = resolveMacInstallTarget({
4949
execPath: EXEC,
50-
incomingAppName: "T3 Code (Alpha).app",
50+
incomingAppName: "T3 Coil (Alpha).app",
5151
});
5252
expect(result).toEqual({
5353
kind: "resolved",
5454
appBundlePath: APP,
55-
appName: "T3 Code (Alpha).app",
55+
appName: "T3 Coil (Alpha).app",
5656
});
5757
});
5858

5959
it("resolves an app installed outside /Applications", () => {
6060
// Never hardcode /Applications. Installing there while running from somewhere else would
6161
// create a second app and leave the running one untouched — a success that changes nothing.
62-
const home = "/Users/me/Applications/T3 Code (Alpha).app";
62+
const home = "/Users/me/Applications/T3 Coil (Alpha).app";
6363
const result = resolveMacInstallTarget({
64-
execPath: `${home}/Contents/MacOS/T3 Code (Alpha)`,
65-
incomingAppName: "T3 Code (Alpha).app",
64+
execPath: `${home}/Contents/MacOS/T3 Coil (Alpha)`,
65+
incomingAppName: "T3 Coil (Alpha).app",
6666
});
6767
expect(result.kind === "resolved" && result.appBundlePath).toBe(home);
6868
});
@@ -72,14 +72,14 @@ describe("resolveMacInstallTarget", () => {
7272
// the OLD build while post-install verification passed against the wrong process.
7373
const result = resolveMacInstallTarget({
7474
execPath:
75-
"/private/var/folders/x9/abc/T/AppTranslocation/1E2D-4F/d/T3 Code (Alpha).app/Contents/MacOS/T3 Code (Alpha)",
76-
incomingAppName: "T3 Code (Alpha).app",
75+
"/private/var/folders/x9/abc/T/AppTranslocation/1E2D-4F/d/T3 Coil (Alpha).app/Contents/MacOS/T3 Coil (Alpha)",
76+
incomingAppName: "T3 Coil (Alpha).app",
7777
});
7878
expect(result.kind === "refused" && result.refusal.kind).toBe("translocated");
7979
});
8080

8181
it("refuses when the incoming bundle has a different name", () => {
82-
// productName here is "T3 Code (Alpha)", not "T3 Code". The shell installer's own comment
82+
// productName here is "T3 Coil (Alpha)", not "T3 Code". The shell installer's own comment
8383
// records the consequence of guessing: it claimed an app that does not exist while a real
8484
// install replaced a differently-named one.
8585
const result = resolveMacInstallTarget({ execPath: EXEC, incomingAppName: "T3 Code.app" });
@@ -89,7 +89,7 @@ describe("resolveMacInstallTarget", () => {
8989
it("refuses when the executable is not inside a bundle", () => {
9090
const result = resolveMacInstallTarget({
9191
execPath: "/usr/local/bin/t3code",
92-
incomingAppName: "T3 Code (Alpha).app",
92+
incomingAppName: "T3 Coil (Alpha).app",
9393
});
9494
expect(result.kind === "refused" && result.refusal.kind).toBe("not-a-bundle");
9595
});

‎apps/desktop/src/coil/updateDelivery/installTarget.ts‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,24 @@ export function describeRefusal(refusal: InstallRefusal): string {
3636
switch (refusal.kind) {
3737
case "translocated":
3838
return (
39-
"T3 Code is running from a randomised read-only copy created by macOS App Translocation, " +
39+
"T3 Coil is running from a randomised read-only copy created by macOS App Translocation, " +
4040
"so it cannot update itself. Move the app to /Applications once, reopen it, and updates " +
4141
"will work from then on."
4242
);
4343
case "not-a-bundle":
4444
return `Could not find the enclosing .app for ${refusal.execPath}, so there is nothing safe to replace.`;
45+
// Reworded for the rename in #71, not softened. This refusal fires exactly once per user, on
46+
// the first build after "T3 Code (Alpha)" became "T3 Coil (Alpha)", and the old wording read
47+
// as a fault: it explains a mechanism and leaves the reader with nothing to do. The check
48+
// itself is unchanged and still the only thing standing between a rename and two installed
49+
// apps, so the message tells them the one safe way through instead of hiding the refusal.
4550
case "name-mismatch":
4651
return (
4752
`The downloaded build is named "${refusal.incoming}" but the running app is ` +
48-
`"${refusal.installed}". Installing it would create a second app and leave this one ` +
49-
"untouched, so it was refused."
53+
`"${refusal.installed}". That is expected the first time after the app was renamed. ` +
54+
"Installing it here would leave two copies, so open the downloaded .dmg and drag the app " +
55+
"to /Applications yourself, replacing the old one. Updates go back to being automatic " +
56+
"after that."
5057
);
5158
}
5259
}
@@ -106,10 +113,11 @@ export function resolveMacInstallTarget(args: {
106113
const appName = posixBasename(appBundlePath);
107114

108115
// `resolveDesktopProductName` returns `desktopPackageJson.productName`, which is
109-
// "T3 Code (Alpha)" on this fork — not "T3 Code". The shell installer records what happens when
116+
// "T3 Coil (Alpha)" on this fork — not "T3 Code". The shell installer records what happens when
110117
// this is computed rather than read: it "always claimed T3 Code.app — an app that does not
111-
// exist — while a real install replaced T3 Code (Alpha).app". Comparing the two names is what
112-
// stops a rename from quietly producing two installed apps.
118+
// exist — while a real install replaced T3 Code (Alpha).app" (its wording, from before #71
119+
// renamed the app). Comparing the two names is what stops a rename from quietly producing two
120+
// installed apps — which is exactly what it is doing for #71's own rename.
113121
if (appName !== args.incomingAppName) {
114122
return {
115123
kind: "refused",

‎apps/web/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
object-fit: contain;
441441
}
442442
</style>
443-
<title>T3 Code (Alpha)</title>
443+
<title>T3 Coil (Alpha)</title>
444444
</head>
445445
<body>
446446
<div id="root">

0 commit comments

Comments
 (0)