Skip to content

Commit fb42959

Browse files
authored
Merge branch 'main' into fix/git-pr-lookup-renamed-repository
2 parents fc1eecd + 81493ef commit fb42959

31 files changed

Lines changed: 789 additions & 104 deletions

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
"tailwindcss": "^4.0.0",
4343
"vite-plus": "catalog:"
4444
},
45-
"productName": "T3 Code (Alpha)"
45+
"productName": "T3 Code (Beta)"
4646
}

‎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-
const APP_DISPLAY_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Alpha)";
18+
const APP_DISPLAY_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Beta)";
1919
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ describe("DesktopAppIdentity", () => {
217217
const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
218218
yield* identity.configure;
219219

220-
assert.deepEqual(calls.setName, ["T3 Code Alpha"]);
221-
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Code (Alpha)");
220+
assert.deepEqual(calls.setName, ["T3 Code Beta"]);
221+
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Code (Beta)");
222222
assert.equal(calls.setAboutPanelOptions[0]?.applicationVersion, "1.2.3");
223223
assert.equal(calls.setAboutPanelOptions[0]?.version, "0123456789ab");
224224
// Packaged: the bundle's own icon stands, so a custom one the user
@@ -238,7 +238,7 @@ describe("DesktopAppIdentity", () => {
238238
});
239239

240240
it.effect.each([
241-
{ stage: "Alpha", environment: {} },
241+
{ stage: "Beta", environment: {} },
242242
{
243243
stage: "Nightly",
244244
environment: { appVersion: "0.0.43-nightly.20260929.2428" },

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function resolveDesktopAppStageLabel(input: {
103103
return "Dev";
104104
}
105105

106-
return isNightlyDesktopVersion(input.appVersion) ? "Nightly" : "Alpha";
106+
return isNightlyDesktopVersion(input.appVersion) ? "Nightly" : "Beta";
107107
}
108108

109109
export function resolveDesktopAppBranding(input: {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ describe("DesktopPreReadyPlatform", () => {
175175
const identity = yield* Effect.promise(() => portalIdentity);
176176
assert.equal(identity.desktopName, "com.t3tools.T3Code.desktop");
177177
assert.include(identity.desktopEntry ?? "", 'Exec="/Applications/current.AppImage" %U');
178-
assert.include(identity.desktopEntry ?? "", "Name=T3 Code (Alpha)");
178+
assert.include(identity.desktopEntry ?? "", "Name=T3 Code (Beta)");
179179
assert.include(identity.desktopEntry ?? "", "MimeType=x-scheme-handler/t3code;");
180180
assert.include(
181181
identity.desktopEntry ?? "",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { T3_CODE_BRAND_MARK_SOURCE } from "./brandAssets";
77

88
const appVariant = Constants.expoConfig?.extra?.appVariant;
99
const DEFAULT_STAGE_LABEL =
10-
appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Alpha";
10+
appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Beta";
1111

1212
export function BrandMark(props: { readonly compact?: boolean; readonly stageLabel?: string }) {
1313
const compact = props.compact ?? false;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export type MobileStageLabel = "Alpha" | "Dev" | "Nightly";
1+
export type MobileStageLabel = "Beta" | "Dev" | "Nightly";
22

33
export function resolveMobileStageLabel(appVariant: unknown): MobileStageLabel {
44
if (appVariant === "development") return "Dev";
55
if (appVariant === "preview") return "Nightly";
6-
return "Alpha";
6+
return "Beta";
77
}

‎apps/server/src/assets/AssetAccess.test.ts‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,34 @@ describe("AssetAccess", () => {
10291029
}).pipe(Effect.provide(layerTest)),
10301030
);
10311031

1032+
it.effect("signs the same HTML page URL within an expiry window", () =>
1033+
Effect.gen(function* () {
1034+
const config = yield* ServerConfig.ServerConfig;
1035+
const fileSystem = yield* FileSystem.FileSystem;
1036+
const path = yield* Path.Path;
1037+
const attachmentId = "thread-1-00000000-0000-4000-8000-000000000001-html";
1038+
yield* fileSystem.makeDirectory(config.attachmentsDir, { recursive: true });
1039+
yield* fileSystem.writeFileString(
1040+
path.join(config.attachmentsDir, `${attachmentId}.html`),
1041+
"<p>render</p>",
1042+
);
1043+
const bucketMs = 30 * 60 * 1000;
1044+
const issue = issueAssetUrl({
1045+
resource: { _tag: "attachment", attachmentId, disposition: "inline" },
1046+
});
1047+
yield* TestClock.setTime(bucketMs + 1);
1048+
const first = yield* issue;
1049+
yield* TestClock.adjust("20 minutes");
1050+
const second = yield* issue;
1051+
yield* TestClock.adjust("10 minutes");
1052+
const next = yield* issue;
1053+
1054+
expect(second.relativeUrl).toBe(first.relativeUrl);
1055+
expect(first.expiresAt).toBe(4 * bucketMs);
1056+
expect(next.expiresAt).toBe(5 * bucketMs);
1057+
}).pipe(Effect.provide(layerTest)),
1058+
);
1059+
10321060
it.effect("serves video attachments inline", () =>
10331061
Effect.gen(function* () {
10341062
const config = yield* ServerConfig.ServerConfig;

‎apps/server/src/assets/AssetAccess.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const ASSET_ROUTE_PREFIX = "/api/assets";
7171
const SIGNING_SECRET_NAME = "asset-access-signing-key";
7272
const ASSET_TOKEN_TTL_MS = 60 * 60 * 1000;
7373
const PROJECT_FAVICON_TOKEN_BUCKET_MS = 30 * 60 * 1000;
74+
const HTML_ATTACHMENT_TOKEN_BUCKET_MS = 30 * 60 * 1000;
7475
const PROJECT_FAVICON_VERSION_PREFIX = "v";
7576
// Clients draw project icons from a 96px thumbnail at most.
7677
const PROJECT_FAVICON_ICNS_MIN_SIZE = 96;
@@ -825,6 +826,14 @@ export const issueAssetUrl = Effect.fn("AssetAccess.issueAssetUrl")(function* (i
825826
PROJECT_FAVICON_TOKEN_BUCKET_MS;
826827
claims = { ...claims, expiresAt };
827828
}
829+
if (claims.kind === "attachment" && claims.mimeType === "text/html") {
830+
// HTML pages never change, so mints in the same window sign the same URL and a reload
831+
// can answer it from the browser cache. Images keep a new URL per mint, since their
832+
// load-error retries rely on one.
833+
expiresAt =
834+
Math.ceil(expiresAt / HTML_ATTACHMENT_TOKEN_BUCKET_MS) * HTML_ATTACHMENT_TOKEN_BUCKET_MS;
835+
claims = { ...claims, expiresAt };
836+
}
828837
const encodedPayload = base64UrlEncode(encodeAssetClaims(claims));
829838
const token = `${encodedPayload}.${signPayload(encodedPayload, signingSecret)}`;
830839
return {

‎apps/server/src/htmlRender/HtmlRender.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,16 @@ describe("HtmlRender", () => {
391391
// Like a D3 chart, the page sizes itself from the width once, at load.
392392
const reference = yield* htmlRender.publish({
393393
threadId: ThreadId.make("thread-html-measure"),
394-
html: '<div id="chart"></div><script>document.getElementById("chart").style.height = innerWidth / 2 + "px";</script>',
394+
html: '<div id="chart" style="background:#888"></div><script>document.getElementById("chart").style.height = innerWidth / 2 + "px";</script>',
395395
title: "Chart",
396396
height: 600,
397397
});
398398

399399
expect(reference.heights).toEqual(
400400
HTML_RENDER_MEASURE_WIDTHS.map((width) => [width, Math.ceil(width / 2)]),
401401
);
402+
// The chart as the column-width load laid it out, in 4px units.
403+
expect(reference.outline).toBe("m0,0,182,91,1");
402404
}).pipe(Effect.provide(layerHtmlRender(executable)));
403405
}),
404406
30_000,

0 commit comments

Comments
 (0)