Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Stage production icons for desktop builds and publish (#168)

Julius Marminged249e628eef2
diff --git a/apps/server/integration/OrchestrationEngineHarness.integration.ts b/apps/server/integration/OrchestrationEngineHarness.integration.ts
index 412973950..b6ae7ee98 100644
--- a/apps/server/integration/OrchestrationEngineHarness.integration.ts
+++ b/apps/server/integration/OrchestrationEngineHarness.integration.ts
@@ -406,19 +406,14 @@ export const makeOrchestrationIntegrationHarness = (
disposed = true;
const shutdown = Effect.gen(function* () {
- const stopAllExit = yield* Effect.exit(
- Effect.promise(() => runtime.runPromise(providerService.stopAll())),
- );
const closeScopeExit = yield* Effect.exit(Scope.close(scope, Exit.void));
const disposeRuntimeExit = yield* Effect.exit(Effect.promise(() => runtime.dispose()));
- const failureCause = Exit.isFailure(stopAllExit)
- ? stopAllExit.cause
- : Exit.isFailure(closeScopeExit)
- ? closeScopeExit.cause
- : Exit.isFailure(disposeRuntimeExit)
- ? disposeRuntimeExit.cause
- : null;
+ const failureCause = Exit.isFailure(closeScopeExit)
+ ? closeScopeExit.cause
+ : Exit.isFailure(disposeRuntimeExit)
+ ? disposeRuntimeExit.cause
+ : null;
if (failureCause) {
return yield* Effect.failCause(failureCause);
diff --git a/apps/server/scripts/cli.ts b/apps/server/scripts/cli.ts
index 7470a0dc6..ccf1f5a91 100644
--- a/apps/server/scripts/cli.ts
+++ b/apps/server/scripts/cli.ts
@@ -6,6 +6,7 @@ import { Data, Effect, FileSystem, Logger, Option, Path } from "effect";
import { Command, Flag } from "effect/unstable/cli";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
+import { DEVELOPMENT_ICON_OVERRIDES, PUBLISH_ICON_OVERRIDES } from "../../../scripts/lib/brand-assets.ts";
import { resolveCatalogDependencies } from "../../../scripts/lib/resolve-catalog.ts";
import rootPackageJson from "../../../package.json" with { type: "json" };
import serverPackageJson from "../package.json" with { type: "json" };
@@ -31,6 +32,84 @@ const runCommand = Effect.fn("runCommand")(function* (command: ChildProcess.Comm
}
});
+interface PublishIconBackup {
+ readonly targetPath: string;
+ readonly backupPath: string;
+}
+
+const applyPublishIconOverrides = Effect.fn("applyPublishIconOverrides")(function* (
+ repoRoot: string,
+ serverDir: string,
+) {
+ const path = yield* Path.Path;
+ const fs = yield* FileSystem.FileSystem;
+ const backups: PublishIconBackup[] = [];
+
+ for (const override of PUBLISH_ICON_OVERRIDES) {
+ const sourcePath = path.join(repoRoot, override.sourceRelativePath);
+ const targetPath = path.join(serverDir, override.targetRelativePath);
+ const backupPath = `${targetPath}.publish-bak`;
+
+ if (!(yield* fs.exists(sourcePath))) {
+ return yield* new CliError({
+ message: `Missing publish icon source: ${sourcePath}`,
+ });
+ }
+ if (!(yield* fs.exists(targetPath))) {
+ return yield* new CliError({
+ message: `Missing publish icon target: ${targetPath}. Run the build subcommand first.`,
+ });
+ }
+
+ yield* fs.copyFile(targetPath, backupPath);
+ yield* fs.copyFile(sourcePath, targetPath);
+ backups.push({ targetPath, backupPath });
+ }
+
+ yield* Effect.log("[cli] Applied publish icon overrides to dist/client");
+ return backups as ReadonlyArray<PublishIconBackup>;
+});
+
+const restorePublishIconOverrides = Effect.fn("restorePublishIconOverrides")(function* (
+ backups: ReadonlyArray<PublishIconBackup>,
+) {
+ const fs = yield* FileSystem.FileSystem;
+ for (const backup of backups) {
+ if (!(yield* fs.exists(backup.backupPath))) {
+ continue;
+ }
+ yield* fs.rename(backup.backupPath, backup.targetPath);
+ }
+});
+
+const applyDevelopmentIconOverrides = Effect.fn("applyDevelopmentIconOverrides")(function* (
+ repoRoot: string,
+ serverDir: string,
+) {
+ const path = yield* Path.Path;
+ const fs = yield* FileSystem.FileSystem;
+
+ for (const override of DEVELOPMENT_ICON_OVERRIDES) {
+ const sourcePath = path.join(repoRoot, override.sourceRelativePath);
+ const targetPath = path.join(serverDir, override.targetRelativePath);
+
+ if (!(yield* fs.exists(sourcePath))) {
+ return yield* new CliError({
+ message: `Missing development icon source: ${sourcePath}`,
+ });
+ }
+ if (!(yield* fs.exists(targetPath))) {
+ return yield* new CliError({
+ message: `Missing development icon target: ${targetPath}. Build web first.`,
+ });
+ }
+
+ yield* fs.copyFile(sourcePath, targetPath);
+ }
+
+ yield* Effect.log("[cli] Applied development icon overrides to dist/client");
+});
+
// ---------------------------------------------------------------------------
// build subcommand
// ---------------------------------------------------------------------------
@@ -61,6 +140,7 @@ const buildCmd = Command.make(
if (yield* fs.exists(webDist)) {
yield* fs.copy(webDist, clientTarget);
+ yield* applyDevelopmentIconOverrides(repoRoot, serverDir);
yield* Effect.log("[cli] Bundled web app into dist/client");
} else {
yield* Effect.logWarning("[cli] Web dist not found — skipping client bundle.");
@@ -104,10 +184,8 @@ const publishCmd = Command.make(
yield* Effect.acquireUseRelease(
// Acquire: backup package.json, resolve catalog: deps, strip devDependencies/scripts
Effect.gen(function* () {
- const original = yield* fs.readFileString(packageJsonPath);
- yield* fs.writeFileString(backupPath, original);
-
- // Build package.json for publish
+ // Resolve catalog dependencies before any file mutations. If this throws,
+ // acquire fails and no release hook runs, so filesystem must still be untouched.
const version = Option.getOrElse(config.appVersion, () => serverPackageJson.version);
const pkg = {
name: serverPackageJson.name,
@@ -120,15 +198,19 @@ const publishCmd = Command.make(
dependencies: serverPackageJson.dependencies as Record<string, unknown>,
};
- // Resolve catalog: entries in production dependencies
pkg.dependencies = resolveCatalogDependencies(
pkg.dependencies,
rootPackageJson.workspaces.catalog,
"apps/server dependencies",
);
+ const original = yield* fs.readFileString(packageJsonPath);
+ yield* fs.writeFileString(backupPath, original);
yield* fs.writeFileString(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
yield* Effect.log("[cli] Resolved package.json for publish");
+
+ const iconBackups = yield* applyPublishIconOverrides(repoRoot, serverDir);
+ return { iconBackups };
}),
// Use: npm publish
() =>
@@ -147,8 +229,15 @@ const publishCmd = Command.make(
);
}),
// Release: restore
- () =>
+ (resource: { readonly iconBackups: ReadonlyArray<PublishIconBackup> }) =>
Effect.gen(function* () {
+ yield* restorePublishIconOverrides(resource.iconBackups).pipe(
+ Effect.catch((error) =>
+ Effect.logError(
+ `[cli] Failed to restore publish icon overrides: ${String(error)}`,
+ ),
+ ),
+ );
yield* fs.rename(backupPath, packageJsonPath);
if (config.verbose) yield* Effect.log("[cli] Restored original package.json");
}),
diff --git a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts
index e1e75682b..d675c85ff 100644
--- a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts
+++ b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts
@@ -91,7 +91,6 @@ function createProviderServiceHarness(
listSessions,
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
rollbackConversation,
- stopAll: () => Effect.void,
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
};
diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
index e29adb2b4..4f352435f 100644
--- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
+++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
@@ -188,7 +188,6 @@ describe("ProviderCommandReactor", () => {
sessionModelSwitch: provider === "codex" ? "in-session" : "in-session",
}),
rollbackConversation: () => unsupported(),
- stopAll: () => Effect.void,
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
};
diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
index 09fae007e..eb230e520 100644
--- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
+++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
@@ -65,7 +65,6 @@ function createProviderServiceHarness() {
listSessions: () => Effect.succeed([]),
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
rollbackConversation: () => unsupported(),
- stopAll: () => Effect.void,
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
};
diff --git a/apps/server/src/provider/Layers/ProviderService.test.ts b/apps/server/src/provider/Layers/ProviderService.test.ts
index 255c6fca0..63b41d6b0 100644
--- a/apps/server/src/provider/Layers/ProviderService.test.ts
+++ b/apps/server/src/provider/Layers/ProviderService.test.ts
@@ -356,11 +356,6 @@ it.effect(
});
}).pipe(Effect.provide(firstProviderLayer));
- yield* Effect.gen(function* () {
- const provider = yield* ProviderService;
- yield* provider.stopAll();
- }).pipe(Effect.provide(firstProviderLayer));
-
const persistedAfterStopAll = yield* Effect.gen(function* () {
const repository = yield* ProviderSessionRuntimeRepository;
return yield* repository.getByThreadId({ threadId: startedSession.threadId });
@@ -549,7 +544,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
runtimeMode: "full-access",
});
- yield* provider.stopAll();
+ yield* routing.codex.stopAll();
routing.codex.startSession.mockClear();
routing.codex.sendTurn.mockClear();
@@ -578,7 +573,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
}),
);
- it.effect("stops all sessions and clears adapter runtime", () =>
+ it.effect("lists no sessions after adapter runtime clears", () =>
Effect.gen(function* () {
const provider = yield* ProviderService;
@@ -593,7 +588,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
runtimeMode: "full-access",
});
- yield* provider.stopAll();
+ yield* routing.codex.stopAll();
const remaining = yield* provider.listSessions();
assert.equal(remaining.length, 0);
@@ -641,14 +636,6 @@ routing.layer("ProviderServiceLive routing", (it) => {
}
}
- yield* provider.stopAll();
- const stoppedRuntime = yield* runtimeRepository.getByThreadId({
- threadId: session.threadId,
- });
- assert.equal(Option.isSome(stoppedRuntime), true);
- if (Option.isSome(stoppedRuntime)) {
- assert.equal(stoppedRuntime.value.status, "stopped");
- }
}),
);
});
diff --git a/apps/server/src/provider/Layers/ProviderService.ts b/apps/server/src/provider/Layers/ProviderService.ts
index 1a56eb946..285e0a870 100644
--- a/apps/server/src/provider/Layers/ProviderService.ts
+++ b/apps/server/src/provider/Layers/ProviderService.ts
@@ -471,7 +471,7 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
});
});
- const stopAll: ProviderServiceShape["stopAll"] = () =>
+ const runStopAll = () =>
Effect.gen(function* () {
const threadIds = yield* directory.listThreadIds();
yield* Effect.forEach(adapters, (adapter) => adapter.stopAll()).pipe(Effect.asVoid);
@@ -497,6 +497,12 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
yield* analytics.flush;
});
+ yield* Effect.addFinalizer(() =>
+ Effect.catch(runStopAll(), (cause) =>
+ Effect.logWarning("failed to stop provider service", { cause }),
+ ),
+ );
+
return {
startSession,
sendTurn,
@@ -507,7 +513,6 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
listSessions,
getCapabilities,
rollbackConversation,
- stopAll,
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
} satisfies ProviderServiceShape;
});
diff --git a/apps/server/src/provider/Services/ProviderService.ts b/apps/server/src/provider/Services/ProviderService.ts
index 600541e89..ebfe8c8ab 100644
--- a/apps/server/src/provider/Services/ProviderService.ts
+++ b/apps/server/src/provider/Services/ProviderService.ts
@@ -99,16 +99,6 @@ export interface ProviderServiceShape {
readonly numTurns: number;
}) => Effect.Effect<void, ProviderServiceError>;
- /**
- * Stop all active provider sessions.
- *
- * Persisted session bindings remain so stale sessions can be resumed after
- * process restart.
- *
- * Runtime alias mappings are cleared as part of shutdown.
- */
- readonly stopAll: () => Effect.Effect<void, ProviderServiceError>;
-
/**
* Canonical provider runtime event stream.
*
diff --git a/apps/server/src/serverLogger.ts b/apps/server/src/serverLogger.ts
index 0abf9f382..de6b27f42 100644
--- a/apps/server/src/serverLogger.ts
+++ b/apps/server/src/serverLogger.ts
@@ -1,18 +1,15 @@
import fs from "node:fs";
import path from "node:path";
-import { Effect, Logger, Option } from "effect";
+import { Effect, Logger } from "effect";
import * as Layer from "effect/Layer";
import { ServerConfig } from "./config";
export const ServerLoggerLive = Effect.gen(function* () {
- const config = yield* Effect.serviceOption(ServerConfig);
- if (Option.isNone(config)) {
- return Logger.layer([Logger.defaultLogger]);
- }
+ const config = yield* ServerConfig;
- const logDir = path.join(config.value.stateDir, "logs");
+ const logDir = path.join(config.stateDir, "logs");
const logPath = path.join(logDir, "server.log");
yield* Effect.sync(() => {
diff --git a/apps/server/src/wsServer.test.ts b/apps/server/src/wsServer.test.ts
index adb4b3cfb..2c30b7cc5 100644
--- a/apps/server/src/wsServer.test.ts
+++ b/apps/server/src/wsServer.test.ts
@@ -1171,7 +1171,6 @@ describe("WebSocket Server", () => {
listSessions: () => Effect.succeed([]),
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
rollbackConversation: () => unsupported(),
- stopAll: () => Effect.void,
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
};
const providerLayer = Layer.succeed(ProviderService, providerService);
diff --git a/apps/server/src/wsServer.ts b/apps/server/src/wsServer.ts
index 0cb29cb9b..934ff92a5 100644
--- a/apps/server/src/wsServer.ts
+++ b/apps/server/src/wsServer.ts
@@ -568,7 +568,6 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
const orchestrationEngine = yield* OrchestrationEngineService;
const projectionReadModelQuery = yield* ProjectionSnapshotQuery;
const checkpointDiffQuery = yield* CheckpointDiffQuery;
- const liveProviderService = yield* ProviderService;
const orchestrationReactor = yield* OrchestrationReactor;
const { openInEditor } = yield* Open;
@@ -660,11 +659,6 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
}
const runPromise = yield* Effect.map(Effect.services<never>(), Effect.runPromiseWith);
- yield* Effect.addFinalizer(() =>
- Effect.catch(liveProviderService.stopAll(), (cause) =>
- Effect.logWarning("failed to stop provider service", { cause }),
- ),
- );
const unsubscribeTerminalEvents = yield* terminalManager.subscribe(
(event) => void Effect.runPromise(onTerminalEvent(event)),
diff --git a/apps/web/public/apple-touch-icon.png b/apps/web/public/apple-touch-icon.png
index 43dc5d216..e0e1b9659 100644
Binary files a/apps/web/public/apple-touch-icon.png and b/apps/web/public/apple-touch-icon.png differ
diff --git a/apps/web/public/favicon-16x16.png b/apps/web/public/favicon-16x16.png
index 1636b5216..673d84599 100644
Binary files a/apps/web/public/favicon-16x16.png and b/apps/web/public/favicon-16x16.png differ
diff --git a/apps/web/public/favicon-32x32.png b/apps/web/public/favicon-32x32.png
index b84a6ff27..25bcc95d4 100644
Binary files a/apps/web/public/favicon-32x32.png and b/apps/web/public/favicon-32x32.png differ
diff --git a/apps/web/public/favicon.ico b/apps/web/public/favicon.ico
index 8298f70d8..36975b997 100644
Binary files a/apps/web/public/favicon.ico and b/apps/web/public/favicon.ico differ
diff --git a/apps/web/public/favicon.svg b/apps/web/public/favicon.svg
deleted file mode 100644
index 61b48db5a..000000000
--- a/apps/web/public/favicon.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 10C0 4.47715 4.47715 0 10 0H118C123.523 0 128 4.47715 128 10V118C128 123.523 123.523 128 118 128H10C4.47715 128 0 123.523 0 118V10Z" fill="black"/>
-<path d="M33.4509 93V47.56H15.5309V37H64.3309V47.56H46.4109V93H33.4509ZM86.7253 93.96C82.832 93.96 78.9653 93.4533 75.1253 92.44C71.2853 91.3733 68.032 89.88 65.3653 87.96L70.4053 78.04C72.5386 79.5867 75.0186 80.8133 77.8453 81.72C80.672 82.6267 83.5253 83.08 86.4053 83.08C89.6586 83.08 92.2186 82.44 94.0853 81.16C95.952 79.88 96.8853 78.12 96.8853 75.88C96.8853 73.7467 96.0586 72.0667 94.4053 70.84C92.752 69.6133 90.0853 69 86.4053 69H80.4853V60.44L96.0853 42.76L97.5253 47.4H68.1653V37H107.365V45.4L91.8453 63.08L85.2853 59.32H89.0453C95.9253 59.32 101.125 60.8667 104.645 63.96C108.165 67.0533 109.925 71.0267 109.925 75.88C109.925 79.0267 109.099 81.9867 107.445 84.76C105.792 87.48 103.259 89.6933 99.8453 91.4C96.432 93.1067 92.0586 93.96 86.7253 93.96Z" fill="white"/>
-</svg>
diff --git a/assets/T3 Code [email protected] b/assets/T3 Code [email protected]
deleted file mode 100644
index f01a7b881..000000000
Binary files a/assets/T3 Code [email protected] and /dev/null differ
diff --git a/assets/T3 Code logo.svg b/assets/T3 Code logo.svg
deleted file mode 100644
index 61b48db5a..000000000
--- a/assets/T3 Code logo.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 10C0 4.47715 4.47715 0 10 0H118C123.523 0 128 4.47715 128 10V118C128 123.523 123.523 128 118 128H10C4.47715 128 0 123.523 0 118V10Z" fill="black"/>
-<path d="M33.4509 93V47.56H15.5309V37H64.3309V47.56H46.4109V93H33.4509ZM86.7253 93.96C82.832 93.96 78.9653 93.4533 75.1253 92.44C71.2853 91.3733 68.032 89.88 65.3653 87.96L70.4053 78.04C72.5386 79.5867 75.0186 80.8133 77.8453 81.72C80.672 82.6267 83.5253 83.08 86.4053 83.08C89.6586 83.08 92.2186 82.44 94.0853 81.16C95.952 79.88 96.8853 78.12 96.8853 75.88C96.8853 73.7467 96.0586 72.0667 94.4053 70.84C92.752 69.6133 90.0853 69 86.4053 69H80.4853V60.44L96.0853 42.76L97.5253 47.4H68.1653V37H107.365V45.4L91.8453 63.08L85.2853 59.32H89.0453C95.9253 59.32 101.125 60.8667 104.645 63.96C108.165 67.0533 109.925 71.0267 109.925 75.88C109.925 79.0267 109.099 81.9867 107.445 84.76C105.792 87.48 103.259 89.6933 99.8453 91.4C96.432 93.1067 92.0586 93.96 86.7253 93.96Z" fill="white"/>
-</svg>
diff --git a/assets/T3 Code [email protected] b/assets/T3 Code [email protected]
deleted file mode 100644
index 87d9f008c..000000000
Binary files a/assets/T3 Code [email protected] and /dev/null differ
diff --git a/assets/T3 Code [email protected] b/assets/T3 Code [email protected]
deleted file mode 100644
index d75373862..000000000
Binary files a/assets/T3 Code [email protected] and /dev/null differ
diff --git a/assets/T3 [email protected] b/assets/T3 [email protected]
deleted file mode 100644
index d426376b1..000000000
Binary files a/assets/T3 [email protected] and /dev/null differ
diff --git a/assets/dev/blueprint-ios-1024.png b/assets/dev/blueprint-ios-1024.png
new file mode 100644
index 000000000..b33d6f337
Binary files /dev/null and b/assets/dev/blueprint-ios-1024.png differ
diff --git a/assets/T3 Code [email protected] b/assets/dev/blueprint-macos-1024.png
similarity index 100%
rename from assets/T3 Code [email protected]
rename to assets/dev/blueprint-macos-1024.png
diff --git a/assets/dev/blueprint-universal-1024.png b/assets/dev/blueprint-universal-1024.png
new file mode 100644
index 000000000..b33d6f337
Binary files /dev/null and b/assets/dev/blueprint-universal-1024.png differ
diff --git a/assets/dev/blueprint-web-apple-touch-180.png b/assets/dev/blueprint-web-apple-touch-180.png
new file mode 100644
index 000000000..e0e1b9659
Binary files /dev/null and b/assets/dev/blueprint-web-apple-touch-180.png differ
diff --git a/assets/dev/blueprint-web-favicon-16x16.png b/assets/dev/blueprint-web-favicon-16x16.png
new file mode 100644
index 000000000..673d84599
Binary files /dev/null and b/assets/dev/blueprint-web-favicon-16x16.png differ
diff --git a/assets/dev/blueprint-web-favicon-32x32.png b/assets/dev/blueprint-web-favicon-32x32.png
new file mode 100644
index 000000000..25bcc95d4
Binary files /dev/null and b/assets/dev/blueprint-web-favicon-32x32.png differ
diff --git a/assets/dev/blueprint-web-favicon.ico b/assets/dev/blueprint-web-favicon.ico
new file mode 100644
index 000000000..36975b997
Binary files /dev/null and b/assets/dev/blueprint-web-favicon.ico differ
diff --git a/assets/dev/blueprint-windows.ico b/assets/dev/blueprint-windows.ico
new file mode 100644
index 000000000..36975b997
Binary files /dev/null and b/assets/dev/blueprint-windows.ico differ
diff --git a/assets/logo-1024.png b/assets/logo-1024.png
deleted file mode 100644
index 88317dd41..000000000
Binary files a/assets/logo-1024.png and /dev/null differ
diff --git a/assets/macos-icon-1024.png b/assets/macos-icon-1024.png
deleted file mode 100644
index 0a6e1cbfc..000000000
Binary files a/assets/macos-icon-1024.png and /dev/null differ
diff --git a/assets/prod/black-ios-1024.png b/assets/prod/black-ios-1024.png
new file mode 100644
index 000000000..2ff311ce7
Binary files /dev/null and b/assets/prod/black-ios-1024.png differ
diff --git a/assets/T3 [email protected] b/assets/prod/black-macos-1024.png
similarity index 100%
rename from assets/T3 [email protected]
rename to assets/prod/black-macos-1024.png
diff --git a/assets/T3 Code [email protected] b/assets/prod/black-universal-1024.png
similarity index 100%
rename from assets/T3 Code [email protected]
rename to assets/prod/black-universal-1024.png
diff --git a/assets/logo.svg b/assets/prod/logo.svg
similarity index 100%
rename from assets/logo.svg
rename to assets/prod/logo.svg
diff --git a/assets/prod/t3-black-web-apple-touch-180.png b/assets/prod/t3-black-web-apple-touch-180.png
new file mode 100644
index 000000000..9c593ce35
Binary files /dev/null and b/assets/prod/t3-black-web-apple-touch-180.png differ
diff --git a/assets/prod/t3-black-web-favicon-16x16.png b/assets/prod/t3-black-web-favicon-16x16.png
new file mode 100644
index 000000000..f85017caf
Binary files /dev/null and b/assets/prod/t3-black-web-favicon-16x16.png differ
diff --git a/assets/prod/t3-black-web-favicon-32x32.png b/assets/prod/t3-black-web-favicon-32x32.png
new file mode 100644
index 000000000..fae2d285b
Binary files /dev/null and b/assets/prod/t3-black-web-favicon-32x32.png differ
diff --git a/assets/prod/t3-black-web-favicon.ico b/assets/prod/t3-black-web-favicon.ico
new file mode 100644
index 000000000..e3ab4ae5e
Binary files /dev/null and b/assets/prod/t3-black-web-favicon.ico differ
diff --git a/assets/prod/t3-black-windows.ico b/assets/prod/t3-black-windows.ico
new file mode 100644
index 000000000..e3ab4ae5e
Binary files /dev/null and b/assets/prod/t3-black-windows.ico differ
diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts
index d8c4d08b1..8823b8851 100644
--- a/scripts/build-desktop-artifact.ts
+++ b/scripts/build-desktop-artifact.ts
@@ -1,11 +1,14 @@
#!/usr/bin/env node
import { spawnSync } from "node:child_process";
+import { existsSync } from "node:fs";
+import { join } from "node:path";
import rootPackageJson from "../package.json" with { type: "json" };
import desktopPackageJson from "../apps/desktop/package.json" with { type: "json" };
import serverPackageJson from "../apps/server/package.json" with { type: "json" };
+import { BRAND_ASSET_PATHS } from "./lib/brand-assets.ts";
import { resolveCatalogDependencies } from "./lib/resolve-catalog.ts";
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
@@ -20,8 +23,18 @@ const BuildArch = Schema.Literals(["arm64", "x64", "universal"]);
const RepoRoot = Effect.service(Path.Path).pipe(
Effect.flatMap((path) => path.fromFileUrl(new URL("..", import.meta.url))),
);
-const IconSource = Effect.zipWith(RepoRoot, Effect.service(Path.Path), (repoRoot, path) =>
- path.join(repoRoot, "assets/macos-icon-1024.png"),
+const ProductionMacIconSource = Effect.zipWith(RepoRoot, Effect.service(Path.Path), (repoRoot, path) =>
+ path.join(repoRoot, BRAND_ASSET_PATHS.productionMacIconPng),
+);
+const ProductionLinuxIconSource = Effect.zipWith(
+ RepoRoot,
+ Effect.service(Path.Path),
+ (repoRoot, path) => path.join(repoRoot, BRAND_ASSET_PATHS.productionLinuxIconPng),
+);
+const ProductionWindowsIconSource = Effect.zipWith(
+ RepoRoot,
+ Effect.service(Path.Path),
+ (repoRoot, path) => path.join(repoRoot, BRAND_ASSET_PATHS.productionWindowsIconIco),
);
const encodeJsonString = Schema.encodeEffect(Schema.UnknownFromJsonString);
@@ -104,6 +117,39 @@ function resolveGitCommitHash(repoRoot: string): string {
return hash.toLowerCase();
}
+function resolvePythonForNodeGyp(): string | undefined {
+ const configured = process.env.npm_config_python ?? process.env.PYTHON;
+ if (configured && existsSync(configured)) {
+ return configured;
+ }
+
+ if (process.platform === "win32") {
+ const localAppData = process.env.LOCALAPPDATA;
+ if (localAppData) {
+ for (const version of ["Python313", "Python312", "Python311", "Python310"]) {
+ const candidate = join(localAppData, "Programs", "Python", version, "python.exe");
+ if (existsSync(candidate)) {
+ return candidate;
+ }
+ }
+ }
+ }
+
+ const probe = spawnSync("python", ["-c", "import sys;print(sys.executable)"], {
+ encoding: "utf8",
+ });
+ if (probe.status !== 0) {
+ return undefined;
+ }
+
+ const executable = probe.stdout.trim();
+ if (!executable || !existsSync(executable)) {
+ return undefined;
+ }
+
+ return executable;
+}
+
interface ResolvedBuildOptions {
readonly platform: typeof BuildPlatform.Type;
readonly target: string;
@@ -261,7 +307,7 @@ function stageMacIcons(stageResourcesDir: string, verbose: boolean) {
return Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
- const iconSource = yield* IconSource;
+ const iconSource = yield* ProductionMacIconSource;
if (!(yield* fs.exists(iconSource))) {
return yield* new BuildScriptError({
message: `Production icon source is missing at ${iconSource}`,
@@ -285,6 +331,38 @@ function stageMacIcons(stageResourcesDir: string, verbose: boolean) {
});
}
+function stageLinuxIcons(stageResourcesDir: string) {
+ return Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const iconSource = yield* ProductionLinuxIconSource;
+ if (!(yield* fs.exists(iconSource))) {
+ return yield* new BuildScriptError({
+ message: `Production icon source is missing at ${iconSource}`,
+ });
+ }
+
+ const iconPath = path.join(stageResourcesDir, "icon.png");
+ yield* fs.copyFile(iconSource, iconPath);
+ });
+}
+
+function stageWindowsIcons(stageResourcesDir: string) {
+ return Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const iconSource = yield* ProductionWindowsIconSource;
+ if (!(yield* fs.exists(iconSource))) {
+ return yield* new BuildScriptError({
+ message: `Production Windows icon source is missing at ${iconSource}`,
+ });
+ }
+
+ const iconPath = path.join(stageResourcesDir, "icon.ico");
+ yield* fs.copyFile(iconSource, iconPath);
+ });
+}
+
function validateBundledClientAssets(clientDir: string) {
return Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
@@ -416,31 +494,18 @@ const assertPlatformBuildResources = Effect.fn("assertPlatformBuildResources")(f
stageResourcesDir: string,
verbose: boolean,
) {
- const fs = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
-
if (platform === "mac") {
yield* stageMacIcons(stageResourcesDir, verbose);
return;
}
if (platform === "linux") {
- const iconPath = path.join(stageResourcesDir, "icon.png");
- if (!(yield* fs.exists(iconPath))) {
- return yield* new BuildScriptError({
- message: `Missing Linux icon at ${iconPath}`,
- });
- }
+ yield* stageLinuxIcons(stageResourcesDir);
return;
}
if (platform === "win") {
- const iconPath = path.join(stageResourcesDir, "icon.ico");
- if (!(yield* fs.exists(iconPath))) {
- return yield* new BuildScriptError({
- message: `Missing Windows icon at ${iconPath}`,
- });
- }
+ yield* stageWindowsIcons(stageResourcesDir);
}
});
@@ -597,6 +662,16 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
delete buildEnv.APPLE_API_ISSUER;
}
+ if (process.platform === "win32") {
+ const python = resolvePythonForNodeGyp();
+ if (python) {
+ buildEnv.PYTHON = python;
+ buildEnv.npm_config_python = python;
+ }
+ buildEnv.npm_config_msvs_version = buildEnv.npm_config_msvs_version ?? "2022";
+ buildEnv.GYP_MSVS_VERSION = buildEnv.GYP_MSVS_VERSION ?? "2022";
+ }
+
yield* Effect.log(
`[desktop-artifact] Building ${options.platform}/${options.target} (arch=${options.arch}, version=${appVersion})...`,
);
diff --git a/scripts/lib/brand-assets.ts b/scripts/lib/brand-assets.ts
new file mode 100644
index 000000000..990d05c32
--- /dev/null
+++ b/scripts/lib/brand-assets.ts
@@ -0,0 +1,57 @@
+export const BRAND_ASSET_PATHS = {
+ productionMacIconPng: "assets/prod/black-macos-1024.png",
+ productionLinuxIconPng: "assets/prod/black-universal-1024.png",
+ productionWindowsIconIco: "assets/prod/t3-black-windows.ico",
+ productionWebFaviconIco: "assets/prod/t3-black-web-favicon.ico",
+ productionWebFavicon16Png: "assets/prod/t3-black-web-favicon-16x16.png",
+ productionWebFavicon32Png: "assets/prod/t3-black-web-favicon-32x32.png",
+ productionWebAppleTouchIconPng: "assets/prod/t3-black-web-apple-touch-180.png",
+ developmentWindowsIconIco: "assets/dev/blueprint-windows.ico",
+ developmentWebFaviconIco: "assets/dev/blueprint-web-favicon.ico",
+ developmentWebFavicon16Png: "assets/dev/blueprint-web-favicon-16x16.png",
+ developmentWebFavicon32Png: "assets/dev/blueprint-web-favicon-32x32.png",
+ developmentWebAppleTouchIconPng: "assets/dev/blueprint-web-apple-touch-180.png",
+} as const;
+
+export interface IconOverride {
+ readonly sourceRelativePath: string;
+ readonly targetRelativePath: string;
+}
+
+export const DEVELOPMENT_ICON_OVERRIDES: ReadonlyArray<IconOverride> = [
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFaviconIco,
+ targetRelativePath: "dist/client/favicon.ico",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFavicon16Png,
+ targetRelativePath: "dist/client/favicon-16x16.png",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFavicon32Png,
+ targetRelativePath: "dist/client/favicon-32x32.png",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.developmentWebAppleTouchIconPng,
+ targetRelativePath: "dist/client/apple-touch-icon.png",
+ },
+];
+
+export const PUBLISH_ICON_OVERRIDES: ReadonlyArray<IconOverride> = [
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.productionWebFaviconIco,
+ targetRelativePath: "dist/client/favicon.ico",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon16Png,
+ targetRelativePath: "dist/client/favicon-16x16.png",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon32Png,
+ targetRelativePath: "dist/client/favicon-32x32.png",
+ },
+ {
+ sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
+ targetRelativePath: "dist/client/apple-touch-icon.png",
+ },
+];