Compare commits

...
Author SHA1 Message Date
Julius Marmingeandcodex f315a4297f test(server): cover silent Claude task updates
Co-authored-by: codex <[email protected]>
2026-07-17 21:30:57 +02:00
Julius Marminge bd60ed0a9c Merge branch 'main' into t3code/claude-binding-error 2026-07-17 21:21:11 +02:00
Olivier Melcher a7f6d97b94 Allow preview panel to grow on wide displays (#4044) 2026-07-17 18:40:24 +00:00
Kriday DaveandJulius Marminge f9a4f59930 Fix documented task-runner commands (bun run -> vp) (#3965)
Co-authored-by: Julius Marminge <[email protected]>
2026-07-17 20:35:24 +02:00
BunnyGamezsc 7f1cb61031 fix(cursor): default binary path to cursor-agent (avoid path conflict w/ grok) (#4094) 2026-07-17 18:01:02 +00:00
Kriday Dave c49d424e3a Normalize protocol-relative remote host input as https (#3971) 2026-07-17 18:59:42 +02:00
Manuel De Ceglie 4804a9824f fix(marketing): correct Cursor icon color (#4090) 2026-07-17 18:56:59 +02:00
Manuel De Ceglie 0748134cec Update marketing GitHub star count (#4088) 2026-07-17 18:56:35 +02:00
Julius Marmingeandcodex 6e9987cf17 Refresh app icons across release variants (#4080)
Co-authored-by: codex <[email protected]>
2026-07-17 18:51:14 +02:00
Eric Tsai 8b5469863a fix(server): stabilize non-repository Git diagnostics (#4077) 2026-07-17 11:15:31 +00:00
Eric Tsai 58302b2010 fix(git): treat selected commit paths literally (#3998) 2026-07-17 11:14:29 +00:00
Hugo Vizcaino SantanaandClaude Opus 4.8 1f2797325b feat: show nightly update changelog tooltip (#3832)
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-17 13:10:51 +02:00
Ishan c14a5ca492 Fix dropped events during initial thread snapshot (#4079) 2026-07-17 11:58:09 +02:00
Dimitar StoykovandClaude Opus 4.8 eb733c10f2 fix(server): use CLAUDE_CONFIG_DIR instead of HOME for Claude instanc… (#4017)
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-17 11:46:55 +02:00
Julius Marmingeandcodex 8a02c71861 [codex] Expand real-route app store screenshot harness (#4014)
Co-authored-by: codex <[email protected]>
2026-07-17 11:33:40 +02:00
Theo BrowneandClaude Fable 5 e62609ba3c fix(server): stop surfacing Claude 'task_updated' messages as work-log errors
The Claude Agent SDK emits system/task_updated as a task-state sync
patch (per its typings, clients merge it into their local task map).
The adapter's system-message switch had no case for it, so it fell
into the unknown-message default and showed up in the work log as a
red-X 'Claude system message' row on every background task status
change. Terminal statuses already arrive via task_notification, so
absorb the message silently; the raw payload remains in the provider
log file.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-06 03:22:32 -07:00
139 changed files with 5766 additions and 209 deletions

No files matched your search

@@ -0,0 +1,134 @@
name: Mobile Showcase Screenshots
on:
workflow_dispatch:
inputs:
platform:
description: Device platforms to capture
required: true
default: all
type: choice
options:
- all
- ios
- android
appearance:
description: System appearances to capture
required: true
default: both
type: choice
options:
- both
- dark
- light
permissions:
contents: read
env:
NODE_OPTIONS: --max-old-space-size=8192
jobs:
ios:
name: iPhone 6.9, iPhone 6.5, and iPad 13
if: inputs.platform == 'all' || inputs.platform == 'ios'
runs-on: blacksmith-12vcpu-macos-26
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true
- name: Expose pnpm
run: |
pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")"
vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin"
echo "$vp_pnpm_bin" >> "$GITHUB_PATH"
"$vp_pnpm_bin/pnpm" --version
- name: Capture iOS showcase
run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}"
- name: Validate App Store Connect assets
run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --validate-only
- name: Upload iOS screenshots
if: always()
uses: actions/upload-artifact@v7
with:
name: app-store-connect-screenshots
path: artifacts/app-store/screenshots/apple/
if-no-files-found: warn
retention-days: 14
android:
name: Android phone, 7-inch tablet, and 10-inch tablet
if: inputs.platform == 'all' || inputs.platform == 'android'
runs-on: blacksmith-16vcpu-ubuntu-2404
timeout-minutes: 60
env:
T3_SHOWCASE_ANDROID_ABI: x86_64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true
- name: Expose pnpm
run: |
pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")"
vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin"
echo "$vp_pnpm_bin" >> "$GITHUB_PATH"
"$vp_pnpm_bin/pnpm" --version
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Setup Gradle cache
uses: gradle/actions/setup-gradle@v5
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Capture Android showcase
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 36
target: google_apis
arch: x86_64
profile: pixel_7_pro
avd-name: Pixel_10_Pro
cores: 8
ram-size: 4096M
disable-animations: false
script: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}"
- name: Validate Google Play assets
run: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" --validate-only
- name: Upload Android screenshots
if: always()
uses: actions/upload-artifact@v7
with:
name: google-play-screenshots
path: artifacts/app-store/screenshots/google-play/
if-no-files-found: warn
retention-days: 14
+3
View File
@@ -27,6 +27,9 @@ squashfs-root/
.gstack/
dist-electron/
.electron-runtime/
.showcase/
apps/mobile/.showcase/
artifacts/app-store/screenshots/
node_modules/
.alchemy/
*.log
@@ -10,6 +10,7 @@ const { autoUpdaterMock } = vi.hoisted(() => ({
autoInstallOnAppQuit: true,
channel: "latest",
disableDifferentialDownload: false,
fullChangelog: false,
checkForUpdates: vi.fn(() => Promise.resolve(null)),
downloadUpdate: vi.fn(() => Promise.resolve([])),
on: vi.fn(),
@@ -33,6 +34,7 @@ describe("ElectronUpdater", () => {
autoUpdaterMock.autoInstallOnAppQuit = true;
autoUpdaterMock.channel = "latest";
autoUpdaterMock.disableDifferentialDownload = false;
autoUpdaterMock.fullChangelog = false;
autoUpdaterMock.checkForUpdates.mockClear();
autoUpdaterMock.checkForUpdates.mockImplementation(() => Promise.resolve(null));
autoUpdaterMock.downloadUpdate.mockClear();
@@ -98,6 +100,18 @@ describe("ElectronUpdater", () => {
}).pipe(Effect.provide(ElectronUpdater.layer)),
);
it.effect("sets full changelog mode", () =>
Effect.gen(function* () {
const updater = yield* ElectronUpdater.ElectronUpdater;
yield* updater.setFullChangelog(true);
assert.equal(autoUpdaterMock.fullChangelog, true);
yield* updater.setFullChangelog(false);
assert.equal(autoUpdaterMock.fullChangelog, false);
}).pipe(Effect.provide(ElectronUpdater.layer)),
);
it.effect("preserves quit-and-install flags and the execution-time channel", () =>
Effect.gen(function* () {
const cause = new Error("quit and install failed");
@@ -66,6 +66,7 @@ export class ElectronUpdater extends Context.Service<
readonly setAllowPrerelease: (value: boolean) => Effect.Effect<void>;
readonly allowDowngrade: Effect.Effect<boolean>;
readonly setAllowDowngrade: (value: boolean) => Effect.Effect<void>;
readonly setFullChangelog: (value: boolean) => Effect.Effect<void>;
readonly setDisableDifferentialDownload: (value: boolean) => Effect.Effect<void>;
readonly checkForUpdates: Effect.Effect<void, ElectronUpdaterCheckForUpdatesError>;
readonly downloadUpdate: Effect.Effect<void, ElectronUpdaterDownloadUpdateError>;
@@ -112,6 +113,11 @@ export const make = ElectronUpdater.of({
autoUpdater.allowDowngrade = value;
return Effect.void;
}),
setFullChangelog: (value) =>
Effect.suspend(() => {
autoUpdater.fullChangelog = value;
return Effect.void;
}),
setDisableDifferentialDownload: (value) =>
Effect.suspend(() => {
autoUpdater.disableDifferentialDownload = value;
@@ -38,6 +38,7 @@ const flushCallbacks = Effect.yieldNow;
function makeHarness(options: UpdatesHarnessOptions = {}) {
let checkCount = 0;
let allowDowngrade = false;
let fullChangelog = false;
const feedUrls: ElectronUpdater.ElectronUpdaterFeedUrl[] = [];
const listeners = new Map<string, Set<(...args: readonly unknown[]) => void>>();
const sentStates: DesktopUpdateState[] = [];
@@ -73,6 +74,10 @@ function makeHarness(options: UpdatesHarnessOptions = {}) {
Effect.sync(() => {
allowDowngrade = value;
}),
setFullChangelog: (value) =>
Effect.sync(() => {
fullChangelog = value;
}),
setDisableDifferentialDownload: () => options.setDisableDifferentialDownload ?? Effect.void,
checkForUpdates: Effect.sync(() => {
checkCount += 1;
@@ -186,6 +191,7 @@ function makeHarness(options: UpdatesHarnessOptions = {}) {
layer,
checkCount: () => checkCount,
feedUrls: () => feedUrls,
fullChangelog: () => fullChangelog,
listenerCount: () =>
Array.from(listeners.values()).reduce(
(total, eventListeners) => total + eventListeners.size,
@@ -287,6 +293,49 @@ describe("DesktopUpdates", () => {
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
it.effect("enables nightly full changelog release notes and broadcasts summaries", () => {
const harness = makeHarness();
return Effect.scoped(
Effect.gen(function* () {
const updates = yield* DesktopUpdates.DesktopUpdates;
yield* updates.configure;
yield* updates.setChannel("nightly");
assert.equal(harness.fullChangelog(), true);
harness.emit("update-available", {
version: "1.2.4-nightly.20260709.766",
releaseNotes: [
{
version: "1.2.4-nightly.20260709.766",
note: `<h2>What's Changed</h2><ul><li>feat(client): persist offline environment data by <a>@juliusmarminge</a> in <a>#3795</a></li></ul><h2>Full Changelog</h2>`,
},
{
version: "1.2.4-nightly.20260709.765",
note: "- [codex] Upgrade Clerk stack by @juliusmarminge in #3821",
},
],
});
yield* flushCallbacks;
const state = yield* updates.getState;
assert.equal(state.status, "available");
assert.deepEqual(state.releaseNotes, [
{
version: "1.2.4-nightly.20260709.766",
items: ["feat(client): persist offline environment data by @juliusmarminge in #3795"],
},
{
version: "1.2.4-nightly.20260709.765",
items: ["[codex] Upgrade Clerk stack by @juliusmarminge in #3821"],
},
]);
assert.deepEqual(harness.sentStates.at(-1)?.releaseNotes, state.releaseNotes);
}),
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
it.effect("keeps raw updater event failures out of update state", () => {
const harness = makeHarness();
const cause = new Error(
+13 -2
View File
@@ -27,6 +27,7 @@ import * as ElectronUpdater from "../electron/ElectronUpdater.ts";
import * as ElectronWindow from "../electron/ElectronWindow.ts";
import * as IpcChannels from "../ipc/channels.ts";
import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts";
import { normalizeDesktopUpdateReleaseNotes } from "./releaseNotes.ts";
import { resolveDefaultDesktopUpdateChannel } from "./updateChannels.ts";
import {
createInitialDesktopUpdateState,
@@ -49,6 +50,10 @@ type AppUpdateYmlConfig = typeof AppUpdateYmlConfig.Type;
const UpdateInfo = Schema.Struct({
version: Schema.String,
// Left unvalidated on purpose: a malformed release-notes payload must never
// fail the decode and block the update state transition. The shape is
// validated defensively in normalizeDesktopUpdateReleaseNotes.
releaseNotes: Schema.optional(Schema.Unknown),
});
const DownloadProgressInfo = Schema.Struct({
@@ -330,10 +335,12 @@ export const make = Effect.gen(function* () {
yield* electronUpdater.setChannel(channel);
yield* electronUpdater.setAllowPrerelease(allowsPrerelease);
yield* electronUpdater.setAllowDowngrade(allowsPrerelease);
yield* electronUpdater.setFullChangelog(allowsPrerelease);
yield* logUpdaterInfo("using update channel", {
channel,
allowPrerelease: allowsPrerelease,
allowDowngrade: allowsPrerelease,
fullChangelog: allowsPrerelease,
});
});
@@ -567,11 +574,15 @@ export const make = Effect.gen(function* () {
}
const checkedAt = yield* currentIsoTimestamp;
const releaseNotes = normalizeDesktopUpdateReleaseNotes(info.releaseNotes, info.version);
yield* setState(
reduceDesktopUpdateStateOnUpdateAvailable(state, info.version, checkedAt),
reduceDesktopUpdateStateOnUpdateAvailable(state, info.version, checkedAt, releaseNotes),
);
yield* Ref.set(lastLoggedDownloadMilestoneRef, -1);
yield* logUpdaterInfo("update available", { version: info.version });
yield* logUpdaterInfo("update available", {
version: info.version,
releaseNoteGroups: releaseNotes.length,
});
}),
),
Effect.catchCause((cause) => {
@@ -0,0 +1,67 @@
import { describe, expect, it } from "vite-plus/test";
import { normalizeDesktopUpdateReleaseNotes } from "./releaseNotes.ts";
describe("normalizeDesktopUpdateReleaseNotes", () => {
it("splits a plain string note into items under the fallback version", () => {
const notes = normalizeDesktopUpdateReleaseNotes(
"## What's changed\n- First fix\n- Second fix",
"1.2.3",
);
expect(notes).toEqual([{ version: "1.2.3", items: ["First fix", "Second fix"] }]);
});
it("keeps per-version groups and drops empty ones", () => {
const notes = normalizeDesktopUpdateReleaseNotes(
[
{ version: "1.2.3", note: "- Newer change" },
{ version: "1.2.2", note: "Full changelog: https://example.com/compare/x...y" },
{ version: "1.2.1", note: "- Older change" },
],
"1.2.3",
);
expect(notes).toEqual([
{ version: "1.2.3", items: ["Newer change"] },
{ version: "1.2.1", items: ["Older change"] },
]);
});
it("decodes valid HTML entities", () => {
const notes = normalizeDesktopUpdateReleaseNotes("- Fix &amp; polish &#128512;", "1.0.0");
expect(notes).toEqual([{ version: "1.0.0", items: ["Fix & polish 😀"] }]);
});
it("ignores malformed entries instead of throwing", () => {
const notes = normalizeDesktopUpdateReleaseNotes(
[
{ version: "1.2.3", note: "- Valid change" },
{ version: 42, note: "- Bad version type" },
{ version: "1.2.1", note: { html: "<p>object note</p>" } },
"not an object",
null,
],
"1.2.3",
);
expect(notes).toEqual([{ version: "1.2.3", items: ["Valid change"] }]);
});
it("returns non-empty groups even when preceded by many boilerplate-only groups", () => {
const boilerplate = Array.from({ length: 7 }, (_, index) => ({
version: `1.3.${9 - index}`,
note: "Full changelog: https://example.com/compare/x...y",
}));
const notes = normalizeDesktopUpdateReleaseNotes(
[...boilerplate, { version: "1.3.2", note: "- Older but real change" }],
"1.3.9",
);
expect(notes).toEqual([{ version: "1.3.2", items: ["Older but real change"] }]);
});
it("does not throw on out-of-range numeric entities and keeps the literal", () => {
expect(() =>
normalizeDesktopUpdateReleaseNotes("- Broken entity &#9999999999;", "1.0.0"),
).not.toThrow();
const notes = normalizeDesktopUpdateReleaseNotes("- Broken entity &#9999999999;", "1.0.0");
expect(notes).toEqual([{ version: "1.0.0", items: ["Broken entity &#9999999999;"] }]);
});
});
+125
View File
@@ -0,0 +1,125 @@
import type { DesktopUpdateReleaseNote } from "@t3tools/contracts";
interface ElectronReleaseNoteInfo {
readonly version: string;
readonly note: string | null | undefined;
}
function isElectronReleaseNoteInfo(value: unknown): value is ElectronReleaseNoteInfo {
if (typeof value !== "object" || value === null) return false;
const candidate = value as { readonly version?: unknown; readonly note?: unknown };
return (
typeof candidate.version === "string" &&
(typeof candidate.note === "string" || candidate.note === null || candidate.note === undefined)
);
}
const MAX_RELEASE_NOTE_GROUPS = 6;
const MAX_RELEASE_NOTE_ITEMS_PER_GROUP = 8;
const MAX_RELEASE_NOTE_ITEM_LENGTH = 220;
const HTML_ENTITY_REPLACEMENTS: Readonly<Record<string, string>> = {
amp: "&",
apos: "'",
gt: ">",
lt: "<",
nbsp: " ",
quot: '"',
};
function decodeCodePoint(codePoint: number, entity: string): string {
// String.fromCodePoint throws RangeError outside the valid Unicode range, and
// Number.isFinite alone lets oversized values (e.g. &#9999999999;) through.
if (!Number.isInteger(codePoint) || codePoint < 0 || codePoint > 0x10ffff) {
return `&${entity};`;
}
return String.fromCodePoint(codePoint);
}
function decodeHtmlEntity(entity: string): string {
const named = HTML_ENTITY_REPLACEMENTS[entity];
if (named) return named;
if (entity.startsWith("#x")) {
return decodeCodePoint(Number.parseInt(entity.slice(2), 16), entity);
}
if (entity.startsWith("#")) {
return decodeCodePoint(Number.parseInt(entity.slice(1), 10), entity);
}
return `&${entity};`;
}
function decodeHtmlEntities(input: string): string {
return input.replace(/&([a-zA-Z]+|#\d+|#x[0-9a-fA-F]+);/g, (_, entity: string) =>
decodeHtmlEntity(entity),
);
}
function stripMarkup(input: string): string {
return decodeHtmlEntities(
input
.replace(/<br\s*\/?>/gi, "\n")
.replace(/<li\b[^>]*>/gi, "\n- ")
.replace(/<\/(?:p|div|li|h[1-6]|ul|ol|blockquote)>/gi, "\n")
.replace(/<[^>]*>/g, "")
.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1")
.replace(/\*\*([^*]+)\*\*/g, "$1"),
);
}
function truncateReleaseNoteItem(item: string): string {
if (item.length <= MAX_RELEASE_NOTE_ITEM_LENGTH) return item;
return `${item.slice(0, MAX_RELEASE_NOTE_ITEM_LENGTH - 3).trimEnd()}...`;
}
function isIgnoredReleaseNoteLine(line: string): boolean {
const normalized = line
.toLowerCase()
.replace(/[*_`#]/g, "")
.trim();
return (
normalized === "" ||
normalized === "what's changed" ||
normalized === "whats changed" ||
normalized === "full changelog" ||
normalized === "new contributors" ||
normalized.startsWith("compare: ") ||
normalized.includes("/compare/")
);
}
function extractReleaseNoteItems(note: string | null | undefined): ReadonlyArray<string> {
if (!note) return [];
const items: string[] = [];
for (const rawLine of stripMarkup(note).split("\n")) {
const item = rawLine
.trim()
.replace(/^[-*]\s+/, "")
.replace(/^\d+[.)]\s+/, "")
.replace(/\s+/g, " ");
if (isIgnoredReleaseNoteLine(item)) continue;
items.push(truncateReleaseNoteItem(item));
if (items.length >= MAX_RELEASE_NOTE_ITEMS_PER_GROUP) break;
}
return items;
}
export function normalizeDesktopUpdateReleaseNotes(
releaseNotes: unknown,
fallbackVersion: string,
): ReadonlyArray<DesktopUpdateReleaseNote> {
const rawNotes =
typeof releaseNotes === "string"
? [{ version: fallbackVersion, note: releaseNotes }]
: Array.isArray(releaseNotes)
? releaseNotes.filter(isElectronReleaseNoteInfo)
: [];
return rawNotes
.map((entry) => ({
version: entry.version,
items: extractReleaseNoteItems(entry.note),
}))
.filter((entry) => entry.items.length > 0)
.slice(0, MAX_RELEASE_NOTE_GROUPS);
}
@@ -118,6 +118,12 @@ describe("updateMachine", () => {
});
it("tracks available, download start, and progress cleanly", () => {
const releaseNotes = [
{
version: "1.1.0",
items: ["feat: add update release notes"],
},
];
const available = reduceDesktopUpdateStateOnUpdateAvailable(
{
...createInitialDesktopUpdateState("1.0.0", runtimeInfo, "latest"),
@@ -126,15 +132,33 @@ describe("updateMachine", () => {
},
"1.1.0",
"2026-03-04T00:00:00.000Z",
releaseNotes,
);
const downloading = reduceDesktopUpdateStateOnDownloadStart(available);
const progress = reduceDesktopUpdateStateOnDownloadProgress(downloading, 55.5);
expect(available.status).toBe("available");
expect(available.channel).toBe("latest");
expect(available.releaseNotes).toBe(releaseNotes);
expect(downloading.releaseNotes).toBe(releaseNotes);
expect(downloading.status).toBe("downloading");
expect(downloading.downloadPercent).toBe(0);
expect(progress.downloadPercent).toBe(55.5);
expect(progress.errorContext).toBeNull();
});
it("clears release notes when checking again", () => {
const state = reduceDesktopUpdateStateOnCheckStart(
{
...createInitialDesktopUpdateState("1.0.0", runtimeInfo, "nightly"),
enabled: true,
status: "available",
availableVersion: "1.1.0-nightly.1",
releaseNotes: [{ version: "1.1.0-nightly.1", items: ["feat: old note"] }],
},
"2026-03-04T00:00:00.000Z",
);
expect(state.releaseNotes).toEqual([]);
});
});
@@ -1,6 +1,7 @@
import type {
DesktopRuntimeInfo,
DesktopUpdateChannel,
DesktopUpdateReleaseNote,
DesktopUpdateState,
} from "@t3tools/contracts";
@@ -29,6 +30,7 @@ export function createInitialDesktopUpdateState(
runningUnderArm64Translation: runtimeInfo.runningUnderArm64Translation,
availableVersion: null,
downloadedVersion: null,
releaseNotes: [],
downloadPercent: null,
checkedAt: null,
message: null,
@@ -45,6 +47,7 @@ export function reduceDesktopUpdateStateOnCheckStart(
...state,
status: "checking",
checkedAt,
releaseNotes: [],
message: null,
downloadPercent: null,
errorContext: null,
@@ -72,12 +75,14 @@ export function reduceDesktopUpdateStateOnUpdateAvailable(
state: DesktopUpdateState,
version: string,
checkedAt: string,
releaseNotes: ReadonlyArray<DesktopUpdateReleaseNote> = [],
): DesktopUpdateState {
return {
...state,
status: "available",
availableVersion: version,
downloadedVersion: null,
releaseNotes,
downloadPercent: null,
checkedAt,
message: null,
@@ -95,6 +100,7 @@ export function reduceDesktopUpdateStateOnNoUpdate(
status: "up-to-date",
availableVersion: null,
downloadedVersion: null,
releaseNotes: [],
downloadPercent: null,
checkedAt,
message: null,
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="cursor_light__Ebene_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 466.73 532.09"><defs></defs><path class="cursor_light__st0" d="M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z"></path></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="cursor_light__Ebene_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 466.73 532.09"><defs></defs><path class="cursor_light__st0" fill="#EDECEC" d="M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z"></path></svg>

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 665 B

+1 -1
View File
@@ -1,6 +1,6 @@
export const GITHUB_REPOSITORY_URL = "https://github.com/pingdotgg/t3code";
export const MARKETING_STATS = {
githubStars: "12k+",
githubStars: "14k+",
users: "100,000",
} as const;
+22 -8
View File
@@ -1,5 +1,6 @@
import type { ExpoConfig } from "expo/config";
import { BRAND_ASSET_PATHS } from "../../scripts/lib/brand-assets.ts";
import { loadRepoEnv } from "../../scripts/lib/public-config.ts";
type AppVariant = "development" | "preview" | "production";
@@ -13,6 +14,8 @@ const isIosPersonalTeamBuild = repoEnv.T3CODE_IOS_PERSONAL_TEAM === "1";
const personalTeamBundleIdentifier = repoEnv.T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID?.trim();
const IOS_BUNDLE_IDENTIFIER_PATTERN = /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/;
const fromRepoRoot = (relativePath: string) => `../../${relativePath}`;
if (
isIosPersonalTeamBuild &&
(!personalTeamBundleIdentifier ||
@@ -24,20 +27,31 @@ if (
}
const DEVELOPMENT_ASSETS = {
appIcon: "./assets/splash-icon-dev.png",
iosIcon: "./assets/icon-composer-dev.icon",
splashIcon: "./assets/splash-icon-dev.png",
androidAdaptiveForeground: "./assets/android-icon-dev-foreground.png",
appIcon: fromRepoRoot(BRAND_ASSET_PATHS.developmentIosIconPng),
iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.developmentIconComposerProject),
splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.developmentIosIconPng),
androidAdaptiveForeground: fromRepoRoot(BRAND_ASSET_PATHS.developmentUniversalIconPng),
androidAdaptiveBackgroundColor: "#00639B",
androidMonochromeIcon: "./assets/android-icon-mark.png",
androidNotificationIcon: "./assets/android-notification-icon.png",
androidNotificationColor: "#00639B",
} as const;
const PREVIEW_ASSETS = {
appIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIosIconPng),
iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIconComposerProject),
splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIosIconPng),
androidAdaptiveForeground: fromRepoRoot(BRAND_ASSET_PATHS.nightlyLinuxIconPng),
androidAdaptiveBackgroundColor: "#111533",
androidMonochromeIcon: "./assets/android-icon-mark.png",
androidNotificationIcon: "./assets/android-notification-icon.png",
androidNotificationColor: "#7565C7",
} as const;
const RELEASE_ASSETS = {
appIcon: "./assets/splash-icon-prod.png",
iosIcon: "./assets/icon-composer-prod.icon",
splashIcon: "./assets/splash-icon-prod.png",
appIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIosIconPng),
iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIconComposerProject),
splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIosIconPng),
androidAdaptiveForeground: "./assets/android-icon-mark.png",
androidAdaptiveBackgroundColor: "#000000",
androidMonochromeIcon: "./assets/android-icon-mark.png",
@@ -60,7 +74,7 @@ const VARIANT_CONFIG = {
iosBundleIdentifier: "com.t3tools.t3code.preview",
androidPackage: "com.t3tools.t3code.preview",
relyingParty: "clerk.t3.codes",
assets: RELEASE_ASSETS,
assets: PREVIEW_ASSETS,
},
production: {
appName: "T3 Code",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

@@ -1,3 +0,0 @@
<svg width="77" height="47" viewBox="0 0 77 47" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.56 45.5V8.58H1.69082e-06V-3.09944e-06H39.65V8.58H25.09V45.5H14.56ZM57.8454 46.28C54.6821 46.28 51.5404 45.8683 48.4204 45.045C45.3004 44.1783 42.6571 42.965 40.4904 41.405L44.5854 33.345C46.3188 34.6017 48.3338 35.5983 50.6304 36.335C52.9271 37.0717 55.2454 37.44 57.5854 37.44C60.2288 37.44 62.3088 36.92 63.8254 35.88C65.3421 34.84 66.1004 33.41 66.1004 31.59C66.1004 29.8567 65.4288 28.4917 64.0854 27.495C62.7421 26.4983 60.5754 26 57.5854 26H52.7754V19.045L65.4504 4.68L66.6204 8.45H42.7654V-3.09944e-06H74.6154V6.825L62.0054 21.19L56.6754 18.135H59.7304C65.3204 18.135 69.5454 19.3917 72.4054 21.905C75.2654 24.4183 76.6954 27.6467 76.6954 31.59C76.6954 34.1467 76.0238 36.5517 74.6804 38.805C73.3371 41.015 71.2788 42.8133 68.5054 44.2C65.7321 45.5867 62.1788 46.28 57.8454 46.28Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

+5
View File
@@ -1,5 +1,6 @@
import { registerRootComponent } from "expo";
import "react-native-gesture-handler";
import { LogBox } from "react-native";
import { featureFlags } from "react-native-screens";
import App from "./src/App";
@@ -8,4 +9,8 @@ import App from "./src/App";
// native stack is rendered inside a non-fitToContents formSheet.
featureFlags.experiment.synchronousScreenUpdatesEnabled = true;
if (process.env.EXPO_PUBLIC_SHOWCASE === "1") {
LogBox.ignoreAllLogs();
}
registerRootComponent(App);
@@ -7,6 +7,32 @@ class T3NativeControlsModule : Module() {
override fun definition() = ModuleDefinition {
Name("T3NativeControls")
Function("getShowcasePairingUrl") {
appContext.currentActivity?.intent?.getStringExtra("showcasePairingUrl")
}
Function("getShowcaseScene") {
val storedScene = appContext.reactContext
?.filesDir
?.resolve("t3-showcase-scene")
?.takeIf { it.isFile }
?.readText()
?.trim()
?.takeIf { it.isNotEmpty() }
storedScene ?: appContext.currentActivity?.intent?.getStringExtra("showcaseScene")
}
Function("prepareShowcaseCapture") {
// Android app data is cleared by the host runner before launch.
}
Function("markShowcaseReady") { scene: String ->
appContext.reactContext
?.filesDir
?.resolve("t3-showcase-ready")
?.writeText(scene)
}
View(T3HeaderButtonView::class) {
Prop("label") { view: T3HeaderButtonView, label: String ->
view.setLabel(label)
@@ -1,9 +1,48 @@
import ExpoModulesCore
import Security
public final class T3NativeControlsModule: Module {
public func definition() -> ModuleDefinition {
Name("T3NativeControls")
Function("getShowcasePairingUrl") {
let arguments = ProcessInfo.processInfo.arguments
guard
let flagIndex = arguments.firstIndex(of: "--showcasePairingUrl"),
arguments.indices.contains(flagIndex + 1)
else {
return nil as String?
}
return arguments[flagIndex + 1]
}
Function("getShowcaseScene") { () -> String? in
let scenePath = NSHomeDirectory() + "/Library/Caches/T3ShowcaseScene"
if let storedScene = try? String(contentsOfFile: scenePath, encoding: .utf8)
.trimmingCharacters(in: .whitespacesAndNewlines), !storedScene.isEmpty {
return storedScene
}
let arguments = ProcessInfo.processInfo.arguments
guard
let flagIndex = arguments.firstIndex(of: "--showcaseScene"),
arguments.indices.contains(flagIndex + 1)
else {
return nil as String?
}
return arguments[flagIndex + 1]
}
Function("prepareShowcaseCapture") {
for itemClass in [kSecClassGenericPassword, kSecClassInternetPassword] {
SecItemDelete([kSecClass as String: itemClass] as CFDictionary)
}
}
Function("markShowcaseReady") { (scene: String) in
let readyPath = NSHomeDirectory() + "/Library/Caches/T3ShowcaseReadyScene"
try? scene.write(toFile: readyPath, atomically: true, encoding: .utf8)
}
View(T3HeaderButtonView.self) {
Prop("label") { (view: T3HeaderButtonView, label: String) in
view.setLabel(label)
@@ -30,6 +30,10 @@ class T3TerminalModule : Module() {
view.focusRequest = focusRequest
}
Prop("autoFocus") { view: T3TerminalView, autoFocus: Boolean ->
view.autoFocus = autoFocus
}
Prop("appearanceScheme") { view: T3TerminalView, appearanceScheme: String ->
view.appearanceScheme = appearanceScheme
}
@@ -76,6 +76,17 @@ class T3TerminalView(context: Context, appContext: AppContext) : ExpoView(contex
}
}
var autoFocus: Boolean = true
set(value) {
field = value
if (value) {
requestKeyboardFocus()
} else {
inputView.clearFocus()
hideKeyboard()
}
}
var backgroundColorHex: String = "#24292E"
set(value) {
field = value
@@ -368,6 +379,13 @@ class T3TerminalView(context: Context, appContext: AppContext) : ExpoView(contex
inputMethodManager?.showSoftInput(inputView, InputMethodManager.SHOW_IMPLICIT)
}
private fun hideKeyboard() {
val inputMethodManager = context.getSystemService(
Context.INPUT_METHOD_SERVICE
) as? InputMethodManager
inputMethodManager?.hideSoftInputFromWindow(windowToken, 0)
}
private fun applyTheme() {
setBackgroundColor(backgroundColorValue)
container.setBackgroundColor(backgroundColorValue)
@@ -27,6 +27,10 @@ public class T3TerminalModule: Module {
view.focusRequest = focusRequest
}
Prop("autoFocus") { (view: T3TerminalView, autoFocus: Bool) in
view.autoFocus = autoFocus
}
Prop("appearanceScheme") { (view: T3TerminalView, appearanceScheme: String) in
view.appearanceScheme = appearanceScheme
}
@@ -248,6 +248,17 @@ public final class T3TerminalView: ExpoView, UITextFieldDelegate {
}
}
var autoFocus = true {
didSet {
guard oldValue != autoFocus else { return }
if autoFocus {
requestKeyboardFocus()
} else {
inputField.resignFirstResponder()
}
}
}
var appearanceScheme: String = TerminalAppearanceScheme.dark.rawValue {
didSet {
guard oldValue != appearanceScheme else { return }
@@ -359,7 +370,7 @@ public final class T3TerminalView: ExpoView, UITextFieldDelegate {
public override func didMoveToWindow() {
super.didMoveToWindow()
guard window != nil else { return }
guard window != nil, autoFocus else { return }
DispatchQueue.main.async { [weak self] in
self?.requestKeyboardFocus()
}
+2
View File
@@ -11,6 +11,8 @@
"start:dev": "APP_VARIANT=development expo start",
"start:preview": "APP_VARIANT=preview expo start",
"start:prod": "APP_VARIANT=production expo start",
"showcase": "APP_VARIANT=development EXPO_PUBLIC_SHOWCASE=1 expo start --dev-client --scheme t3code-dev --clear",
"screenshots": "node ../../scripts/mobile-showcase.ts",
"android": "EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android",
"android:dev": "APP_VARIANT=development EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && REACT_NATIVE_PACKAGER_HOSTNAME=localhost expo run:android",
"android:preview": "APP_VARIANT=preview EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android",
+5
View File
@@ -11,6 +11,7 @@ import { createStaticNavigation, DarkTheme, DefaultTheme } from "@react-navigati
import { RegistryContext } from "@effect/atom-react";
import { ConfirmDialogHost } from "./components/ConfirmDialogHost";
import { CloudAuthProvider } from "./features/cloud/CloudAuthProvider";
import { prepareNativeShowcaseCapture } from "./features/showcase/nativeShowcaseScene";
import { IncomingShareProvider } from "./features/sharing/IncomingShareProvider";
import { AppearancePreferencesProvider } from "./features/settings/appearance/AppearancePreferencesProvider";
import { RootStack } from "./Stack";
@@ -21,6 +22,10 @@ import { useThemeColor } from "./lib/useThemeColor";
import "../global.css";
if (process.env.EXPO_PUBLIC_SHOWCASE === "1") {
prepareNativeShowcaseCapture();
}
const appLinking = {
prefixes: [Linking.createURL("/"), "t3code://", "t3code-dev://", "t3code-preview://"],
// The Expo dev client launches the app via
+2
View File
@@ -48,6 +48,7 @@ import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnv
import { SettingsLegalRouteScreen } from "./features/settings/SettingsLegalRouteScreen";
import { SettingsRouteScreen } from "./features/settings/SettingsRouteScreen";
import { SettingsWaitlistRouteScreen } from "./features/settings/SettingsWaitlistRouteScreen";
import { ShowcaseCaptureCoordinator } from "./features/showcase/ShowcaseCaptureCoordinator";
import {
SettingsLegalDocumentCloseHeaderButton,
SettingsLegalDocumentExternalHeaderButton,
@@ -313,6 +314,7 @@ function RootStackLayout(props: {
return (
<HardwareKeyboardCommandProvider pathname={pathname}>
<ShowcaseCaptureCoordinator pathname={pathname} />
<ClerkSettingsSheetDetentProvider initiallyExpanded={false}>
<AdaptiveWorkspaceLayout pathname={workspacePathname}>
{props.children}
+13 -3
View File
@@ -1,13 +1,23 @@
import { Image, View } from "react-native";
import Constants from "expo-constants";
import { Image } from "expo-image";
import { View } from "react-native";
import { AppText as Text } from "./AppText";
const BRAND_MARK_SOURCE = require("../../../../assets/dev/blueprint-ios-1024.png");
const appVariant = Constants.expoConfig?.extra?.appVariant;
const BRAND_MARK_SOURCE =
appVariant === "development"
? require("../../../../assets/dev/blueprint-ios-1024.png")
: appVariant === "preview"
? require("../../../../assets/nightly/nightly-ios-1024.png")
: require("../../../../assets/prod/black-ios-1024.png");
const DEFAULT_STAGE_LABEL =
appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Alpha";
export function BrandMark(props: { readonly compact?: boolean; readonly stageLabel?: string }) {
const compact = props.compact ?? false;
const iconSize = compact ? 32 : 44;
const stageLabel = props.stageLabel ?? "Alpha";
const stageLabel = props.stageLabel ?? DEFAULT_STAGE_LABEL;
return (
<View className="flex-row items-center gap-3">
@@ -33,6 +33,8 @@ import { type RelayEnvironmentView, useConnectionController } from "./useConnect
export function CloudEnvironmentRows(props: {
readonly connectedCloudEnvironments: ReadonlyArray<ConnectedEnvironmentSummary>;
readonly onReconnectEnvironment: (environmentId: EnvironmentId) => void;
readonly showcaseAvailableEnvironments?: ReadonlyArray<RelayEnvironmentView>;
readonly showcaseSignedIn?: boolean;
/**
* Hide the "T3 Connect" section title + refresh button for hosts that
* provide their own chrome (the onboarding sheet's native header and
@@ -43,7 +45,8 @@ export function CloudEnvironmentRows(props: {
const { isSignedIn } = useAuth({ treatPendingAsSignedOut: false });
const controller = useConnectionController();
const iconColor = useThemeColor("--color-icon");
const availableCloudEnvironments = controller.availableRelayEnvironments;
const availableCloudEnvironments =
props.showcaseAvailableEnvironments ?? controller.availableRelayEnvironments;
const [expandedErrorId, setExpandedErrorId] = useState<string | null>(null);
const hasCloudRows =
props.connectedCloudEnvironments.length > 0 || availableCloudEnvironments.length > 0;
@@ -64,7 +67,7 @@ export function CloudEnvironmentRows(props: {
const showHeader = props.showHeader ?? true;
if (!isSignedIn) return null;
if (!(props.showcaseSignedIn ?? isSignedIn)) return null;
return (
<View collapsable={false} className={cn("gap-3", showHeader && "mt-5")}>
@@ -96,5 +96,22 @@ describe("isPendingNativeViewRegistration", () => {
new Error("Unable to find the 'T3ReviewDiffView' view for this native tag"),
),
).toBe(false);
expect(
isPendingNativeViewRegistration(
new Error(
"Unable to find the class expo.modules.t3reviewdiff.T3ReviewDiffView view with tag 1150",
),
),
).toBe(true);
});
});
describe("isNativeReviewDiffDrawEvent", () => {
it("accepts only native events emitted after diff rows draw", async () => {
const { isNativeReviewDiffDrawEvent } = await import("./nativeReviewDiffSurface");
expect(isNativeReviewDiffDrawEvent({ message: "draw-metrics" })).toBe(true);
expect(isNativeReviewDiffDrawEvent({ message: "visible-range" })).toBe(true);
expect(isNativeReviewDiffDrawEvent({ message: "rows-decoded" })).toBe(false);
});
});
@@ -149,6 +149,10 @@ export interface NativeReviewDiffViewHandle {
readonly scrollToTop: (animated?: boolean) => Promise<void>;
}
export function isNativeReviewDiffDrawEvent(payload: Readonly<Record<string, unknown>>): boolean {
return payload.message === "draw-metrics" || payload.message === "visible-range";
}
interface NativeReviewDiffViewRef {
readonly setRowsJson: (rowsJson: string) => Promise<void>;
readonly setTokensJson: (tokensJson: string) => Promise<void>;
@@ -170,9 +174,11 @@ let nativeReviewDiffViewResolutionFailed = false;
type NativeReviewDiffPayloadMethod = "setRowsJson" | "setTokensJson" | "setTokensPatchJson";
export function isPendingNativeViewRegistration(error: unknown): boolean {
if (!(error instanceof Error)) return false;
return (
error instanceof Error &&
error.message.includes(`Unable to find the '${NATIVE_REVIEW_DIFF_MODULE_NAME}' view`)
error.message.includes(`Unable to find the '${NATIVE_REVIEW_DIFF_MODULE_NAME}' view`) ||
(error.message.includes("Unable to find the class") &&
error.message.includes("T3ReviewDiffView view with tag"))
);
}
@@ -167,7 +167,6 @@ export function HomeScreen(props: HomeScreenProps) {
const listRef = useRef<LegendListRef | null>(null);
const insets = useSafeAreaInsets();
const accentColor = useThemeColor("--color-icon-muted");
const effectiveGroupDisplayStates = useMemo(() => {
const next = new Map(groupDisplayStates);
if (!AsyncResult.isSuccess(preferencesResult)) {
@@ -56,6 +56,7 @@ import { WorkspaceSidebarToolbar } from "../layout/workspace-sidebar-toolbar";
import { ThreadGitMenu } from "../threads/ThreadGitControls";
import { useReviewCacheForThread } from "./reviewState";
import {
isNativeReviewDiffDrawEvent,
type NativeReviewDiffViewHandle,
resolveNativeReviewDiffView,
} from "../diffs/nativeReviewDiffSurface";
@@ -71,8 +72,10 @@ import { resolveReviewAvailability } from "./reviewAvailability";
import { resolveSelectedReviewFileId } from "./reviewPaneSelection";
import { buildReviewSectionMenu } from "./review-section-menu";
import type { ReviewSectionItem } from "./reviewModel";
import { markNativeShowcaseReady } from "../showcase/nativeShowcaseScene";
const REVIEW_HEADER_SPACING = 0;
const SHOWCASE_ENABLED = process.env.EXPO_PUBLIC_SHOWCASE === "1";
const ReviewNotice = memo(function ReviewNotice(props: { readonly notice: string }) {
return (
@@ -394,6 +397,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
});
const NativeReviewDiffView = resolveNativeReviewDiffView()!;
const nativeReviewDiffViewRef = useRef<NativeReviewDiffViewHandle>(null);
const showcasedReviewDrawRef = useRef<string | null>(null);
// Native pull-to-refresh on the diff surface (replaces the old Refresh menu item).
const [isPullRefreshing, setIsPullRefreshing] = useState(false);
const handlePullToRefresh = useCallback(async () => {
@@ -435,6 +439,25 @@ export function ReviewSheet(props: ReviewSheetProps) {
selectedRowIds: commentSelection.selectedRowIds,
canHighlight: parsedDiff.kind === "files",
});
const showcaseReviewKey =
SHOWCASE_ENABLED && parsedDiff.kind === "files" && selectedSection
? `${reviewCache.threadKey}:${selectedSection.id}:${nativeBridge.tokensResetKey}`
: null;
const handleNativeDebug = useCallback(
(event: NativeSyntheticEvent<Record<string, unknown>>) => {
nativeBridge.onDebug(event);
if (
showcaseReviewKey === null ||
showcasedReviewDrawRef.current === showcaseReviewKey ||
!isNativeReviewDiffDrawEvent(event.nativeEvent)
) {
return;
}
showcasedReviewDrawRef.current = showcaseReviewKey;
markNativeShowcaseReady("review");
},
[nativeBridge.onDebug, showcaseReviewKey],
);
const handleSelectFile = useCallback(
(fileId: string | null) => {
@@ -788,7 +811,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
tokensPatchJson={nativeBridge.tokensPatchJson}
tokensResetKey={nativeBridge.tokensResetKey}
viewedFileIdsJson={nativeBridge.viewedFileIdsJson}
onDebug={nativeBridge.onDebug}
onDebug={handleNativeDebug}
onPressLine={commentSelection.onPressLine}
onVisibleFileChange={handleVisibleFileChange}
onToggleComment={nativeBridge.onToggleComment}
@@ -2,7 +2,7 @@ import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/Stac
import { useNavigation } from "@react-navigation/native";
import { SymbolView } from "../../components/AppSymbol";
import type { EnvironmentId } from "@t3tools/contracts";
import { useCallback, useState } from "react";
import { useCallback, useEffect, useState } from "react";
import { Platform, ScrollView, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
@@ -15,6 +15,15 @@ import { splitEnvironmentSections } from "../connection/environmentSections";
import { cn } from "../../lib/cn";
import { useThemeColor } from "../../lib/useThemeColor";
import { useRemoteConnections } from "../../state/use-remote-environment-registry";
import {
applyShowcaseLocalEnvironmentDisplayUrls,
resolveShowcaseEnvironmentUpdateDisplayUrl,
SHOWCASE_AVAILABLE_CLOUD_ENVIRONMENTS,
SHOWCASE_CONNECTED_CLOUD_ENVIRONMENTS,
} from "../showcase/showcaseEnvironmentRows";
import { markNativeShowcaseReady } from "../showcase/nativeShowcaseScene";
const SHOWCASE_ENABLED = process.env.EXPO_PUBLIC_SHOWCASE === "1";
export function SettingsEnvironmentsRouteScreen() {
const {
@@ -25,18 +34,56 @@ export function SettingsEnvironmentsRouteScreen() {
} = useRemoteConnections();
const navigation = useNavigation();
const insets = useSafeAreaInsets();
const { localEnvironments, connectedCloudEnvironments } = splitEnvironmentSections({
const environmentSections = splitEnvironmentSections({
connectedEnvironments,
cloudEnvironments: null,
});
const localEnvironments = SHOWCASE_ENABLED
? applyShowcaseLocalEnvironmentDisplayUrls(environmentSections.localEnvironments)
: environmentSections.localEnvironments;
const connectedCloudEnvironments = SHOWCASE_ENABLED
? SHOWCASE_CONNECTED_CLOUD_ENVIRONMENTS
: environmentSections.connectedCloudEnvironments;
const hasLocalEnvironments = localEnvironments.length > 0;
const [expandedId, setExpandedId] = useState<EnvironmentId | null>(null);
const accentColor = useThemeColor("--color-icon-muted");
const headerIconColor = useThemeColor("--color-icon");
useEffect(() => {
if (!SHOWCASE_ENABLED) return;
const timer = setTimeout(() => markNativeShowcaseReady("environments"), 500);
return () => clearTimeout(timer);
}, []);
const handleToggle = useCallback((environmentId: EnvironmentId) => {
setExpandedId((prev) => (prev === environmentId ? null : environmentId));
}, []);
const handleUpdateEnvironment = useCallback(
(
environmentId: EnvironmentId,
updates: { readonly label: string; readonly displayUrl: string },
) => {
if (!SHOWCASE_ENABLED) return onUpdateEnvironment(environmentId, updates);
const actualEnvironment = environmentSections.localEnvironments.find(
(environment) => environment.environmentId === environmentId,
);
const presentedEnvironment = localEnvironments.find(
(environment) => environment.environmentId === environmentId,
);
return onUpdateEnvironment(environmentId, {
...updates,
displayUrl:
actualEnvironment && presentedEnvironment
? resolveShowcaseEnvironmentUpdateDisplayUrl({
actualDisplayUrl: actualEnvironment.displayUrl,
presentedDisplayUrl: presentedEnvironment.displayUrl,
submittedDisplayUrl: updates.displayUrl,
})
: updates.displayUrl,
});
},
[environmentSections.localEnvironments, localEnvironments, onUpdateEnvironment],
);
return (
<View collapsable={false} className="flex-1 bg-sheet">
@@ -92,7 +139,7 @@ export function SettingsEnvironmentsRouteScreen() {
onToggle={() => handleToggle(environment.environmentId)}
onReconnect={onReconnectEnvironment}
onRemove={onRemoveEnvironmentPress}
onUpdate={onUpdateEnvironment}
onUpdate={handleUpdateEnvironment}
/>
</View>
))}
@@ -114,10 +161,16 @@ export function SettingsEnvironmentsRouteScreen() {
</View>
)}
{hasCloudPublicConfig() ? (
{hasCloudPublicConfig() || SHOWCASE_ENABLED ? (
<CloudEnvironmentRows
connectedCloudEnvironments={connectedCloudEnvironments}
onReconnectEnvironment={onReconnectEnvironment}
{...(SHOWCASE_ENABLED
? {
showcaseAvailableEnvironments: SHOWCASE_AVAILABLE_CLOUD_ENVIRONMENTS,
showcaseSignedIn: true,
}
: {})}
/>
) : null}
</ScrollView>
@@ -0,0 +1,224 @@
import { useEffect, useRef, useState } from "react";
import { Keyboard, View } from "react-native";
import { CommonActions, StackActions, useNavigation } from "@react-navigation/native";
import { AsyncResult } from "effect/unstable/reactivity";
import { useConnectionController } from "../connection/useConnectionController";
import { useProjects, useThreadShells } from "../../state/entities";
import { enqueueThreadOutboxMessage } from "../../state/thread-outbox";
import { holdEditingQueuedMessage } from "../../state/use-thread-outbox";
import { useWorkspaceState } from "../../state/workspace";
import {
getNativeShowcasePairingUrls,
getNativeShowcaseScene,
markNativeShowcaseReady,
type ShowcaseScene,
} from "./nativeShowcaseScene";
import {
buildShowcasePendingTasks,
SHOWCASE_PENDING_TASK_DEFINITIONS,
} from "./showcasePendingTasks";
import { retryShowcaseOperation } from "./showcaseRetry";
const SHOWCASE_ENABLED = process.env.EXPO_PUBLIC_SHOWCASE === "1";
const SHOWCASE_THREAD_ID = "remote-command-center";
function sceneFromPathname(pathname: string): ShowcaseScene | null {
const routePath = pathname.split(/[?#]/u, 1)[0] ?? pathname;
if (routePath === "/settings" || routePath.endsWith("/settings/environments")) {
return "environments";
}
if (routePath.endsWith("/terminal")) return "terminal";
if (routePath.endsWith("/review")) return "review";
if (routePath.startsWith("/threads/")) return "thread";
if (routePath === "/") return "threads";
return null;
}
export function ShowcaseCaptureCoordinator(props: { readonly pathname: string }) {
const navigation = useNavigation();
const { connectPairingUrl } = useConnectionController();
const workspace = useWorkspaceState();
const projects = useProjects();
const threads = useThreadShells();
const attemptedPairingRef = useRef(new Set<string>());
const seededPendingTaskIdsRef = useRef(new Set<string>());
const [pairingUrls, setPairingUrls] = useState<ReadonlyArray<string>>([]);
const [pendingTasksReady, setPendingTasksReady] = useState(false);
const [requestedScene, setRequestedScene] = useState<ShowcaseScene | null>(null);
const [readyScene, setReadyScene] = useState<ShowcaseScene | null>(null);
useEffect(() => {
if (!SHOWCASE_ENABLED || pairingUrls.length > 0) return;
const readPairingUrls = () => {
const values = getNativeShowcasePairingUrls();
if (values.length > 0) setPairingUrls(values);
};
readPairingUrls();
const interval = setInterval(readPairingUrls, 250);
return () => clearInterval(interval);
}, [pairingUrls.length]);
useEffect(() => {
if (!SHOWCASE_ENABLED) return;
const readRequestedScene = () => {
const value = getNativeShowcaseScene();
if (value) setRequestedScene(value);
};
readRequestedScene();
const interval = setInterval(readRequestedScene, 250);
return () => clearInterval(interval);
}, []);
useEffect(() => {
if (!SHOWCASE_ENABLED || pairingUrls.length === 0) return;
let cancelled = false;
void (async () => {
await Promise.all(
pairingUrls.map(async (pairingUrl) => {
if (cancelled || attemptedPairingRef.current.has(pairingUrl)) return;
const paired = await retryShowcaseOperation(
async () => AsyncResult.isSuccess(await connectPairingUrl(pairingUrl)),
{ isCancelled: () => cancelled },
);
if (paired) attemptedPairingRef.current.add(pairingUrl);
}),
);
})();
return () => {
cancelled = true;
};
}, [connectPairingUrl, pairingUrls]);
const scene = sceneFromPathname(props.pathname);
const hasServerFixture =
workspace.state.hasReadyEnvironment &&
workspace.environments.length >= 3 &&
projects.length >= 3 &&
threads.some((thread) => String(thread.id) === SHOWCASE_THREAD_ID);
const hasFixture = hasServerFixture && pendingTasksReady;
const showcaseThread = threads.find((thread) => String(thread.id) === SHOWCASE_THREAD_ID);
useEffect(() => {
if (!SHOWCASE_ENABLED || !hasServerFixture || pendingTasksReady) return;
const pendingTasks = buildShowcasePendingTasks(projects, Date.now());
if (pendingTasks.length !== SHOWCASE_PENDING_TASK_DEFINITIONS.length) return;
let cancelled = false;
for (const task of pendingTasks) holdEditingQueuedMessage(task.messageId);
void (async () => {
const results = await Promise.all(
pendingTasks.map(async (task) => {
const messageId = String(task.messageId);
if (seededPendingTaskIdsRef.current.has(messageId)) return true;
const seeded = await retryShowcaseOperation(
async () => {
await enqueueThreadOutboxMessage(task);
return true;
},
{ isCancelled: () => cancelled },
);
if (seeded) seededPendingTaskIdsRef.current.add(messageId);
return seeded;
}),
);
if (!cancelled && results.every(Boolean)) setPendingTasksReady(true);
})();
return () => {
cancelled = true;
};
}, [hasServerFixture, pendingTasksReady, projects]);
useEffect(() => {
if (!SHOWCASE_ENABLED || requestedScene === null || !hasFixture || !showcaseThread) return;
if (scene === requestedScene) return;
const params = {
environmentId: String(showcaseThread.environmentId),
threadId: SHOWCASE_THREAD_ID,
};
if (requestedScene === "threads") {
navigation.dispatch(StackActions.popToTop());
return;
}
const routes: Array<{
name: string;
params?: Record<string, unknown>;
state?: { index: number; routes: Array<{ name: string }> };
}> = [{ name: "Home" }];
if (requestedScene === "environments") {
routes.push({
name: "SettingsSheet",
state: {
index: 1,
routes: [{ name: "Settings" }, { name: "SettingsEnvironments" }],
},
});
} else {
routes.push({ name: "Thread", params });
if (requestedScene === "terminal") {
routes.push({
name: "ThreadTerminal",
params: { ...params, terminalId: "term-1" },
});
} else if (requestedScene === "review") {
routes.push({ name: "ThreadReview", params });
}
}
navigation.dispatch(
CommonActions.reset({
index: routes.length - 1,
routes,
}),
);
}, [hasFixture, navigation, requestedScene, scene, showcaseThread]);
useEffect(() => {
if (
!SHOWCASE_ENABLED ||
scene === null ||
requestedScene === null ||
scene !== requestedScene ||
!hasFixture
) {
setReadyScene(null);
return;
}
// Review owns its readiness marker because route activation happens before
// the VCS request is parsed and the native diff surface is mounted.
if (scene === "review") {
setReadyScene(null);
return;
}
if (scene === "terminal") Keyboard.dismiss();
let renderFrame: number | null = null;
let readyFrame: number | null = null;
const settleTimer = setTimeout(() => {
renderFrame = requestAnimationFrame(() => {
readyFrame = requestAnimationFrame(() => {
markNativeShowcaseReady(scene);
setReadyScene(scene);
});
});
}, 500);
return () => {
clearTimeout(settleTimer);
if (renderFrame !== null) cancelAnimationFrame(renderFrame);
if (readyFrame !== null) cancelAnimationFrame(readyFrame);
};
}, [hasFixture, requestedScene, scene]);
if (!SHOWCASE_ENABLED || readyScene === null) return null;
return (
<View
pointerEvents="none"
testID={`showcase-ready-${readyScene}`}
style={{ position: "absolute", width: 1, height: 1, opacity: 0.01 }}
/>
);
}
@@ -0,0 +1,68 @@
import { requireOptionalNativeModule } from "expo";
export const SHOWCASE_SCENES = ["threads", "thread", "terminal", "review", "environments"] as const;
export type ShowcaseScene = (typeof SHOWCASE_SCENES)[number];
interface NativeShowcaseControls {
readonly getShowcasePairingUrl?: () => string | null;
readonly getShowcaseScene?: () => string | null;
readonly prepareShowcaseCapture?: () => void;
readonly markShowcaseReady?: (scene: ShowcaseScene) => void;
}
function nativeShowcaseControls(): NativeShowcaseControls | null {
return requireOptionalNativeModule<NativeShowcaseControls>("T3NativeControls");
}
export function getNativeShowcasePairingUrls(): ReadonlyArray<string> {
try {
let raw = nativeShowcaseControls()?.getShowcasePairingUrl?.()?.trim();
if (!raw) return [];
if (raw.startsWith("json-uri:")) {
try {
raw = decodeURIComponent(raw.slice("json-uri:".length));
} catch {
return [];
}
}
try {
const parsed: unknown = JSON.parse(raw);
if (Array.isArray(parsed)) {
return parsed.filter(
(candidate): candidate is string =>
typeof candidate === "string" && candidate.trim().length > 0,
);
}
} catch {
// Older runners pass a single URL rather than a JSON array.
}
return [raw];
} catch {
return [];
}
}
export function getNativeShowcaseScene(): ShowcaseScene | null {
try {
const scene = nativeShowcaseControls()?.getShowcaseScene?.()?.trim();
return SHOWCASE_SCENES.find((candidate) => candidate === scene) ?? null;
} catch {
return null;
}
}
export function prepareNativeShowcaseCapture(): void {
try {
nativeShowcaseControls()?.prepareShowcaseCapture?.();
} catch {
// The harness still works when a development build predates this helper.
}
}
export function markNativeShowcaseReady(scene: ShowcaseScene): void {
try {
nativeShowcaseControls()?.markShowcaseReady?.(scene);
} catch {
// The readiness marker is capture-runner metadata, never app functionality.
}
}
@@ -0,0 +1,70 @@
import { EnvironmentId } from "@t3tools/contracts";
import { assert, it } from "@effect/vitest";
import type { ConnectedEnvironmentSummary } from "../../state/remote-runtime-types";
import {
applyShowcaseLocalEnvironmentDisplayUrls,
resolveShowcaseEnvironmentUpdateDisplayUrl,
} from "./showcaseEnvironmentRows";
function environment(
environmentId: string,
environmentLabel: string,
displayUrl = "http://127.0.0.1:3773/",
): ConnectedEnvironmentSummary {
return {
environmentId: EnvironmentId.make(environmentId),
environmentLabel,
displayUrl,
isRelayManaged: false,
connectionState: "connected",
connectionError: null,
connectionErrorTraceId: null,
};
}
it("presents showcase transports as remote endpoints", () => {
const environments = applyShowcaseLocalEnvironmentDisplayUrls([
environment("runtime-id-1", "Moonbase Terminal"),
environment("runtime-id-2", "Suspense Station"),
environment("runtime-id-3", "Kernel Cabin"),
]);
assert.deepStrictEqual(
environments.map(({ displayUrl }) => displayUrl),
[
"https://moonbase.tail9f3a.ts.net/",
"https://suspense-vps.hel1.t3.sh/",
"http://100.82.16.5:3773/",
],
);
});
it("leaves environments outside the showcase fixture unchanged", () => {
const original = environment(
"runtime-id-4",
"My Workstation",
"https://workstation.example.test/",
);
assert.deepStrictEqual(applyShowcaseLocalEnvironmentDisplayUrls([original]), [original]);
});
it("does not persist a cosmetic showcase URL when only the label is saved", () => {
assert.equal(
resolveShowcaseEnvironmentUpdateDisplayUrl({
actualDisplayUrl: "http://127.0.0.1:3773/",
presentedDisplayUrl: "https://moonbase.tail9f3a.ts.net/",
submittedDisplayUrl: "https://moonbase.tail9f3a.ts.net/",
}),
"http://127.0.0.1:3773/",
);
assert.equal(
resolveShowcaseEnvironmentUpdateDisplayUrl({
actualDisplayUrl: "http://127.0.0.1:3773/",
presentedDisplayUrl: "https://moonbase.tail9f3a.ts.net/",
submittedDisplayUrl: "https://new-host.example.com/",
}),
"https://new-host.example.com/",
);
});
@@ -0,0 +1,70 @@
import { EnvironmentId } from "@t3tools/contracts";
import type { RelayEnvironmentView } from "../connection/useConnectionController";
import type { ConnectedEnvironmentSummary } from "../../state/remote-runtime-types";
const SHOWCASE_LOCAL_ENVIRONMENT_DISPLAY_URLS: Readonly<Record<string, string>> = {
"Moonbase Terminal": "https://moonbase.tail9f3a.ts.net/",
"Suspense Station": "https://suspense-vps.hel1.t3.sh/",
"Kernel Cabin": "http://100.82.16.5:3773/",
};
export function applyShowcaseLocalEnvironmentDisplayUrls(
environments: ReadonlyArray<ConnectedEnvironmentSummary>,
): ReadonlyArray<ConnectedEnvironmentSummary> {
return environments.map((environment) => ({
...environment,
displayUrl:
SHOWCASE_LOCAL_ENVIRONMENT_DISPLAY_URLS[environment.environmentLabel] ??
environment.displayUrl,
}));
}
export function resolveShowcaseEnvironmentUpdateDisplayUrl(input: {
readonly actualDisplayUrl: string;
readonly presentedDisplayUrl: string;
readonly submittedDisplayUrl: string;
}): string {
return input.submittedDisplayUrl === input.presentedDisplayUrl
? input.actualDisplayUrl
: input.submittedDisplayUrl;
}
const pocketPiId = EnvironmentId.make("showcase-pocket-pi");
const pocketPiEndpoint = {
httpBaseUrl: "https://pocket-pi.t3.sh",
wsBaseUrl: "wss://pocket-pi.t3.sh",
providerKind: "t3_relay" as const,
};
export const SHOWCASE_CONNECTED_CLOUD_ENVIRONMENTS: ReadonlyArray<ConnectedEnvironmentSummary> = [
{
environmentId: EnvironmentId.make("showcase-aurora-gpu"),
environmentLabel: "Aurora GPU Pod",
displayUrl: "https://aurora-gpu.t3.sh",
isRelayManaged: true,
connectionState: "connected",
connectionError: null,
connectionErrorTraceId: null,
},
];
export const SHOWCASE_AVAILABLE_CLOUD_ENVIRONMENTS: ReadonlyArray<RelayEnvironmentView> = [
{
environment: {
environmentId: pocketPiId,
label: "Pocket Pi",
endpoint: pocketPiEndpoint,
linkedAt: "2026-07-16T08:00:00.000Z",
},
availability: "online",
status: {
environmentId: pocketPiId,
endpoint: pocketPiEndpoint,
status: "online",
checkedAt: "2026-07-16T08:41:00.000Z",
},
error: null,
traceId: null,
},
];
@@ -0,0 +1,72 @@
import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
import { EnvironmentId, ProjectId, ProviderInstanceId } from "@t3tools/contracts";
import { assert, it } from "@effect/vitest";
import {
buildShowcasePendingTasks,
SHOWCASE_PENDING_TASK_DEFINITIONS,
} from "./showcasePendingTasks";
const projects: ReadonlyArray<EnvironmentProject> = [
{
environmentId: EnvironmentId.make("moonbase-terminal"),
id: ProjectId.make("t3code"),
title: "T3 Code",
workspaceRoot: "/workspace/t3code",
repositoryIdentity: null,
defaultModelSelection: { instanceId: ProviderInstanceId.make("codex"), model: "gpt-5.4" },
scripts: [],
createdAt: "2026-07-16T08:00:00.000Z",
updatedAt: "2026-07-16T08:00:00.000Z",
},
{
environmentId: EnvironmentId.make("suspense-station"),
id: ProjectId.make("react"),
title: "React",
workspaceRoot: "/workspace/react",
repositoryIdentity: null,
defaultModelSelection: null,
scripts: [],
createdAt: "2026-07-16T08:00:00.000Z",
updatedAt: "2026-07-16T08:00:00.000Z",
},
];
it("builds sendable-looking pending tasks against real showcase projects", () => {
const tasks = buildShowcasePendingTasks(projects, Date.parse("2026-07-16T09:00:00.000Z"));
assert.equal(tasks.length, SHOWCASE_PENDING_TASK_DEFINITIONS.length);
assert.deepStrictEqual(
tasks.map((task) => ({
environmentId: String(task.environmentId),
projectId: task.creation ? String(task.creation.projectId) : undefined,
title: task.creation?.projectTitle,
branch: task.creation?.branch,
createdAt: task.createdAt,
})),
[
{
environmentId: "moonbase-terminal",
projectId: "t3code",
title: "T3 Code",
branch: "feat/offline-launchpad",
createdAt: "2026-07-16T08:52:00.000Z",
},
{
environmentId: "suspense-station",
projectId: "react",
title: "React",
branch: "perf/tunnel-handoff",
createdAt: "2026-07-16T08:33:00.000Z",
},
],
);
assert.equal(
tasks.every((task) => task.modelSelection !== undefined),
true,
);
});
it("waits until every referenced project has hydrated", () => {
assert.equal(buildShowcasePendingTasks(projects.slice(0, 1), Date.now()).length, 1);
});
@@ -0,0 +1,66 @@
import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";
import {
CommandId,
DEFAULT_PROVIDER_INTERACTION_MODE,
DEFAULT_RUNTIME_MODE,
MessageId,
ProviderInstanceId,
ThreadId,
} from "@t3tools/contracts";
import type { QueuedThreadMessage } from "../../state/thread-outbox-model";
export const SHOWCASE_PENDING_TASK_DEFINITIONS = [
{
projectId: "t3code",
id: "offline-launch-checklist",
text: "Ship the offline launch checklist before touchdown ✈️",
branch: "feat/offline-launchpad",
minutesAgo: 8,
},
{
projectId: "react",
id: "train-tunnel-suspense",
text: "Polish the Suspense handoff for the train tunnel 🚇",
branch: "perf/tunnel-handoff",
minutesAgo: 27,
},
] as const;
const FALLBACK_MODEL_SELECTION = {
instanceId: ProviderInstanceId.make("codex"),
model: "gpt-5.4",
} as const;
export function buildShowcasePendingTasks(
projects: ReadonlyArray<EnvironmentProject>,
now: number,
): ReadonlyArray<QueuedThreadMessage> {
return SHOWCASE_PENDING_TASK_DEFINITIONS.flatMap((definition) => {
const project = projects.find((candidate) => String(candidate.id) === definition.projectId);
if (!project) return [];
return [
{
environmentId: project.environmentId,
threadId: ThreadId.make(`showcase-pending-${definition.id}`),
messageId: MessageId.make(`showcase-pending-message-${definition.id}`),
commandId: CommandId.make(`showcase-pending-command-${definition.id}`),
text: definition.text,
attachments: [],
modelSelection: project.defaultModelSelection ?? FALLBACK_MODEL_SELECTION,
runtimeMode: DEFAULT_RUNTIME_MODE,
interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE,
creation: {
projectId: project.id,
projectTitle: project.title,
projectCwd: project.workspaceRoot,
workspaceMode: "local" as const,
branch: definition.branch,
worktreePath: project.workspaceRoot,
},
createdAt: new Date(now - definition.minutesAgo * 60_000).toISOString(),
},
];
});
}
@@ -0,0 +1,44 @@
import { assert, it } from "@effect/vitest";
import { retryShowcaseOperation } from "./showcaseRetry";
it("retries a failed showcase operation until it succeeds", async () => {
let attempts = 0;
const succeeded = await retryShowcaseOperation(
async () => {
attempts += 1;
return attempts === 3;
},
{ isCancelled: () => false, retryDelayMs: 0 },
);
assert.equal(succeeded, true);
assert.equal(attempts, 3);
});
it("recovers when a showcase operation attempt hangs", async () => {
let attempts = 0;
const succeeded = await retryShowcaseOperation(
() => {
attempts += 1;
return attempts === 1 ? new Promise<boolean>(() => undefined) : Promise.resolve(true);
},
{ isCancelled: () => false, attemptTimeoutMs: 1, retryDelayMs: 0 },
);
assert.equal(succeeded, true);
assert.equal(attempts, 2);
});
it("stops retrying when the owning showcase effect is cancelled", async () => {
let cancelled = false;
const succeeded = await retryShowcaseOperation(
async () => {
cancelled = true;
return false;
},
{ isCancelled: () => cancelled, retryDelayMs: 0 },
);
assert.equal(succeeded, false);
});
@@ -0,0 +1,46 @@
export interface ShowcaseRetryOptions {
readonly isCancelled: () => boolean;
readonly attemptTimeoutMs?: number;
readonly retryDelayMs?: number;
}
const DEFAULT_ATTEMPT_TIMEOUT_MS = 10_000;
const DEFAULT_RETRY_DELAY_MS = 500;
function delay(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function runAttemptWithTimeout(
operation: () => Promise<boolean>,
timeoutMs: number,
): Promise<boolean> {
let timeout: ReturnType<typeof setTimeout> | null = null;
try {
return await Promise.race([
operation(),
new Promise<boolean>((resolve) => {
timeout = setTimeout(() => resolve(false), timeoutMs);
}),
]);
} catch {
return false;
} finally {
if (timeout !== null) clearTimeout(timeout);
}
}
/** Retry transient showcase setup work until it succeeds or the owning effect unmounts. */
export async function retryShowcaseOperation(
operation: () => Promise<boolean>,
options: ShowcaseRetryOptions,
): Promise<boolean> {
const attemptTimeoutMs = options.attemptTimeoutMs ?? DEFAULT_ATTEMPT_TIMEOUT_MS;
const retryDelayMs = options.retryDelayMs ?? DEFAULT_RETRY_DELAY_MS;
while (!options.isCancelled()) {
if (await runAttemptWithTimeout(operation, attemptTimeoutMs)) return true;
if (!options.isCancelled()) await delay(retryDelayMs);
}
return false;
}
@@ -37,6 +37,7 @@ interface TerminalSurfaceProps extends ViewProps {
readonly buffer: string;
readonly fontSize?: number;
readonly isRunning: boolean;
readonly autoFocus?: boolean;
readonly keyboardFocusRequest?: number;
readonly theme?: TerminalTheme;
readonly onInput: (data: string) => void;
@@ -215,6 +216,7 @@ export const TerminalSurface = memo(function TerminalSurface(props: TerminalSurf
<View style={props.style}>
<NativeTerminalSurfaceView
appearanceScheme={appearanceScheme}
autoFocus={props.autoFocus ?? true}
backgroundColor={theme.background}
focusRequest={props.isRunning ? (props.keyboardFocusRequest ?? 0) : 0}
foregroundColor={theme.foreground}
@@ -70,6 +70,7 @@ import { cacheTerminalGridSize, getCachedTerminalGridSize } from "./terminalUiSt
const DEFAULT_TERMINAL_COLS = 80;
const DEFAULT_TERMINAL_ROWS = 24;
const TERMINAL_ACCESSORY_HEIGHT = 52;
const SHOWCASE_ENABLED = process.env.EXPO_PUBLIC_SHOWCASE === "1";
type PendingModifier = "ctrl" | "meta";
type HostPlatform = "mac" | "linux" | "windows" | "unknown";
@@ -1218,6 +1219,7 @@ export function ThreadTerminalRouteScreen(props: ThreadTerminalRouteScreenProps)
<>
<View className="flex-1" style={{ paddingBottom: terminalBottomInset }}>
<TerminalSurface
autoFocus={!SHOWCASE_ENABLED}
buffer={terminalSurfaceBuffer}
fontSize={fontSize}
isRunning={isRunning}
@@ -23,6 +23,7 @@ interface TerminalResizeEvent {
export interface NativeTerminalSurfaceProps extends ViewProps {
readonly appearanceScheme?: "light" | "dark";
readonly autoFocus?: boolean;
readonly focusRequest?: number;
readonly themeConfig?: string;
readonly backgroundColor?: string;
@@ -101,7 +101,10 @@ export function createThreadOutboxManager(options: ThreadOutboxManagerOptions) {
cause,
});
}
setMessages([...currentMessages(), message]);
setMessages([
...currentMessages().filter((candidate) => candidate.messageId !== message.messageId),
message,
]);
});
// Rewrites an already-queued message. A no-op when the message has been
@@ -294,6 +294,31 @@ describe("thread outbox", () => {
registry.dispose();
});
it("replaces an existing message when an enqueue retry uses the same id", async () => {
const registry = AtomRegistry.make();
const manager = createThreadOutboxManager({
registry,
storage: {
load: async () => [],
write: async () => undefined,
remove: async () => undefined,
},
});
const message = queuedMessage({
messageId: "message-1",
createdAt: "2026-06-08T10:00:01.000Z",
});
const retried = { ...message, text: "retried" };
await manager.enqueue(message);
await manager.enqueue(retried);
expect(registry.get(manager.queuedMessagesByThreadKeyAtom)).toEqual({
"environment-1:thread-1": [retried],
});
registry.dispose();
});
it("updates a queued message in place but never resurrects a removed one", async () => {
const registry = AtomRegistry.make();
const stored = new Map<MessageId, QueuedThreadMessage>();
@@ -62,7 +62,7 @@ const promptText = NodeProcess.argv[4] ?? "helo";
const targetReasoning = NodeProcess.env.CURSOR_REASONING ?? "";
const targetContext = NodeProcess.env.CURSOR_CONTEXT ?? "";
const targetFast = NodeProcess.env.CURSOR_FAST ?? "";
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "agent";
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "cursor-agent";
const promptWaitMs = Number(NodeProcess.env.CURSOR_PROMPT_WAIT_MS ?? "4000");
const requestTimeoutMs = Number(NodeProcess.env.CURSOR_REQUEST_TIMEOUT_MS ?? "20000");
@@ -31,7 +31,7 @@ it.layer(NodeServices.layer)("ClaudeHome", (it) => {
const resolved = path.resolve(NodeOS.homedir(), ".claude-work");
expect(yield* resolveClaudeHomePath({ homePath })).toBe(resolved);
expect((yield* makeClaudeEnvironment({ homePath })).HOME).toBe(resolved);
expect((yield* makeClaudeEnvironment({ homePath })).CLAUDE_CONFIG_DIR).toBe(resolved);
expect(yield* makeClaudeContinuationGroupKey({ homePath })).toBe(`claude:home:${resolved}`);
expect(yield* makeClaudeCapabilitiesCacheKey({ binaryPath: "claude", homePath })).toBe(
`claude\0${resolved}`,
@@ -24,7 +24,13 @@ export const makeClaudeEnvironment = Effect.fn("makeClaudeEnvironment")(function
const resolvedHomePath = yield* resolveClaudeHomePath(config);
return {
...resolvedBaseEnv,
HOME: resolvedHomePath,
// Isolate this instance's config via CLAUDE_CONFIG_DIR rather than HOME.
// Overriding HOME also relocates the macOS login keychain lookup
// ($HOME/Library/Keychains), so the spawned CLI can't find its stored
// OAuth credentials and reports "Not logged in". CLAUDE_CONFIG_DIR points
// Claude Code at its config dir directly while leaving HOME (and the
// keychain) intact.
CLAUDE_CONFIG_DIR: resolvedHomePath,
};
});
@@ -1,5 +1,5 @@
/**
* CursorDriver — `ProviderDriver` for the Cursor Agent (`agent`) runtime.
* CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor-agent`) runtime.
*
* Cursor exposes an ACP-based CLI. Model catalog and capability refreshes
* happen during the managed provider status check via Cursor's
@@ -42,7 +42,7 @@ import type { ServerProviderDraft } from "../providerSnapshot.ts";
import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts";
import {
makeProviderMaintenanceCapabilities,
makeStaticProviderMaintenanceResolver,
type ProviderMaintenanceCapabilitiesResolver,
resolveProviderMaintenanceCapabilitiesEffect,
} from "../providerMaintenance.ts";
import {
@@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);
const DRIVER_KIND = ProviderDriverKind.make("cursor");
const SNAPSHOT_REFRESH_INTERVAL = Duration.minutes(5);
const UPDATE = makeStaticProviderMaintenanceResolver(
makeProviderMaintenanceCapabilities({
provider: DRIVER_KIND,
packageName: null,
updateExecutable: "agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
}),
);
const UPDATE: ProviderMaintenanceCapabilitiesResolver = {
resolve: (options) =>
makeProviderMaintenanceCapabilities({
provider: DRIVER_KIND,
packageName: null,
updateExecutable: options?.binaryPath?.trim() || "cursor-agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
}),
};
export type CursorDriverEnv =
| ChildProcessSpawner.ChildProcessSpawner
@@ -418,7 +418,7 @@ describe("ClaudeAdapterLive", () => {
);
});
it.effect("runs Claude SDK sessions with the configured Claude HOME", () => {
it.effect("runs Claude SDK sessions with the configured CLAUDE_CONFIG_DIR", () => {
const harness = makeHarness({ claudeConfig: { homePath: "~/.claude-work" } });
return Effect.gen(function* () {
const adapter = yield* ClaudeAdapter;
@@ -433,7 +433,10 @@ describe("ClaudeAdapterLive", () => {
});
const createInput = harness.getLastCreateQueryInput();
assert.equal(createInput?.options.env?.HOME, NodePath.join(NodeOS.homedir(), ".claude-work"));
assert.equal(
createInput?.options.env?.CLAUDE_CONFIG_DIR,
NodePath.join(NodeOS.homedir(), ".claude-work"),
);
}).pipe(
Effect.provideService(Random.Random, makeDeterministicRandomService()),
Effect.provide(harness.layer),
@@ -1661,6 +1664,48 @@ describe("ClaudeAdapterLive", () => {
);
});
it.effect("does not surface Claude task_updated messages as runtime warnings", () => {
const harness = makeHarness();
return Effect.gen(function* () {
const adapter = yield* ClaudeAdapter;
const runtimeEventsFiber = yield* Stream.take(adapter.streamEvents, 6).pipe(
Stream.runCollect,
Effect.forkChild,
);
yield* adapter.startSession({
threadId: THREAD_ID,
provider: ProviderDriverKind.make("claudeAgent"),
runtimeMode: "full-access",
});
harness.query.emit({
type: "system",
subtype: "task_updated",
task_id: "task-subagent-1",
status: "in_progress",
session_id: "sdk-session-task-updated",
uuid: "task-updated-1",
} as unknown as SDKMessage);
harness.query.emit({
type: "system",
subtype: "task_progress",
task_id: "task-subagent-1",
description: "Running background teammate",
session_id: "sdk-session-task-updated",
uuid: "task-progress-after-update-1",
} as unknown as SDKMessage);
const runtimeEvents = Array.from(yield* Fiber.join(runtimeEventsFiber));
assert.isFalse(runtimeEvents.some((event) => event.type === "runtime.warning"));
assert.isTrue(runtimeEvents.some((event) => event.type === "task.progress"));
}).pipe(
Effect.provideService(Random.Random, makeDeterministicRandomService()),
Effect.provide(harness.layer),
);
});
it.effect("forwards Claude task progress summaries for subagent updates", () => {
const harness = makeHarness();
return Effect.gen(function* () {
@@ -2741,6 +2741,11 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (
return;
case "thinking_tokens":
return;
// Task-state sync patch for the client's local task map. Terminal
// statuses arrive separately via task_notification, so there is
// nothing to surface; the raw payload stays in the provider log.
case "task_updated":
return;
case "permission_denied":
yield* offerRuntimeEvent({
...base,
@@ -294,7 +294,7 @@ const parameterizedClaudeModelOptionConfigOptions = [
const baseCursorSettings: CursorSettings = {
enabled: true,
binaryPath: "agent",
binaryPath: "cursor-agent",
apiEndpoint: "",
customModels: [],
};
@@ -76,7 +76,7 @@ const makeClaudeConfig = (overrides: Partial<ClaudeSettings>): ClaudeSettings =>
const makeCursorConfig = (overrides: Partial<CursorSettings>): CursorSettings => ({
enabled: false,
binaryPath: "agent",
binaryPath: "cursor-agent",
apiEndpoint: "",
customModels: [],
...overrides,
@@ -1396,7 +1396,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
Layer.provideMerge(OpenCodeRuntime.OpenCodeRuntimeLive),
Layer.provideMerge(
mockCommandSpawnerLayer((command, args) => {
if (command === "agent") {
if (command === "cursor-agent") {
cursorSpawned = true;
}
const joined = args.join(" ");
@@ -1719,8 +1719,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
),
);
it.effect("runs Claude status probes with the configured Claude HOME", () => {
const claudeHome = "/tmp/t3code-claude-home";
it.effect("runs Claude status probes with the configured CLAUDE_CONFIG_DIR", () => {
const claudeConfigDir = "/tmp/t3code-claude-home";
const recorded = recordingMockSpawnerLayer((args) => {
const joined = args.join(" ");
if (joined === "--version") return { stdout: "1.0.0\n", stderr: "", code: 0 };
@@ -1737,14 +1737,14 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
const status = yield* checkClaudeProviderStatus(
{
...defaultClaudeSettings,
homePath: claudeHome,
homePath: claudeConfigDir,
},
claudeCapabilities(),
);
assert.strictEqual(status.status, "ready");
assert.deepStrictEqual(
recorded.commands.map((command) => command.env?.HOME),
[claudeHome],
recorded.commands.map((command) => command.env?.CLAUDE_CONFIG_DIR),
[claudeConfigDir],
);
}).pipe(Effect.provide(recorded.layer));
});
@@ -1,5 +1,5 @@
/**
* Optional integration check against a real `agent acp` install.
* Optional integration check against a real `cursor-agent acp` install.
* Enable with: T3_CURSOR_ACP_PROBE=1 bun run test --filter CursorAcpCliProbe
*/
import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -12,7 +12,7 @@ import type * as EffectAcpSchema from "effect-acp/schema";
import * as AcpSessionRuntime from "./AcpSessionRuntime.ts";
describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", () => {
it.effect("initialize and authenticate against real agent acp", () =>
it.effect("initialize and authenticate against real cursor-agent acp", () =>
Effect.gen(function* () {
const runtime = yield* AcpSessionRuntime.AcpSessionRuntime;
const started = yield* runtime.start();
@@ -21,7 +21,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
Effect.provide(
AcpSessionRuntime.layer({
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
@@ -77,7 +77,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
AcpSessionRuntime.layer({
authMethodId: "cursor_login",
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
@@ -133,7 +133,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
AcpSessionRuntime.layer({
authMethodId: "cursor_login",
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
@@ -53,7 +53,7 @@ const parameterizedGpt54ConfigOptions: ReadonlyArray<EffectAcpSchema.SessionConf
describe("buildCursorAcpSpawnInput", () => {
it("builds the default Cursor ACP command", () => {
expect(buildCursorAcpSpawnInput(undefined, "/tmp/project")).toEqual({
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: "/tmp/project",
});
@@ -35,7 +35,7 @@ export function buildCursorAcpSpawnInput(
environment?: NodeJS.ProcessEnv,
): AcpSessionRuntime.AcpSpawnInput {
return {
command: cursorSettings?.binaryPath || "agent",
command: cursorSettings?.binaryPath || "cursor-agent",
args: [
...(cursorSettings?.apiEndpoint ? (["-e", cursorSettings.apiEndpoint] as const) : []),
"acp",
@@ -48,7 +48,7 @@ function lifecycleFor(provider: ProviderDriverKind): ProviderMaintenanceCapabili
return makeProviderMaintenanceCapabilities({
provider,
packageName: null,
updateExecutable: "agent",
updateExecutable: "cursor-agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
});
@@ -226,7 +226,7 @@ describe("providerMaintenanceRunner", () => {
const result = yield* updater.updateProvider(CURSOR_DRIVER);
assert.deepStrictEqual(calls, [
{
command: "agent",
command: "cursor-agent",
args: ["update"],
},
]);
+58
View File
@@ -5607,6 +5607,64 @@ it.layer(NodeServices.layer)("server router seam", (it) => {
}).pipe(Effect.provide(NodeHttpServer.layerTest)),
);
it.effect("buffers thread events published while the initial snapshot loads", () =>
Effect.gen(function* () {
const thread = makeDefaultOrchestrationReadModel().threads[0]!;
const liveEvents = yield* PubSub.unbounded<OrchestrationEvent>();
const messageEvent = {
sequence: 2,
eventId: EventId.make("event-message"),
aggregateKind: "thread",
aggregateId: defaultThreadId,
occurredAt: "2026-01-01T00:00:01.000Z",
commandId: null,
causationEventId: null,
correlationId: null,
metadata: {},
type: "thread.message-sent",
payload: {
threadId: defaultThreadId,
messageId: MessageId.make("message-1"),
role: "user",
text: "First message",
turnId: null,
streaming: false,
createdAt: "2026-01-01T00:00:01.000Z",
updatedAt: "2026-01-01T00:00:01.000Z",
},
} satisfies Extract<OrchestrationEvent, { type: "thread.message-sent" }>;
yield* buildAppUnderTest({
layers: {
orchestrationEngine: {
streamDomainEvents: Stream.fromPubSub(liveEvents),
},
projectionSnapshotQuery: {
getThreadDetailSnapshot: () =>
Effect.gen(function* () {
yield* Effect.sleep("25 millis");
yield* PubSub.publish(liveEvents, messageEvent);
return Option.some({ snapshotSequence: 1, thread });
}),
},
},
});
const wsUrl = yield* getWsServerUrl("/ws");
const items = yield* Effect.scoped(
withWsRpcClient(wsUrl, (client) =>
client[ORCHESTRATION_WS_METHODS.subscribeThread]({
threadId: defaultThreadId,
}).pipe(Stream.take(2), Stream.runCollect),
),
).pipe(Effect.timeout("2 seconds"));
assert.equal(items[0]?.kind, "snapshot");
assert.equal(items[1]?.kind, "event");
assert.equal(items[1]?.kind === "event" ? items[1].event.sequence : null, 2);
}).pipe(Effect.provide(NodeHttpServer.layerTest), TestClock.withLive),
);
it.effect("enriches replayed project events with repository identity metadata", () =>
Effect.gen(function* () {
const repositoryIdentity = {
@@ -51,8 +51,8 @@ function makeFakeClaudeBinary(dir: string) {
" exit 4",
" }",
"fi",
'if [ -n "$T3_FAKE_CLAUDE_HOME_MUST_BE" ] && [ "$HOME" != "$T3_FAKE_CLAUDE_HOME_MUST_BE" ]; then',
' printf "%s\\n" "HOME was $HOME" >&2',
'if [ -n "$T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE" ] && [ "$CLAUDE_CONFIG_DIR" != "$T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE" ]; then',
' printf "%s\\n" "CLAUDE_CONFIG_DIR was $CLAUDE_CONFIG_DIR" >&2',
" exit 5",
"fi",
'if [ -n "$T3_FAKE_CLAUDE_STDERR" ]; then',
@@ -76,7 +76,7 @@ function withFakeClaudeEnv<A, E, R>(
argsMustContain?: string;
argsMustNotContain?: string;
stdinMustContain?: string;
homeMustBe?: string;
configDirMustBe?: string;
claudeConfig?: Partial<ClaudeSettings>;
},
effectFn: (textGeneration: TextGeneration.TextGeneration["Service"]) => Effect.Effect<A, E, R>,
@@ -92,7 +92,7 @@ function withFakeClaudeEnv<A, E, R>(
const previousArgsMustContain = process.env.T3_FAKE_CLAUDE_ARGS_MUST_CONTAIN;
const previousArgsMustNotContain = process.env.T3_FAKE_CLAUDE_ARGS_MUST_NOT_CONTAIN;
const previousStdinMustContain = process.env.T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN;
const previousHomeMustBe = process.env.T3_FAKE_CLAUDE_HOME_MUST_BE;
const previousConfigDirMustBe = process.env.T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE;
yield* Effect.acquireRelease(
Effect.sync(() => {
@@ -129,10 +129,10 @@ function withFakeClaudeEnv<A, E, R>(
delete process.env.T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN;
}
if (input.homeMustBe !== undefined) {
process.env.T3_FAKE_CLAUDE_HOME_MUST_BE = input.homeMustBe;
if (input.configDirMustBe !== undefined) {
process.env.T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE = input.configDirMustBe;
} else {
delete process.env.T3_FAKE_CLAUDE_HOME_MUST_BE;
delete process.env.T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE;
}
}),
() =>
@@ -175,10 +175,10 @@ function withFakeClaudeEnv<A, E, R>(
process.env.T3_FAKE_CLAUDE_STDIN_MUST_CONTAIN = previousStdinMustContain;
}
if (previousHomeMustBe === undefined) {
delete process.env.T3_FAKE_CLAUDE_HOME_MUST_BE;
if (previousConfigDirMustBe === undefined) {
delete process.env.T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE;
} else {
process.env.T3_FAKE_CLAUDE_HOME_MUST_BE = previousHomeMustBe;
process.env.T3_FAKE_CLAUDE_CONFIG_DIR_MUST_BE = previousConfigDirMustBe;
}
}),
);
@@ -286,10 +286,10 @@ it.layer(ClaudeTextGenerationTestLayer)("ClaudeTextGeneration", (it) => {
),
);
it.effect("runs Claude text generation with the configured Claude HOME", () =>
it.effect("runs Claude text generation with the configured CLAUDE_CONFIG_DIR", () =>
Effect.gen(function* () {
const path = yield* Path.Path;
const claudeHome = path.join(process.cwd(), ".claude-work-test");
const claudeConfigDir = path.join(process.cwd(), ".claude-work-test");
return yield* withFakeClaudeEnv(
{
// @effect-diagnostics-next-line preferSchemaOverJson:off
@@ -298,8 +298,8 @@ it.layer(ClaudeTextGenerationTestLayer)("ClaudeTextGeneration", (it) => {
title: "Use Claude home",
},
}),
homeMustBe: claudeHome,
claudeConfig: { homePath: claudeHome },
configDirMustBe: claudeConfigDir,
claudeConfig: { homePath: claudeConfigDir },
},
(textGeneration) =>
Effect.gen(function* () {
@@ -6,6 +6,9 @@ import * as Layer from "effect/Layer";
import * as Path from "effect/Path";
import * as PlatformError from "effect/PlatformError";
import * as Scope from "effect/Scope";
import * as Sink from "effect/Sink";
import * as Stream from "effect/Stream";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
import { GitCommandError } from "@t3tools/contracts";
import { ServerConfig } from "../config.ts";
@@ -20,6 +23,21 @@ const TestLayer = GitVcsDriver.layer.pipe(
Layer.provideMerge(NodeServices.layer),
);
const makeNonRepositoryHandle = () =>
ChildProcessSpawner.makeHandle({
pid: ChildProcessSpawner.ProcessId(1),
exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(128)),
isRunning: Effect.succeed(false),
kill: () => Effect.void,
unref: Effect.succeed(Effect.void),
stdin: Sink.drain,
stdout: Stream.empty,
stderr: Stream.encodeText(Stream.make("fatal: not a git repository")),
all: Stream.empty,
getInputFd: () => Sink.drain,
getOutputFd: () => Stream.empty,
});
const makeTmpDir = (
prefix = "git-vcs-driver-test-",
): Effect.Effect<string, PlatformError.PlatformError, FileSystem.FileSystem | Scope.Scope> =>
@@ -77,7 +95,62 @@ const initRepoWithCommit = (
return { initialBranch };
});
it.effect("uses stable diagnostics for every parsed non-repository command", () => {
const commands: Array<{ readonly args: ReadonlyArray<string>; readonly lcAll?: string }> = [];
const spawner = ChildProcessSpawner.make((command) =>
Effect.sync(() => {
if (!ChildProcess.isStandardCommand(command)) {
return assert.fail("expected a standard Git command");
}
commands.push({
args: command.args,
...(command.options.env?.LC_ALL ? { lcAll: command.options.env.LC_ALL } : {}),
});
return makeNonRepositoryHandle();
}),
);
const nodeServicesLayer = Layer.merge(
NodeServices.layer,
Layer.succeed(ChildProcessSpawner.ChildProcessSpawner, spawner),
);
const layer = GitVcsDriver.layer.pipe(
Layer.provide(ServerConfigLayer),
Layer.provideMerge(nodeServicesLayer),
);
return Effect.gen(function* () {
const driver = yield* GitVcsDriver.GitVcsDriver;
const cwd = "/repo";
yield* driver.statusDetailsLocal(cwd);
yield* driver.statusDetailsRemote(cwd, { refreshUpstream: false });
yield* driver.listRefs({ cwd });
assert.deepStrictEqual(commands, [
{ args: ["status", "--porcelain=2", "--branch"], lcAll: "C" },
{ args: ["rev-parse", "--abbrev-ref", "HEAD"], lcAll: "C" },
{ args: ["branch", "--no-color", "--no-column"], lcAll: "C" },
]);
}).pipe(Effect.provide(layer));
});
it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
describe("process environment", () => {
it.effect("preserves the caller locale for general Git subprocesses", () =>
Effect.gen(function* () {
const cwd = yield* makeTmpDir();
const locale = yield* git(
cwd,
["-c", 'alias.print-locale=!printf "%s" "$LC_ALL"', "print-locale"],
{ LC_ALL: "zh_CN.UTF-8" },
);
assert.equal(locale, "zh_CN.UTF-8");
}),
);
});
describe("structured errors", () => {
it.effect("preserves structured spawn context and the platform cause", () =>
Effect.gen(function* () {
@@ -620,6 +693,24 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
assert.notInclude(status, "a.txt");
}),
);
it.effect("treats selected file paths literally", () =>
Effect.gen(function* () {
const cwd = yield* makeTmpDir();
yield* initRepoWithCommit(cwd);
const driver = yield* GitVcsDriver.GitVcsDriver;
yield* writeTextFile(cwd, "selected[1].txt", "literal\n");
yield* writeTextFile(cwd, "selected1.txt", "pattern match\n");
yield* driver.prepareCommitContext(cwd, ["selected[1].txt"]);
assert.equal(yield* git(cwd, ["diff", "--cached", "--name-only"]), "selected[1].txt");
const status = yield* git(cwd, ["status", "--porcelain"]);
assert.include(status, "?? selected1.txt");
}),
);
});
describe("remote operations", () => {
+18 -3
View File
@@ -830,6 +830,20 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
}),
);
const executeGitWithStableDiagnostics = (
operation: string,
cwd: string,
args: readonly string[],
options: ExecuteGitOptions = {},
): Effect.Effect<GitVcsDriver.ExecuteGitResult, GitCommandError> =>
executeGit(operation, cwd, args, {
...options,
env: {
...options.env,
LC_ALL: "C",
},
});
const runGit = (
operation: string,
cwd: string,
@@ -1184,7 +1198,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
});
const readStatusDetailsRemote = Effect.fn("readStatusDetailsRemote")(function* (cwd: string) {
const branchResult = yield* executeGit(
const branchResult = yield* executeGitWithStableDiagnostics(
"GitVcsDriver.statusDetailsRemote.branch",
cwd,
["rev-parse", "--abbrev-ref", "HEAD"],
@@ -1304,7 +1318,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
});
const readStatusDetailsLocal = Effect.fn("readStatusDetailsLocal")(function* (cwd: string) {
const statusResult = yield* executeGit(
const statusResult = yield* executeGitWithStableDiagnostics(
"GitVcsDriver.statusDetails.status",
cwd,
["status", "--porcelain=2", "--branch"],
@@ -1524,6 +1538,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
}),
);
yield* runGit("GitVcsDriver.prepareCommitContext.addSelected", cwd, [
"--literal-pathspecs",
"add",
"-A",
"--",
@@ -1985,7 +2000,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
const branchRecencyPromise = readBranchRecency(input.cwd).pipe(
Effect.orElseSucceed(() => new Map<string, number>()),
);
const localBranchResult = yield* executeGit(
const localBranchResult = yield* executeGitWithStableDiagnostics(
"GitVcsDriver.listRefs.branchNoColor",
input.cwd,
["branch", "--no-color", "--no-column"],
+23 -23
View File
@@ -1166,6 +1166,14 @@ const makeWsRpcLayer = (
})),
);
// Attach live delivery before reading either replay or snapshot state.
// Otherwise an event published while the snapshot is loading is lost.
const liveBuffer = yield* Queue.unbounded<OrchestrationThreadStreamItem>();
yield* Effect.forkScoped(
liveStream.pipe(Stream.runForEach((item) => Queue.offer(liveBuffer, item))),
);
const bufferedLiveStream = Stream.fromQueue(liveBuffer);
// When the client already loaded the snapshot over HTTP it passes
// that snapshot's sequence, and we resume the live subscription by
// replaying persisted events after it instead of re-sending the
@@ -1185,28 +1193,20 @@ const makeWsRpcLayer = (
// so a global cap could otherwise omit this thread's events.
if (input.afterSequence !== undefined) {
const afterSequence = input.afterSequence;
return Stream.unwrap(
Effect.gen(function* () {
const liveBuffer = yield* Queue.unbounded<OrchestrationThreadStreamItem>();
yield* Effect.forkScoped(
liveStream.pipe(Stream.runForEach((item) => Queue.offer(liveBuffer, item))),
);
const catchUpStream = orchestrationEngine
.readEvents(afterSequence, Number.MAX_SAFE_INTEGER)
.pipe(
Stream.filter(isThisThreadDetailEvent),
Stream.map((event) => ({ kind: "event" as const, event })),
Stream.mapError(
(cause) =>
new OrchestrationGetSnapshotError({
message: `Failed to replay thread ${input.threadId} events`,
cause,
}),
),
);
return Stream.concat(catchUpStream, Stream.fromQueue(liveBuffer));
}),
);
const catchUpStream = orchestrationEngine
.readEvents(afterSequence, Number.MAX_SAFE_INTEGER)
.pipe(
Stream.filter(isThisThreadDetailEvent),
Stream.map((event) => ({ kind: "event" as const, event })),
Stream.mapError(
(cause) =>
new OrchestrationGetSnapshotError({
message: `Failed to replay thread ${input.threadId} events`,
cause,
}),
),
);
return Stream.concat(catchUpStream, bufferedLiveStream);
}
const snapshot = yield* projectionSnapshotQuery
@@ -1233,7 +1233,7 @@ const makeWsRpcLayer = (
kind: "snapshot" as const,
snapshot: snapshot.value,
}),
liveStream,
bufferedLiveStream,
);
}),
{ "rpc.aggregate": "orchestration" },
@@ -24,6 +24,7 @@ const baseState: DesktopUpdateState = {
runningUnderArm64Translation: false,
availableVersion: null,
downloadedVersion: null,
releaseNotes: [],
downloadPercent: null,
checkedAt: null,
message: null,
@@ -0,0 +1,13 @@
import { describe, expect, it } from "vite-plus/test";
import { getPreviewPanelMaxWidth } from "./PreviewPanelShell";
describe("getPreviewPanelMaxWidth", () => {
it("allows the panel to use 70% of an ultra-wide viewport without a pixel ceiling", () => {
expect(getPreviewPanelMaxWidth(6_000)).toBe(4_200);
});
it("rounds fractional CSS pixels down", () => {
expect(getPreviewPanelMaxWidth(2_001)).toBe(1_400);
});
});
@@ -10,12 +10,14 @@ export type PreviewPanelMode = "inline" | "sheet" | "sidebar" | "embedded";
const PREVIEW_PANEL_WIDTH_STORAGE_KEY = "t3code:preview-panel-width";
const PREVIEW_PANEL_MIN_WIDTH = 360;
/** Hard ceiling so a wide monitor can't yield a panel that swallows the chat. */
const PREVIEW_PANEL_MAX_WIDTH_PX = 1400;
/** Fraction of the viewport allowed; the panel is min(this · vw, MAX_PX). */
/** Fraction of the viewport allowed, preserving the remaining space for chat. */
const PREVIEW_PANEL_MAX_WIDTH_FRACTION = 0.7;
const PREVIEW_PANEL_DEFAULT_WIDTH = 540;
export function getPreviewPanelMaxWidth(viewportWidth: number): number {
return Math.floor(viewportWidth * PREVIEW_PANEL_MAX_WIDTH_FRACTION);
}
/**
* Shell for the preview panel. In inline mode the panel is user-resizable
* via a drag handle on the left edge; width persists per browser. In
@@ -82,5 +84,5 @@ function useViewportClampedMaxWidth(): number {
if (frame !== 0) window.cancelAnimationFrame(frame);
};
}, []);
return Math.min(PREVIEW_PANEL_MAX_WIDTH_PX, Math.floor(vw * PREVIEW_PANEL_MAX_WIDTH_FRACTION));
return getPreviewPanelMaxWidth(vw);
}
@@ -15,8 +15,48 @@ import {
shouldToastDesktopUpdateActionResult,
} from "../desktopUpdate.logic";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
import { Separator } from "../ui/separator";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
function SidebarUpdateReleaseNotesTooltip({
state,
tooltip,
}: {
readonly state: NonNullable<ReturnType<typeof useDesktopUpdateState>>;
readonly tooltip: string;
}) {
if (state.channel !== "nightly" || state.releaseNotes.length === 0) {
return <>{tooltip}</>;
}
return (
<div className="w-120 max-w-[calc(100vw-2rem)] text-left">
<div className="px-1">
<div className="text-sm leading-5 font-medium">{tooltip}</div>
</div>
<div className="pointer-events-auto max-h-[min(28rem,calc(100vh-6rem))] overflow-y-auto px-1 pt-4 pb-1">
{state.releaseNotes.map((releaseNote, index) => (
<div key={releaseNote.version}>
{index > 0 && <Separator className="my-3 bg-border/60" />}
<section>
<h3 className="text-muted-foreground text-xs leading-4 font-semibold">
{index === 0 ? "What's changed" : `Changes in ${releaseNote.version}`}
</h3>
<ul className="mt-2 space-y-1.5 pl-4 text-xs leading-5 text-popover-foreground/90">
{releaseNote.items.map((item, itemIndex) => (
<li className="list-disc break-words" key={`${releaseNote.version}-${itemIndex}`}>
{item}
</li>
))}
</ul>
</section>
</div>
))}
</div>
</div>
);
}
export function SidebarUpdatePill() {
const state = useDesktopUpdateState();
const [dismissed, setDismissed] = useState(false);
@@ -151,7 +191,21 @@ export function SidebarUpdatePill() {
</button>
}
/>
<TooltipPopup side="top">{tooltip}</TooltipPopup>
<TooltipPopup
align="start"
className={
state?.channel === "nightly" && state.releaseNotes.length > 0
? "max-w-none text-balance"
: undefined
}
side="top"
>
{state ? (
<SidebarUpdateReleaseNotesTooltip state={state} tooltip={tooltip} />
) : (
tooltip
)}
</TooltipPopup>
</Tooltip>
{action === "download" && (
<Tooltip>
+1
View File
@@ -15,6 +15,7 @@ const baseState: DesktopUpdateState = {
runningUnderArm64Translation: false,
availableVersion: null,
downloadedVersion: null,
releaseNotes: [],
downloadPercent: null,
checkedAt: null,
message: null,
+50
View File
@@ -0,0 +1,50 @@
# Brand icons
The three Icon Composer projects are the source of truth for full application icons:
- `dev/app-icon.icon`
- `nightly/app-icon.icon`
- `prod/app-icon.icon`
Each project uses `text.svg` for the T3 mark and `background.svg` when the background is a vector layer. Additional layers use semantic names that describe their role and placement.
Run `vp run icons:export` from the repository root to regenerate the tracked iOS, Linux, Windows, and web assets. Run `vp run icons:check` to verify that those generated assets match their sources without changing files.
Exporting requires Icon Composer 2 or newer on macOS. The script selects the newest compatible exporter from Xcode or a standalone Icon Composer installation and pins design generation 26. Set `ICON_COMPOSER_TOOL` to the full path of `Icon Composer.app/Contents/Executables/ictool` to override automatic discovery.
## macOS exports
Icon Composer's command-line exporter does not expose the `macOS pre-Tahoe` preset. A plain command-line `macOS` export is full bleed and is not suitable for the desktop app, so the export script intentionally leaves the tracked macOS PNGs unchanged and prints a reminder after every run.
After changing an Icon Composer project, open it in Icon Composer and export the macOS PNG with exactly these settings:
- Platform: `macOS pre-Tahoe`
- Appearance: `Default`
- Size: `1024pt`
- Scale: `1×`
Save the three exports to:
- `dev/app-icon.icon` -> `dev/blueprint-macos-1024.png`
- `nightly/app-icon.icon` -> `nightly/nightly-macos-1024.png`
- `prod/app-icon.icon` -> `prod/black-macos-1024.png`
The result must be a 1024×1024 PNG with the classic macOS safe area: the opaque icon body is 824×824, inset 100 pixels on every side, with only the native Icon Composer shadow extending into the surrounding transparent canvas.
To have Codex perform the native exports, paste this prompt into a task opened at the repository root:
```text
Use [@Computer](plugin://computer-use@openai-bundled) and the Icon Composer app to export the three macOS app icons in this repository.
For each project below, use Platform: macOS pre-Tahoe, Appearance: Default, Size: 1024pt, and Scale: 1×, then save the PNG to the exact destination:
- assets/dev/app-icon.icon -> assets/dev/blueprint-macos-1024.png
- assets/nightly/app-icon.icon -> assets/nightly/nightly-macos-1024.png
- assets/prod/app-icon.icon -> assets/prod/black-macos-1024.png
Do not resize, composite, or otherwise post-process the exported PNGs.
Verify every result is 1024×1024 and has the classic macOS safe area: an 824×824 opaque body inset 100px on every side, with only Icon Composer's native shadow extending beyond it.
```
Do not edit the generated PNG or ICO files directly.
@@ -0,0 +1,37 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="arrowStart" markerWidth="5" markerHeight="5" refX="1.2" refY="2.5" orient="auto" markerUnits="strokeWidth">
<path d="M4.5 0.6L1 2.5L4.5 4.4" fill="none" stroke="#DDF7FF" stroke-width="0.8" stroke-linecap="round"/>
</marker>
<marker id="arrowEnd" markerWidth="5" markerHeight="5" refX="3.8" refY="2.5" orient="auto" markerUnits="strokeWidth">
<path d="M0.5 0.6L4 2.5L0.5 4.4" fill="none" stroke="#DDF7FF" stroke-width="0.8" stroke-linecap="round"/>
</marker>
</defs>
<g stroke="#DDF7FF" stroke-linecap="round" stroke-linejoin="round">
<g opacity="0.9" stroke-width="0.44">
<path d="M15.5309 31V25.6M64.3309 31V25.6M68.1653 31V25.6M107.365 31V25.6"/>
<path d="M16.9 27.2H62.96" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
<path d="M69.54 27.2H105.99" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
<path d="M33.4509 97.3V103M46.4109 97.3V103M65.3653 97.3V103M109.925 97.3V103"/>
<path d="M34.82 101.1H45.04" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
<path d="M66.74 101.1H108.55" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
<path d="M10.2 37H6.1M10.2 47.6H6.1M10.2 93H6.1"/>
<path d="M7.9 38.4V46.2" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
<path d="M7.9 49V91.6" marker-start="url(#arrowStart)" marker-end="url(#arrowEnd)"/>
</g>
<g opacity="0.58" stroke-width="0.34">
<path d="M12.5 35.1H66.8M39.9309 94.8V44.5M64.3309 34.2V49.9M68.1653 34.2V49.9" stroke-dasharray="1.6 1.6"/>
<path d="M65.3653 65.2H109.925M87.2 32.7V98.2" stroke-dasharray="1.2 2"/>
<circle cx="87.2" cy="65.2" r="20.8"/>
<circle cx="87.2" cy="65.2" r="1.1"/>
</g>
<g opacity="0.76" stroke-width="0.4">
<path d="M24 20V24M22 22H26M101 17V21M99 19H103M114 106V110M112 108H116"/>
<path d="M54 107L57 110M57 107L54 110M16 74L19 77M19 74L16 77"/>
<path d="M74 22H82M78 18V26" stroke-dasharray="0.7 1.1"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,51 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="paper" x1="36" y1="0" x2="92" y2="128" gradientUnits="userSpaceOnUse">
<stop stop-color="#67C2FF"/>
<stop offset="0.44" stop-color="#347FF8"/>
<stop offset="1" stop-color="#1538D0"/>
</linearGradient>
<radialGradient id="cyanGlow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(92 22) rotate(137) scale(78 70)">
<stop stop-color="#D4F6FF" stop-opacity="0.62"/>
<stop offset="0.52" stop-color="#65C8FF" stop-opacity="0.24"/>
<stop offset="1" stop-color="#276AF1" stop-opacity="0"/>
</radialGradient>
<radialGradient id="edgeShade" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(64 58) rotate(90) scale(77)">
<stop offset="0.68" stop-color="#102EBC" stop-opacity="0"/>
<stop offset="1" stop-color="#061A88" stop-opacity="0.48"/>
</radialGradient>
<pattern id="minorGrid" width="4" height="4" patternUnits="userSpaceOnUse">
<path d="M4 0H0V4" stroke="#D9F7FF" stroke-width="0.18" opacity="0.38"/>
</pattern>
<pattern id="majorGrid" width="16" height="16" patternUnits="userSpaceOnUse">
<rect width="16" height="16" fill="url(#minorGrid)"/>
<path d="M16 0H0V16" stroke="#F0FCFF" stroke-width="0.34" opacity="0.52"/>
</pattern>
<clipPath id="frame">
<rect width="128" height="128" rx="10"/>
</clipPath>
</defs>
<g clip-path="url(#frame)">
<rect width="128" height="128" fill="url(#paper)"/>
<rect width="128" height="128" fill="url(#cyanGlow)"/>
<rect x="4" y="4" width="120" height="120" fill="url(#majorGrid)" opacity="0.96"/>
<path d="M64 4V124M4 64H124" stroke="#F0FCFF" stroke-width="0.3" opacity="0.46"/>
<rect x="5.75" y="5.75" width="116.5" height="116.5" rx="5.5" stroke="#F1FCFF" stroke-width="0.5" opacity="0.66"/>
<g stroke="#BFE9F7" stroke-linecap="round" opacity="0.2">
<path d="M14 19L24 12M17 22L29 13" stroke-width="0.5"/>
<path d="M106 25L115 18M104 30L118 20" stroke-width="0.38"/>
<path d="M11 108L23 101M16 113L28 105" stroke-width="0.42"/>
<path d="M102 113L116 104M107 116L120 108" stroke-width="0.46"/>
</g>
<g fill="#D7F4FF" opacity="0.22">
<circle cx="18" cy="30" r="0.45"/>
<circle cx="112" cy="38" r="0.35"/>
<circle cx="22" cy="98" r="0.3"/>
<circle cx="109" cy="94" r="0.5"/>
<circle cx="94" cy="14" r="0.32"/>
</g>
<rect width="128" height="128" fill="url(#edgeShade)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+3
View File
@@ -0,0 +1,3 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<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>

After

Width:  |  Height:  |  Size: 890 B

@@ -6,35 +6,40 @@
{
"layers": [
{
"hidden": false,
"image-name": "gpt-image-1.5-jd70szmrd03p36z4zv48ycsbax81egvr.png",
"name": "gpt-image-1.5-jd70szmrd03p36z4zv48ycsbax81egvr",
"glass": true,
"image-name": "text.svg",
"name": "Text",
"position": {
"scale": 1.1,
"scale": 8.5,
"translation-in-points": [0, 0]
}
},
{
"image-name": "T3.svg",
"name": "T3",
"glass": false,
"image-name": "annotations.svg",
"name": "Annotations",
"position": {
"scale": 10,
"scale": 8.5,
"translation-in-points": [0, 0]
}
},
{
"hidden": true,
"image-name": "Texturelabs_Paper_381XL.jpg",
"name": "Texturelabs_Paper_381XL"
"glass": true,
"image-name": "background.svg",
"name": "Background",
"position": {
"scale": 8.1,
"translation-in-points": [0, 0]
}
}
],
"shadow": {
"kind": "neutral",
"opacity": 0.5
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.5
"value": 0.2
}
}
],
@@ -1,3 +0,0 @@
<svg width="77" height="47" viewBox="0 0 77 47" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.56 45.5V8.58H1.69082e-06V-3.09944e-06H39.65V8.58H25.09V45.5H14.56ZM57.8454 46.28C54.6821 46.28 51.5404 45.8683 48.4204 45.045C45.3004 44.1783 42.6571 42.965 40.4904 41.405L44.5854 33.345C46.3188 34.6017 48.3338 35.5983 50.6304 36.335C52.9271 37.0717 55.2454 37.44 57.5854 37.44C60.2288 37.44 62.3088 36.92 63.8254 35.88C65.3421 34.84 66.1004 33.41 66.1004 31.59C66.1004 29.8567 65.4288 28.4917 64.0854 27.495C62.7421 26.4983 60.5754 26 57.5854 26H52.7754V19.045L65.4504 4.68L66.6204 8.45H42.7654V-3.09944e-06H74.6154V6.825L62.0054 21.19L56.6754 18.135H59.7304C65.3204 18.135 69.5454 19.3917 72.4054 21.905C75.2654 24.4183 76.6954 27.6467 76.6954 31.59C76.6954 34.1467 76.0238 36.5517 74.6804 38.805C73.3371 41.015 71.2788 42.8133 68.5054 44.2C65.7321 45.5867 62.1788 46.28 57.8454 46.28Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

@@ -1,47 +0,0 @@
{
"fill": {
"solid": "display-p3:0.00000,0.00000,0.00000,1.00000"
},
"groups": [
{
"layers": [
{
"blend-mode": "normal",
"fill": "automatic",
"glass": true,
"hidden": false,
"image-name": "gpt-image-1.5-kn76n9hynne5q3qxy3g91chp2d84t871.png",
"name": "gpt-image-1.5-kn76n9hynne5q3qxy3g91chp2d84t871",
"position": {
"scale": 1.05,
"translation-in-points": [0, 0]
}
},
{
"image-name": "T3.svg",
"name": "T3",
"position": {
"scale": 10,
"translation-in-points": [0, 0]
}
},
{
"hidden": false,
"image-name": "Texturelabs_Paper_381XL.jpg",
"name": "Texturelabs_Paper_381XL"
}
],
"shadow": {
"kind": "neutral",
"opacity": 0.5
},
"translucency": {
"enabled": true,
"value": 0.5
}
}
],
"supported-platforms": {
"squares": ["iOS", "macOS"]
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 277 KiB

@@ -0,0 +1,43 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="night" x1="12" y1="6" x2="116" y2="124" gradientUnits="userSpaceOnUse">
<stop stop-color="#07152F"/>
<stop offset="0.5" stop-color="#151443"/>
<stop offset="1" stop-color="#32155B"/>
</linearGradient>
<radialGradient id="skyGlow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(90 28) rotate(137) scale(78 70)">
<stop stop-color="#5165D8" stop-opacity="0.4"/>
<stop offset="0.5" stop-color="#283075" stop-opacity="0.16"/>
<stop offset="1" stop-color="#111635" stop-opacity="0"/>
</radialGradient>
<radialGradient id="horizonGlow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(42 127) rotate(-70) scale(68 96)">
<stop stop-color="#6646B6" stop-opacity="0.34"/>
<stop offset="1" stop-color="#352066" stop-opacity="0"/>
</radialGradient>
<clipPath id="frame">
<rect width="128" height="128" rx="10"/>
</clipPath>
</defs>
<g clip-path="url(#frame)">
<rect width="128" height="128" fill="url(#night)"/>
<rect width="128" height="128" fill="url(#skyGlow)"/>
<rect width="128" height="128" fill="url(#horizonGlow)"/>
<!-- A few tiny stars kept to the perimeter so the wordmark stays clear. -->
<g fill="#E4EAFF">
<circle cx="17" cy="18" r="0.55" fill-opacity="0.82"/>
<circle cx="54" cy="14" r="0.4" fill-opacity="0.65"/>
<circle cx="116" cy="42" r="0.45" fill-opacity="0.72"/>
<circle cx="10" cy="70" r="0.35" fill-opacity="0.56"/>
<circle cx="117" cy="88" r="0.4" fill-opacity="0.6"/>
</g>
<path d="M31 22V24.8M29.6 23.4H32.4" stroke="#EEF2FF" stroke-width="0.5" stroke-linecap="round" opacity="0.72"/>
<path d="M111 58V60M110 59H112" stroke="#CBD8FF" stroke-width="0.45" stroke-linecap="round" opacity="0.58"/>
<!-- Broad horizon remains below the T3 baseline (y=94). -->
<path d="M-12 119C14 99 39 99 63 110C87 121 110 116 140 96V140H-12V119Z" fill="#20184E" fill-opacity="0.42"/>
<path d="M-12 129C15 111 42 112 66 122C91 132 114 124 140 107V140H-12V129Z" fill="#6946B8" fill-opacity="0.22"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -0,0 +1,21 @@
<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="cloud" x1="7" y1="10" x2="57" y2="25" gradientUnits="userSpaceOnUse">
<stop stop-color="#4EA4FF" stop-opacity="0.62"/>
<stop offset="0.52" stop-color="#696FEA" stop-opacity="0.72"/>
<stop offset="1" stop-color="#A85BEA" stop-opacity="0.58"/>
</linearGradient>
<radialGradient id="highlight" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(30 14) rotate(13) scale(27 10)">
<stop stop-color="#C8D7FF" stop-opacity="0.4"/>
<stop offset="1" stop-color="#8C8EF2" stop-opacity="0"/>
</radialGradient>
<filter id="soft" x="-8" y="-8" width="80" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.5"/>
</filter>
</defs>
<g filter="url(#soft)">
<path d="M7 23.5C7 18.9 10.8 15.2 15.5 15.2C16.9 10.7 21.1 7.5 26.1 7.5C31 7.5 35.2 10.5 36.7 14.8C38.5 13.2 40.9 12.2 43.5 12.2C49.1 12.2 53.7 16.4 54.1 21.8C57 22.2 59.2 24 60 26.5H8.2C7.4 25.7 7 24.7 7 23.5Z" fill="url(#cloud)"/>
<path d="M11 22.9C12.7 19.8 16 18 19.5 18.5C21 13.4 25.6 10 30.8 10.6C35 11 38.3 13.9 39.4 17.7C43.8 15.5 49 17.3 51.1 21.7C46.2 20.3 41.9 21 37.7 22.1C29.6 24.2 21.5 21.3 11 22.9Z" fill="url(#highlight)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,21 @@
<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="cloud" x1="7" y1="10" x2="57" y2="25" gradientUnits="userSpaceOnUse">
<stop stop-color="#4EA4FF" stop-opacity="0.62"/>
<stop offset="0.52" stop-color="#696FEA" stop-opacity="0.72"/>
<stop offset="1" stop-color="#A85BEA" stop-opacity="0.58"/>
</linearGradient>
<radialGradient id="highlight" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(30 14) rotate(13) scale(27 10)">
<stop stop-color="#C8D7FF" stop-opacity="0.4"/>
<stop offset="1" stop-color="#8C8EF2" stop-opacity="0"/>
</radialGradient>
<filter id="soft" x="-8" y="-8" width="80" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.5"/>
</filter>
</defs>
<g transform="translate(64 0) scale(-1 1)" filter="url(#soft)">
<path d="M7 23.5C7 18.9 10.8 15.2 15.5 15.2C16.9 10.7 21.1 7.5 26.1 7.5C31 7.5 35.2 10.5 36.7 14.8C38.5 13.2 40.9 12.2 43.5 12.2C49.1 12.2 53.7 16.4 54.1 21.8C57 22.2 59.2 24 60 26.5H8.2C7.4 25.7 7 24.7 7 23.5Z" fill="url(#cloud)"/>
<path d="M11 22.9C12.7 19.8 16 18 19.5 18.5C21 13.4 25.6 10 30.8 10.6C35 11 38.3 13.9 39.4 17.7C43.8 15.5 49 17.3 51.1 21.7C46.2 20.3 41.9 21 37.7 22.1C29.6 24.2 21.5 21.3 11 22.9Z" fill="url(#highlight)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,3 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<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>

After

Width:  |  Height:  |  Size: 890 B

+94
View File
@@ -0,0 +1,94 @@
{
"fill": {
"automatic-gradient": "display-p3:0.00000,0.00000,0.00000,1.00000"
},
"groups": [
{
"layers": [
{
"glass": true,
"image-name": "text.svg",
"name": "Text",
"position": {
"scale": 8.5,
"translation-in-points": [0, 0]
}
},
{
"glass": false,
"image-name": "cloud-upper-right.svg",
"name": "Cloud Upper Right",
"opacity": 1,
"position": {
"scale": 15,
"translation-in-points": [387.9605131881942, -134.30064713259117]
}
},
{
"glass": false,
"image-name": "cloud-lower-left.svg",
"name": "Cloud Lower Left",
"position": {
"scale": 25,
"translation-in-points": [-309.63750000000005, 268.66077693836917]
}
},
{
"glass": true,
"hidden": false,
"image-name": "background.svg",
"name": "Background",
"position": {
"scale": 8.1,
"translation-in-points": [0, -2.171875]
}
}
],
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.2
}
},
{
"layers": [],
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.2
}
},
{
"layers": [],
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.2
}
},
{
"layers": [],
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.2
}
}
],
"supported-platforms": {
"circles": ["watchOS"],
"squares": "shared"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Loaded 100 of 139 files, more files were not shown because too many files have changed in this diff. Show more