Skip to content

Commit ee2b9ff

Browse files
sheehanmunimclaude
andcommitted
refactor: drop the MT Code Connect identity and mobile app
MT Code has been signing in through T3 Connect since 2026-08-25, so the Munim Clerk application had no job left: `buildConnectProviders` already returned T3 alone, and every `mt` branch behind it was dead code carrying a switch the reader could never reach. Connect is now one identity. `ConnectProviderId` is `"t3"`, the MT/T3 toggle leaves the sidebar and Settings, the Clerk organization switcher and its team page go with them, and the `~/.mt/munim-connect.env` loaders and every call site in the publish and refresh scripts are gone. The mobile app goes back to T3's identity too — scheme, bundle identifiers, Apple team, relying party, EAS project and owner are upstream's literals again, and the `munim` build and submit profiles, the iOS publish script and the MT wordmark are removed. The desktop app keeps its own name, bundle id and `~/.mt` data directory; it is the only surface that stays MT Code. Note: this repository can no longer build the iOS app under @munimtechnologies/mt-code. Mobile builds resolve to T3's EAS project. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent b7be6af commit ee2b9ff

26 files changed

Lines changed: 108 additions & 966 deletions

‎apps/mobile/app.config.ts‎

Lines changed: 32 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import type { ExpoConfig } from "expo/config";
22

33
import { BRAND_ASSET_PATHS } from "../../scripts/lib/brand-assets.ts";
4-
import {
5-
resolveMobileDistroIdentity,
6-
resolveMobileDistroRaw,
7-
resolveMobileUpdatesUrl,
8-
} from "../../scripts/lib/mobile-distro.ts";
94
import { loadRepoEnv } from "../../scripts/lib/public-config.ts";
105

116
type AppVariant = "development" | "preview" | "production";
@@ -14,8 +9,7 @@ const repoEnv = loadRepoEnv();
149
Object.assign(process.env, repoEnv);
1510

1611
const APP_VARIANT = resolveAppVariant(repoEnv.APP_VARIANT);
17-
const mobileDistro = resolveMobileDistroIdentity(resolveMobileDistroRaw(repoEnv));
18-
const brandName = mobileDistro.productName;
12+
const brandName = "T3 Code";
1913
const isIosPersonalTeamBuild = repoEnv.T3CODE_IOS_PERSONAL_TEAM === "1";
2014
const runtimeVersionPolicy =
2115
process.env.MOBILE_VERSION_POLICY ??
@@ -81,49 +75,30 @@ const RELEASE_ASSETS = {
8175
androidNotificationColor: "#FFFFFF",
8276
} as const;
8377

84-
const MUNIM_RELEASE_ASSETS = {
85-
appIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimUniversalIconPng),
86-
iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimIconComposerProject),
87-
splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimIosIconPng),
88-
splashIconDark: fromRepoRoot(BRAND_ASSET_PATHS.munimIosIconLightPng),
89-
androidAdaptiveForeground: fromRepoRoot(BRAND_ASSET_PATHS.munimUniversalIconPng),
90-
androidAdaptiveBackgroundColor: "#000000",
91-
// The Munim mark is already full-bleed on black, so it needs no separate
92-
// adaptive background layer and doubles as the Android splash image.
93-
androidAdaptiveBackgroundImage: undefined,
94-
androidSplashIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimUniversalIconPng),
95-
androidMonochromeIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimUniversalIconPng),
96-
androidNotificationIcon: fromRepoRoot(BRAND_ASSET_PATHS.munimUniversalIconPng),
97-
androidNotificationColor: "#FFFFFF",
98-
} as const;
99-
10078
const VARIANT_CONFIG = {
10179
development: {
10280
appName: `${brandName} Dev`,
103-
scheme: mobileDistro.schemeDev,
104-
iosBundleIdentifier: mobileDistro.iosBundleIdentifierDev,
105-
androidPackage: mobileDistro.androidPackageDev,
106-
relyingParty: mobileDistro.clerkRelyingParty,
107-
hostedAppDomain: mobileDistro.hostedAppDomain,
81+
scheme: "t3code-dev",
82+
iosBundleIdentifier: "com.t3tools.t3code.dev",
83+
androidPackage: "com.t3tools.t3code.dev",
84+
relyingParty: "clerk.t3.codes",
10885
assets: DEVELOPMENT_ASSETS,
10986
},
11087
preview: {
11188
appName: `${brandName} Preview`,
112-
scheme: mobileDistro.schemePreview,
113-
iosBundleIdentifier: mobileDistro.iosBundleIdentifierPreview,
114-
androidPackage: mobileDistro.androidPackagePreview,
115-
relyingParty: mobileDistro.clerkRelyingParty,
116-
hostedAppDomain: mobileDistro.hostedAppDomain,
89+
scheme: "t3code-preview",
90+
iosBundleIdentifier: "com.t3tools.t3code.preview",
91+
androidPackage: "com.t3tools.t3code.preview",
92+
relyingParty: "clerk.t3.codes",
11793
assets: PREVIEW_ASSETS,
11894
},
11995
production: {
12096
appName: brandName,
121-
scheme: mobileDistro.scheme,
122-
iosBundleIdentifier: mobileDistro.iosBundleIdentifier,
123-
androidPackage: mobileDistro.androidPackage,
124-
relyingParty: mobileDistro.clerkRelyingParty,
125-
hostedAppDomain: mobileDistro.hostedAppDomain,
126-
assets: mobileDistro.id === "munim" ? MUNIM_RELEASE_ASSETS : RELEASE_ASSETS,
97+
scheme: "t3code",
98+
iosBundleIdentifier: "com.t3tools.t3code",
99+
androidPackage: "com.t3tools.t3code",
100+
relyingParty: "clerk.t3.codes",
101+
assets: RELEASE_ASSETS,
127102
},
128103
} as const;
129104

