Skip to content

Commit 9f1a6ce

Browse files
committed
fix(webapp): revert tailwind codemod renames in non-CSS strings
The upgrade codemod treated string literals in .ts files as utility classes: realtimeBackend "shadow" flag values, compute template creation "shadow" mode, and randomWords dictionary entries were renamed to shadow-sm/ring-3/ outline-solid. Restores the original values so persisted flags keep parsing.
1 parent 2d08665 commit 9f1a6ce

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

apps/webapp/app/services/realtime/resolveRealtimeStreamClient.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { type RealtimeStreamClient } from "./nativeRealtimeClient.server";
1111
import { getNativeRealtimeClient } from "./nativeRealtimeClientInstance.server";
1212
import { getShadowRealtimeClient } from "./shadowRealtimeClientInstance.server";
1313

14-
type RealtimeBackend = "electric" | "native" | "shadow-sm";
14+
type RealtimeBackend = "electric" | "native" | "shadow";
1515

1616
// Two gates, both defaulting to the Electric path: the env master switch, then the
1717
// per-org `realtimeBackend` feature flag (cached so long-polls don't hit the DB per request).
@@ -43,7 +43,7 @@ export async function resolveRealtimeStreamClient(
4343
switch (await getRealtimeBackend(environment.organizationId, orgFeatureFlags)) {
4444
case "native":
4545
return getNativeRealtimeClient();
46-
case "shadow-sm":
46+
case "shadow":
4747
// The client is still served Electric; the native path is diffed in the background.
4848
return getShadowRealtimeClient();
4949
case "electric":

apps/webapp/app/services/realtime/shadowRealtimeClientInstance.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ShadowRealtimeClient } from "./shadowRealtimeClient.server";
1212

1313
/**
1414
* Process-singleton wiring for the shadow-compare client. Only constructed
15-
* when an org's `realtimeBackend` flag is set to "shadow-sm".
15+
* when an org's `realtimeBackend` flag is set to "shadow".
1616
*/
1717
function initializeShadowRealtimeClient(): ShadowRealtimeClient {
1818
const compares = getMeter("realtime-shadow").createCounter("realtime_shadow.compares", {

apps/webapp/app/utils/randomWords.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ var wordList = [
11771177
"ourselves",
11781178
"out",
11791179
"outer",
1180-
"outline-solid",
1180+
"outline",
11811181
"outside",
11821182
"over",
11831183
"own",
@@ -1396,7 +1396,7 @@ var wordList = [
13961396
"ride",
13971397
"riding",
13981398
"right",
1399-
"ring-3",
1399+
"ring",
14001400
"rise",
14011401
"rising",
14021402
"river",
@@ -1483,7 +1483,7 @@ var wordList = [
14831483
"seven",
14841484
"several",
14851485
"shade",
1486-
"shadow-sm",
1486+
"shadow",
14871487
"shake",
14881488
"shaking",
14891489
"shall",

apps/webapp/app/v3/featureFlags.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export const FeatureFlagCatalog = {
3535
[FEATURE_FLAG.workerQueueScheduledSplitEnabled]: z.coerce.boolean(),
3636
// Which backend serves the realtime run feed. Controllable
3737
// globally and per-org (org wins). Defaults to "electric" when unset.
38-
// "shadow-sm" serves Electric but diffs the native path in the background.
39-
[FEATURE_FLAG.realtimeBackend]: z.enum(["electric", "native", "shadow-sm"]),
38+
// "shadow" serves Electric but diffs the native path in the background.
39+
[FEATURE_FLAG.realtimeBackend]: z.enum(["electric", "native", "shadow"]),
4040
// Strict z.boolean() (not z.coerce.boolean()): coercion turns the string "false"
4141
// into true, which would silently flip this kill switch / per-org exclude the wrong
4242
// way if written as a string via the admin PAT route. The admin toggle sends a real

apps/webapp/app/v3/services/computeTemplateCreation.server.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { globalFlagsRegistry } from "~/v3/globalFlagsRegistry.server";
1515
import { getEntitlement } from "~/services/platform.v3.server";
1616
import { startActiveSpan, attributesFromAuthenticatedEnv } from "~/v3/tracer.server";
1717

18-
type TemplateCreationMode = "required" | "shadow-sm" | "skip";
18+
type TemplateCreationMode = "required" | "shadow" | "skip";
1919

2020
// Why the mode was chosen — slices the compute.template.create span by path.
2121
type TemplateModeReason =
@@ -95,7 +95,7 @@ export class ComputeTemplateCreationService {
9595
return;
9696
}
9797

98-
if (mode === "shadow-sm") {
98+
if (mode === "shadow") {
9999
// Shadow is fire-and-forget (background build), so the span only records
100100
// that it was dispatched — the build outcome lands server-side later.
101101
span.setAttribute("compute.template.result", "shadow_dispatched");
@@ -226,7 +226,7 @@ export class ComputeTemplateCreationService {
226226
try {
227227
planType = (await getEntitlement(project.organization.id))?.plan?.type;
228228
} catch (error) {
229-
logger.warn("compute migration: entitlement lookup failed; skipping shadow-sm template", {
229+
logger.warn("compute migration: entitlement lookup failed; skipping shadow template", {
230230
organizationId: project.organization.id,
231231
error: error instanceof Error ? error.message : String(error),
232232
});
@@ -236,7 +236,7 @@ export class ComputeTemplateCreationService {
236236
if (migrated) {
237237
// required => template built at deploy (deploy fails on error); off => shadow.
238238
return {
239-
mode: decision.flags?.computeMigrationRequireTemplate ? "required" : "shadow-sm",
239+
mode: decision.flags?.computeMigrationRequireTemplate ? "required" : "shadow",
240240
migrated: true,
241241
reason: "migrated",
242242
};
@@ -246,12 +246,12 @@ export class ComputeTemplateCreationService {
246246
const hasComputeAccess = await resolveComputeAccess(prisma, project.organization.featureFlags);
247247

248248
if (hasComputeAccess) {
249-
return { mode: "shadow-sm", migrated: false, reason: "compute-access" };
249+
return { mode: "shadow", migrated: false, reason: "compute-access" };
250250
}
251251

252252
const rolloutPct = Number(env.COMPUTE_TEMPLATE_SHADOW_ROLLOUT_PCT ?? "0");
253253
if (rolloutPct > 0 && Math.random() * 100 < rolloutPct) {
254-
return { mode: "shadow-sm", migrated: false, reason: "rollout" };
254+
return { mode: "shadow", migrated: false, reason: "rollout" };
255255
}
256256

257257
return { mode: "skip", migrated: false, reason: "none" };

0 commit comments

Comments
 (0)