Skip to content

Commit c602c7f

Browse files
radroidclaude
authored andcommitted
feat(coil): finish the app rename at the surfaces that name the app (#71)
#71 renamed the bundle, the certificate, the release identity and the site, but stopped short of the two places a running build says its own name out loud. The result read as a half-rename from inside the app: the title bar said Coil, the sidebar said Code. Four update-toast strings and the Web Push fallback title are fork-owned, so they cost nothing. The sidebar corner is not — `SidebarChrome.tsx` is upstream's and the fork had never touched it. The first pass wrote `Coil` there as a literal. That was wrong for a reason this repo has already paid for once: `install-instructions.json` keeps a cached copy of the app name and needed a test to stop it drifting, and a second literal buried in an upstream-owned component is the same duplication in a place where a stale value is harder to see. So the word is derived. `branding.ts` already resolves `APP_BASE_NAME` from the desktop bundle's injected branding, and #71 already owns a row there; this adds `APP_WORDMARK_SUFFIX` beside it, additive, and the sidebar consumes it. The prefix strip is because the glyph already draws `T3` — and if a later name drops that prefix, the replace no-ops and the full base name is what belongs beside the mark anyway. Two tests cover both halves, including that an injected rename moves the sidebar with it. Deliberately NOT hoisted into a fork-owned component. That is the failure mode the 08-08 sync recorded — a fork hoist of upstream inline JSX goes stale and silently reverts an upstream restyle, which is how the send button lost `stageBackdropVariant`. One substituted expression in place is smaller and louder. The ~130 remaining "T3 Code" mentions in settings copy, desktop dialogs and provider prompts are left alone on purpose: incidental body text deep in upstream files, where chasing them buys inconsistency elsewhere at real rebase cost. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent 50cec17 commit c602c7f

5 files changed

Lines changed: 52 additions & 6 deletions

File tree

‎apps/server/src/coil/webPush/Reactor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const makeSupervisor = Effect.gen(function* () {
8888
const environmentId = yield* serverEnvironment.getEnvironmentId;
8989

9090
const projectTitle = (
91-
Option.isSome(projectOpt) ? projectOpt.value.title : "T3 Code"
91+
Option.isSome(projectOpt) ? projectOpt.value.title : "T3 Coil"
9292
) as OrchestrationProjectShell["title"];
9393

9494
const state = projectThreadAwareness({

‎apps/web/src/branding.test.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,36 @@ describe("branding", () => {
7272
expect(branding.HOSTED_APP_CHANNEL).toBeNull();
7373
expect(branding.HOSTED_APP_CHANNEL_LABEL).toBeNull();
7474
});
75+
76+
// coil: the sidebar renders this beside the `T3` glyph, so it is the word the running app calls
77+
// itself. Asserted here rather than by rendering the component, because the risk is drift in the
78+
// derivation, not in the markup.
79+
it("derives the sidebar wordmark suffix from the base name", async () => {
80+
const branding = await import("./branding");
81+
82+
expect(branding.APP_WORDMARK_SUFFIX).toBe("Coil");
83+
});
84+
85+
// The prefix strip must key off the injected name too, or a desktop build that renames itself
86+
// would keep drawing the previous word next to the glyph — the exact drift it exists to prevent.
87+
it("derives the sidebar wordmark suffix from injected desktop branding", async () => {
88+
Object.defineProperty(globalThis, "window", {
89+
configurable: true,
90+
value: {
91+
desktopBridge: {
92+
getAppBranding: () => ({
93+
baseName: "T3 Code",
94+
stageLabel: "Nightly",
95+
displayName: "T3 Code (Nightly)",
96+
}),
97+
},
98+
},
99+
});
100+
101+
const branding = await import("./branding");
102+
103+
expect(branding.APP_WORDMARK_SUFFIX).toBe("Code");
104+
});
75105
});
76106

77107
describe("branding logic", () => {

‎apps/web/src/branding.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ export const APP_DISPLAY_NAME =
2525
injectedDesktopAppBranding?.displayName ??
2626
formatAppDisplayName({ baseName: APP_BASE_NAME, stageLabel: APP_STAGE_LABEL });
2727
export const APP_VERSION = import.meta.env.APP_VERSION || "0.0.0";
28+
29+
/**
30+
* coil: the word the sidebar renders beside the shared `T3` glyph.
31+
*
32+
* Derived rather than written out a second time. `scripts/coil/install-instructions.json` records
33+
* what a cached copy of this name costs — it needed a test to keep it honest — and the sidebar is
34+
* the same class of duplication, one that would sit in an upstream-owned file where a stale literal
35+
* is hardest to notice. So it reads the base name instead of repeating it, and a build whose
36+
* desktop bundle injects a different `baseName` renames the sidebar with it.
37+
*
38+
* The prefix is stripped because the glyph already draws `T3`. If a future name drops that prefix,
39+
* the replace is a no-op and the whole base name is what belongs beside the mark anyway.
40+
*/
41+
export const APP_WORDMARK_SUFFIX = APP_BASE_NAME.replace(/^T3\s+/u, "");

‎apps/web/src/components/coil/updateToast.logic.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const FIRST_UPDATE_PERMISSION_NOTE =
181181
* deleted my app" — which is exactly how it was read the first time it ran.
182182
*/
183183
const WINDOWS_INSTALL_NOTE =
184-
"T3 Code will close, install the update, and reopen itself. This usually takes a few minutes, and the window and Start-menu shortcut are unavailable until it finishes.";
184+
"T3 Coil will close, install the update, and reopen itself. This usually takes a few minutes, and the window and Start-menu shortcut are unavailable until it finishes.";
185185

186186
function plural(count: number): string {
187187
return count === 1 ? "change" : "changes";
@@ -247,7 +247,7 @@ export function selectUpdateToastView(input: UpdateToastInput): UpdateToastView
247247
return {
248248
kind: "armed",
249249
title: "Restarting when work finishes",
250-
description: "T3 Code will restart once nothing is running. You can keep working.",
250+
description: "T3 Coil will restart once nothing is running. You can keep working.",
251251
actionLabel: "Restart now",
252252
cancelLabel: "Cancel",
253253
shortSha: input.status.shortSha,
@@ -270,7 +270,7 @@ export function selectUpdateToastView(input: UpdateToastInput): UpdateToastView
270270
description:
271271
(isWindowsPlatform(input.platform)
272272
? WINDOWS_INSTALL_NOTE
273-
: "Restart to update T3 Code.") +
273+
: "Restart to update T3 Coil.") +
274274
(expired ? TIMED_OUT_NOTE : "") +
275275
// Gated on macOS, not merely on "first update". The note names screen-recording and
276276
// automation prompts, which are a macOS concept — every Windows and Linux user was
@@ -330,7 +330,7 @@ export function selectUpdateToastView(input: UpdateToastInput): UpdateToastView
330330
kind: "install-failed",
331331
title: "Update did not apply",
332332
description:
333-
`T3 Code restarted to install ${input.status.expectedVersion} but came back as ` +
333+
`T3 Coil restarted to install ${input.status.expectedVersion} but came back as ` +
334334
`${actual === undefined ? "a build that reports no commit" : actual}. ` +
335335
"The previous version is still installed and still works.",
336336
reportUrl: buildInstallFailureReportUrl({

‎apps/web/src/components/sidebar/SidebarChrome.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { memo, useCallback } from "react";
88
import { Link, useLocation, useNavigate } from "@tanstack/react-router";
99

10+
import { APP_WORDMARK_SUFFIX } from "../../branding";
1011
import { useEnvironmentIdentificationMode } from "../../hooks/useSettings";
1112
import { cn } from "../../lib/utils";
1213
import { useEnvironments } from "../../state/environments";
@@ -95,7 +96,8 @@ function SidebarBrand({ onBackdrop }: { onBackdrop: boolean }) {
9596
onBackdrop ? "text-white/70" : "text-muted-foreground",
9697
)}
9798
>
98-
Code
99+
{/* coil: was the literal `Code`. Derived so the sidebar cannot drift from the bundle. */}
100+
{APP_WORDMARK_SUFFIX}
99101
</span>
100102
</Link>
101103
);

0 commit comments

Comments
 (0)