@@ -142,11 +117,9 @@ const variant = VARIANT_CONFIG[APP_VARIANT];
142117
const iosBundleIdentifier = isIosPersonalTeamBuild
143118
? personalTeamBundleIdentifier!
144119
: variant.iosBundleIdentifier;
145-
const mobileUpdatesUrl = resolveMobileUpdatesUrl(mobileDistro);
146120
const associatedDomains = [
147121
`applinks:${variant.relyingParty}`,
148122
`webcredentials:${variant.relyingParty}`,
149-
...(variant.hostedAppDomain ? [`applinks:${variant.hostedAppDomain}`] : []),
150123
];
151124

152125
const dmSansFonts = {
@@ -207,7 +180,7 @@ const sharingPlugin: NonNullable<ExpoConfig["plugins"]>[number] = [
207180

208181
const config: ExpoConfig = {
209182
name: variant.appName,
210-
slug: mobileDistro.slug,
183+
slug: "t3-code",
211184
platforms: ["ios", "android"],
212185
scheme: variant.scheme,
213186
version: "1.1.1",
@@ -220,16 +193,12 @@ const config: ExpoConfig = {
220193
orientation: "portrait",
221194
icon: variant.assets.appIcon,
222195
userInterfaceStyle: "automatic",
223-
updates: mobileUpdatesUrl
224-
? {
225-
enabled: repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0",
226-
url: mobileUpdatesUrl,
227-
checkAutomatically: "ON_LOAD",
228-
fallbackToCacheTimeout: 0,
229-
}
230-
: {
231-
enabled: false,
232-
},
196+
updates: {
197+
enabled: repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0",
198+
url: "https://u.expo.dev/d763fcb8-d37c-41ea-a773-b54a0ab4a454",
199+
checkAutomatically: "ON_LOAD",
200+
fallbackToCacheTimeout: 0,
201+
},
233202
ios: {
234203
icon: variant.assets.iosIcon,
235204
supportsTablet: true,
@@ -240,7 +209,7 @@ const config: ExpoConfig = {
240209
// Pin code signing to the T3 Tools team so non-interactive `expo run:ios`
241210
// does not fall back to a personal team (which cannot sign app groups,
242211
// Sign in with Apple, or push notification entitlements).
243-
appleTeamId: mobileDistro.appleTeamId,
212+
appleTeamId: "ARK85ZXQ4Z",
244213
associatedDomains,
245214
entitlements: {
246215
"keychain-access-groups": [`$(AppIdentifierPrefix)${variant.iosBundleIdentifier}`],
@@ -435,18 +404,12 @@ const config: ExpoConfig = {
435404
appVariant: APP_VARIANT,
436405
iosPersonalTeamBuild: isIosPersonalTeamBuild,
437406
branding: {
438-
distroId: mobileDistro.id,
439-
productName: mobileDistro.productName,
440-
// The Connect name follows the baked identity, not the distro: MT Code
441-
// ships with T3 Connect (T3's relay) as its sync backend.
442-
connectProductName:
443-
repoEnv.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY === "pk_live_Y2xlcmsudDMuY29kZXMk" ||
444-
mobileDistro.id !== "munim"
445-
? "T3 Connect"
446-
: "MT Connect",
447-
scheme: mobileDistro.scheme,
448-
schemeDev: mobileDistro.schemeDev,
449-
schemePreview: mobileDistro.schemePreview,
407+
distroId: "default",
408+
productName: brandName,
409+
connectProductName: "T3 Connect",
410+
scheme: "t3code",
411+
schemeDev: "t3code-dev",
412+
schemePreview: "t3code-preview",
450413
},
451414
relay: {
452415
url: repoEnv.T3CODE_RELAY_URL ?? null,
@@ -469,15 +432,11 @@ const config: ExpoConfig = {
469432
tracesDataset: repoEnv.EXPO_PUBLIC_OTLP_TRACES_DATASET ?? null,
470433
tracesToken: repoEnv.EXPO_PUBLIC_OTLP_TRACES_TOKEN ?? null,
471434
},
472-
...(mobileDistro.easProjectId
473-
? {
474-
eas: {
475-
projectId: mobileDistro.easProjectId,
476-
},
477-
}
478-
: {}),
435+
eas: {
436+
projectId: "d763fcb8-d37c-41ea-a773-b54a0ab4a454",
437+
},
479438
},
480-
...(mobileDistro.expoOwner ? { owner: mobileDistro.expoOwner } : {}),
439+
owner: "pingdotgg",
481440
};
482441

483442
export default config;

‎apps/mobile/eas.json‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,6 @@
4949
"channel": "production",
5050
"environment": "production",
5151
"autoIncrement": true
52-
},
53-
"production-munim": {
54-
"extends": "production",
55-
"credentialsSource": "local",
56-
"env": {
57-
"APP_VARIANT": "production",
58-
"T3CODE_MOBILE_DISTRO": "munim",
59-
"MOBILE_VERSION_POLICY": "appVersion",
60-
"EXPO_PUBLIC_MARKETING_SITE_URL": "https://www.munimtech.com",
61-
"EXPO_PUBLIC_PRIVACY_POLICY_PATH": "privacy",
62-
"EXPO_PUBLIC_TERMS_OF_SERVICE_PATH": "terms",
63-
"EXPO_PUBLIC_SECURITY_POLICY_PATH": "privacy",
64-
"EXPO_PUBLIC_LEGAL_PATH": "privacy",
65-
"NODE_OPTIONS": "--max-old-space-size=4096"
66-
},
67-
"channel": "production-munim"
6852
}
6953
},
7054
"submit": {
@@ -75,18 +59,6 @@
7559
"android": {
7660
"track": "internal"
7761
}
78-
},
79-
"production-munim": {
80-
"ios": {
81-
"ascAppId": "6803353917",
82-
"ascApiKeyPath": "./credentials/apple/AuthKey_A5X3Y92UJP.p8",
83-
"ascApiKeyId": "A5X3Y92UJP",
84-
"ascApiKeyIssuerId": "6f677a98-7245-4fce-a5ae-be933547b809",
85-
"appleTeamId": "6T5J6U2UVT"
86-
},
87-
"android": {
88-
"track": "internal"
89-
}
9062
}
9163
}
9264
}

‎apps/mobile/src/components/BrandMark.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import Constants from "expo-constants";
22
import { Image } from "expo-image";
33
import { View } from "react-native";
44

5-
import { getProductName, isMunimDistro } from "../lib/branding";
5+
import { getProductName } from "../lib/branding";
66
import { resolveMobileStageLabel } from "../lib/mobileBranding";
77
import { AppText as Text } from "./AppText";
88

99
const appVariant = Constants.expoConfig?.extra?.appVariant;
10-
const BRAND_MARK_SOURCE = isMunimDistro()
11-
? require("../../../../assets/munim/munim-icon-dark-1024.png")
12-
: appVariant === "development"
10+
const BRAND_MARK_SOURCE =
11+
appVariant === "development"
1312
? require("../../../../assets/dev/blueprint-ios-1024.png")
1413
: appVariant === "preview"
1514
? require("../../../../assets/nightly/nightly-ios-1024.png")

‎apps/mobile/src/components/BrandWordmark.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import type { ColorValue } from "react-native";
22

3-
import { getBrandMark, isMunimDistro } from "../lib/branding";
4-
import { MTWordmark } from "./MTWordmark";
3+
import { getBrandMark } from "../lib/branding";
54
import { T3Wordmark } from "./T3Wordmark";
65
import { AppText as Text } from "./AppText";
76

87
/**
9-
* Distro-aware wordmark for navigation headers: MT SVG, T3 SVG, or plain text
10-
* for any other first-word mark.
8+
* Wordmark for navigation headers: the T3 SVG, or plain text for any other
9+
* first-word mark.
1110
*/
1211
export function BrandWordmark(props: { readonly height: number; readonly color: ColorValue }) {
13-
if (isMunimDistro()) {
14-
return <MTWordmark color={props.color} height={props.height} />;
15-
}
1612
const mark = getBrandMark();
1713
if (mark !== "T3") {
1814
return (

‎apps/mobile/src/components/MTWordmark.tsx‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎apps/mobile/src/lib/branding.test.ts‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,30 @@ describe("mobile branding helpers", () => {
1414
expect(branding.getProductName()).toBe("T3 Code");
1515
expect(branding.getConnectName()).toBe("T3 Connect");
1616
expect(branding.getAppScheme()).toBe("t3code");
17-
expect(branding.isMunimDistro()).toBe(false);
1817
});
1918

20-
it("reads Munim branding from expo extra", async () => {
19+
it("reads the baked branding from expo extra", async () => {
2120
vi.doMock("expo-constants", () => ({
2221
default: {
2322
expoConfig: {
24-
name: "MT Code",
23+
name: "T3 Code Preview",
2524
extra: {
2625
branding: {
27-
distroId: "munim",
28-
productName: "MT Code",
29-
connectProductName: "MT Connect",
30-
scheme: "mtcode",
31-
schemeDev: "mtcode-dev",
32-
schemePreview: "mtcode-preview",
26+
productName: "T3 Code",
27+
connectProductName: "T3 Connect",
28+
scheme: "t3code",
29+
schemeDev: "t3code-dev",
30+
schemePreview: "t3code-preview",
3331
},
3432
},
3533
},
3634
},
3735
}));
3836
const branding = await import("./branding.ts");
39-
expect(branding.getProductName()).toBe("MT Code");
40-
expect(branding.getConnectName()).toBe("MT Connect");
41-
expect(branding.getMobileClientLabel()).toBe("MT Code Mobile");
42-
expect(branding.getAppScheme()).toBe("mtcode");
43-
expect(branding.getBrandMark()).toBe("MT");
37+
expect(branding.getMobileClientLabel()).toBe("T3 Code Mobile");
38+
expect(branding.getAppSchemeDev()).toBe("t3code-dev");
39+
expect(branding.getAppSchemePreview()).toBe("t3code-preview");
40+
expect(branding.getBrandMark()).toBe("T3");
4441
expect(branding.getBrandLabel()).toBe("Code");
45-
expect(branding.isMunimDistro()).toBe(true);
4642
});
4743
});

‎apps/mobile/src/lib/branding.ts‎

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import Constants from "expo-constants";
22

3-
export type MobileDistroId = "default" | "munim";
4-
53
type BrandingExtra = {
64
readonly distroId?: unknown;
75
readonly productName?: unknown;
@@ -21,25 +19,16 @@ function readString(value: unknown): string | null {
2119
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
2220
}
2321

24-
/** Active mobile distro. Defaults to official T3 when unset (tests / old binaries). */
25-
export function getDistroId(): MobileDistroId {
26-
return brandingExtra().distroId === "munim" ? "munim" : "default";
27-
}
28-
29-
export function isMunimDistro(): boolean {
30-
return getDistroId() === "munim";
31-
}
32-
33-
/** Product name shown in UI ("MT Code" / "T3 Code"). */
22+
/** Product name shown in UI. */
3423
export function getProductName(): string {
3524
return (
3625
readString(brandingExtra().productName) ??
3726
readString(Constants.expoConfig?.name)?.replace(/\s+(Dev|Preview)$/, "") ??
38-
"MT Code"
27+
"T3 Code"
3928
);
4029
}
4130

42-
/** Connect product name ("MT Connect" / "T3 Connect"). */
31+
/** Connect product name. */
4332
export function getConnectName(): string {
4433
return (
4534
readString(brandingExtra().connectProductName) ?? `${getProductName().split(" ")[0]} Connect`
@@ -51,9 +40,9 @@ export function getMobileClientLabel(): string {
5140
return `${getProductName()} Mobile`;
5241
}
5342

54-
/** Production deep-link scheme for this distro. */
43+
/** Production deep-link scheme. */
5544
export function getAppScheme(): string {
56-
return readString(brandingExtra().scheme) ?? (isMunimDistro() ? "mtcode" : "t3code");
45+
return readString(brandingExtra().scheme) ?? "t3code";
5746
}
5847

5948
export function getAppSchemeDev(): string {

‎apps/web/src/cloud/connectProviderContext.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ interface ConnectProvidersContextValue {
1717
readonly activeId: ConnectProviderId | null;
1818
readonly active: ConnectProviderPublicConfig | null;
1919
readonly embedded: ConnectProviderPublicConfig | null;
20-
/** Switch the in-app Clerk identity. Non-embeddable providers (T3 on hosted
21-
* Munim web) are ignored — open their hostedAppUrl instead. */
20+
/** Switch the in-app Clerk identity. A provider Clerk cannot embed on this
21+
* origin is ignored — open its hostedAppUrl instead. */
2222
readonly setActiveId: (id: ConnectProviderId) => boolean;
2323
}
2424

0 commit comments

Comments
 (0)