From 51eb2d5437b217b5f9a8e9eff4f97a8e353ce201 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 13:13:29 -0800 Subject: [PATCH 001/385] fix(web): usage chart's screen-reader caption stays hidden in Firefox (#38332) --- .../components/usage/UsageProviderChart.tsx | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/apps/web/src/components/usage/UsageProviderChart.tsx b/apps/web/src/components/usage/UsageProviderChart.tsx index 520fe45404a60..90c17d28011ac 100644 --- a/apps/web/src/components/usage/UsageProviderChart.tsx +++ b/apps/web/src/components/usage/UsageProviderChart.tsx @@ -522,39 +522,42 @@ export function UsageProviderChart({ - {/* The plot and its axes are hover-only; this carries the same figures for screen readers. */} - - - - - - {providers.map((provider) => ( - - ))} - {providers.length > 1 ? : null} - - - - {periods.map((period, index) => { - const column = columns[index]; - return ( - - - {providers.map((provider) => ( - - ))} - {providers.length > 1 ? : null} - - ); - })} - -
- {`${resolution === "hour" ? "Hourly" : "Daily"} ${metric === "tokens" ? "processed tokens" : "cost"} by provider`} -
{resolution === "hour" ? "Hour" : "Day"} - {PROVIDER_PRESENTATION[provider].label} - Total
{formatTooltipPeriod(period)} - {format(column?.bands.find((band) => band.provider === provider)?.value ?? 0)} - {format(column?.total ?? 0)}
+ {/* The plot and its axes are hover-only; this carries the same figures for screen readers. + sr-only sits on a wrapper: Firefox does not clip a table's caption by the table's own box. */} +
+ + + + + + {providers.map((provider) => ( + + ))} + {providers.length > 1 ? : null} + + + + {periods.map((period, index) => { + const column = columns[index]; + return ( + + + {providers.map((provider) => ( + + ))} + {providers.length > 1 ? : null} + + ); + })} + +
+ {`${resolution === "hour" ? "Hourly" : "Daily"} ${metric === "tokens" ? "processed tokens" : "cost"} by provider`} +
{resolution === "hour" ? "Hour" : "Day"} + {PROVIDER_PRESENTATION[provider].label} + Total
{formatTooltipPeriod(period)} + {format(column?.bands.find((band) => band.provider === provider)?.value ?? 0)} + {format(column?.total ?? 0)}
+
); } From 94dc06e7ac13a337f9cbebe5f1f89d0d47976399 Mon Sep 17 00:00:00 2001 From: Aritra Das <64171580+Ari-03@users.noreply.github.com> Date: Tue, 17 Nov 2026 13:29:28 -0800 Subject: [PATCH 002/385] fix(cli): keep the old database when project or thread records are missing (#38325) Co-authored-by: Julius Marminge --- apps/server/src/cli/doctor.test.ts | 2 + apps/server/src/cli/doctor.ts | 17 ++++- .../persistence/DatabaseMaintenance.test.ts | 24 +++++++ .../src/persistence/DatabaseMaintenance.ts | 72 ++++++++++++++++--- docs/user/background-service.md | 5 +- 5 files changed, 107 insertions(+), 13 deletions(-) diff --git a/apps/server/src/cli/doctor.test.ts b/apps/server/src/cli/doctor.test.ts index aec1217494981..6315378d07cb8 100644 --- a/apps/server/src/cli/doctor.test.ts +++ b/apps/server/src/cli/doctor.test.ts @@ -68,6 +68,7 @@ it.effect( reclaimableBytes: 1000, incrementalVacuumEnabled: false, legacyDatabaseBytes: 4000, + legacyOnlyRecords: { projects: 0, threads: 0 }, }), compact: () => startServer.pipe( @@ -151,6 +152,7 @@ it.effect("warns how long reclaiming can take and reports each step with its ela reclaimableBytes: 0, incrementalVacuumEnabled: false, legacyDatabaseBytes: null, + legacyOnlyRecords: null, }), compact: (_databasePath, onStep) => Effect.gen(function* () { diff --git a/apps/server/src/cli/doctor.ts b/apps/server/src/cli/doctor.ts index a0bda99351646..50cd852e5b4b1 100644 --- a/apps/server/src/cli/doctor.ts +++ b/apps/server/src/cli/doctor.ts @@ -68,10 +68,20 @@ export const runDoctor = Effect.fn("runDoctor")(function* ( yield* Console.log( `Database: ${formatBytes(status.databaseBytes)}, ${formatBytes(status.reclaimableBytes)} reclaimable.`, ); + const legacyRecords = status.legacyOnlyRecords; if (status.legacyDatabaseBytes !== null) { yield* Console.log( `Database from before 0.1.0: ${formatBytes(status.legacyDatabaseBytes)}, kept for rolling back.`, ); + if (legacyRecords === null) { + yield* Console.log( + " Could not check for missing projects or threads. Keep the old database.", + ); + } else if (legacyRecords.projects > 0 || legacyRecords.threads > 0) { + yield* Console.log( + ` The current database is missing legacy records. Projects missing: ${legacyRecords.projects}. Threads missing: ${legacyRecords.threads}. Keep the old database for recovery.`, + ); + } } const repairs = [ ...(status.incrementalVacuumEnabled && status.reclaimableBytes === 0 @@ -90,13 +100,16 @@ export const runDoctor = Effect.fn("runDoctor")(function* ( status.reclaimableBytes >= DATABASE_COMPACTION_RECOMMENDED_BYTES, }, ]), - ...(status.legacyDatabaseBytes === null + ...(status.legacyDatabaseBytes === null || + legacyRecords === null || + legacyRecords.projects > 0 || + legacyRecords.threads > 0 ? [] : [ { id: "legacy" as const, title: "Delete the database from before 0.1.0", - description: `Frees ${formatBytes(status.legacyDatabaseBytes)}. Your threads and settings are already in the current database.\n Warning: after this, a T3 Code version before 0.1.0 starts with no threads or settings, so you can no longer roll back.`, + description: `Frees ${formatBytes(status.legacyDatabaseBytes)}.\n Warning: after this, a T3 Code version before 0.1.0 starts with no threads or settings, so you can no longer roll back.`, recommended: false, }, ]), diff --git a/apps/server/src/persistence/DatabaseMaintenance.test.ts b/apps/server/src/persistence/DatabaseMaintenance.test.ts index 2621d366c04a1..e186beb025f00 100644 --- a/apps/server/src/persistence/DatabaseMaintenance.test.ts +++ b/apps/server/src/persistence/DatabaseMaintenance.test.ts @@ -41,6 +41,8 @@ it.layer(DatabaseMaintenance.layer.pipe(Layer.provideMerge(NodeServices.layer))) const legacy = path.join(userdata, "state.sqlite"); yield* Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; + yield* sql`CREATE TABLE projection_projects (project_id TEXT PRIMARY KEY)`; + yield* sql`CREATE TABLE orchestration_v2_projection_threads (thread_id TEXT PRIMARY KEY)`; yield* sql`CREATE TABLE retained_data (value TEXT)`; yield* sql`INSERT INTO retained_data VALUES ('keep')`; }).pipe(Effect.provide(NodeSqliteClient.layer({ filename: dbPath }))); @@ -52,9 +54,31 @@ it.layer(DatabaseMaintenance.layer.pipe(Layer.provideMerge(NodeServices.layer))) yield* sql`PRAGMA journal_mode = WAL`; yield* sql`CREATE TABLE v1_data (value TEXT)`; yield* sql`INSERT INTO v1_data VALUES ('rollback')`; + yield* sql`CREATE TABLE projection_projects (project_id TEXT PRIMARY KEY, deleted_at TEXT)`; + yield* sql`CREATE TABLE projection_threads (thread_id TEXT PRIMARY KEY, deleted_at TEXT)`; + yield* sql`INSERT INTO projection_projects VALUES ('legacy-project', NULL)`; + yield* sql`INSERT INTO projection_threads VALUES ('legacy-thread', NULL), ('deleted-thread', '2026-10-01')`; }).pipe(Effect.provide(openLegacy)); assert.isAbove((yield* maintenance.inspect(dbPath)).legacyDatabaseBytes ?? 0, 0); + assert.deepEqual((yield* maintenance.inspect(dbPath)).legacyOnlyRecords, { + projects: 1, + threads: 1, + }); + const missing = yield* Effect.flip(maintenance.removeLegacyDatabase(dbPath)); + assert.equal(missing._tag, "LegacyDatabaseHasUnmigratedRecordsError"); + assert.isTrue(yield* fs.exists(legacy)); + + yield* Effect.gen(function* () { + const sql = yield* SqlClient.SqlClient; + yield* sql`INSERT INTO projection_projects VALUES ('legacy-project')`; + yield* sql`INSERT INTO orchestration_v2_projection_threads VALUES ('legacy-thread')`; + }).pipe(Effect.provide(NodeSqliteClient.layer({ filename: dbPath }))); + assert.deepEqual((yield* maintenance.inspect(dbPath)).legacyOnlyRecords, { + projects: 0, + threads: 0, + }); + const refused = yield* Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; yield* sql`SELECT value FROM v1_data`; diff --git a/apps/server/src/persistence/DatabaseMaintenance.ts b/apps/server/src/persistence/DatabaseMaintenance.ts index 07f2bdeecec6c..bdb1c459f6e94 100644 --- a/apps/server/src/persistence/DatabaseMaintenance.ts +++ b/apps/server/src/persistence/DatabaseMaintenance.ts @@ -11,6 +11,7 @@ import * as Schema from "effect/Schema"; // @effect-diagnostics-next-line nodeBuiltinImport:off -- Effect has no free-space query. import * as NodeFSP from "node:fs/promises"; import * as NodeOS from "node:os"; +import * as NodeURL from "node:url"; import * as SqlClient from "effect/sql/SqlClient"; import { isSqlError } from "effect/sql/SqlError"; @@ -66,7 +67,16 @@ export class LegacyDatabaseRemoveError extends Schema.TaggedError()( + "LegacyDatabaseHasUnmigratedRecordsError", + { projects: Schema.Int, threads: Schema.Int }, +) { + override get message() { + return `The current database is missing legacy records. Projects missing: ${this.projects}. Threads missing: ${this.threads}. Keep the old database for recovery.`; } } @@ -79,6 +89,8 @@ export class DiskSpaceCheckError extends Schema.TaggedError } } +type LegacyOnlyRecords = { readonly projects: number; readonly threads: number }; + export type DatabaseCompactStep = "prune-events" | "vacuum" | "rebuild-search" | "checkpoint"; export class DatabaseMaintenance extends Context.Service< @@ -91,6 +103,7 @@ export class DatabaseMaintenance extends Context.Service< readonly incrementalVacuumEnabled: boolean; /** Size of the database from before 0.1.0 still kept beside it, or null. */ readonly legacyDatabaseBytes: number | null; + readonly legacyOnlyRecords: LegacyOnlyRecords | null; }, DatabaseMissingError | DatabaseInspectError >; @@ -113,7 +126,10 @@ export class DatabaseMaintenance extends Context.Service< /** Deletes only the pre-0.1.0 database; earlier versions still use it. */ readonly removeLegacyDatabase: ( databasePath: string, - ) => Effect.Effect; + ) => Effect.Effect< + void, + DatabaseInUseError | LegacyDatabaseRemoveError | LegacyDatabaseHasUnmigratedRecordsError + >; } >()("t3/persistence/DatabaseMaintenance") {} @@ -143,7 +159,7 @@ const lockExclusively = Effect.fn("DatabaseMaintenance.lockExclusively")(functio ) { const sql = yield* SqlClient.SqlClient; yield* sql`PRAGMA busy_timeout = 0`; - yield* sql`PRAGMA locking_mode = EXCLUSIVE`; + yield* sql`PRAGMA main.locking_mode = EXCLUSIVE`; yield* sql`BEGIN EXCLUSIVE`.pipe( Effect.mapError((cause) => isSqlError(cause) && cause.reason._tag === "LockTimeoutError" @@ -166,6 +182,29 @@ const make = Effect.gen(function* () { } }); + const readLegacyOnlyRecords = Effect.fn("DatabaseMaintenance.readLegacyOnlyRecords")(function* ( + databasePath: string, + ) { + const sql = yield* SqlClient.SqlClient; + const currentUri = `${NodeURL.pathToFileURL(databasePath).href}?mode=ro`; + yield* sql`ATTACH DATABASE ${currentUri} AS current_v2`; + const [counts] = yield* sql` + SELECT + (SELECT COUNT(*) FROM main.projection_projects legacy + WHERE legacy.deleted_at IS NULL AND NOT EXISTS ( + SELECT 1 FROM current_v2.projection_projects current + WHERE current.project_id = legacy.project_id + )) AS projects, + (SELECT COUNT(*) FROM main.projection_threads legacy + WHERE legacy.deleted_at IS NULL AND NOT EXISTS ( + SELECT 1 FROM current_v2.orchestration_v2_projection_threads current + WHERE current.thread_id = legacy.thread_id + )) AS threads + `; + if (!counts) return yield* Effect.die(new Error("Missing result from legacy database counts")); + return counts; + }); + const inspect = Effect.fn("DatabaseMaintenance.inspect")( function* (databasePath: string) { yield* locate(databasePath); @@ -176,7 +215,14 @@ const make = Effect.gen(function* () { const legacyDatabaseBytes = (yield* fs.exists(legacy)) ? Number((yield* fs.stat(legacy)).size) : null; - return { ...storage, legacyDatabaseBytes }; + const legacyOnlyRecords = + legacyDatabaseBytes === null + ? null + : yield* readLegacyOnlyRecords(databasePath).pipe( + Effect.provide(NodeSqliteClient.layer({ filename: legacy, readonly: true })), + Effect.orElseSucceed(() => null), + ); + return { ...storage, legacyDatabaseBytes, legacyOnlyRecords }; }, (effect, databasePath) => effect.pipe( @@ -242,21 +288,27 @@ const make = Effect.gen(function* () { { discard: true }, ); const connection = NodeSqliteClient.layer({ filename: legacy }); + const check = lockExclusively(legacy).pipe( + Effect.andThen(readLegacyOnlyRecords(databasePath)), + Effect.flatMap((counts) => + counts.projects > 0 || counts.threads > 0 + ? new LegacyDatabaseHasUnmigratedRecordsError(counts) + : Effect.void, + ), + ); if ((yield* HostProcess.Platform) === "win32") { // Windows blocks unlink while any SQLite handle is open, including our own. - yield* lockExclusively(legacy).pipe(Effect.provide(connection)); + yield* check.pipe(Effect.provide(connection)); yield* removeFiles; } else { - yield* lockExclusively(legacy).pipe( - Effect.andThen(removeFiles), - Effect.provide(connection), - ); + yield* check.pipe(Effect.andThen(removeFiles), Effect.provide(connection)); } }, (effect, databasePath) => effect.pipe( Effect.mapError((cause) => - cause._tag === "DatabaseInUseError" + cause._tag === "DatabaseInUseError" || + cause._tag === "LegacyDatabaseHasUnmigratedRecordsError" ? cause : new LegacyDatabaseRemoveError({ path: legacyPath(databasePath), cause }), ), diff --git a/docs/user/background-service.md b/docs/user/background-service.md index 1bc41addf8c96..fb3d3cca9a1be 100644 --- a/docs/user/background-service.md +++ b/docs/user/background-service.md @@ -199,4 +199,7 @@ once next to the database for its write-ahead log. If you upgraded from a version before 0.1.0, its database (`state.sqlite`) is still kept next to the current one so you can roll back. `t3 doctor` offers to delete it, but never selects that repair for you and `--fix` skips it: once it -is gone, a version before 0.1.0 starts with no threads or settings. +is gone, a version before 0.1.0 starts with no threads or settings. It does +not offer to delete it while any project or thread you have not deleted is +missing from the current database, so the old file stays available for +recovery. From 54ad956ff229045bc6d9a844457426d009c10250 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 13:37:25 -0800 Subject: [PATCH 003/385] fix(server): file search keeps Git-ignored files a .ignore re-includes (#38337) --- .../src/workspace/WorkspaceEntries.test.ts | 6 +- .../workspace/WorkspaceSearchIndex.test.ts | 24 ++++++ .../src/workspace/WorkspaceSearchIndex.ts | 82 ++++++++++++------- 3 files changed, 80 insertions(+), 32 deletions(-) diff --git a/apps/server/src/workspace/WorkspaceEntries.test.ts b/apps/server/src/workspace/WorkspaceEntries.test.ts index 92d8bc882c951..363764ff70e8d 100644 --- a/apps/server/src/workspace/WorkspaceEntries.test.ts +++ b/apps/server/src/workspace/WorkspaceEntries.test.ts @@ -618,7 +618,7 @@ it.layer(layerTest, { excludeTestServices: true })("WorkspaceEntries", (it) => { } }), ); - it.effect("lets the nearest .ignore rule decide a symlink, and git's rules still hide it", () => + it.effect("lets the nearest .ignore rule decide a symlink, ahead of git's rules", () => Effect.gen(function* () { if ((yield* HostProcess.Platform) === "win32") return; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-symlinks-", git: true }); @@ -639,12 +639,12 @@ it.layer(layerTest, { excludeTestServices: true })("WorkspaceEntries", (it) => { for (const entries of [searched.entries, listed.entries]) { const paths = entries.map((entry) => entry.path); expect(paths).toContain("sub/hide-link.ts"); - expect(paths).not.toContain("keep-link.ts"); + expect(paths).toContain("keep-link.ts"); } // The real files are shown or hidden by the same rules. const listedPaths = listed.entries.map((entry) => entry.path); expect(listedPaths).toContain("sub/hide-real.ts"); - expect(listedPaths).not.toContain("keep-real.ts"); + expect(listedPaths).toContain("keep-real.ts"); }), ); it.effect("matches .ignore rules against whole names and treats folder links as links", () => diff --git a/apps/server/src/workspace/WorkspaceSearchIndex.test.ts b/apps/server/src/workspace/WorkspaceSearchIndex.test.ts index 8c42fcf52aabf..265a72a98a4aa 100644 --- a/apps/server/src/workspace/WorkspaceSearchIndex.test.ts +++ b/apps/server/src/workspace/WorkspaceSearchIndex.test.ts @@ -748,3 +748,27 @@ it.effect.skipIf(HostProcess.Platform.defaultValue() === "win32")( }), ).pipe(Effect.provide(testLayer)), ); + +// ripgrep and fff let a matching `.ignore` decide ahead of `.gitignore`, so Git's list must not hide it. +it.live("finds Git-ignored files that a root .ignore re-includes", () => + Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const vcsProcess = yield* VcsProcess.VcsProcess; + const cwd = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-search-reinclude-" }); + yield* vcsProcess.run({ operation: "test.gitInit", command: "git", args: ["init"], cwd }); + yield* fileSystem.writeFileString(path.join(cwd, ".gitignore"), "notes/\n"); + yield* fileSystem.writeFileString( + path.join(cwd, ".ignore"), + "!notes/\nnotes/**/*\n!notes/**/\n!notes/**/*.md\n", + ); + yield* fileSystem.makeDirectory(path.join(cwd, "notes", "daily"), { recursive: true }); + yield* fileSystem.writeFileString(path.join(cwd, "notes", "daily", "standup.md"), ""); + yield* fileSystem.writeFileString(path.join(cwd, "notes", "daily", "standup.txt"), ""); + + const searchIndex = yield* WorkspaceSearchIndex.make(cwd); + const result = yield* searchIndex.search("standup", 50, "file"); + + expect(result.entries).toEqual([{ kind: "file", path: "notes/daily/standup.md" }]); + }).pipe(Effect.scoped, Effect.provide(testLayer)), +); diff --git a/apps/server/src/workspace/WorkspaceSearchIndex.ts b/apps/server/src/workspace/WorkspaceSearchIndex.ts index b33ceade77fa5..e862a5d5325aa 100644 --- a/apps/server/src/workspace/WorkspaceSearchIndex.ts +++ b/apps/server/src/workspace/WorkspaceSearchIndex.ts @@ -526,13 +526,12 @@ const listGitIgnoredPaths = Effect.fn("WorkspaceSearchIndex.listGitIgnoredPaths" maxOutputBytes: 16 * 1024 * 1024, }) .pipe(Effect.orElseSucceed(() => undefined)); - if (!result || result.exitCode !== 0 || result.stdoutTruncated) return new Set(); - return new Set( - result.stdout - .split("\0") - .filter((entry) => entry.length > 0) - .map((entry) => trimDirectorySeparator(toPosixPath(entry, hostIsWindows))), - ); + if (!result || result.exitCode !== 0 || result.stdoutTruncated) return []; + // Folders keep their trailing `/`. + return result.stdout + .split("\0") + .filter((entry) => entry.length > 0) + .map((entry) => toPosixPath(entry, hostIsWindows)); }); function mixedItemPath(item: MixedItem): string { @@ -624,7 +623,50 @@ export const make = Effect.fn("WorkspaceSearchIndex.make")(function* ( // so content searches do not wait for it; git grep answers until it is ready. let contentIndexPending = variant === "content"; const vcsProcess = yield* VcsProcess.VcsProcess; - let ignoredPaths = yield* listGitIgnoredPaths(vcsProcess, cwd, hostIsWindows); + + /** The nearest `.ignore` with a pattern matching `relativePath` itself decides. */ + const makeIgnoreFileDecider = () => { + const ignoreFiles = new Map(); + const readIgnoreFile = Effect.fn("WorkspaceSearchIndex.readIgnoreFile")(function* ( + directory: string, + ) { + if (ignoreFiles.has(directory)) return ignoreFiles.get(directory); + const contents = yield* fileSystem + .readFileString(path.join(cwd, directory, ".ignore")) + .pipe(Effect.option); + const file = Option.isSome(contents) ? parseIgnoreFile(contents.value) : undefined; + ignoreFiles.set(directory, file); + return file; + }); + return Effect.fn("WorkspaceSearchIndex.decideByIgnoreFile")(function* ( + relativePath: string, + isFolder: boolean, + ) { + const segments = relativePath.split("/"); + for (let ancestor = segments.length - 1; ancestor >= 0; ancestor -= 1) { + const directory = segments.slice(0, ancestor).join("/"); + const file = yield* readIgnoreFile(directory); + const relative = directory ? relativePath.slice(directory.length + 1) : relativePath; + const decision = file?.decide(relative, isFolder); + if (decision) return decision; + } + return undefined; + }); + }; + + // Like ripgrep and fff, a `.ignore` that re-includes a path overrules Git's ignore rules for it. + const loadIgnoredPaths = Effect.fn("WorkspaceSearchIndex.loadIgnoredPaths")(function* () { + const decide = makeIgnoreFileDecider(); + const ignored = new Set(); + for (const entry of yield* listGitIgnoredPaths(vcsProcess, cwd, hostIsWindows)) { + const relativePath = trimDirectorySeparator(entry); + if ((yield* decide(relativePath, entry.endsWith("/"))) !== "included") { + ignored.add(relativePath); + } + } + return ignored; + }); + let ignoredPaths = yield* loadIgnoredPaths(); if (variant === "paths") { yield* waitForIndexReady( cwd, @@ -713,32 +755,14 @@ export const make = Effect.fn("WorkspaceSearchIndex.make")(function* ( // fff leaves out what `.ignore` files exclude, which git cannot evaluate; the nearest // `.ignore` that matches a path or one of its folders decides, as in decideByIgnoreFiles. const makeIgnoreFileFilter = () => { - const ignoreFiles = new Map(); - const readIgnoreFile = Effect.fn("WorkspaceSearchIndex.readIgnoreFile")(function* ( - directory: string, - ) { - if (ignoreFiles.has(directory)) return ignoreFiles.get(directory); - const contents = yield* fileSystem - .readFileString(path.join(cwd, directory, ".ignore")) - .pipe(Effect.option); - const file = Option.isSome(contents) ? parseIgnoreFile(contents.value) : undefined; - ignoreFiles.set(directory, file); - return file; - }); + const decide = makeIgnoreFileDecider(); return Effect.fn("WorkspaceSearchIndex.isExcludedByIgnoreFiles")(function* ( relativePath: string, ) { const segments = relativePath.split("/"); for (let depth = 1; depth <= segments.length; depth += 1) { const candidate = segments.slice(0, depth).join("/"); - for (let ancestor = depth - 1; ancestor >= 0; ancestor -= 1) { - const directory = segments.slice(0, ancestor).join("/"); - const file = yield* readIgnoreFile(directory); - const relative = directory ? candidate.slice(directory.length + 1) : candidate; - const decision = file?.decide(relative, depth < segments.length); - if (decision === "ignored") return true; - if (decision === "included") break; - } + if ((yield* decide(candidate, depth < segments.length)) === "ignored") return true; } return false; }); @@ -1159,7 +1183,7 @@ export const make = Effect.fn("WorkspaceSearchIndex.make")(function* ( cause, }), ).pipe(Effect.catchTags({ WorkspaceSearchIndexScanTimedOut: () => Effect.void })); - ignoredPaths = yield* listGitIgnoredPaths(vcsProcess, cwd, hostIsWindows); + ignoredPaths = yield* loadIgnoredPaths(); invalidateSymlinkScan(); }); From 4ecbe55087ade20daea476d67b479aab4ce5039a Mon Sep 17 00:00:00 2001 From: Mike Olson Date: Tue, 17 Nov 2026 16:48:17 -0500 Subject: [PATCH 004/385] fix(pi): Reasoning that Pi starts again no longer repeats the abandoned attempt (#38334) Co-authored-by: Julius Marminge --- .../provider-pi/src/server/adapter.test.ts | 54 +++++++++++++++++++ packages/provider-pi/src/server/adapter.ts | 19 ++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/packages/provider-pi/src/server/adapter.test.ts b/packages/provider-pi/src/server/adapter.test.ts index a1dd152e662ee..601969d5ffe3f 100644 --- a/packages/provider-pi/src/server/adapter.test.ts +++ b/packages/provider-pi/src/server/adapter.test.ts @@ -6117,6 +6117,60 @@ describe("PiAdapterV2", () => { }).pipe(Effect.scoped, Effect.provide(layerTest)), ); + // Streamed text is published on a real timer, so this runs on the live clock. + it.live("shows only the new reasoning when Pi starts a streaming block again", () => + Effect.gen(function* () { + const fake = yield* makeFakePi; + const { runtime, takeEvent } = yield* openRuntime(fake); + const providerThread = yield* runtime.ensureThread({ + threadId: THREAD_ID, + modelSelection: modelSelection("default"), + runtimePolicy, + }); + yield* startTurn(runtime, providerThread); + yield* fake.takeRequest("prompt"); + yield* fake.emit({ type: "agent_start" }); + yield* fake.emit({ type: "message_start", message: { role: "assistant" } }); + // A provider that reconnects mid-reasoning streams the same block from its start. + const thinking = (event: Record) => + fake.emit({ + type: "message_update", + assistantMessageEvent: { contentIndex: 0, ...event }, + }); + const reasoningUpdate = Effect.fnUntraced(function* ( + wanted: (item: { readonly status: string; readonly text: string }) => boolean, + ) { + const update = yield* takeEvent( + (event) => + event.type === "turn_item.updated" && + event.turnItem.type === "reasoning" && + wanted(event.turnItem), + ); + return update.type === "turn_item.updated" && update.turnItem.type === "reasoning" + ? { status: update.turnItem.status, text: update.turnItem.text } + : null; + }); + yield* thinking({ type: "thinking_start" }); + yield* thinking({ type: "thinking_delta", delta: "Abandoned attempt" }); + yield* thinking({ type: "thinking_start" }); + yield* thinking({ type: "thinking_delta", delta: "Replacement attempt" }); + assert.deepEqual( + yield* reasoningUpdate((item) => item.text.endsWith("Replacement attempt")), + { + status: "running", + text: "Replacement attempt", + }, + ); + // A third attempt that ends with no reasoning leaves nothing of the second on screen. + yield* thinking({ type: "thinking_start" }); + yield* thinking({ type: "thinking_end" }); + assert.deepEqual(yield* reasoningUpdate((item) => item.status === "completed"), { + status: "completed", + text: "", + }); + }).pipe(Effect.scoped, Effect.provide(layerTest)), + ); + it.effect.each([ { pi: "clears its native queue", diff --git a/packages/provider-pi/src/server/adapter.ts b/packages/provider-pi/src/server/adapter.ts index 1e80b48d7fb9a..ab49fe6a45315 100644 --- a/packages/provider-pi/src/server/adapter.ts +++ b/packages/provider-pi/src/server/adapter.ts @@ -327,6 +327,7 @@ interface PiStreamItemState { text: string; completed: boolean; flushScheduled: boolean; + published: boolean; readonly startedAt: DateTime.Utc; } @@ -1196,6 +1197,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( item: PiStreamItemState, streaming: boolean, ) { + item.published = true; const emittedAt = yield* DateTime.now; const base = baseItemFields(turn, item.nativeItemId, item.startedAt, emittedAt); yield* emitItemNode( @@ -1279,12 +1281,15 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( ); }); + const streamItemId = (turn: ActivePiTurn, contentIndex: number) => + `${turn.providerTurn.id}:m${turn.messageOrdinal}:c${contentIndex}`; + const streamItemFor = Effect.fnUntraced(function* ( turn: ActivePiTurn, kind: PiStreamItemState["kind"], contentIndex: number, ) { - const nativeItemId = `${turn.providerTurn.id}:m${turn.messageOrdinal}:c${contentIndex}`; + const nativeItemId = streamItemId(turn, contentIndex); const existing = turn.streamItems.get(nativeItemId); if (existing !== undefined) return existing; const startedAt = yield* DateTime.now; @@ -1294,6 +1299,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( text: "", completed: false, flushScheduled: false, + published: false, startedAt, }; turn.streamItems.set(nativeItemId, item); @@ -1306,7 +1312,10 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( if (item.completed) return Effect.void; item.completed = true; if (text !== undefined && text.length > 0) item.text = text; - return item.text.length === 0 ? Effect.void : emitStreamItem(turn, item, false); + // A block that was shown and then started again empty still replaces what it showed. + return item.text.length === 0 && !item.published + ? Effect.void + : emitStreamItem(turn, item, false); }); const completeOpenStreamItems = (turn: ActivePiTurn) => @@ -2309,6 +2318,12 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( const delta = event["assistantMessageEvent"]; const deltaType = recordString(delta, "type"); const contentIndex = recordNumber(delta, "contentIndex") ?? 0; + if (deltaType === "text_start" || deltaType === "thinking_start") { + // A provider that reconnects mid-block starts it again; its earlier text is abandoned. + const restarted = turn.streamItems.get(streamItemId(turn, contentIndex)); + if (restarted !== undefined && !restarted.completed) restarted.text = ""; + return; + } if (deltaType === "text_delta" || deltaType === "thinking_delta") { const item = yield* streamItemFor( turn, From 2ebe7f8e22617d0eb8deb93ce4f458aba3e9a434 Mon Sep 17 00:00:00 2001 From: Benjamin Nasse <72772737+Bean0-0@users.noreply.github.com> Date: Tue, 17 Nov 2026 15:48:51 -0600 Subject: [PATCH 005/385] fix(pi): fork historical turns from their original session (#38315) Co-authored-by: Julius Marminge --- packages/contracts/src/orchestrationV2.ts | 2 + .../provider-pi/src/server/adapter.test.ts | 109 +++++++++++- packages/provider-pi/src/server/adapter.ts | 165 ++++++++++++++++-- 3 files changed, 252 insertions(+), 24 deletions(-) diff --git a/packages/contracts/src/orchestrationV2.ts b/packages/contracts/src/orchestrationV2.ts index 39543e9a5f261..a297d92a444d4 100644 --- a/packages/contracts/src/orchestrationV2.ts +++ b/packages/contracts/src/orchestrationV2.ts @@ -1232,6 +1232,8 @@ export const OrchestrationV2ProviderTurn = Schema.Struct({ nodeId: NodeId, runAttemptId: Schema.NullOr(RunAttemptId), nativeTurnRef: Schema.NullOr(OrchestrationV2ProviderRef), + /** The native session that held this turn, when a provider can move a thread between sessions. */ + nativeThreadRef: Schema.optional(OrchestrationV2ProviderRef), ordinal: PositiveInt, status: Schema.Literals([ "pending", diff --git a/packages/provider-pi/src/server/adapter.test.ts b/packages/provider-pi/src/server/adapter.test.ts index 601969d5ffe3f..d4a5f5ff206c8 100644 --- a/packages/provider-pi/src/server/adapter.test.ts +++ b/packages/provider-pi/src/server/adapter.test.ts @@ -164,6 +164,7 @@ interface FakePi { readonly queueEntries: (data: unknown) => void; readonly queueMessages: (data: unknown) => void; readonly vetoNextSwitch: () => void; + readonly failNextFork: () => void; readonly queueState: (data: Record) => void; readonly setStreaming: (streaming: boolean) => void; readonly setCompacting: (compacting: boolean) => void; @@ -237,6 +238,7 @@ const makeFakePi: Effect.Effect = Effect.gen(function* () { let failStateAfter: number | null = null; let failThinking = false; let vetoSwitch = false; + let failFork = false; let vetoNewSession = false; let deferredLifecycle: string | undefined; let sessionFile = FAKE_SESSION_FILE; @@ -354,6 +356,10 @@ const makeFakePi: Effect.Effect = Effect.gen(function* () { case "get_session_stats": return { ...base, data: statsQueue.shift() ?? {} }; case "fork": + if (failFork) { + failFork = false; + return { ...base, success: false, error: "Invalid entry ID for forking" }; + } serviceTier = null; return { ...base, data: { text: "Hello pi", cancelled: false } }; case "clear_queue": @@ -498,6 +504,9 @@ const makeFakePi: Effect.Effect = Effect.gen(function* () { vetoNextSwitch: () => { vetoSwitch = true; }, + failNextFork: () => { + failFork = true; + }, queueState: (data) => stateQueue.push(data), setStreaming: (streaming) => { isStreaming = streaming; @@ -2806,6 +2815,16 @@ describe("PiAdapterV2", () => { yield* fake.emit({ type: "agent_start" }); yield* fake.emit({ type: "agent_end", messages: [], willRetry: false }); yield* fake.emit({ type: "agent_settled" }); + const completed = yield* takeEvent( + (event) => + event.type === "provider_turn.updated" && event.providerTurn.status === "completed", + ); + assert.equal( + completed.type === "provider_turn.updated" + ? completed.providerTurn.nativeThreadRef?.nativeId + : undefined, + childFile, + ); const idle = yield* takeEvent( (event) => event.type === "provider_thread.updated" && event.providerThread.status === "idle", @@ -2965,9 +2984,21 @@ describe("PiAdapterV2", () => { ); it.effect.each([ - { historical: false, label: "the latest turn" }, - { historical: true, label: "a historical turn" }, - ])("natively forks $label into an independent session", ({ historical }) => + { historical: false, moved: false, split: false, label: "the latest turn" }, + { historical: true, moved: false, split: false, label: "a historical turn" }, + { + historical: true, + moved: true, + split: false, + label: "a historical turn after a session switch", + }, + { + historical: true, + moved: true, + split: true, + label: "the last turn before a switch to a fresh session", + }, + ])("natively forks $label into an independent session", ({ historical, moved, split }) => Effect.gen(function* () { const fake = yield* makeFakePi; const forkFake = yield* makeFakePi; @@ -2984,12 +3015,22 @@ describe("PiAdapterV2", () => { modelSelection: modelSelection("default"), runtimePolicy, }); + const freshSession = { + driver: PI_PROVIDER, + nativeId: "/fake/new-session.jsonl", + strength: "strong", + } as const; const turn = (ordinal: number): OrchestrationV2ProviderTurn => ({ id: ProviderTurnId.make(`turn-${ordinal}`), providerThreadId: source.id, nodeId: NodeId.make(`node-${ordinal}`), runAttemptId: null, nativeTurnRef: { driver: PI_PROVIDER, nativeId: `u${ordinal}`, strength: "strong" }, + ...(split && ordinal === 2 + ? { nativeThreadRef: freshSession } + : moved && source.nativeThreadRef !== null + ? { nativeThreadRef: source.nativeThreadRef } + : {}), ordinal, status: "completed", startedAt: null, @@ -3005,7 +3046,7 @@ describe("PiAdapterV2", () => { fake.queueState({ sessionFile: forkFile }); const target = ThreadId.make("fork-target"); const forked = yield* runtime.forkThread({ - sourceProviderThread: source, + sourceProviderThread: moved ? { ...source, nativeThreadRef: freshSession } : source, sourceProviderTurns: historical ? [turn(1), turn(2)] : [turn(1)], providerTurnId: turn(1).id, targetThreadId: target, @@ -3025,7 +3066,7 @@ describe("PiAdapterV2", () => { .allRequests() .filter((request) => request.type === "fork") .map((request) => request.entryId), - historical ? ["u2"] : [], + historical && !split ? ["u2"] : [], ); assert.isFalse( fake.allRequests().some((request) => request.type === "fork" || request.type === "clone"), @@ -3061,6 +3102,64 @@ describe("PiAdapterV2", () => { }).pipe(Effect.scoped, Effect.provide(layerTest)), ); + it.effect("recovers a historical Pi fork recorded before turns stored the session file", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const dir = yield* fs.makeTempDirectoryScoped(); + const oldFile = `${dir}/original.jsonl`; + const unrelatedFile = `${dir}/unrelated.jsonl`; + const currentFile = `${dir}/current.jsonl`; + const header = { type: "session", version: 3 }; + const writeSession = (file: string, entries: ReadonlyArray) => + fs.writeFileString( + file, + [header, ...entries].map((entry) => encodeJsonLine(entry)).join("\n") + "\n", + ); + yield* writeSession(oldFile, UNCAPTURED_TURN_TREE.entries); + yield* writeSession(unrelatedFile, [ + sessionMessage("u1", null, "user", 10), + sessionMessage("u2", null, "user", 110), + ]); + yield* writeSession(currentFile, [sessionMessage("new", null, "user", 120)]); + + const fake = yield* makeFakePi; + const forkFake = yield* makeFakePi; + const { runtime } = yield* openRuntime(fake, "default", THREAD_ID, SESSION_ID, forkFake); + const source = yield* runtime.ensureThread({ + threadId: THREAD_ID, + modelSelection: modelSelection("default"), + runtimePolicy, + }); + const forkFile = `${dir}/forked.jsonl`; + forkFake.failNextFork(); + forkFake.queueState({ sessionFile: forkFile }); + fake.queueState({ sessionFile: forkFile }); + const [target, boundary] = uncapturedTurns(source.id, { + startedAt: 100, + completedAt: 145, + }); + if (target === undefined || boundary === undefined) throw new Error("missing fork turns"); + const forked = yield* runtime.forkThread({ + sourceProviderThread: { + ...source, + nativeThreadRef: { driver: PI_PROVIDER, nativeId: currentFile, strength: "strong" }, + }, + sourceProviderTurns: [ + target, + { + ...boundary, + nativeTurnRef: { driver: PI_PROVIDER, nativeId: "u2", strength: "strong" }, + }, + ], + providerTurnId: target.id, + targetThreadId: ThreadId.make("fork-target"), + }); + const args = forkFake.lastSpawn().args; + assert.equal(args[args.indexOf("--fork") + 1], oldFile); + assert.equal(forked.nativeThreadRef?.nativeId, forkFile); + }).pipe(Effect.scoped, Effect.provide(layerTest)), + ); + it.effect("natively forks before a turn whose start entry was never captured", () => Effect.gen(function* () { const fake = yield* makeFakePi; diff --git a/packages/provider-pi/src/server/adapter.ts b/packages/provider-pi/src/server/adapter.ts index ab49fe6a45315..d4dac26c9a4e4 100644 --- a/packages/provider-pi/src/server/adapter.ts +++ b/packages/provider-pi/src/server/adapter.ts @@ -521,7 +521,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( Effect.orElseSucceed(() => undefined), ); if (header === undefined) return true; - const sessionCwd = recordString(Option.getOrUndefined(decodeSessionHeader(header)), "cwd"); + const sessionCwd = recordString(Option.getOrUndefined(decodeSessionLine(header)), "cwd"); if (sessionCwd === undefined || sessionCwd === cwd) return true; const realCwd = yield* fileSystem.realPath(cwd).pipe(Effect.orElseSucceed(() => cwd)); return sessionCwd === realCwd; @@ -2076,6 +2076,9 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( ...(treeRefs === null || treeRefs.nativeTurnRef === undefined ? {} : { nativeTurnRef: treeRefs.nativeTurnRef }), + ...(state.providerThread.nativeThreadRef === null + ? {} + : { nativeThreadRef: state.providerThread.nativeThreadRef }), status: interrupted ? "interrupted" : failure !== null ? "failed" : "completed", completedAt, ...(tokenUsage === undefined ? {} : { tokenUsage }), @@ -2951,6 +2954,68 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( ).pipe(Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner)); }); + // Old records hold entry IDs without a session file. Recover only when both + // timestamped user entries are on the same branch in a sibling session. + const findHistoricalForkSession = Effect.fnUntraced(function* ( + currentFile: string, + boundary: Extract, + ) { + const targetId = piTurnEntryId(boundary.target); + const startedAt = boundary.target?.startedAt; + const completedAt = boundary.target?.completedAt; + const boundaryEnd = boundary.turn.completedAt; + if ( + targetId === undefined || + startedAt == null || + completedAt == null || + boundaryEnd === null + ) { + return undefined; + } + const from = DateTime.toEpochMillis(startedAt); + const between = DateTime.toEpochMillis(completedAt); + const to = DateTime.toEpochMillis(boundaryEnd); + const dir = path.dirname(currentFile); + const siblings = yield* fileSystem + .readDirectoryEntries(dir) + .pipe(Effect.orElseSucceed(() => [])); + const files = siblings + .filter((entry) => entry.type === "File" && entry.name.endsWith(".jsonl")) + .map((entry) => path.join(dir, entry.name)) + .sort() + .reverse(); + for (const file of files) { + if (file === currentFile) continue; + const entries = new Map(); + let leafId: string | null = null; + const readable = yield* fileSystem.stream(file).pipe( + Stream.decodeText(), + Stream.splitLines, + Stream.runForEach((line) => + Effect.sync(() => { + const entry = readPiSessionEntry(Option.getOrUndefined(decodeSessionLine(line))); + if (entry === null) return; + const [id, value] = entry; + entries.set(id, value); + leafId = id; + }), + ), + Effect.as(true), + Effect.orElseSucceed(() => false), + ); + if ( + readable && + piUserEntryInWindow(entries.get(targetId), from, between) && + piUserEntryInWindow(entries.get(boundary.entryId), between, to) && + walkPiBranch(entries, leafId, boundary.entryId)?.reachedStop === true && + walkPiBranch(entries, boundary.entryId, targetId)?.reachedStop === true + ) { + return file; + } + } + return undefined; + }); + const sessionFileInCwd = Effect.fnUntraced(function* ( sessionFile: string, providerThreadCreatedAt: DateTime.Utc, @@ -3369,6 +3434,9 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( nodeId: turnInput.rootNodeId, runAttemptId: turnInput.attemptId, nativeTurnRef: providerRef(syntheticNativeTurnId, "weak"), + ...(state.providerThread.nativeThreadRef === null + ? {} + : { nativeThreadRef: state.providerThread.nativeThreadRef }), ordinal: turnInput.providerTurnOrdinal, status: "running", startedAt, @@ -3927,8 +3995,8 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( return yield* protocolError("Cannot fork while a Pi turn is active"); } const source = forkInput.sourceProviderThread; - const sourceFile = source.nativeThreadRef?.nativeId; - if (sourceFile == null) + const currentFile = source.nativeThreadRef?.nativeId; + if (currentFile == null) return yield* protocolError("Pi fork source has no session file"); const sourceTurns = (forkInput.sourceProviderTurns ?? []).filter( (turn) => turn.providerThreadId === source.id, @@ -3937,14 +4005,39 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( if (forkInput.providerTurnId !== undefined && target === undefined) { return yield* protocolError("Pi fork target turn is missing"); } + const targetFile = target?.nativeThreadRef?.nativeId ?? undefined; const boundary: PiForkBoundary = target === undefined ? { type: "nothing" } : piForkBoundary({ target: { type: "provider_turn", providerTurn: target }, providerThreadTurns: sourceTurns, + sessionFile: targetFile, }); - const nativeId = yield* forkSessionIntoCwd(sourceFile, boundary, source.createdAt); + const boundaryFile = + boundary.type === "nothing" ? undefined : boundary.turn.nativeThreadRef?.nativeId; + const sourceFile = targetFile ?? boundaryFile ?? currentFile; + const nativeId = yield* forkSessionIntoCwd(sourceFile, boundary, source.createdAt).pipe( + Effect.catchTags({ + PiRpcError: (error) => { + if ( + boundary.type !== "entry" || + boundaryFile != null || + error.operation !== "fork" || + error.detail !== "Invalid entry ID for forking" + ) { + return Effect.fail(error); + } + return findHistoricalForkSession(currentFile, boundary).pipe( + Effect.flatMap((file) => + file === undefined + ? Effect.fail(error) + : forkSessionIntoCwd(file, boundary, source.createdAt), + ), + ); + }, + }), + ); const now = yield* DateTime.now; return yield* registerThread( { @@ -3998,7 +4091,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* ( }); }); -const decodeSessionHeader = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown)); +const decodeSessionLine = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Unknown)); interface PiSessionEntry { readonly parentId: string | null; @@ -4021,15 +4114,24 @@ function piSessionListing(data: unknown): PiSessionListing | null { } function piSessionEntries(entries: unknown): ReadonlyMap | null { - const byId = new Map(); if (!Array.isArray(entries)) return null; - for (const entry of entries) { - const id = recordString(entry, "id"); - const parentId = recordField(entry, "parentId"); - if (id === undefined || byId.has(id) || (parentId !== null && typeof parentId !== "string")) - return null; - const timestamp = recordString(entry, "timestamp"); - byId.set(id, { + const byId = new Map(); + for (const raw of entries) { + const entry = readPiSessionEntry(raw); + if (entry === null || byId.has(entry[0])) return null; + byId.set(...entry); + } + return byId; +} + +function readPiSessionEntry(entry: unknown): [string, PiSessionEntry] | null { + const id = recordString(entry, "id"); + const parentId = recordField(entry, "parentId"); + if (id === undefined || (parentId !== null && typeof parentId !== "string")) return null; + const timestamp = recordString(entry, "timestamp"); + return [ + id, + { parentId, isUserMessage: recordField(entry, "type") === "message" && @@ -4038,9 +4140,22 @@ function piSessionEntries(entries: unknown): ReadonlyMap timestamp === undefined ? null : Option.getOrNull(Option.map(DateTime.make(timestamp), DateTime.toEpochMillis)), - }); - } - return byId; + }, + ]; +} + +function piUserEntryInWindow(entry: PiSessionEntry | undefined, from: number, to: number): boolean { + return ( + entry?.isUserMessage === true && + entry.timestamp !== null && + entry.timestamp >= from && + entry.timestamp <= to + ); +} + +function piTurnEntryId(turn: OrchestrationV2ProviderTurn | null | undefined): string | undefined { + const ref = turn?.nativeTurnRef; + return ref?.strength === "strong" ? (ref.nativeId ?? undefined) : undefined; } function walkPiBranch( @@ -4067,7 +4182,12 @@ function walkPiBranch( } type PiForkBoundary = - | { readonly type: "entry"; readonly entryId: string } + | { + readonly type: "entry"; + readonly entryId: string; + readonly turn: OrchestrationV2ProviderTurn; + readonly target: OrchestrationV2ProviderTurn | null; + } | { readonly type: "nothing" } | { readonly type: "uncaptured"; @@ -4085,15 +4205,22 @@ function piForkBoundary(input: { | { readonly type: "thread_start" } | { readonly type: "provider_turn"; readonly providerTurn: OrchestrationV2ProviderTurn }; readonly providerThreadTurns: ReadonlyArray; + /** Only turns recorded in this session can bound a fork from it. */ + readonly sessionFile?: string | undefined; }): PiForkBoundary { const target = input.target.type === "thread_start" ? null : input.target.providerTurn; const boundary = input.providerThreadTurns - .filter((turn) => turn.ordinal > (target?.ordinal ?? 0) && turn.nativeTurnRef !== null) + .filter( + (turn) => + turn.ordinal > (target?.ordinal ?? 0) && + turn.nativeTurnRef !== null && + (input.sessionFile === undefined || turn.nativeThreadRef?.nativeId === input.sessionFile), + ) .sort((a, b) => a.ordinal - b.ordinal)[0]; const ref = boundary?.nativeTurnRef; if (boundary === undefined || ref == null) return { type: "nothing" }; return ref.strength === "strong" && ref.nativeId !== null - ? { type: "entry", entryId: ref.nativeId } + ? { type: "entry", entryId: ref.nativeId, turn: boundary, target } : { type: "uncaptured", turn: boundary, target }; } From 009966d073aa093832ed39278f524e9870adffd6 Mon Sep 17 00:00:00 2001 From: shivam <91240327+shivamhwp@users.noreply.github.com> Date: Wed, 18 Nov 2026 03:25:06 +0530 Subject: [PATCH 006/385] fix(web): find in thread paints only matches near the viewport (#38329) Co-authored-by: Julius Marminge --- .../threadFindHighlights.browser.test.tsx | 135 ++++++++++- .../components/chat/threadFindHighlights.ts | 229 +++++++++++++++--- .../scenarios/thread-find-paint-bound.e2e.ts | 75 ++++++ 3 files changed, 400 insertions(+), 39 deletions(-) create mode 100644 scripts/scenarios/thread-find-paint-bound.e2e.ts diff --git a/apps/web/src/components/chat/threadFindHighlights.browser.test.tsx b/apps/web/src/components/chat/threadFindHighlights.browser.test.tsx index a04507ef9c2c2..d7a3647d9c2cd 100644 --- a/apps/web/src/components/chat/threadFindHighlights.browser.test.tsx +++ b/apps/web/src/components/chat/threadFindHighlights.browser.test.tsx @@ -29,19 +29,148 @@ function Highlights(props: Parameters[0]) { return null; } -it("paints every match when one row has more matches than a call can take as arguments", async () => { +function mountTimeline(html: string) { + const container = document.createElement("div"); + container.style.cssText = "height: 200px; width: 300px; overflow: auto"; + container.innerHTML = html; + document.body.append(container); + return { container, [Symbol.dispose]: () => container.remove() }; +} + +const painted = () => [...(CSS.highlights.get("t3-thread-find") ?? [])] as Range[]; +const paintedIn = (element: Element) => + painted().filter((range) => element.contains(range.startContainer)).length; + +it("paints only matches near the viewport plus the active one, in a row with more matches than a call can take as arguments", async () => { const count = 200_000; const onActiveRange = vi.fn<(range: Range | null) => void>(); + using timeline = mountTimeline( + `
${"e x".repeat(count)}
`, + ); await using _screen = await render( , ); - expect(CSS.highlights.get("t3-thread-find")?.size).toBe(count - 1); + const visible = painted(); + expect(visible.length).toBeGreaterThan(0); + expect(visible.length).toBeLessThan(5_000); + expect(Math.max(...visible.map((range) => range.startOffset))).toBeLessThan(count); expect(CSS.highlights.get("t3-thread-find-active")?.size).toBe(1); expect(onActiveRange.mock.lastCall?.[0]?.startOffset).toBe((count - 1) * 3); + + timeline.container.scrollTop = timeline.container.scrollHeight; + await vi.waitFor(() => + expect(Math.max(...painted().map((range) => range.startOffset))).toBe((count - 2) * 3), + ); + expect(painted().length).toBeLessThan(5_000); +}); + +it("paints every match near the viewport when cells lay text out in a different order than the DOM", async () => { + using timeline = mountTimeline( + `
+ + +
${"e x ".repeat(5_000)}${"e x ".repeat(5_000)}
`, + ); + const cells = [...timeline.container.querySelectorAll("td")]; + const ranges = collectThreadFindRanges(timeline.container, "e"); + const key = (range: Range) => + `${cells.indexOf(range.startContainer.parentElement as HTMLTableCellElement)}:${range.startOffset}`; + const missing = () => { + const viewport = timeline.container.getBoundingClientRect(); + const [top, bottom] = [viewport.top - viewport.height, viewport.bottom + viewport.height]; + const shown = new Set(painted().map(key)); + return ranges.filter(({ range }) => { + const rect = range.getBoundingClientRect(); + return rect.bottom >= top && rect.top <= bottom && !shown.has(key(range)); + }).length; + }; + await using _screen = await render( + {}} + />, + ); + expect(missing()).toBe(0); + + timeline.container.scrollTop = 1_000; + await vi.waitFor(() => expect(missing()).toBe(0)); + expect(painted().length).toBeLessThan(ranges.length / 2); +}); + +it("skips a hidden block's matches without measuring each one", async () => { + using timeline = mountTimeline( + `
+
${"e x ".repeat(10_000)}

e

+
`, + ); + const visible = timeline.container.querySelector("p")!; + using measure = vi.spyOn(Range.prototype, "getBoundingClientRect"); + await using _screen = await render( + {}} + />, + ); + expect([painted().length, paintedIn(visible)]).toEqual([1, 1]); + expect(measure.mock.calls.length).toBeLessThan(100); +}); + +it("registers a row's matches only while it is near the viewport, and again after its text changes", async () => { + using timeline = mountTimeline( + `
e e e
+
+
e e
`, + ); + const [near, far] = [...timeline.container.querySelectorAll("[data-thread-find-text]")]; + const onActiveRange = vi.fn<(range: Range | null) => void>(); + await using _screen = await render( + , + ); + expect([paintedIn(near!), paintedIn(far!)]).toEqual([3, 0]); + expect(CSS.highlights.get("t3-thread-find-active")?.size).toBe(1); + expect(far!.contains(onActiveRange.mock.lastCall?.[0]?.startContainer ?? null)).toBe(true); + + near!.append(" e"); + await vi.waitFor(() => expect(paintedIn(near!)).toBe(4)); + + timeline.container.scrollTop = timeline.container.scrollHeight; + await vi.waitFor(() => expect([paintedIn(near!), paintedIn(far!)]).toEqual([0, 1])); +}); + +it("paints a row's matches once the hidden wrapper around it is revealed", async () => { + using timeline = mountTimeline( + ``, + ); + const text = timeline.container.querySelector("[data-thread-find-text]")!; + await using _screen = await render( + {}} + />, + ); + expect(paintedIn(text)).toBe(0); + + timeline.container.querySelector("#wrap")!.removeAttribute("hidden"); + await vi.waitFor(() => expect(paintedIn(text)).toBe(2)); }); diff --git a/apps/web/src/components/chat/threadFindHighlights.ts b/apps/web/src/components/chat/threadFindHighlights.ts index 54ee159e1b286..c8ce0b31b9c9e 100644 --- a/apps/web/src/components/chat/threadFindHighlights.ts +++ b/apps/web/src/components/chat/threadFindHighlights.ts @@ -2,6 +2,8 @@ import { findThreadSearchOccurrences } from "@t3tools/shared/threadSearch"; import { useEffect, useEffectEvent, useRef } from "react"; import { THREAD_FIND_BLOCK_TAGS } from "@t3tools/shared/threadFindText"; +import { observeResize } from "~/lib/observeResize"; + const THREAD_FIND_HIGHLIGHT_NAME = "t3-thread-find"; const THREAD_FIND_ACTIVE_HIGHLIGHT_NAME = "t3-thread-find-active"; @@ -160,9 +162,19 @@ export function useThreadFindHighlights(input: { } for (const row of cache.keys()) if (!rows.has(row)) cache.delete(row); rangesRef.current = ranges; - paint(ranges, readSelection()); + paint.update(cache, ranges, readSelection()); }; let frame: number | null = null; + let dirty = false; + const schedule = () => { + if (frame !== null) return; + frame = requestAnimationFrame(() => { + frame = null; + if (dirty) repaint(); + else paint.place(cache); + dirty = false; + }); + }; const observer = new MutationObserver((mutations) => { // Ignore timer and status mutations outside searchable text and folds. const relevant = mutations.filter(affectsSearchableText); @@ -174,12 +186,12 @@ export function useThreadFindHighlights(input: { : mutation.target.parentElement; const row = target?.closest("[data-timeline-row-id]"); if (row) cache.delete(row); + // A hidden wrapper around rows changes their runs, which are cached with their matches. + if (mutation.attributeName === "hidden" && target) + for (const cached of cache.keys()) if (target.contains(cached)) cache.delete(cached); } - if (frame !== null) return; - frame = requestAnimationFrame(() => { - frame = null; - repaint(); - }); + dirty = true; + schedule(); }); observer.observe(container, { subtree: true, @@ -195,10 +207,14 @@ export function useThreadFindHighlights(input: { "data-thread-find-ignore", ], }); + container.addEventListener("scroll", schedule, { passive: true }); + const stopResize = observeResize(container, schedule); // Revealing the first match can synchronously mount or recycle list rows. repaint(); return () => { observer.disconnect(); + stopResize(); + container.removeEventListener("scroll", schedule); if (frame !== null) cancelAnimationFrame(frame); cache.clear(); paintRef.current = null; @@ -211,7 +227,7 @@ export function useThreadFindHighlights(input: { // layout inputs, and repainting the active highlight for those is wasted work. // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- repaints the active CSS Highlight range when the selected match changes useEffect(() => { - paintRef.current?.(rangesRef.current, { + paintRef.current?.select({ activeRowId, activeOccurrence, onActiveRange: readSelection().onActiveRange, @@ -219,47 +235,188 @@ export function useThreadFindHighlights(input: { }, [activeOccurrence, activeRowId]); } +type ThreadFindSelection = Pick< + Parameters[0], + "activeRowId" | "activeOccurrence" | "onActiveRange" +>; + +interface TextRun { + readonly start: number; + end: number; + readonly box: Element; + readonly item: Node | null; + readonly ordered: boolean; + readonly hidden: boolean; +} + +const INLINE_DISPLAYS = new Set(["inline", "contents"]); +const textRunsByMatches = new WeakMap(); + +// Splits a row's matches into runs that each lie in one inline formatting context, +// where a later match is never higher on screen. Cells, flex and grid items, and +// inline blocks each start a run, since their text can sit beside earlier text. +function textRuns(row: Element, matches: readonly ThreadFindRange[]): readonly TextRun[] { + const cached = textRunsByMatches.get(matches); + if (cached) return cached; + const displays = new Map(); + const displayOf = (element: Element) => { + let display = displays.get(element); + if (display === undefined) { + display = getComputedStyle(element).display; + displays.set(element, display); + } + return display; + }; + const columns = new Map(); + const inColumns = (element: Element): boolean => { + let multicol = columns.get(element); + if (multicol === undefined) { + const style = getComputedStyle(element); + multicol = + style.columnCount !== "auto" || + style.columnWidth !== "auto" || + (element !== row && element.parentElement !== null && inColumns(element.parentElement)); + columns.set(element, multicol); + } + return multicol; + }; + const runs: TextRun[] = []; + let text: Node | null = null; + for (const [index, { range }] of matches.entries()) { + const last = runs.at(-1); + if (last && range.startContainer === text) { + last.end = index + 1; + continue; + } + const parent = range.startContainer.parentElement; + if (!parent) continue; + text = range.startContainer; + let box = parent; + while (box !== row && box.parentElement && INLINE_DISPLAYS.has(displayOf(box))) + box = box.parentElement; + // Text directly inside a flex or grid container is an anonymous item of its own. + const item = /flex|grid/.test(displayOf(box)) ? text : null; + const hidden = parent.closest("[hidden]") !== null; + if (last?.end === index && last.box === box && last.item === item && last.hidden === hidden) { + last.end = index + 1; + continue; + } + runs.push({ start: index, end: index + 1, box, item, hidden, ordered: !inColumns(box) }); + } + textRunsByMatches.set(matches, runs); + return runs; +} + +// Blink rebuilds every registered highlight Range on any DOM or style change, so +// only matches within a screen of the viewport are painted; the active one always is. +function matchesInZone( + row: Element, + matches: readonly ThreadFindRange[], + zone: { top: number; bottom: number }, + shown: Set, +): void { + const rowBox = row.getBoundingClientRect(); + if (matches.length === 0 || rowBox.bottom < zone.top || rowBox.top > zone.bottom) return; + const intersects = (rect: DOMRect) => rect.bottom >= zone.top && rect.top <= zone.bottom; + for (const run of textRuns(row, matches)) { + if (run.hidden) continue; + const boxes = run.box.getClientRects(); + if (boxes.length === 0 || ![...boxes].some(intersects)) continue; + if (!run.ordered) { + for (let index = run.start; index < run.end; index++) + if (intersects(matches[index]!.range.getBoundingClientRect())) + shown.add(matches[index]!.range); + continue; + } + const firstShown = (index: number, high: number): [number, DOMRect | null] => { + for (; index < high; index++) { + const rect = matches[index]!.range.getBoundingClientRect(); + if (rect.height > 0) return [index, rect]; + } + return [high, null]; + }; + const firstWhere = (isPast: (rect: DOMRect) => boolean) => { + let low = run.start; + let high = run.end; + while (low < high) { + const mid = (low + high) >>> 1; + const [probe, rect] = firstShown(mid, high); + if (!rect || isPast(rect)) high = mid; + else low = probe + 1; + } + return low; + }; + const end = firstWhere((rect) => rect.top > zone.bottom); + for (let index = firstWhere((rect) => rect.bottom >= zone.top); index < end; index++) + shown.add(matches[index]!.range); + } +} + function makeThreadFindHighlightPainter(container: HTMLElement) { - let previousRanges: readonly ThreadFindRange[] | null = null; - const rangesByRow = new Map(); const inactive = new Highlight(); const active = new Highlight(); - let previousActive: Range | null = null; + const zoned = new Set(); + const windows = new Map>(); + const rangesByRow = new Map(); + let selected: Range | null = null; CSS.highlights.set(THREAD_FIND_HIGHLIGHT_NAME, inactive); CSS.highlights.set(THREAD_FIND_ACTIVE_HIGHLIGHT_NAME, active); - return ( - ranges: readonly ThreadFindRange[], - selection: Pick< - Parameters[0], - "activeRowId" | "activeOccurrence" | "onActiveRange" - >, - ) => { - if (previousRanges !== ranges) { - previousRanges = ranges; - previousActive = null; - rangesByRow.clear(); - inactive.clear(); - for (const match of ranges) { - const row = rangesByRow.get(match.rowId) ?? []; - row[match.occurrence] = match.range; - rangesByRow.set(match.rowId, row); - if (foldsHiding(match.range, container).length === 0) inactive.add(match.range); - } + const show = (range: Range) => { + zoned.add(range); + if (range !== selected && foldsHiding(range, container).length === 0) inactive.add(range); + }; + const hide = (range: Range) => { + zoned.delete(range); + inactive.delete(range); + }; + const place = (rows: ReadonlyMap) => { + const viewport = container.getBoundingClientRect(); + const zone = { top: viewport.top - viewport.height, bottom: viewport.bottom + viewport.height }; + for (const [row, previous] of windows) { + if (rows.has(row)) continue; + for (const range of previous) hide(range); + windows.delete(row); + } + for (const [row, matches] of rows) { + const shown = new Set(); + matchesInZone(row, matches, zone, shown); + const previous = windows.get(row); + if (previous) for (const range of previous) if (!shown.has(range)) hide(range); + for (const range of shown) if (!previous?.has(range)) show(range); + windows.set(row, shown); } - if (previousActive && foldsHiding(previousActive, container).length === 0) - inactive.add(previousActive); - const selected = + }; + const select = (selection: ThreadFindSelection) => { + const next = selection.activeRowId === null ? null : (rangesByRow.get(selection.activeRowId)?.[selection.activeOccurrence] ?? null); + if (selected && selected !== next && zoned.has(selected)) { + if (foldsHiding(selected, container).length === 0) inactive.add(selected); + } + selected = next; active.clear(); - if (selected) inactive.delete(selected); - previousActive = selected; - if (selected && revealFolded(selected, container)) { + if (next) inactive.delete(next); + if (next && revealFolded(next, container)) { selection.onActiveRange(null); } else { - if (selected) active.add(selected); - selection.onActiveRange(selected); + if (next) active.add(next); + selection.onActiveRange(next); + } + }; + const update = ( + rows: ReadonlyMap, + ranges: readonly ThreadFindRange[], + selection: ThreadFindSelection, + ) => { + rangesByRow.clear(); + for (const match of ranges) { + const row = rangesByRow.get(match.rowId) ?? []; + row[match.occurrence] = match.range; + rangesByRow.set(match.rowId, row); } + place(rows); + select(selection); }; + return { update, place, select }; } diff --git a/scripts/scenarios/thread-find-paint-bound.e2e.ts b/scripts/scenarios/thread-find-paint-bound.e2e.ts new file mode 100644 index 0000000000000..9c0be796fcdca --- /dev/null +++ b/scripts/scenarios/thread-find-paint-bound.e2e.ts @@ -0,0 +1,75 @@ +import { expect } from "e2e"; + +import { test, WEB } from "./t3.ts"; + +// The thread CLI takes at most 120,000 characters per message: 3,000 lines of ten "the". +const SEEDED_MATCHES = 30_000; +const LONG_MESSAGE = Array.from({ length: SEEDED_MATCHES / 10 }, () => + "the ".repeat(10).trim(), +).join("\n"); + +const findTotal = `(() => { + const label = document.querySelector("[data-thread-find-bar] span[aria-hidden]")?.textContent ?? ""; + const match = /^\\d+\\/(\\d+)$/.exec(label.trim()); + return match ? Number(match[1]) : 0; +})()`; + +const paint = `(() => { + const inactive = CSS.highlights.get("t3-thread-find"); + const active = CSS.highlights.get("t3-thread-find-active"); + let onScreen = 0; + for (const highlight of [inactive, active]) + for (const range of highlight ?? []) { + const rect = range.getBoundingClientRect(); + if (rect.height > 0 && rect.bottom >= 0 && rect.top <= innerHeight) onScreen++; + } + return { + registered: (inactive?.size ?? 0) + (active?.size ?? 0), + active: active?.size ?? 0, + onScreen, + }; +})()`; + +test( + "Find paints only matches near the viewport of a message with 30,000 matches", + WEB, + async ({ t3, app, screen, browser }) => { + const project = await t3.project("find-paint"); + const thread = await t3.thread({ + project, + title: "Paint bound proof", + messages: [LONG_MESSAGE], + }); + await t3.open(thread); + await expect(screen.getByText("first fixture turn complete", { exact: false })).toBeVisible({ + timeout: 120_000, + }); + + // The CLI's message folds to one line; find unfolds it to reach the first match. + await browser.keyboard.press("Control+f"); + const find = screen.getByRole("searchbox", "Find in thread"); + await expect(find).toBeVisible(); + await find.fill("the"); + // The count is the server's: every match in the thread, whatever is painted. + await expect + .poll(() => browser.evaluate(findTotal), { timeout: 60_000 }) + .toBeGreaterThanOrEqual(SEEDED_MATCHES); + await expect + .poll(async () => (await browser.evaluate<{ active: number }>(paint)).active, { + timeout: 30_000, + }) + .toBe(1); + + try { + const painted = await browser.evaluate<{ + registered: number; + active: number; + onScreen: number; + }>(paint); + expect(painted.onScreen).toBeGreaterThan(0); + expect(painted.registered).toBeLessThan(5_000); + } finally { + await app.screenshot("find-open-paint"); + } + }, +); From 73e62fcecc5e07de840e2b03a8efd9c45cbe52cf Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 14:23:35 -0800 Subject: [PATCH 007/385] fix(server): Copilot MCP calls and glob searches keep their identity (#38349) --- .../Adapters/AcpRegistryAdapterV2.test.ts | 103 ++++++++++++++++++ .../src/server/copilotAcp.ts | 53 ++++++++- 2 files changed, 153 insertions(+), 3 deletions(-) diff --git a/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts index ee82cc06de836..495f16646a61d 100644 --- a/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts @@ -1997,6 +1997,109 @@ describe("AcpRegistryAdapterV2", () => { }).pipe(Effect.provide(layerTest)), ); + // Copilot flattens MCP titles and reports kind "read" for MCP calls and glob; its native + // tool.execution_start event carries the real identity. + it.effect("keeps Copilot's MCP and search tool identity instead of calling them file reads", () => + Effect.gen(function* () { + const sessionId = "copilot-session"; + const executionStart = (data: Record) => ({ + type: "emit_inbound", + frame: { + kind: "notification", + method: "github.com/copilot/sessionEvent", + params: { sessionId, type: "tool.execution_start", data }, + }, + }); + const update = (sessionUpdate: Record) => + claudeFrames.update(sessionId, sessionUpdate); + const session = yield* openClaudeReplaySession( + [ + { + type: "expect_outbound", + frame: { kind: "request", method: "initialize", params: "" }, + }, + { + type: "emit_inbound", + frame: { + kind: "response", + method: "initialize", + result: { + protocolVersion: 1, + agentInfo: { name: "Copilot", version: "1.0.112" }, + agentCapabilities: { loadSession: true }, + authMethods: [], + }, + }, + }, + { + type: "expect_outbound", + frame: { kind: "request", method: "session/new", params: "" }, + }, + { + type: "emit_inbound", + frame: { kind: "response", method: "session/new", result: { sessionId } }, + }, + { + type: "expect_outbound", + frame: { kind: "request", method: "session/prompt", params: "" }, + }, + executionStart({ + toolCallId: "mcp-call", + mcpServerName: "demo-library", + mcpToolName: "search_books", + }), + update({ + sessionUpdate: "tool_call", + toolCallId: "mcp-call", + title: "demo-library-search_books", + kind: "read", + status: "completed", + rawInput: { arguments: { query: "paper airplanes" }, limit: 2 }, + }), + executionStart({ + toolCallId: "native-search", + toolName: "glob", + toolTitle: "Finding files", + arguments: { pattern: "*.ts", paths: ["/workspace"] }, + }), + update({ + sessionUpdate: "tool_call", + toolCallId: "native-search", + title: "Finding files matching *.ts", + kind: "read", + status: "completed", + rawInput: { pattern: "*.ts", paths: ["/workspace"] }, + locations: [{ path: "/workspace" }], + }), + update({ sessionUpdate: "session_info_update", title: "after tools" }), + ], + undefined, + false, + "github-copilot-cli", + ); + yield* session.runtime.startTurn(session.turnInput(1)); + const events = yield* session.throughMarker("after tools"); + const lastItem = (nativeId: string) => + events + .flatMap((event) => + event.type === "turn_item.updated" && + event.turnItem.nativeItemRef?.nativeId === nativeId + ? [event.turnItem] + : [], + ) + .at(-1); + const mcp = lastItem("mcp-call"); + const search = lastItem("native-search"); + assert.deepEqual( + { + mcp: mcp?.type === "dynamic_tool" ? mcp.toolName : mcp?.type, + search: search?.type === "dynamic_tool" ? search.toolName : search?.type, + }, + { mcp: "demo-library.search_books", search: "file_search" }, + ); + }).pipe(Effect.provide(layerTest)), + ); + it.effect.each([ { kind: "approval", stopReason: "end_turn", status: "completed" }, { kind: "question", stopReason: "error", status: "failed" }, diff --git a/packages/provider-acp-registry/src/server/copilotAcp.ts b/packages/provider-acp-registry/src/server/copilotAcp.ts index 8482886892985..7b5027147c073 100644 --- a/packages/provider-acp-registry/src/server/copilotAcp.ts +++ b/packages/provider-acp-registry/src/server/copilotAcp.ts @@ -24,6 +24,7 @@ export const copilotClientCapabilitiesMeta = { "session.compaction_complete", "assistant.turn_start", "assistant.idle", + "tool.execution_start", ], }, }; @@ -63,9 +64,26 @@ function record(value: unknown): Record | undefined { const childSessionId = (taskToolCallId: string) => `copilot-task:${taskToolCallId}`; +// Copilot's tool_call reports MCP calls and glob/grep as kind "read" under a flattened title. +type CopilotToolIdentity = + | { readonly kind: "mcp"; readonly server: string; readonly tool: string } + | { readonly kind: "search" }; + +const COPILOT_SEARCH_TOOLS = new Set(["glob", "grep"]); + interface CopilotSessionAttribution { delta: { readonly kind: string; readonly text: string; readonly task?: string } | undefined; readonly taskByAgentId: Map; + readonly toolIdentityByCallId: Map; +} + +function copilotToolIdentity(data: Record): CopilotToolIdentity | undefined { + const server = typeof data.mcpServerName === "string" ? data.mcpServerName.trim() : ""; + const tool = typeof data.mcpToolName === "string" ? data.mcpToolName.trim() : ""; + if (server.length > 0 && tool.length > 0) return { kind: "mcp", server, tool }; + return typeof data.toolName === "string" && COPILOT_SEARCH_TOOLS.has(data.toolName) + ? { kind: "search" } + : undefined; } export function makeCopilotSubagentRouting() { @@ -73,13 +91,17 @@ export function makeCopilotSubagentRouting() { const session = (sessionId: string) => { let current = sessions.get(sessionId); if (current === undefined) { - current = { delta: undefined, taskByAgentId: new Map() }; + current = { delta: undefined, taskByAgentId: new Map(), toolIdentityByCallId: new Map() }; sessions.set(sessionId, current); } return current; }; const release = (sessionId: string, current: CopilotSessionAttribution) => { - if (current.delta === undefined && current.taskByAgentId.size === 0) { + if ( + current.delta === undefined && + current.taskByAgentId.size === 0 && + current.toolIdentityByCallId.size === 0 + ) { sessions.delete(sessionId); } }; @@ -105,6 +127,13 @@ export function makeCopilotSubagentRouting() { } return Effect.void; } + case "tool.execution_start": { + const identity = copilotToolIdentity(data); + if (identity !== undefined && typeof data.toolCallId === "string") { + session(event.sessionId).toolIdentityByCallId.set(data.toolCallId, identity); + } + return Effect.void; + } case "subagent.completed": case "subagent.failed": { const current = sessions.get(event.sessionId); @@ -154,6 +183,7 @@ export function makeCopilotSubagentRouting() { const current = sessions.get(notification.sessionId); if (current === undefined) return notification; let task: string | undefined; + let normalized = notification; if ( update.sessionUpdate === "agent_message_chunk" || update.sessionUpdate === "agent_thought_chunk" @@ -178,8 +208,25 @@ export function makeCopilotSubagentRouting() { ) { const agentId = record(record(update._meta)?.[COPILOT_META_KEY])?.agentId; task = typeof agentId === "string" ? current.taskByAgentId.get(agentId) : undefined; + const identity = current.toolIdentityByCallId.get(update.toolCallId); + if (identity !== undefined) { + if (update.status === "completed" || update.status === "failed") { + current.toolIdentityByCallId.delete(update.toolCallId); + release(notification.sessionId, current); + } + normalized = { + ...notification, + update: + identity.kind === "search" + ? { ...update, kind: "search" } + : { + ...update, + _meta: { ...update._meta, serverId: identity.server, toolName: identity.tool }, + }, + }; + } } - return task === undefined ? notification : { ...notification, sessionId: childSessionId(task) }; + return task === undefined ? normalized : { ...normalized, sessionId: childSessionId(task) }; }; return { registerExtensions, normalizeSessionUpdate }; From 7b4478895daf4f71da216131dbb629ba04271dcf Mon Sep 17 00:00:00 2001 From: Simone Date: Tue, 17 Nov 2026 23:25:09 +0100 Subject: [PATCH 008/385] fix(server): omit page-specific headers and footers from RTF text (#38347) Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com> Co-authored-by: Julius Marminge --- apps/server/src/provider/documentTextWorker.ts | 6 ++++++ apps/server/src/provider/userInputAttachments.test.ts | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/server/src/provider/documentTextWorker.ts b/apps/server/src/provider/documentTextWorker.ts index ed67cba63f472..57f154204a563 100644 --- a/apps/server/src/provider/documentTextWorker.ts +++ b/apps/server/src/provider/documentTextWorker.ts @@ -454,7 +454,13 @@ function* rtf(source: string): Generator { "object", "fldinst", "header", + "headerf", + "headerl", + "headerr", "footer", + "footerf", + "footerl", + "footerr", ].includes(control) ) state.skip = true; diff --git a/apps/server/src/provider/userInputAttachments.test.ts b/apps/server/src/provider/userInputAttachments.test.ts index 79a9f0539534b..f54b748a5701e 100644 --- a/apps/server/src/provider/userInputAttachments.test.ts +++ b/apps/server/src/provider/userInputAttachments.test.ts @@ -277,6 +277,15 @@ describe("question answer paths", () => { ); it.effect.each([ + [ + "page-specific headers and footers", + String.raw`{\rtf1\ansi\facingp\sectd\titlepg +{\headerf First-page header}{\headerl Left-page header}{\headerr Right-page header} +{\footerf First-page footer}{\footerl Left-page footer}{\footerr Right-page footer} +\pard Approved delivery date: 24 November.\par +}`, + "Approved delivery date: 24 November.", + ], [ "text symbols", String.raw`{\rtf1\ansi Pages 1\endash 5\emdash\lquote left\rquote\ldblquote right\rdblquote\bullet\b End\b0\unknown{\*\secret\bullet hidden}}`, @@ -310,7 +319,7 @@ describe("question answer paths", () => { ["large fallback", String.raw`{\rtf1\ansi\uc20\u945????????????????????Z}`, "αZ"], ["no fallback", String.raw`{\rtf1\ansi\uc0\u945Z}`, "αZ"], ["scoped count", String.raw`{\rtf1\ansi{\uc2\u945??}\u946?Z}`, "αβZ"], - ] as const)("extracts RTF symbols and Unicode fallbacks: %s", ([name, source, expected]) => + ] as const)("extracts RTF text: %s", ([name, source, expected]) => Effect.gen(function* () { const config = yield* ServerConfig.ServerConfig; const path = NodePath.join(config.attachmentsDir, `${name}.rtf`); From 856c84e4b14653facaa3ee320cd165e4e1b103c1 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 15:37:35 -0800 Subject: [PATCH 009/385] fix(desktop): picked element keeps its screenshot when the page re-renders before Attach (#38357) --- apps/desktop/src/preview/PickPreload.test.ts | 45 +++++++++++++++++++- apps/desktop/src/preview/PickPreload.ts | 19 +++++++-- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/preview/PickPreload.test.ts b/apps/desktop/src/preview/PickPreload.test.ts index 61d3941ba41ab..abf9421985f21 100644 --- a/apps/desktop/src/preview/PickPreload.test.ts +++ b/apps/desktop/src/preview/PickPreload.test.ts @@ -1,9 +1,10 @@ import { expect, it, vi } from "vite-plus/test"; -import { START_PICK_CHANNEL } from "./GuestProtocol.ts"; +import { ELEMENT_PICKED_CHANNEL, START_PICK_CHANNEL } from "./GuestProtocol.ts"; import "./PickPreload.ts"; const ipcListeners = vi.hoisted(() => new Map void>>()); +const ipcSend = vi.hoisted(() => ({ calls: [] as unknown[][] })); vi.mock("electron", () => ({ ipcRenderer: { @@ -11,7 +12,9 @@ vi.mock("electron", () => ({ ipcListeners.set(channel, [...(ipcListeners.get(channel) ?? []), listener]); }, off: () => {}, - send: () => {}, + send: (...args: unknown[]) => { + ipcSend.calls.push(args); + }, invoke: async () => undefined, }, })); @@ -105,3 +108,41 @@ it("keeps the annotation when Escape dismisses an IME candidate in the comment", expect(shadowRoot.host.isConnected).toBe(true); expect(comment.value).toBe("draft"); }); + +it.each([ + { scrolled: false, rect: { x: 40, y: 60, width: 200, height: 120 } }, + // The last rect would point at whatever now sits there, so no crop beats a wrong one. + { scrolled: true, rect: { x: 0, y: 0, width: 0, height: 0 } }, +])( + "submits a replaced element's last rect unless the page scrolled ($scrolled)", + async ({ scrolled, rect }) => { + ipcSend.calls.length = 0; + const card = document.body.appendChild(document.createElement("div")); + const pickedRect = new DOMRect(40, 60, 200, 120); + // Browsers report a detached element at 0x0 in the corner. + using _rect = vi + .spyOn(card, "getBoundingClientRect") + .mockImplementation(() => (card.isConnected ? pickedRect : new DOMRect())); + document.elementsFromPoint = () => [card]; + const shadowRoot = startAnnotation(); + + card.dispatchEvent( + new PointerEvent("pointerdown", { button: 0, clientX: 100, clientY: 100, bubbles: true }), + ); + // A polling page re-renders while the comment is written and replaces the picked node. + card.replaceWith(document.createElement("div")); + if (scrolled) window.dispatchEvent(new Event("scroll")); + const attach = Array.from(shadowRoot.querySelectorAll("button")).find( + (button) => button.textContent === "Attach", + ); + if (!attach) throw new Error("Attach button not found"); + attach.click(); + + await vi.waitFor(() => + expect(ipcSend.calls.some(([channel]) => channel === ELEMENT_PICKED_CHANNEL)).toBe(true), + ); + const [, annotation] = + ipcSend.calls.find(([channel]) => channel === ELEMENT_PICKED_CHANNEL) ?? []; + expect((annotation as { elements: Array<{ rect: unknown }> }).elements[0]?.rect).toEqual(rect); + }, +); diff --git a/apps/desktop/src/preview/PickPreload.ts b/apps/desktop/src/preview/PickPreload.ts index 42867b9d9cb44..14ae5b16f33d6 100644 --- a/apps/desktop/src/preview/PickPreload.ts +++ b/apps/desktop/src/preview/PickPreload.ts @@ -151,6 +151,8 @@ interface SelectedElement { outline: HTMLDivElement; label: HTMLDivElement; baselineStyles: Map; + // Last rect measured while connected; a detached node reports 0x0. + rect: PreviewAnnotationRect; } interface AnnotationSession { @@ -417,6 +419,7 @@ function updateSelectedVisual(target: SelectedElement): void { target.label.style.display = "none"; return; } + target.rect = rectFromDomRect(target.element.getBoundingClientRect()); const rect = visibleElementRect(target.element); positionBox(target.outline, rect); if (rect.width === 0 || rect.height === 0) { @@ -966,6 +969,7 @@ function startAnnotation( outline: createBox(PRIMARY, PRIMARY_FILL), label: createLabel(), baselineStyles: new Map(), + rect: rectFromDomRect(element.getBoundingClientRect()), }; selected.set(element, target); root.append(target.outline, target.label); @@ -1392,6 +1396,13 @@ function startAnnotation( for (const target of selected.values()) updateSelectedVisual(target); queueEditorLayout(); }; + const onScroll = (): void => { + // A detached element's last rect no longer matches what is on screen once the page scrolls. + for (const target of selected.values()) { + if (!target.element.isConnected) target.rect = { x: 0, y: 0, width: 0, height: 0 }; + } + repaint(); + }; // A scrollbar appearing narrows the viewport without a window resize. const rootResizeObserver = new ResizeObserver(repaint); @@ -1626,7 +1637,7 @@ function startAnnotation( window.removeEventListener("focus", onWindowFocus); window.removeEventListener("keydown", onKeyDown, true); window.removeEventListener("keyup", onVoiceKeyUp, true); - window.removeEventListener("scroll", repaint, true); + window.removeEventListener("scroll", onScroll, true); window.removeEventListener("resize", repaint); dragHandle.removeEventListener("pointerdown", onEditorPointerDown); dragHandle.removeEventListener("pointermove", onEditorPointerMove); @@ -1723,7 +1734,9 @@ function startAnnotation( return { id: target.id, element, - rect: rectFromDomRect(target.element.getBoundingClientRect()), + rect: target.element.isConnected + ? rectFromDomRect(target.element.getBoundingClientRect()) + : target.rect, }; }), ) @@ -1785,7 +1798,7 @@ function startAnnotation( window.addEventListener("focus", onWindowFocus); window.addEventListener("keydown", onKeyDown, { capture: true }); window.addEventListener("keyup", onVoiceKeyUp, { capture: true }); - window.addEventListener("scroll", repaint, { capture: true, passive: true }); + window.addEventListener("scroll", onScroll, { capture: true, passive: true }); window.addEventListener("resize", repaint, { passive: true }); // Bubble phase, so the overlay's own handlers still see these events. for (const type of PAGE_ISOLATED_EVENTS) From 24467d671d182bdac5915088bed23a4d34a46dfe Mon Sep 17 00:00:00 2001 From: Martin Bergo Date: Wed, 18 Nov 2026 01:28:02 +0100 Subject: [PATCH 010/385] fix(client): a subagent prompt that opens with comment dividers no longer freezes the thread (#38368) Co-authored-by: Julius Marminge --- .../client-runtime/src/state/subagentRuntime.test.ts | 12 ++++++++++++ packages/client-runtime/src/state/subagentRuntime.ts | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/client-runtime/src/state/subagentRuntime.test.ts b/packages/client-runtime/src/state/subagentRuntime.test.ts index 7be9639bafedb..3512956af25fc 100644 --- a/packages/client-runtime/src/state/subagentRuntime.test.ts +++ b/packages/client-runtime/src/state/subagentRuntime.test.ts @@ -316,5 +316,17 @@ describe("resolveWorkflowOpening", () => { false, ); expect(isWorkflowScriptMessage({ role: "assistant", text: SCRIPT })).toBe(false); + expect( + isWorkflowScriptMessage({ role: "user", text: `// a\r// b\u2028/* c\n * d */\r\n${SCRIPT}` }), + ).toBe(true); + expect(isWorkflowScriptMessage({ role: "user", text: "// export const meta = {}" })).toBe( + false, + ); + // Divider comments ahead of ordinary code must reject without catastrophic backtracking. + const dividers = `${"/".repeat(40)}\n`.repeat(40); + expect(isWorkflowScriptMessage({ role: "user", text: `${dividers}const x = 1;` })).toBe(false); + expect( + isWorkflowScriptMessage({ role: "user", text: `${"/**/".repeat(200)}const x = 1;` }), + ).toBe(false); }); }); diff --git a/packages/client-runtime/src/state/subagentRuntime.ts b/packages/client-runtime/src/state/subagentRuntime.ts index a971eef5efc77..ceee780057d55 100644 --- a/packages/client-runtime/src/state/subagentRuntime.ts +++ b/packages/client-runtime/src/state/subagentRuntime.ts @@ -325,7 +325,9 @@ export function deriveWorkflowGroups( } // Workflow scripts open with their `meta` export, after any leading comments. -const WORKFLOW_SCRIPT_START = /^\s*(?:(?:\/\/[^\n]*|\/\*[\s\S]*?\*\/)\s*)*export\s+const\s+meta\b/; +// Each comment has one way to match, so a prompt of `////` divider lines cannot backtrack. +const WORKFLOW_SCRIPT_START = + /^\s*(?:(?:\/\/[^\r\n\u2028\u2029]*(?:[\r\n\u2028\u2029]|$)|\/\*(?:[^*]|\*(?!\/))*\*\/)\s*)*export\s+const\s+meta\b/; /** * Whether a user message is the script a provider-native workflow runs. Servers mark every From ef5772805916a97e9522feaaefcf9e0b5c3b92ff Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 16:28:46 -0800 Subject: [PATCH 011/385] fix(gitlab): GitLab issues open again; issue reactions come from REST (#38383) --- .../src/server/GitLabIssueTracker.test.ts | 14 +++++++++++-- .../src/server/GitLabIssueTracker.ts | 12 ++++++++++- .../src/server/gitLabIssueJson.ts | 6 +++--- .../src/server/gitLabMergeRequestJson.ts | 21 +++++++++++++++++++ 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/packages/source-control-gitlab/src/server/GitLabIssueTracker.test.ts b/packages/source-control-gitlab/src/server/GitLabIssueTracker.test.ts index 9b6e23b16d0e5..18c3c7709f52a 100644 --- a/packages/source-control-gitlab/src/server/GitLabIssueTracker.test.ts +++ b/packages/source-control-gitlab/src/server/GitLabIssueTracker.test.ts @@ -92,13 +92,15 @@ function answer(path: string): string { }, ]); } + if (path.startsWith("projects/acme%2Fweb/issues/42/award_emoji")) { + return encode([{ id: 11, name: "eyes", user: { username: "theo" } }]); + } if (path === "graphql") { return encode({ data: { currentUser: { username: "julius" }, project: { mergeRequest: { - awardEmoji: { nodes: [{ name: "eyes", user: { username: "theo" } }] }, notes: { pageInfo: { hasNextPage: false }, nodes: [ @@ -144,7 +146,15 @@ describe("GitLabIssueTracker", () => { const awardCursors: unknown[] = []; const api = yield* tracker((args, input) => { hosts.add(input.host); - if (args[1] === "graphql") awardCursors.push(JSON.parse(input.stdin!).variables.cursor); + if (args[1] === "graphql") { + const request = JSON.parse(input.stdin!); + // gitlab.com's schema has no `Issue.awardEmoji`; glab exits 1 on such a query. + const issueFields = /issue\(iid: \$iid\) \{([\s\S]*?)notes\(/.exec(request.query)?.[1]; + if (issueFields?.includes("awardEmoji")) { + throw new Error("Field 'awardEmoji' doesn't exist on type 'Issue'"); + } + awardCursors.push(request.variables.cursor); + } return answer(args[1]!); }); const target = { cwd: "/w", host: "gitlab.example.com", scope: "acme/web", key: "42" }; diff --git a/packages/source-control-gitlab/src/server/GitLabIssueTracker.ts b/packages/source-control-gitlab/src/server/GitLabIssueTracker.ts index e30dcc18b256a..8206b572ece5d 100644 --- a/packages/source-control-gitlab/src/server/GitLabIssueTracker.ts +++ b/packages/source-control-gitlab/src/server/GitLabIssueTracker.ts @@ -37,7 +37,9 @@ import { type GitLabTemplateEntry, } from "./gitLabIssueJson.ts"; import { + awardReactions, decodeAwardEmojiJson, + decodeAwardListJson, decodeOwnAwardIdJson, decodeViewerJson, gitLabAwardName, @@ -523,6 +525,13 @@ export const make: Effect.Effect = number, operation: "getIssue", }), + read({ + cwd: input.cwd, + host: input.host, + operation: "getIssue", + path: paged(`${path}/award_emoji`, 1), + decode: decodeAwardListJson, + }), ], { concurrency: 4 }, ), @@ -537,6 +546,7 @@ export const make: Effect.Effect = closing, related, awardPage, + issueAwards, ]) => { const closingKeys = new Set( closing.map((link) => `${link.repository}!${link.number}`), @@ -546,7 +556,7 @@ export const make: Effect.Effect = viewer: viewerLogin, viewerPermissions: VIEWER_PERMISSIONS, states: ISSUE_STATES, - reactions: awardPage.reactions, + reactions: awardReactions(issueAwards, viewerLogin), comments: notes.comments.map((comment) => ({ ...comment, reactions: awardPage.reactionsByNoteId.get(comment.id) ?? [], diff --git a/packages/source-control-gitlab/src/server/gitLabIssueJson.ts b/packages/source-control-gitlab/src/server/gitLabIssueJson.ts index 7f649eeeb9f1a..91495e43ed00f 100644 --- a/packages/source-control-gitlab/src/server/gitLabIssueJson.ts +++ b/packages/source-control-gitlab/src/server/gitLabIssueJson.ts @@ -409,14 +409,14 @@ export function decodeTemplateJson( } /** - * Awards on the issue and on every note of it, in one read, shaped exactly like the merge request - * query so its decoder answers for both: `mergeRequest` is an alias for the issue field. + * Awards on every note of the issue, shaped like the merge request query so its decoder answers + * for both: `mergeRequest` is an alias for the issue field. GitLab's `Issue` type has no + * `awardEmoji`, so the issue's own awards are read from REST `award_emoji` instead. */ export const ISSUE_AWARD_EMOJI_GRAPHQL_QUERY = `query($fullPath: ID!, $iid: String!, $cursor: String) { currentUser { username } project(fullPath: $fullPath) { mergeRequest: issue(iid: $iid) { - awardEmoji { nodes { name user { username } } } notes(first: ${PAGE_SIZE}, after: $cursor) { pageInfo { hasNextPage endCursor } nodes { id awardEmoji { nodes { name user { username } } } } diff --git a/packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts b/packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts index 995ae74939260..00daa58f026d9 100644 --- a/packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts +++ b/packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts @@ -1304,6 +1304,27 @@ const RawAwardSchema = Schema.Struct({ const decodeAward = Schema.decodeUnknownExit(RawAwardSchema); +type GitLabAward = typeof RawAwardSchema.Type; + +/** A page of REST `award_emoji`; a row that cannot be read is skipped. */ +export function decodeAwardListJson( + raw: string, +): Result.Result, DecodeFailure> { + return Result.map(decodeUnknownList(raw), (rows) => + rows.flatMap((entry) => { + const award = decodeAward(entry); + return Exit.isSuccess(award) ? [award.value] : []; + }), + ); +} + +export function awardReactions( + awards: ReadonlyArray, + viewer: string | null, +): ReadonlyArray { + return toReactions({ nodes: awards }, viewer); +} + export function decodeOwnAwardIdJson( raw: string, input: { readonly content: PullRequestReactionContent; readonly viewer: string }, From 959c4c1ecf0dac0e6a1ebc83336113ecf91a585d Mon Sep 17 00:00:00 2001 From: Simone Date: Wed, 18 Nov 2026 01:31:17 +0100 Subject: [PATCH 012/385] fix(server): count only actual slides in PowerPoint attachment text (#38377) Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com> --- .../server/src/provider/documentTextWorker.ts | 8 ++++--- .../src/provider/userInputAttachments.test.ts | 22 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/apps/server/src/provider/documentTextWorker.ts b/apps/server/src/provider/documentTextWorker.ts index 57f154204a563..fd723a7c25856 100644 --- a/apps/server/src/provider/documentTextWorker.ts +++ b/apps/server/src/provider/documentTextWorker.ts @@ -133,8 +133,8 @@ function xml(source: string, extension: string): XmlNode { return root; } -const children = (node: XmlNode) => - node.children.filter((child): child is XmlNode => typeof child !== "string"); +const children = (node: XmlNode | undefined) => + node?.children.filter((child): child is XmlNode => typeof child !== "string") ?? []; function* all(node: XmlNode, name: string | readonly string[]): Generator { for (const child of children(node)) { if (typeof name === "string" ? child.name === name : name.includes(child.name)) yield child; @@ -630,8 +630,10 @@ async function* document(path: string, extension: string): AsyncGenerator node.name === "sldIdLst"); let index = 0; - for (const slide of all(read("ppt/presentation.xml"), "sldId")) { + for (const slide of children(slideList).filter((node) => node.name === "sldId")) { yield `\n\n## Slide ${++index}\n`; const target = rels.get(slide.attrs["r:id"] ?? slide.attrs.id); if (!target) { diff --git a/apps/server/src/provider/userInputAttachments.test.ts b/apps/server/src/provider/userInputAttachments.test.ts index f54b748a5701e..b2ea247900b98 100644 --- a/apps/server/src/provider/userInputAttachments.test.ts +++ b/apps/server/src/provider/userInputAttachments.test.ts @@ -685,7 +685,7 @@ describe("question answer paths", () => { ext === "pptx" ? { "ppt/presentation.xml": - '', + '', "ppt/_rels/presentation.xml.rels": '', "ppt/bad.xml": "

Discard", @@ -912,8 +912,16 @@ describe("question answer paths", () => { ext: "pptx", bounded: true, parts: { - "ppt/presentation.xml": - '', + "ppt/presentation.xml": ` + + + + + + + `, "ppt/_rels/presentation.xml.rels": '', "ppt/slides/slide1.xml": "Departure", @@ -934,13 +942,15 @@ describe("question answer paths", () => { "## Slide 2", "Departure\nNotes:\nBoard at gate 4", ], + occurrences: { text: "## Slide ", count: 2 }, absent: ["Unrelated notes", "[Skipped document part", "[Extracted text truncated"], }, ...[false, true].map((missing) => ({ ext: "pptx", bounded: true, parts: { - "ppt/presentation.xml": '', + "ppt/presentation.xml": + '', "ppt/_rels/presentation.xml.rels": '', "ppt/slides/a.xml": "

Slide text

", @@ -958,7 +968,7 @@ describe("question answer paths", () => { bounded: true, parts: { "ppt/presentation.xml": - '', + '', "ppt/_rels/presentation.xml.rels": '', "ppt/slides/a.xml": `

${"A".repeat(600_000)}

`, @@ -1092,7 +1102,7 @@ describe("question answer paths", () => { bounded: true, parts: { "ppt/presentation.xml": - '', + '', "ppt/_rels/presentation.xml.rels": '', "ppt/slides/slide.xml": `${"A".repeat(1_000_100)}`, From 1c818a80830f6b031c5ffd6d96d78b64d958b0dd Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 16:40:43 -0800 Subject: [PATCH 013/385] fix(server): settling a thread closes its waiting link cards (#38380) --- .../src/orchestration-v2/Orchestrator.ts | 6 ++++-- apps/server/src/peer/PeerLinkRequests.test.ts | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 9ca65a32f3cf8..819aa90c03b98 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -5446,6 +5446,8 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio now, cancelQueuedDelivery: false, }); + } + if (command.type === "thread.archive" || command.type === "thread.settle") { yield* closePendingLinkRequests({ command, events, threadId: command.threadId, now }); } @@ -10828,8 +10830,8 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio /** * Closes the link cards still waiting for the user. Their agent stopped - * waiting long ago, so nobody is woken: stopping or archiving the thread - * means the user is done with it. + * waiting long ago, so nobody is woken: stopping, settling or archiving the + * thread means the user is done with it. */ const closePendingLinkRequests = Effect.fn("orchestrationV2.closePendingLinkRequests")( function* (input: { diff --git a/apps/server/src/peer/PeerLinkRequests.test.ts b/apps/server/src/peer/PeerLinkRequests.test.ts index 2190e9a50e6a9..2eec22a90bfa0 100644 --- a/apps/server/src/peer/PeerLinkRequests.test.ts +++ b/apps/server/src/peer/PeerLinkRequests.test.ts @@ -888,6 +888,24 @@ it.live("archiving the thread closes its open card", () => ), ); +it.live("settling the thread closes its open card, so it no longer reads as asking", () => + withBoth((a, b) => + Effect.gen(function* () { + yield* seedThread(a); + yield* a.call({ url: b.url }); + yield* pendingCard(a); + yield* endRun(a); + yield* a.orchestrator.dispatch({ + type: "thread.settle", + commandId: CommandId.make("command:settle:laptop"), + threadId, + }); + expect(yield* cardOf(a)).toMatchObject({ status: "cancelled", linkStatus: "cancelled" }); + expect((yield* a.orchestrator.getThreadShell(threadId))?.pendingRuntimeRequest).toBeNull(); + }), + ), +); + it.live("a code the box refuses fails the request with its reason, and links nothing", () => withBoth((a, b) => Effect.gen(function* () { From 25875c11b226b20d4612e719d35c1dd9797c0026 Mon Sep 17 00:00:00 2001 From: Alex Vallone <39172404+amv146@users.noreply.github.com> Date: Tue, 17 Nov 2026 17:06:13 -0800 Subject: [PATCH 014/385] fix(azure-devops): list issues when work item metadata is large (#38387) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Julius Marminge --- .../src/server/AzureDevOpsIssueTracker.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts b/packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts index 40dfd6df986e8..5a6f4c7c38ef9 100644 --- a/packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts +++ b/packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts @@ -347,7 +347,12 @@ export const make: Effect.Effect< read({ cwd: input.cwd, operation: input.operation, - args: invokeArgs({ ...input, resource: "workitemtypes" }), + // Form layouts can exceed the CLI output cap; only workflow metadata is needed. + args: [ + ...invokeArgs({ ...input, resource: "workitemtypes" }), + "--query", + "{value: value[].{name: name, isDisabled: isDisabled || `false`, states: (states || `[]`)[].{name: name, category: category}}}", + ], decode: decodeAs(decodeTypes), }).pipe(Effect.map((types) => types.value)); From 65accaf23cc51563e385f4d3ad84a97eecd95ca0 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Tue, 17 Nov 2026 17:18:46 -0800 Subject: [PATCH 015/385] chore: vouch maschwenk (#38394) Co-authored-by: Claude Opus 5.5 --- .github/VOUCHED.td | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/VOUCHED.td b/.github/VOUCHED.td index 315ff5742fd5c..2cfd35f32074d 100644 --- a/.github/VOUCHED.td +++ b/.github/VOUCHED.td @@ -52,6 +52,7 @@ github:lnieuwenhuis github:Lucenx9 github:mackinleysmith github:maria-rcks +github:maschwenk github:MatthewFeroz github:maxwellyoung github:mweinbach From 42763ff8b12bfb534363df4dd5f8f5f759f54990 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Nov 2026 17:59:16 -0800 Subject: [PATCH 016/385] fix(web): screen readers read a pull request's number once in thread details (#38400) --- .../components/chat/ThreadDetailsPrRow.browser.test.tsx | 7 +++++++ apps/web/src/components/chat/ThreadDetailsPrRow.tsx | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/ThreadDetailsPrRow.browser.test.tsx b/apps/web/src/components/chat/ThreadDetailsPrRow.browser.test.tsx index 1c3fa1a3899fc..0c33baf1a2e4c 100644 --- a/apps/web/src/components/chat/ThreadDetailsPrRow.browser.test.tsx +++ b/apps/web/src/components/chat/ThreadDetailsPrRow.browser.test.tsx @@ -361,6 +361,13 @@ it("names a linked pull request row by its kind, number and title, not its URL", expect(name).toMatch(/pull request/i); expect(name).toContain("#1"); expect(name).toContain("Test PR"); + const exposedNumbers = [...screen.container.querySelectorAll("span")].filter( + (span) => + span.textContent?.trim() === "#1" && + span.closest("button") === null && + span.closest('[aria-hidden="true"]') === null, + ); + expect(exposedNumbers).toHaveLength(0); }); it("names a linked issue row by its kind, number and title, not its URL", async () => { diff --git a/apps/web/src/components/chat/ThreadDetailsPrRow.tsx b/apps/web/src/components/chat/ThreadDetailsPrRow.tsx index c067632980156..3fc70104882c8 100644 --- a/apps/web/src/components/chat/ThreadDetailsPrRow.tsx +++ b/apps/web/src/components/chat/ThreadDetailsPrRow.tsx @@ -483,7 +483,9 @@ export function ThreadDetailsPrRow({
{openRow(detail.title, "row", true)}
- #{number} + + #{number} + {showChecks && checksRollup !== null ? ( Date: Wed, 18 Nov 2026 03:03:18 +0100 Subject: [PATCH 017/385] fix(server): preserve positional tabs in DOCX attachment text (#38393) Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com> Co-authored-by: Julius Marminge --- .../server/src/provider/documentTextWorker.ts | 32 +++++++++++++++---- .../src/provider/userInputAttachments.test.ts | 14 ++++++-- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/apps/server/src/provider/documentTextWorker.ts b/apps/server/src/provider/documentTextWorker.ts index fd723a7c25856..237df2a07ab13 100644 --- a/apps/server/src/provider/documentTextWorker.ts +++ b/apps/server/src/provider/documentTextWorker.ts @@ -112,12 +112,7 @@ function xml(source: string, extension: string): XmlNode { parent.children.pop(); return; } - // Markup-compatibility fallbacks repeat their mc:Choice content, e.g. Word text boxes. - // Keep one when no Choice carries text, such as a chart with a VML caption. - if (node.name === "Fallback" && parent.hasTextChoice) { - parent.children.pop(); - return; - } + if (node.name === "Fallback" && !retainCompatibilityFallback(parent, node)) return; if (HIDDEN.has(node.name) || (!node.hasText && node.name !== "noBreakHyphen")) return; parent.hasText = true; if (node.name === "Choice") parent.hasTextChoice = true; @@ -135,6 +130,29 @@ function xml(source: string, extension: string): XmlNode { const children = (node: XmlNode | undefined) => node?.children.filter((child): child is XmlNode => typeof child !== "string") ?? []; + +function retainCompatibilityFallback(parent: XmlNode, fallback: XmlNode): boolean { + // Markup-compatibility fallbacks repeat their mc:Choice content, e.g. Word text boxes. + // Keep one when no Choice carries text, such as a chart with a VML caption. + if (parent.hasTextChoice) { + parent.children.pop(); + return false; + } + if (fallback.hasText || hasInlineTab(fallback, ["tab", "ptab"])) { + parent.children = parent.children.filter( + (child) => + typeof child === "string" || child.name !== "Choice" || !hasInlineTab(child, ["ptab"]), + ); + } + return true; +} + +function hasInlineTab(node: XmlNode, names: readonly string[]): boolean { + return ( + !HIDDEN.has(node.name) && + (names.includes(node.name) || children(node).some((child) => hasInlineTab(child, names))) + ); +} function* all(node: XmlNode, name: string | readonly string[]): Generator { for (const child of children(node)) { if (typeof name === "string" ? child.name === name : name.includes(child.name)) yield child; @@ -143,7 +161,7 @@ function* all(node: XmlNode, name: string | readonly string[]): Generator { if (HIDDEN.has(node.name)) return; - if (["tab", "cell"].includes(node.name)) yield "\t"; + if (["tab", "ptab", "cell"].includes(node.name)) yield "\t"; else if (["br", "line-break", "cr"].includes(node.name)) yield "\n"; else if (node.name === "noBreakHyphen") yield "\u2011"; else if (node.spaceCount !== undefined) { diff --git a/apps/server/src/provider/userInputAttachments.test.ts b/apps/server/src/provider/userInputAttachments.test.ts index b2ea247900b98..e0212783f6f62 100644 --- a/apps/server/src/provider/userInputAttachments.test.ts +++ b/apps/server/src/provider/userInputAttachments.test.ts @@ -749,10 +749,18 @@ describe("question answer paths", () => { ext: "docx", bounded: true, parts: { - "word/document.xml": - 'FirstSecondThirdparty‑End', + "word/document.xml": [ + '', + 'FirstSecondThirdparty‑End', + 'Invoice 104$700.00', + 'Invoice 105$800.00', + 'Invoice 106 total $900.00', + "", + ].join(""), }, - expected: ["First\nSecond\nThird\u2011party\u2011End"], + expected: [ + "First\nSecond\nThird\u2011party\u2011End\nInvoice 104\t$700.00\nInvoice 105\t$800.00\nInvoice 106 total $900.00", + ], }, { ext: "docx", From 724f5c6bec1781c6d7d6ad09033030f198e4607d Mon Sep 17 00:00:00 2001 From: Johannes Mitschunas <51748815+Krarilotus@users.noreply.github.com> Date: Wed, 18 Nov 2026 03:21:45 +0100 Subject: [PATCH 018/385] fix(server): a refused hub read keeps the account's last good usage reading (#38397) Co-authored-by: Julius Marminge --- .../src/usage/UsageLimitSources.test.ts | 101 ++++++++++++++++++ apps/server/src/usage/UsageLimitSources.ts | 38 ++++++- 2 files changed, 138 insertions(+), 1 deletion(-) diff --git a/apps/server/src/usage/UsageLimitSources.test.ts b/apps/server/src/usage/UsageLimitSources.test.ts index fc8a93f9e1bc6..4a71640aa2626 100644 --- a/apps/server/src/usage/UsageLimitSources.test.ts +++ b/apps/server/src/usage/UsageLimitSources.test.ts @@ -175,6 +175,107 @@ it.effect("reads a management key from its secret provider", () => { ); }); +it.effect("keeps an account's last good reading when the hub's next read of it is refused", () => { + let refused = true; + let workspace = "account-a"; + let listsIdentity = true; + const readAccount = Effect.gen(function* () { + const sources = yield* UsageLimitSources.make; + return Effect.gen(function* () { + yield* sources.refresh; + const [source] = yield* sources.current; + return source?.accounts[0]?.usageLimits; + }); + }); + return Effect.gen(function* () { + const read = yield* readAccount; + // Nothing to keep yet: the account stays listed as unreadable. + expect(yield* read).toMatchObject({ windows: [], unavailable: { reason: "probeFailed" } }); + refused = false; + const good = yield* read; + expect(good?.windows.map((window) => window.usedPercent)).toEqual([78]); + expect(good?.unavailable).toBeUndefined(); + refused = true; + expect(yield* read).toEqual(good); + // The same auth file now holds another login, whose reading is unknown. + workspace = "account-b"; + expect(yield* read).toMatchObject({ windows: [], unavailable: { reason: "probeFailed" } }); + // A file that lists no login cannot show whether the next one is the same. + listsIdentity = false; + refused = false; + yield* read; + refused = true; + expect(yield* read).toMatchObject({ windows: [], unavailable: { reason: "probeFailed" } }); + }).pipe( + Effect.provide([ + ServerSettings.layerTest({ + usageLimitSources: { + [UsageLimitSourceId.make("hub")]: { + kind: "cliproxy", + url: "http://hub.test:8317", + managementKey: "management-secret", + enabled: true, + }, + }, + }), + Layer.mock(BackgroundPolicy.BackgroundPolicy)({ + shouldRunScopeWork: () => Effect.succeed(false), + }), + Layer.succeed(SecretResolver.SecretResolver, { + label: (provider) => Effect.succeed(provider), + read: (references) => Effect.succeed(references.map(() => undefined)), + invalidate: () => Effect.void, + }), + Layer.succeed( + HttpClient.HttpClient, + HttpClient.make((request) => + Effect.sync(() => { + if (new URL(request.url).pathname.endsWith("/auth-files")) { + return HttpClientResponse.fromWeb( + request, + Response.json({ + files: [ + { + id: "first.json", + auth_index: "a", + provider: "codex", + ...(listsIdentity + ? { + email: "first@example.com", + id_token: { chatgpt_account_id: workspace }, + } + : {}), + }, + ], + }), + ); + } + const usage = { + plan_type: "pro", + rate_limit: { + secondary_window: { + used_percent: 78, + reset_at: 4070908800, + limit_window_seconds: 604800, + }, + }, + }; + return HttpClientResponse.fromWeb( + request, + Response.json( + refused + ? { status_code: 429, body: "{}" } + : { status_code: 200, body: JSON.stringify(usage) }, + ), + ); + }), + ), + ), + NodeCrypto.layer, + ]), + ); +}); + const NOW = Date.parse("2026-11-13T12:00:00.000Z"); const at = (hours: number) => DateTime.formatIso(DateTime.makeUnsafe(NOW + hours * 3_600_000)); const spent = (id: string, hours: number): ServerProviderUsageWindow => ({ diff --git a/apps/server/src/usage/UsageLimitSources.ts b/apps/server/src/usage/UsageLimitSources.ts index d6f867d621d23..ff54bb02781a9 100644 --- a/apps/server/src/usage/UsageLimitSources.ts +++ b/apps/server/src/usage/UsageLimitSources.ts @@ -52,6 +52,41 @@ function sourceLabel(id: string, config: UsageLimitSourceConfig): string { } } +/** + * A refused read of one account keeps its last good reading, as provider probes keep their bars + * (see ServerProviderUsageLimits); a reading with none to keep stays listed as unreadable. + */ +function keepLastGoodReadings( + previous: ReadonlyArray, + next: ReadonlyArray, +): ReadonlyArray { + return next.map((source) => { + // Auth file names can be reused, so only the same hub and login may lend a reading. + const before = previous.find( + (candidate) => candidate.id === source.id && candidate.endpoint === source.endpoint, + ); + if (!before) return source; + return { + ...source, + accounts: source.accounts.map((account) => { + if (account.usageLimits.unavailable?.reason !== "probeFailed") return account; + // Without a listed login, a reused auth file name cannot be told apart from the old one. + if (account.email === undefined && account.workspaceId === undefined) return account; + const last = before.accounts.find( + (candidate) => + candidate.id === account.id && + candidate.driver === account.driver && + // Fingerprinted Antigravity readings omit the listed identity, so they are never lent. + candidate.usageLimits.credentialFingerprint === undefined && + candidate.email === account.email && + candidate.workspaceId === account.workspaceId, + ); + return last && !last.usageLimits.unavailable ? last : account; + }), + }; + }); +} + function missingManagementKey(config: UsageLimitSourceConfig): string { return typeof config.managementKey === "string" ? "No management key configured." @@ -131,7 +166,7 @@ export const make = Effect.gen(function* () { ([id, config]) => readSource(id as UsageLimitSourceId, config), { concurrency: 4 }, ); - yield* publish(snapshots); + yield* publish(keepLastGoodReadings(yield* Ref.get(stateRef), snapshots)); }).pipe(refreshLock.withPermits(1), Effect.ignoreCause({ log: true })); // Shares the refresh lock so a stale in-flight read cannot overwrite a redemption. @@ -156,6 +191,7 @@ export const make = Effect.gen(function* () { input.accountId, input.creditId, ); + // A redemption changes the reading, so a refused re-read must not bring back the one before it. const snapshot = yield* readSource(input.sourceId, config); const previous = yield* Ref.get(stateRef); yield* publish(previous.map((source) => (source.id === input.sourceId ? snapshot : source))); From 055b44919eeb5d6a59b934fea1cdd34de10c91fe Mon Sep 17 00:00:00 2001 From: maria Date: Tue, 17 Nov 2026 23:25:50 -0300 Subject: [PATCH 019/385] feat(web,mobile,desktop): translate the whole app into every supported language (#37893) --- apps/desktop/gt.config.json | 10 + apps/desktop/package.json | 5 +- apps/desktop/scripts/i18n-generate.mjs | 15 + apps/desktop/src/app/DesktopApp.ts | 6 +- .../desktop/src/app/DesktopStartupRecovery.ts | 62 +- .../desktop/src/backend/DesktopBackendPool.ts | 12 +- apps/desktop/src/backend/DesktopHomeOwner.ts | 49 +- apps/desktop/src/i18n/messages.ts | 83 + apps/desktop/src/i18n/translations/de.json | 103 + apps/desktop/src/i18n/translations/en.json | 103 + apps/desktop/src/i18n/translations/es.json | 103 + apps/desktop/src/i18n/translations/fr.json | 103 + apps/desktop/src/i18n/translations/ja.json | 103 + apps/desktop/src/i18n/translations/ko.json | 103 + apps/desktop/src/i18n/translations/pt-BR.json | 103 + apps/desktop/src/i18n/translations/ru.json | 103 + apps/desktop/src/i18n/translations/sv.json | 103 + apps/desktop/src/i18n/translations/zh.json | 103 + .../desktop/src/ipc/methods/clientSettings.ts | 2 + apps/desktop/src/ipc/methods/snapShot.ts | 4 +- apps/desktop/src/ipc/methods/window.ts | 4 +- apps/desktop/src/permissions/MacPermission.ts | 10 +- .../src/permissions/MacPermissionHelper.ts | 17 +- apps/desktop/src/preview/BrowserSession.ts | 63 +- apps/desktop/src/preview/Manager.ts | 7 +- apps/desktop/src/preview/Passkeys.ts | 8 +- .../src/window/DesktopApplicationMenu.ts | 148 +- apps/desktop/src/window/DesktopWindow.ts | 10 +- apps/mobile/gt.config.json | 8 +- apps/mobile/package.json | 1 + apps/mobile/src/App.tsx | 22 +- apps/mobile/src/Stack.tsx | 205 +- apps/mobile/src/components/BrandMark.tsx | 12 +- .../src/components/CompactBrandTitle.tsx | 7 +- .../components/ComposerAttachmentStrip.tsx | 20 +- .../components/ComposerContextAttachment.tsx | 21 +- .../src/components/ComposerContextSheet.tsx | 173 +- apps/mobile/src/components/ComposerEditor.tsx | 39 +- .../src/components/ComposerModelControl.tsx | 24 +- .../components/EnvironmentMachineSymbol.tsx | 19 +- .../src/components/MediaActionsMenu.tsx | 4 +- .../src/components/MediaVideoPlayer.tsx | 27 +- .../components/NewThreadButton.android.tsx | 4 +- .../src/components/NewThreadButton.shared.tsx | 8 +- .../src/components/PdfPreview.android.tsx | 20 +- apps/mobile/src/components/PdfPreview.tsx | 18 +- apps/mobile/src/components/ProjectFavicon.tsx | 4 +- apps/mobile/src/components/RelativeTime.tsx | 4 +- .../src/components/RenderErrorBoundary.tsx | 16 +- .../ScrollComposeButton.android.tsx | 6 +- .../src/components/VideoAttachmentTile.tsx | 8 +- .../ui/AndroidScreenHeader.android.tsx | 6 +- .../src/components/ui/AppBar.android.tsx | 14 +- apps/mobile/src/components/ui/AppBar.tsx | 46 +- .../src/components/ui/Dialog.android.tsx | 12 +- apps/mobile/src/components/ui/Dialog.tsx | 7 +- .../ui/FilePreviewModal.android.tsx | 25 +- .../src/components/ui/FilePreviewModal.tsx | 15 +- .../src/components/ui/FilePreviewSession.tsx | 27 +- .../src/components/ui/ListToggleRow.tsx | 10 +- apps/mobile/src/components/ui/Notice.tsx | 4 +- .../src/components/ui/NumberField.android.tsx | 11 +- apps/mobile/src/components/ui/NumberField.tsx | 6 +- .../src/components/ui/SecretRevealButton.tsx | 4 +- apps/mobile/src/components/ui/Sheet.tsx | 4 +- .../src/components/ui/SheetHeader.android.tsx | 4 +- apps/mobile/src/components/ui/SheetHeader.tsx | 7 +- apps/mobile/src/components/ui/Toast.tsx | 11 +- .../ui/VideoPreviewModal.android.tsx | 23 +- .../src/components/ui/VideoPreviewModal.tsx | 21 +- .../components/ui/WorkspaceAppBar.android.tsx | 4 +- apps/mobile/src/connection/catalog-store.ts | 15 +- apps/mobile/src/connection/platform.ts | 26 +- .../notificationPermissions.ts | 9 +- .../agent-awareness/remoteRegistration.ts | 17 +- .../archive/ArchivedThreadsScreen.tsx | 45 +- .../browser/BrowserPreviewRouteScreen.tsx | 40 +- .../src/features/browser/BrowserTabMenu.tsx | 63 +- .../features/browser/PreviewStreamWebView.tsx | 95 +- .../features/browser/ThreadBrowserFloat.tsx | 11 +- .../browser/browser-preview-button.tsx | 23 +- .../src/features/browser/browserTabs.ts | 7 +- .../browser/preview-stream-document.ts | 17 +- .../browser/preview-stream.browser.ts | 8 +- .../cloud/ConnectOnboardingRouteScreen.tsx | 10 +- .../features/cloud/T3ConnectProfilePage.tsx | 88 +- .../mobile/src/features/cloud/cloud-drafts.ts | 9 +- .../cloud/cloudEnvironmentPresentation.ts | 34 +- apps/mobile/src/features/cloud/dpop.ts | 27 +- .../src/features/cloud/linkEnvironment.ts | 46 +- .../connection/CloudEnvironmentRows.tsx | 77 +- .../ConnectDeviceApprovalCoordinator.tsx | 22 +- .../connection/ConnectionDiagnosisDetails.tsx | 35 +- .../connection/ConnectionEnvironmentRow.tsx | 85 +- .../features/connection/ConnectionTraceId.tsx | 13 +- .../connection/ConnectionsNewRouteScreen.tsx | 54 +- .../connection/ConnectionsRouteScreen.tsx | 8 +- .../EnvironmentConnectionNotice.tsx | 71 +- .../connection/LinkedEnvironmentsSection.tsx | 17 +- .../connection/LocalEnvironmentList.tsx | 8 +- .../connection/PullRequestRoutingSettings.tsx | 39 +- .../connection/connectDeviceApproval.ts | 21 +- .../src/features/connection/connectionTone.ts | 20 +- .../connection/environmentStatusText.ts | 30 +- .../mobile/src/features/connection/pairing.ts | 5 +- .../connection/permissionUpdateNotice.ts | 12 +- .../connection/useConnectionController.ts | 9 +- .../devices/DevicePreviewRouteScreen.tsx | 61 +- .../features/devices/DeviceStreamWebView.tsx | 55 +- .../devices/device-preview-button.tsx | 20 +- .../devices/device-stream-document.ts | 14 +- .../devices/device-stream.browser.test.ts | 4 + .../features/devices/device-stream.browser.ts | 51 +- .../SettingsDiagnosticsRouteScreen.tsx | 43 +- .../features/diagnostics/crash-log-model.ts | 1 + .../features/diffs/nativeReviewDiffSurface.ts | 8 +- .../features/files/AttachmentDocumentBody.tsx | 20 +- .../features/files/AttachmentFileScreen.tsx | 33 +- .../src/features/files/AudioFilePreview.tsx | 16 +- .../features/files/DelimitedFilePreview.tsx | 4 +- .../features/files/FileMarkdownPreview.tsx | 6 +- .../src/features/files/FileTreeBrowser.tsx | 24 +- .../src/features/files/SourceFileSurface.tsx | 8 +- .../features/files/ThreadFilesRouteScreen.tsx | 123 +- .../files/WorkspaceFileImagePreview.tsx | 15 +- .../files/WorkspaceFilePreviewError.tsx | 15 +- .../files/WorkspaceFileWebPreview.tsx | 13 +- .../src/features/files/ZipArchiveView.tsx | 186 +- .../files/thread-file-navigator-pane.tsx | 26 +- .../src/features/files/useFileTreeEntries.ts | 7 +- apps/mobile/src/features/files/zipTree.ts | 30 +- .../src/features/home/HomeRouteScreen.tsx | 43 +- apps/mobile/src/features/home/HomeScreen.tsx | 51 +- .../src/features/home/ThreadListFilters.tsx | 16 +- .../src/features/home/ThreadUndoNotice.tsx | 12 +- .../home/WorkspaceConnectionTitle.tsx | 7 +- .../src/features/home/home-empty-state.ts | 41 +- .../features/home/home-list-filter-menu.ts | 34 +- .../src/features/home/homeThreadList.ts | 31 +- .../features/home/thread-swipe-actions.tsx | 10 +- .../home/usePendingTaskListActions.ts | 60 +- .../src/features/home/useThreadListActions.ts | 222 +- .../home/workspace-connection-status.ts | 37 +- .../features/issues/IssueAssigneesScreen.tsx | 9 +- .../features/issues/IssueCandidatesSheet.tsx | 35 +- .../features/issues/IssueCommentComposer.tsx | 8 +- .../src/features/issues/IssueEditScreen.tsx | 14 +- .../issues/IssueFilterSearchScreen.tsx | 4 +- .../src/features/issues/IssueLabelsScreen.tsx | 9 +- .../src/features/issues/IssueListRow.tsx | 17 +- .../src/features/issues/IssueRouteScreen.tsx | 138 +- .../src/features/issues/IssuesScreen.tsx | 129 +- .../src/features/issues/issuePresentation.tsx | 18 +- .../src/features/keyboard/CommandPalette.tsx | 68 +- .../HardwareKeyboardCommandProvider.tsx | 24 +- .../layout/AdaptiveWorkspaceLayout.tsx | 8 +- .../features/layout/WorkspaceEmptyDetail.tsx | 30 +- .../createWorkspaceStackNavigator.ios.tsx | 4 +- .../layout/inspector-host.android.tsx | 4 +- .../src/features/layout/inspector-host.tsx | 4 +- .../layout/native-mail-search-toolbar.ts | 6 +- .../src/features/layout/useSidebarToggle.ts | 9 +- .../layout/workspace-inspector-pane.tsx | 4 +- .../layout/workspace-pane-divider.tsx | 8 +- .../workspace/ListSearchToolbar.android.tsx | 12 +- .../layout/workspace/SavedViewsMenu.tsx | 58 +- .../layout/workspace/SharedSlotTitle.tsx | 14 +- .../workspace/WorkspaceListEmptyDetail.tsx | 6 +- .../workspace/WorkspaceListHeader.android.tsx | 4 +- .../layout/workspace/WorkspaceListHeader.tsx | 9 +- .../workspace/WorkspaceNativeTabs.ios.tsx | 7 +- .../layout/workspace/WorkspaceNoTabs.tsx | 8 +- .../workspace/WorkspaceRootScreen.android.tsx | 11 +- .../layout/workspace/WorkspaceRootScreen.tsx | 24 +- .../workspace/WorkspaceSectionToolbar.tsx | 10 +- .../workspace/WorkspaceSidebarColumn.tsx | 13 +- .../layout/workspace/WorkspaceToolbar.tsx | 15 +- .../layout/workspace/brand-header-options.tsx | 8 +- .../layout/workspace/navigation-tab-order.ts | 10 +- .../layout/workspace/navigation-tabs.ts | 8 +- .../layout/workspace/useWorkspaceCompose.ts | 5 +- .../workspace/workspace-list-header-items.ts | 8 +- .../features/projects/AddProjectScreen.tsx | 256 +- .../src/features/projects/suggestAppAccess.ts | 15 +- .../prompt-links/newTaskPromptLink.ts | 63 +- .../prompt-links/prompt-link-actions.ts | 21 +- .../prompt-links/prompt-link-model.ts | 33 +- .../features/prompt-links/threadPromptLink.ts | 9 +- .../PullRequestActivityFilters.tsx | 37 +- .../PullRequestCompletionSuggestions.tsx | 34 +- .../pull-requests/PullRequestControls.tsx | 39 +- .../pull-requests/PullRequestDescription.tsx | 31 +- .../PullRequestDiscussionScreen.tsx | 43 +- .../pull-requests/PullRequestEditScreen.tsx | 55 +- .../pull-requests/PullRequestFiles.tsx | 108 +- .../PullRequestFilterSearchScreen.tsx | 26 +- .../PullRequestInlineCommentScreen.tsx | 25 +- .../pull-requests/PullRequestLabelsScreen.tsx | 48 +- .../pull-requests/PullRequestListFilters.tsx | 173 +- .../pull-requests/PullRequestListRow.tsx | 64 +- .../pull-requests/PullRequestMedia.tsx | 7 +- .../PullRequestMergeControls.tsx | 157 +- .../PullRequestOverviewLoading.tsx | 36 +- .../pull-requests/PullRequestPresentation.tsx | 10 +- .../pull-requests/PullRequestReactions.tsx | 19 +- .../pull-requests/PullRequestReviewSheet.tsx | 78 +- .../PullRequestReviewersScreen.tsx | 118 +- .../pull-requests/PullRequestRouteScreen.tsx | 170 +- .../pull-requests/PullRequestStackCard.tsx | 42 +- .../pull-requests/PullRequestStatusRows.tsx | 109 +- .../pull-requests/PullRequestTimeline.tsx | 87 +- .../pull-requests/PullRequestsScreen.tsx | 35 +- .../SourceControlAppAccessNotice.tsx | 13 +- .../pull-requests/guide/GuideNotice.tsx | 25 +- .../pull-requests/guide/GuideOutline.tsx | 34 +- .../guide/PullRequestGuideScreen.tsx | 65 +- .../guide/ReviewGuideExcerpt.tsx | 16 +- .../pull-requests/guide/reviewGuideState.ts | 63 +- .../pull-requests/guide/useReviewGuide.ts | 9 +- .../pull-requests/pullRequestActions.ts | 111 +- .../pull-requests/pullRequestAgentTasks.ts | 46 +- .../pullRequestDescriptionContent.ts | 7 +- .../pull-requests/pullRequestDiffComments.ts | 31 +- .../pull-requests/pullRequestDiffPages.ts | 65 +- .../features/pull-requests/pullRequestList.ts | 19 +- .../pull-requests/pullRequestStack.ts | 26 +- .../pull-requests/pullRequestStatus.ts | 187 +- .../pull-requests/usePullRequestAction.ts | 28 +- .../usePullRequestAgentActions.ts | 10 +- .../usePullRequestDescription.ts | 10 +- .../pull-requests/usePullRequestDiff.ts | 16 +- .../usePullRequestFilesViewed.ts | 8 +- .../pull-requests/usePullRequestList.ts | 17 +- .../usePullRequestListActions.ts | 57 +- .../usePullRequestMaintainerEdits.ts | 16 +- .../usePullRequestReviewDraft.ts | 6 +- .../pull-requests/usePullRequestThreads.ts | 26 +- .../src/features/review/ReviewCommentCard.tsx | 6 +- .../review/ReviewCommentComposerSheet.tsx | 34 +- .../src/features/review/ReviewSheet.tsx | 67 +- .../review/nativeReviewDiffAdapter.ts | 26 +- .../features/review/reviewCommentSelection.ts | 14 +- .../mobile/src/features/review/reviewModel.ts | 80 +- .../mobile/src/features/review/reviewState.ts | 12 +- .../useReviewCommentSelectionController.ts | 8 +- .../src/features/review/useReviewDiffData.ts | 44 +- .../review/useReviewDiffPrewarming.ts | 10 +- .../useReviewHeaderPresentation.android.ts | 10 +- .../src/features/review/useReviewSections.ts | 20 +- .../src/features/settings/ClaudeAccounts.tsx | 71 +- .../features/settings/CloudVoiceSection.tsx | 143 +- .../settings/EnvironmentRoutesSection.tsx | 74 +- .../settings/OutdatedServerUpdateSection.tsx | 43 +- .../settings/ScheduledTaskPickerScreens.tsx | 35 +- .../settings/SettingsAboutRouteScreen.tsx | 37 +- .../SettingsAppearanceRouteScreen.tsx | 4 +- .../SettingsClientStorageRouteScreen.tsx | 55 +- .../SettingsEnvironmentDetailRouteScreen.tsx | 129 +- .../SettingsEnvironmentsRouteScreen.tsx | 8 +- .../settings/SettingsFollowUpRouteScreen.tsx | 25 +- .../settings/SettingsKeyboardRouteScreen.tsx | 27 +- .../settings/SettingsLanguageRouteScreen.tsx | 18 +- .../settings/SettingsLegalRouteScreen.tsx | 9 +- .../SettingsNavigationRouteScreen.tsx | 35 +- .../SettingsNotificationsRouteScreen.tsx | 134 +- .../SettingsOpenSourceLicensesRouteScreen.tsx | 32 +- .../SettingsProjectGroupingRouteScreen.tsx | 23 +- .../SettingsProjectOverviewRouteScreen.tsx | 135 +- .../SettingsProviderAccountsRouteScreen.tsx | 113 +- .../settings/SettingsRouteScreen.logic.ts | 11 +- .../features/settings/SettingsRouteScreen.tsx | 23 +- .../SettingsScheduledTasksRouteScreen.tsx | 444 +- .../SettingsServerControlsRouteScreen.tsx | 163 +- ...ettingsSourceControlDetailRouteScreens.tsx | 41 +- .../SettingsVoiceModelsRouteScreen.tsx | 22 +- .../settings/SettingsVoiceRouteScreen.tsx | 121 +- .../SettingsWorkspaceLayout.android.tsx | 8 +- .../settings/ThreadSettingsSections.tsx | 82 +- .../features/settings/VoiceModelSection.tsx | 86 +- .../components/AppearancePreviews.tsx | 15 +- .../AndroidNavigationAppearanceSection.tsx | 8 +- .../sections/CodeAppearanceSection.tsx | 12 +- .../sections/TerminalAppearanceSection.tsx | 10 +- .../sections/TextAppearanceSection.tsx | 10 +- .../sections/ThemeAppearanceSection.tsx | 53 +- .../sections/ToolCallsAppearanceSection.tsx | 21 +- .../src/features/settings/claude-accounts.ts | 17 +- .../components/AutoSettleDaysField.tsx | 8 +- .../components/BranchNamingSettings.tsx | 50 +- .../components/DatabaseStorageNotice.tsx | 12 +- .../components/IssueTrackerSection.tsx | 40 +- .../components/ScheduledTaskPromptField.tsx | 13 +- .../components/SettingsDragHandle.tsx | 8 +- .../SettingsEnvironmentFilterHeader.tsx | 23 +- .../SettingsLegalDocumentRouteScreen.tsx | 18 +- .../SettingsProjectOverridesSection.tsx | 8 +- .../components/SettingsProviderRow.tsx | 4 +- .../SourceControlProvidersSection.tsx | 104 +- .../components/SourceControlSignInSection.tsx | 41 +- .../settings/environment-maintenance.ts | 12 +- .../settings/environmentUpdateCheck.ts | 10 +- .../settings/mobileThirdPartyLicenses.ts | 4 +- .../settings/scheduled-task-editor.tsx | 8 +- .../settings/scheduledTaskPresentation.ts | 92 +- .../settings/settings-environment-filter.tsx | 30 +- .../settings/settings-scoped-server.test.ts | 8 +- .../settings/settings-scoped-server.ts | 10 +- .../src/features/settings/settings-search.ts | 254 +- .../features/settings/useSettingsWriter.ts | 9 +- .../sharing/IncomingShareProvider.tsx | 34 +- .../features/sharing/incoming-share-inbox.ts | 15 +- .../features/sharing/incoming-share-model.ts | 71 +- .../src/features/shortcuts/appShortcuts.ts | 8 +- .../features/shortcuts/appShortcutsRuntime.ts | 18 +- .../showcase/showcaseAgentActivity.ts | 5 +- .../showcase/showcaseEnvironmentRows.ts | 2 + .../features/showcase/showcasePendingTasks.ts | 2 + .../showcase/stageShowcaseAgentActivity.ts | 1 + .../terminal/NativeTerminalSurface.tsx | 10 +- .../terminal/TerminalContextSheet.tsx | 20 +- .../terminal/ThreadTerminalRouteScreen.tsx | 146 +- .../src/features/terminal/terminalMenu.ts | 50 +- .../features/threads/ChatGptSharingStatus.tsx | 22 +- .../features/threads/ChildThreadApprovals.tsx | 10 +- .../threads/ComposerAttachmentButton.tsx | 13 +- .../threads/ComposerCommandPopover.tsx | 36 +- .../features/threads/ComposerErrorNotice.tsx | 4 +- .../src/features/threads/ComposerFeedback.tsx | 9 +- .../features/threads/ComposerQueuedEdit.tsx | 11 +- .../features/threads/ComposerUsageLimits.tsx | 8 +- .../src/features/threads/CopyTextButton.tsx | 8 +- .../threads/CustomSnoozeSheet.android.tsx | 29 +- .../features/threads/CustomSnoozeSheet.tsx | 39 +- .../threads/DraftEnvironmentControl.tsx | 12 +- .../features/threads/DraftThreadHeader.tsx | 14 +- .../features/threads/FreshSessionNotice.tsx | 8 +- .../threads/GitActionProgressOverlay.tsx | 13 +- .../features/threads/HtmlRenderWebView.tsx | 10 +- .../src/features/threads/LinkRequestCard.tsx | 146 +- .../threads/LinkedPullRequestList.tsx | 80 +- .../threads/ManagedRuntimeModeNotice.tsx | 11 +- .../threads/McpAppFullscreenScreen.tsx | 19 +- .../src/features/threads/McpAppWebView.tsx | 62 +- .../features/threads/NativeChildWorkSheet.tsx | 23 +- .../threads/NewTaskContextPickerScreens.tsx | 47 +- .../threads/NewTaskDraftRouteScreen.tsx | 14 +- .../features/threads/NewTaskDraftScreen.tsx | 195 +- .../features/threads/NewTaskRouteScreen.tsx | 117 +- .../features/threads/PendingApprovalCard.tsx | 33 +- .../features/threads/PendingUserInputCard.tsx | 47 +- .../features/threads/ProjectCloneBanner.tsx | 26 +- .../src/features/threads/ProposedPlanCard.tsx | 23 +- .../features/threads/ProviderSubagentBar.tsx | 22 +- .../features/threads/QuestionAttachments.tsx | 18 +- .../features/threads/SecretRequestCard.tsx | 28 +- .../src/features/threads/SubagentRow.tsx | 37 +- .../features/threads/SubagentStopButton.tsx | 26 +- .../features/threads/ThreadAgentsSheet.tsx | 26 +- .../threads/ThreadArrangementSheet.tsx | 53 +- .../threads/ThreadBackgroundWorkSheet.tsx | 23 +- .../src/features/threads/ThreadComposer.tsx | 95 +- .../threads/ThreadCreationFailedCard.tsx | 8 +- .../features/threads/ThreadDetailScreen.tsx | 122 +- .../src/features/threads/ThreadFeed.tsx | 237 +- .../features/threads/ThreadGitControls.tsx | 133 +- .../features/threads/ThreadGuestShareBar.tsx | 35 +- .../src/features/threads/ThreadHeader.tsx | 10 +- .../threads/ThreadInlineFilePreview.tsx | 21 +- .../features/threads/ThreadMarkdownImage.tsx | 24 +- .../features/threads/ThreadMarkdownVideo.tsx | 5 +- .../threads/ThreadNavigationSidebar.tsx | 59 +- .../threads/ThreadPullRequestsSheet.tsx | 22 +- .../features/threads/ThreadQueueControl.tsx | 78 +- .../features/threads/ThreadRouteScreen.tsx | 77 +- .../threads/ThreadSettingsRows.shared.tsx | 44 +- .../features/threads/ThreadSettingsSheet.tsx | 106 +- .../features/threads/ThreadSideChatsRow.tsx | 14 +- .../features/threads/ThreadWorkflowGroup.tsx | 64 +- .../threads/UsageLimitRecoveryCard.tsx | 61 +- .../threads/checkout-new-task-branch.ts | 19 +- .../threads/composerSendPresentation.ts | 34 +- .../features/threads/draft-thread-shell.ts | 30 +- .../src/features/threads/fileChipMenu.ts | 18 +- .../threads/floating-working-control.tsx | 23 +- .../threads/floating-working-status.ts | 54 +- .../features/threads/git/GitBranchesSheet.tsx | 43 +- .../features/threads/git/GitCommitSheet.tsx | 45 +- .../features/threads/git/GitConfirmSheet.tsx | 32 +- .../features/threads/git/GitOverviewSheet.tsx | 111 +- .../threads/git/gitSheetComponents.tsx | 49 +- .../features/threads/guestMessageStyle.tsx | 4 +- .../features/threads/incomingShareImport.ts | 13 +- .../threads/new-task-context-presentation.ts | 51 +- .../threads/new-task-flow-provider.tsx | 47 +- .../features/threads/pending-thread-feed.ts | 9 +- .../threads/provider-catalog-refresh.ts | 6 +- .../threads/subagent-card-presentation.ts | 7 +- .../threads/thread-command-output.tsx | 12 +- .../features/threads/thread-handoff-row.tsx | 7 +- .../threads/thread-inspector-preview.tsx | 6 +- .../features/threads/thread-list-v2-items.tsx | 469 +- .../thread-list-v2-row-appearance.android.ts | 7 +- .../threads/thread-list-v2-row-appearance.ts | 7 +- .../features/threads/thread-search-match.tsx | 7 +- .../threads/thread-settings-options.ts | 29 +- .../threads/thread-subagent-group.tsx | 23 +- .../threads/thread-title-regeneration-menu.ts | 18 +- .../src/features/threads/thread-work-log.tsx | 76 +- .../threads/thread-workflow-opening.tsx | 30 +- .../threads/threadAgentsPresentation.ts | 47 +- .../threads/threadContentPresentation.ts | 20 +- .../src/features/threads/threadListV2.ts | 79 +- .../src/features/threads/threadOrder.ts | 24 +- .../threads/threadQueueControlPresentation.ts | 3 +- .../features/threads/turnThreadIntoProject.ts | 9 +- .../threads/use-composer-command-menu.ts | 125 +- .../threads/use-new-task-project-defaults.ts | 16 +- .../threads/use-open-thread-pull-requests.ts | 15 +- .../src/features/threads/useFileChipShare.ts | 13 +- .../threads/useLinkedPullRequestActions.ts | 104 +- .../src/features/threads/useStartSideChat.ts | 22 +- .../src/features/threads/useThreadListV2.ts | 2 + .../threads/useThreadStatusAnnouncements.ts | 3 +- .../threads/userMessageIntentBadge.ts | 21 +- .../features/threads/worktree-setup-card.tsx | 97 +- .../src/features/triage/useStartTriage.ts | 37 +- .../src/features/updates/app-updates.ts | 34 +- .../features/usage/ChatGptUsageSummary.tsx | 21 +- .../src/features/usage/UsageLimitsPooled.tsx | 181 +- .../src/features/usage/UsageLimitsSection.tsx | 107 +- .../src/features/usage/UsageRouteScreen.tsx | 281 +- .../src/features/usage/usageAxisLabels.ts | 42 + .../voice-input/ComposerDictationControl.tsx | 15 +- .../voice-input/GlobalVoiceInputControl.tsx | 37 +- .../voice-input/environmentTranscriber.ts | 7 +- .../features/voice-input/lazyVoiceRecorder.ts | 5 +- .../features/voice-input/voiceDestination.ts | 14 +- .../voice-input/voiceInputPresentation.ts | 14 +- .../features/voice-input/voiceInputSession.ts | 2 + apps/mobile/src/i18n/I18nProvider.tsx | 49 +- apps/mobile/src/i18n/intl-polyfills.ts | 14 +- apps/mobile/src/i18n/messages.ts | 39 + apps/mobile/src/i18n/translations/de.json | 5220 ++++++- apps/mobile/src/i18n/translations/en.json | 5221 ++++++- apps/mobile/src/i18n/translations/es.json | 5214 ++++++- apps/mobile/src/i18n/translations/fr.json | 5220 ++++++- apps/mobile/src/i18n/translations/ja.json | 5196 ++++++- apps/mobile/src/i18n/translations/ko.json | 5200 ++++++- apps/mobile/src/i18n/translations/pt-BR.json | 5214 ++++++- apps/mobile/src/i18n/translations/ru.json | 5296 ++++++- apps/mobile/src/i18n/translations/sv.json | 5210 +++++++ apps/mobile/src/i18n/translations/zh.json | 5209 ++++++- apps/mobile/src/lib/attachmentDocument.ts | 21 +- apps/mobile/src/lib/attachmentDownload.ts | 21 +- apps/mobile/src/lib/attachmentUpload.ts | 25 +- apps/mobile/src/lib/authClientMetadata.ts | 1 + apps/mobile/src/lib/changeRequestTerm.ts | 12 + .../src/lib/composerAttachmentUploadQueue.ts | 22 +- apps/mobile/src/lib/composerContext.ts | 11 +- .../src/lib/composerContextClipboard.ts | 12 +- apps/mobile/src/lib/composerImages.ts | 72 +- apps/mobile/src/lib/localAttachmentPreview.ts | 9 +- apps/mobile/src/lib/markdownDetails.ts | 10 +- apps/mobile/src/lib/mediaActions.test.ts | 4 + apps/mobile/src/lib/modelOptions.ts | 34 +- apps/mobile/src/lib/pdfPreview.ts | 6 +- apps/mobile/src/lib/projectThreadStartTurn.ts | 12 +- apps/mobile/src/lib/threadActivity.ts | 342 +- apps/mobile/src/lib/time.ts | 30 +- .../src/native/EnrichedMarkdownText.tsx | 42 +- .../src/native/HighlightedCodeBlock.tsx | 17 +- apps/mobile/src/native/MermaidCodeBlock.tsx | 30 +- .../src/native/T3ComposerEditor.ios.tsx | 6 +- apps/mobile/src/native/V5StackHeader.ios.tsx | 12 +- .../src/native/useMarkdownImageSource.ts | 16 +- .../src/native/voiceTranscription.android.ts | 36 +- .../src/native/voiceTranscription.ios.ts | 14 +- apps/mobile/src/state/assets.test.ts | 4 + apps/mobile/src/state/assets.ts | 23 +- apps/mobile/src/state/attachments.ts | 4 +- .../src/state/edit-pending-thread-message.ts | 4 +- apps/mobile/src/state/entities.ts | 27 +- apps/mobile/src/state/mediaActions.ts | 28 +- .../src/state/pending-new-tasks-model.ts | 27 +- .../src/state/queries.filesystem.test.ts | 4 + apps/mobile/src/state/queries.ts | 22 +- apps/mobile/src/state/query.ts | 17 +- apps/mobile/src/state/queued-run-edit.ts | 6 +- .../state/remote-environment-projections.ts | 4 + apps/mobile/src/state/remote-runtime-types.ts | 3 + .../src/state/thread-model-selection.ts | 11 +- apps/mobile/src/state/thread-outbox-model.ts | 4 +- .../src/state/thread-pr-presentation.ts | 70 +- .../src/state/thread-task-permissions.test.ts | 9 + apps/mobile/src/state/threadOutboxDelivery.ts | 63 +- apps/mobile/src/state/usage.ts | 31 +- .../state/use-composer-attachment-actions.ts | 32 +- apps/mobile/src/state/use-composer-drafts.ts | 8 +- .../mobile/src/state/use-pending-new-tasks.ts | 15 +- .../state/use-remote-environment-registry.ts | 49 +- .../state/use-selected-thread-git-actions.ts | 39 +- .../state/use-selected-thread-git-state.ts | 5 +- .../src/state/use-selected-thread-requests.ts | 6 +- .../src/state/use-thread-composer-state.ts | 143 +- apps/mobile/src/state/use-thread-pr.ts | 25 +- apps/mobile/src/state/use-vcs-action-state.ts | 25 +- apps/mobile/src/state/workspaceModel.ts | 12 +- apps/mobile/src/widgets/AgentActivity.tsx | 51 +- .../src/widgets/AgentActivityWidget.tsx | 15 +- .../src/widgets/SubscriptionUsage.android.tsx | 29 +- apps/mobile/src/widgets/SubscriptionUsage.tsx | 78 +- .../widgets/SubscriptionUsageCoordinator.tsx | 51 +- .../widgets/agentActivityWidgetTimeline.ts | 72 +- .../widgets/publishAgentActivityWidget.ios.ts | 26 +- .../src/widgets/publishAgentActivityWidget.ts | 8 +- .../src/widgets/subscriptionUsageSnapshot.ts | 148 +- apps/mobile/vite.config.ts | 34 + apps/web/gt.config.json | 8 +- apps/web/src/appInit.tsx | 12 +- apps/web/src/assets/assetUrls.ts | 6 +- apps/web/src/assets/longLivedAssetUrls.ts | 6 +- apps/web/src/branding.logic.ts | 5 +- apps/web/src/browser/BrowserDeviceToolbar.tsx | 38 +- .../browser/BrowserViewportResizeHandles.tsx | 15 +- apps/web/src/browser/ServerBrowserSurface.tsx | 59 +- .../web/src/browser/browserViewportActions.ts | 7 +- apps/web/src/browser/openFileInPreview.ts | 6 +- apps/web/src/browser/useOpenLink.ts | 4 +- apps/web/src/cloud/cloudLinkState.ts | 8 +- apps/web/src/cloud/dpop.ts | 43 +- apps/web/src/cloud/linkEnvironment.ts | 109 +- apps/web/src/cloud/relayFailureReason.ts | 13 +- apps/web/src/cloud/useCloudLinkController.ts | 28 +- .../components/AddProjectToMachineDialog.tsx | 96 +- apps/web/src/components/AppRouteModal.tsx | 8 +- apps/web/src/components/AppSidebarLayout.tsx | 13 +- apps/web/src/components/BranchPicker.tsx | 31 +- .../web/src/components/BranchToolbar.logic.ts | 78 +- apps/web/src/components/BranchToolbar.tsx | 97 +- .../BranchToolbarBranchSelector.tsx | 88 +- .../BranchToolbarEnvModeSelector.tsx | 29 +- .../BranchToolbarEnvironmentSelector.tsx | 22 +- apps/web/src/components/ChatMarkdown.tsx | 103 +- apps/web/src/components/ChatView.logic.ts | 143 +- apps/web/src/components/ChatView.tsx | 245 +- apps/web/src/components/CommandBlock.tsx | 10 +- .../src/components/CommandPalette.logic.ts | 212 +- apps/web/src/components/CommandPalette.tsx | 494 +- .../components/CommandPaletteAddProject.tsx | 24 +- .../src/components/CommandPaletteContent.tsx | 13 +- .../src/components/CommandPaletteLookups.ts | 8 +- .../components/CommandPaletteProjectItems.tsx | 43 +- .../src/components/CommandPaletteResults.tsx | 9 +- .../components/CommandPaletteThemeItems.tsx | 43 +- .../components/CommandPaletteThreadItems.tsx | 166 +- .../components/ComposerContextPermissions.tsx | 15 +- .../components/ComposerPromptEditorTiptap.tsx | 4 +- apps/web/src/components/ConfirmDialogHost.tsx | 28 +- .../ConnectDeviceApprovalCoordinator.tsx | 24 +- .../web/src/components/CustomSnoozeDialog.tsx | 64 +- apps/web/src/components/DevReplayHost.tsx | 24 +- .../src/components/DiffFilePathCopyButton.tsx | 6 +- apps/web/src/components/DiffPanel.tsx | 232 +- .../src/components/DiffWorkerPoolProvider.tsx | 3 +- .../src/components/EnvironmentContextChip.tsx | 7 +- .../src/components/EnvironmentMachineIcon.tsx | 15 +- .../src/components/GitActionsControl.logic.ts | 324 +- apps/web/src/components/GitActionsControl.tsx | 325 +- apps/web/src/components/GitHubStarPrompt.tsx | 20 +- .../components/HostFreezeToastCoordinator.ts | 3 +- apps/web/src/components/HostedEmptyState.tsx | 37 +- apps/web/src/components/InstallT3Commands.tsx | 13 +- .../components/KeybindingsConfigWarning.tsx | 12 +- .../src/components/KeybindingsUpdateToast.tsx | 5 +- .../components/LegacyThreadMigrationToast.ts | 17 +- apps/web/src/components/ManagedPolicy.tsx | 7 +- .../src/components/NoActiveThreadState.tsx | 13 +- apps/web/src/components/NoProjectsHero.tsx | 16 +- .../src/components/PermissionUpdateNotice.ts | 15 +- .../components/PersistentThreadTerminals.tsx | 9 +- .../PreviousWorktreeItemContent.tsx | 5 +- .../ProjectCloneToastCoordinator.tsx | 33 +- .../components/ProjectEnvironmentBadge.tsx | 9 +- apps/web/src/components/ProjectPinButton.tsx | 12 +- .../src/components/ProjectScriptsControl.tsx | 74 +- .../ProviderUpdateLaunchNotification.logic.ts | 165 +- .../src/components/ProviderUpdatesAction.tsx | 10 +- .../components/PullRequestContextDetails.tsx | 25 +- .../PullRequestThreadDialog.test.ts | 10 + .../components/PullRequestThreadDialog.tsx | 90 +- apps/web/src/components/QuitHoldOverlay.tsx | 6 +- apps/web/src/components/RelativeTime.tsx | 2 +- .../components/ReopenClosedViewShortcut.tsx | 8 +- apps/web/src/components/RightPanelSheet.tsx | 5 +- apps/web/src/components/RightPanelTabs.tsx | 247 +- apps/web/src/components/SavedViewsMenu.tsx | 71 +- .../web/src/components/ServerUpdateAction.tsx | 132 +- apps/web/src/components/Sidebar.logic.ts | 51 +- apps/web/src/components/Sidebar.snooze.ts | 11 +- apps/web/src/components/Sidebar.tsx | 243 +- .../src/components/SidebarStageBackdrop.tsx | 2 + .../SlowRpcRequestToastCoordinator.tsx | 18 +- .../SourceControlAppAccessNotice.tsx | 14 +- .../src/components/ThreadCommandSubtitle.tsx | 5 +- apps/web/src/components/ThreadContextChip.tsx | 10 +- .../ThreadNotificationCoordinator.tsx | 16 +- apps/web/src/components/ThreadSearchMatch.tsx | 10 +- .../src/components/ThreadStatusIndicators.tsx | 284 +- .../src/components/ThreadTerminalDrawer.tsx | 142 +- .../components/WorktreeBaseBranchPicker.tsx | 45 +- .../components/auth/ApproveAgentSurface.tsx | 39 +- .../components/auth/ConnectAgentSurface.tsx | 157 +- .../components/auth/PairingRouteSurface.tsx | 110 +- .../backgroundThreadAnnouncement.ts | 19 +- apps/web/src/components/chat/AgentElapsed.tsx | 43 +- .../components/chat/AssistantCitationChip.tsx | 16 +- .../chat/AssistantCitationCommentEditor.tsx | 22 +- .../chat/AssistantCitationSource.tsx | 10 +- .../chat/AssistantSelectionToolbar.tsx | 8 +- .../components/chat/BackgroundWorkDetails.tsx | 34 +- .../src/components/chat/ChangedFilesTree.tsx | 27 +- apps/web/src/components/chat/ChatComposer.tsx | 158 +- .../components/chat/ChatGptSharingControl.tsx | 10 +- apps/web/src/components/chat/ChatHeader.tsx | 39 +- .../src/components/chat/ChatMarkdownMedia.tsx | 30 +- .../src/components/chat/ChatOverlayHosts.tsx | 41 +- .../components/chat/ChildThreadApprovals.tsx | 19 +- .../components/chat/CommandOutputPanel.tsx | 31 +- .../chat/CompactComposerControlsMenu.tsx | 4 +- .../chat/ComposerAttachmentStrip.tsx | 82 +- .../src/components/chat/ComposerBanner.tsx | 6 +- .../components/chat/ComposerBannerStack.tsx | 15 +- .../chat/ComposerCodeBlockLanguagePicker.tsx | 27 +- .../components/chat/ComposerCommandMenu.tsx | 70 +- .../components/chat/ComposerControlsBar.tsx | 7 +- .../src/components/chat/ComposerFeedback.tsx | 31 +- .../chat/ComposerFooterControls.tsx | 28 +- .../components/chat/ComposerFreshSession.tsx | 14 +- .../components/chat/ComposerModelEffort.tsx | 93 +- .../chat/ComposerPendingApprovalActions.tsx | 38 +- .../chat/ComposerPendingUserInputPanel.tsx | 10 +- ...omposerPermissionsSection.browser.test.tsx | 4 +- .../chat/ComposerPrimaryActions.tsx | 112 +- .../components/chat/ComposerSpeechButton.tsx | 40 +- .../components/chat/ComposerStashBadge.tsx | 8 +- .../src/components/chat/ComposerStashMenu.tsx | 70 +- .../components/chat/ComposerUsageLimits.tsx | 85 +- .../web/src/components/chat/DiffStatLabel.tsx | 4 +- .../src/components/chat/DraftHeroHeadline.tsx | 30 +- .../chat/DraftHeroProjectHeading.tsx | 27 +- .../components/chat/ExpandedImageDialog.tsx | 28 +- .../components/chat/ExpandedImagePreview.tsx | 8 +- .../chat/GlobalVoiceInputIndicator.tsx | 4 +- .../chat/GuestMessageAttachments.tsx | 9 +- .../components/chat/GuestShareControls.tsx | 69 +- .../src/components/chat/HtmlRenderDialog.tsx | 12 +- .../src/components/chat/HtmlRenderFrame.tsx | 16 +- .../src/components/chat/LinkRequestCard.tsx | 127 +- .../src/components/chat/MarkdownCodeBlock.tsx | 24 +- .../src/components/chat/MarkdownDetails.tsx | 4 +- .../components/chat/MarkdownFileLink.logic.ts | 14 +- .../src/components/chat/MarkdownFileLink.tsx | 44 +- apps/web/src/components/chat/MarkdownMath.tsx | 10 +- .../chat/MarkdownMermaidCodeBlock.tsx | 4 +- .../web/src/components/chat/MarkdownTable.tsx | 12 +- .../components/chat/MarkdownThreadLink.tsx | 9 +- apps/web/src/components/chat/McpAppFrame.tsx | 33 +- .../src/components/chat/MermaidDiagram.tsx | 16 +- .../src/components/chat/MessageCopyButton.tsx | 5 +- .../components/chat/MessagesTimeline.logic.ts | 204 +- .../src/components/chat/MessagesTimeline.tsx | 66 +- apps/web/src/components/chat/ModelListRow.tsx | 12 +- .../src/components/chat/ModelMentionChip.tsx | 4 +- .../components/chat/ModelPickerContent.tsx | 39 +- .../components/chat/ModelPickerSidebar.tsx | 39 +- .../components/chat/NativeChildWorkDialog.tsx | 35 +- apps/web/src/components/chat/OpenInPicker.tsx | 63 +- .../components/chat/OpenInPickerShortcut.ts | 6 +- .../components/chat/PanelLayoutControls.tsx | 30 +- .../src/components/chat/ProposedPlanCard.tsx | 72 +- .../components/chat/ProviderModelPicker.tsx | 38 +- .../components/chat/ProviderStatusBanner.tsx | 60 +- .../components/chat/ProviderSubagentBar.tsx | 17 +- .../src/components/chat/QueuedRunsControl.tsx | 99 +- .../chat/RightPanelSurfaceContent.tsx | 10 +- .../src/components/chat/SecretRequestCard.tsx | 26 +- apps/web/src/components/chat/SideChatPane.tsx | 39 +- .../src/components/chat/SkillInlineText.tsx | 8 +- .../chat/SnapShotAttachmentDetails.tsx | 30 +- .../chat/SubagentTooltipContent.tsx | 54 +- .../chat/TerminalContextInlineChip.tsx | 21 +- .../chat/ThreadActivityAnnouncer.tsx | 12 +- .../components/chat/ThreadActivityBanners.tsx | 174 +- .../chat/ThreadAutomationsPanel.tsx | 65 +- .../src/components/chat/ThreadDetailsCard.tsx | 4 +- .../chat/ThreadDetailsIssueRows.tsx | 4 +- .../chat/ThreadDetailsItemsMenu.tsx | 10 +- .../components/chat/ThreadDetailsPanel.tsx | 8 +- .../components/chat/ThreadDetailsPrRow.tsx | 139 +- .../components/chat/ThreadDetailsPrRows.tsx | 12 +- .../components/chat/ThreadDetailsUsage.tsx | 62 +- .../src/components/chat/ThreadErrorBanner.tsx | 34 +- .../web/src/components/chat/ThreadFindBar.tsx | 25 +- .../chat/ThreadLineageWorkflowRow.tsx | 50 +- apps/web/src/components/chat/ThreadNow.tsx | 4 +- .../chat/ThreadRelationshipIcon.tsx | 35 +- .../chat/ThreadRelationshipsControl.tsx | 138 +- .../components/chat/ThreadServersPanel.tsx | 42 +- .../components/chat/TimelineAssistantRows.tsx | 29 +- .../src/components/chat/TimelineMinimap.tsx | 11 +- .../src/components/chat/TimelineOverlays.tsx | 5 +- .../chat/TimelinePendingApprovalRow.tsx | 40 +- .../src/components/chat/TimelineRowParts.tsx | 6 +- .../chat/TimelineUserMessageRow.logic.ts | 9 +- .../chat/TimelineUserMessageRow.tsx | 125 +- .../components/chat/TimelineV2EventRow.tsx | 14 +- .../chat/TimelineWorkEntryRow.logic.ts | 14 +- .../components/chat/TimelineWorkEntryRow.tsx | 148 +- .../chat/TimelineWorkGroupRows.logic.ts | 10 +- .../components/chat/TimelineWorkGroupRows.tsx | 81 +- apps/web/src/components/chat/TraitsPicker.tsx | 75 +- apps/web/src/components/chat/TraitsSpeed.tsx | 14 +- .../src/components/chat/TriageDraftHero.tsx | 36 +- .../chat/UsageLimitRecoveryBanner.tsx | 60 +- .../chat/UserMessageContextChips.tsx | 75 +- .../src/components/chat/V2ItemInspector.tsx | 32 +- .../src/components/chat/V2LifecycleRow.tsx | 97 +- .../components/chat/VoiceInputErrorPill.tsx | 69 +- .../src/components/chat/VoiceInputSetup.tsx | 83 +- .../components/chat/WorkflowOpeningBlock.tsx | 19 +- .../components/chat/WorkspaceEntryIcon.tsx | 4 +- .../src/components/chat/WorktreeSetupCard.tsx | 68 +- .../web/src/components/chat/ZoomableImage.tsx | 10 +- apps/web/src/components/chat/chatViewSend.ts | 42 +- .../src/components/chat/citationProcedure.ts | 25 +- .../src/components/chat/compaction.logic.ts | 17 +- .../chat/composerAttachmentFiles.ts | 11 +- .../src/components/chat/composerSend.logic.ts | 58 +- .../src/components/chat/composerSubmission.ts | 24 +- apps/web/src/components/chat/copySnapshot.ts | 5 +- .../chat/externalLinkContextMenu.ts | 21 +- .../src/components/chat/guestMessageStyle.tsx | 8 +- .../components/chat/guestShareAvailability.ts | 3 +- .../src/components/chat/queuedMessageEdit.ts | 4 +- .../src/components/chat/runtimeModeConfig.ts | 67 +- .../src/components/chat/threadDetailsItems.ts | 37 +- .../components/chat/turnDetailAnnouncement.ts | 30 +- .../chat/useApplyThreadModelPick.ts | 11 +- .../chat/useAutoBalanceUpdateBanner.tsx | 48 +- .../components/chat/useChatTerminalActions.ts | 21 +- .../chat/useComposerAttachmentIntake.ts | 63 +- .../chat/useComposerContextImport.ts | 20 +- .../components/chat/useComposerMenuItems.ts | 76 +- .../src/components/chat/useComposerResume.ts | 5 +- .../components/chat/useComposerSelection.ts | 3 + .../src/components/chat/useComposerSend.ts | 197 +- .../src/components/chat/useComposerStash.ts | 117 +- .../chat/useDraftEnvironmentRouting.ts | 27 +- .../src/components/chat/useForceStopThread.ts | 18 +- .../components/chat/useMultipleModelSend.ts | 42 +- .../chat/usePendingThreadRequests.ts | 19 +- .../components/chat/useProjectCloneBanner.tsx | 42 +- .../chat/useProjectScriptEditing.ts | 30 +- .../chat/usePullRequestDraftThread.ts | 4 +- .../src/components/chat/useQueuedRunEdit.ts | 32 +- .../components/chat/useRightPanelActions.ts | 15 +- apps/web/src/components/chat/useSideChat.ts | 18 +- .../chat/useSystemComposerBanners.tsx | 60 +- .../components/chat/useThreadLifecycle.tsx | 124 +- .../src/components/chat/useTimelineRewind.ts | 28 +- .../src/components/chat/useTimelineRows.ts | 15 +- .../components/chat/useUsageLimitsPanel.ts | 16 +- .../components/clerk/ClerkUserProfilePage.tsx | 3 +- .../MobileClientsUserProfilePage.logic.ts | 34 +- .../clerk/MobileClientsUserProfilePage.tsx | 41 +- .../RemoveT3ConnectEnvironmentDialog.tsx | 34 +- .../clerk/T3ChatUserProfilePage.tsx | 67 +- .../clerk/T3ConnectAccountPages.tsx | 6 +- .../clerk/T3ConnectSidebarSignIn.tsx | 12 +- .../clerk/T3ConnectUserProfilePage.tsx | 86 +- .../web/src/components/clerk/useT3ChatLink.ts | 12 +- .../cloud/CloudEnvironmentConnectList.tsx | 101 +- .../cloud/ConnectCliAuthSurface.tsx | 28 +- .../cloud/ConnectOnboardingDialog.tsx | 56 +- .../cloud/RelayClientInstallDialog.tsx | 50 +- apps/web/src/components/cloud/TunnelUsage.tsx | 46 +- .../cloudEnvironmentConnectionPresentation.ts | 35 +- .../composerContextPresentation.tsx | 187 +- apps/web/src/components/contextChipParts.tsx | 17 +- .../desktop/DesktopWebLinkCoordinator.tsx | 21 +- .../desktop/SnapShotCoordinator.tsx | 33 +- .../desktop/SshPasswordPromptDialog.tsx | 40 +- .../web/src/components/desktopUpdate.logic.ts | 98 +- .../src/components/desktopUpdate.toast.tsx | 10 +- .../device/DeviceAndroidFoldControls.tsx | 24 +- .../components/device/DeviceControlsRail.tsx | 69 +- .../components/device/DeviceDuoControls.tsx | 23 +- .../components/device/DeviceDuoViewport.tsx | 6 +- .../device/DeviceHostAvailability.tsx | 15 +- .../components/device/DeviceHostUpdates.tsx | 16 +- .../components/device/DeviceLoadingView.tsx | 6 +- .../web/src/components/device/DevicePanel.tsx | 86 +- .../components/device/DevicePhoneViewport.tsx | 6 +- .../web/src/components/device/DeviceSetup.tsx | 154 +- .../components/device/DeviceStreamView.tsx | 32 +- .../components/device/DeviceToolVersions.tsx | 52 +- .../components/device/DeviceToolsPanel.tsx | 213 +- .../src/components/device/DeviceWorkspace.tsx | 6 +- apps/web/src/components/device/deviceFold.ts | 12 +- .../components/device/deviceStreamSession.ts | 2 + .../diffs/DiffCommentAnnotation.tsx | 24 +- .../diffs/DiffFileLoadingBoundary.tsx | 4 +- .../src/components/diffs/DiffFileStatus.tsx | 8 +- .../web/src/components/diffs/DiffFileTree.tsx | 10 +- .../AttachmentFilePreview.browser.test.tsx | 10 +- ...achmentFilePreview.office.browser.test.tsx | 27 +- .../files/AttachmentFilePreview.tsx | 103 +- .../web/src/components/files/AudioPreview.tsx | 26 +- .../web/src/components/files/BinaryViewer.tsx | 104 +- .../src/components/files/DocumentPages.tsx | 8 +- .../src/components/files/FileBreadcrumbs.tsx | 36 +- .../src/components/files/FileBrowserPanel.tsx | 53 +- .../src/components/files/FileExplorerPane.tsx | 8 +- .../components/files/FilePreviewPanel.test.ts | 20 +- .../src/components/files/FilePreviewPanel.tsx | 123 +- apps/web/src/components/files/FontViewer.tsx | 37 +- .../src/components/files/LargeTextViewer.tsx | 50 +- .../src/components/files/MermaidViewer.tsx | 10 +- .../src/components/files/NotebookPreview.tsx | 31 +- .../web/src/components/files/OfficeViewer.tsx | 135 +- .../components/files/OpenXmlOfficeViewer.tsx | 41 +- apps/web/src/components/files/PdfViewer.tsx | 56 +- .../components/files/PreviewImageContent.tsx | 16 +- .../components/files/ProjectFilePicker.tsx | 42 +- .../files/binaryPreview.worker.test.ts | 6 +- .../components/files/binaryPreview.worker.ts | 43 +- .../components/files/binaryPreviewProtocol.ts | 3 +- .../components/files/decodeImagePreview.ts | 24 +- .../files/extendedDocumentPreview.ts | 81 +- .../files/fileCommentAnnotations.ts | 12 +- .../src/components/files/filePreviewMode.ts | 22 +- .../components/files/fileSurfaceChrome.tsx | 6 +- .../components/files/imageDecode.worker.ts | 67 +- .../src/components/files/largeText.worker.ts | 25 +- .../src/components/files/largeTextProtocol.ts | 3 +- .../components/files/office/OfficePages.tsx | 27 +- .../components/files/office/Presentation.tsx | 36 +- .../components/files/office/Spreadsheet.tsx | 31 +- .../components/files/office/WordDocument.tsx | 22 +- .../files/office/presentation.worker.ts | 3 +- .../components/files/office/word-document.ts | 5 +- .../src/components/files/office/worker-rpc.ts | 31 +- .../web/src/components/files/officeArchive.ts | 86 +- .../components/files/officePreview.worker.ts | 8 +- .../components/files/officePreviewProtocol.ts | 7 +- .../src/components/files/previewFailure.ts | 20 + .../files/previewFailureMessages.ts | 147 + .../files/projectFilesQueryState.ts | 25 +- .../src/components/files/readBinaryPreview.ts | 9 +- .../components/files/readBoundedDocument.ts | 8 +- .../components/files/useDirectoryEntries.ts | 5 +- apps/web/src/components/guest/GuestPage.tsx | 91 +- .../src/components/guest/guestStream.logic.ts | 24 +- .../components/guest/guestTurnItemSource.ts | 9 +- .../components/issue/IssueCommentComposer.tsx | 20 +- .../src/components/issue/IssueDetailGhost.tsx | 41 +- .../src/components/issue/IssueDetailPanel.tsx | 181 +- .../issue/IssueListFilterPickers.tsx | 52 +- apps/web/src/components/issue/IssuesPage.tsx | 125 +- .../src/components/issue/issueSavedViews.ts | 9 +- .../components/mcp/UseInAnotherAppDialog.tsx | 310 +- apps/web/src/components/mcp/mcpApps.ts | 59 +- apps/web/src/components/mcp/mcpGate.ts | 53 +- .../web/src/components/media/MediaActions.tsx | 80 +- .../src/components/media/MediaVideoPlayer.tsx | 12 +- .../src/components/media/OpenMediaLink.tsx | 4 +- apps/web/src/components/media/mediaContent.ts | 33 +- .../components/onboarding/FirstRunGate.tsx | 10 +- .../src/components/onboarding/WelcomePage.tsx | 347 +- .../permissions/PermissionChecklist.tsx | 10 +- .../permissions/usePermissionStatus.ts | 6 +- .../preview/PreviewAnnotationSpeech.tsx | 11 +- .../components/preview/PreviewChromeRow.tsx | 48 +- .../components/preview/PreviewEmptyState.tsx | 21 +- .../src/components/preview/PreviewFindBar.tsx | 14 +- .../preview/PreviewLocalServerCard.tsx | 10 +- .../components/preview/PreviewMoreMenu.tsx | 91 +- .../src/components/preview/PreviewPanel.tsx | 6 +- .../components/preview/PreviewPanelShell.tsx | 4 +- .../preview/PreviewRecentUrlCard.tsx | 4 +- .../components/preview/PreviewUnreachable.tsx | 52 +- .../src/components/preview/PreviewView.tsx | 119 +- .../preview/ThreadPreviewMiniPlayer.tsx | 40 +- .../components/preview/errorCodeMessages.ts | 10 +- .../components/preview/fileExplorerLabel.ts | 34 +- .../components/preview/previewConstants.ts | 26 +- .../src/components/projectScriptEditor.tsx | 112 +- .../promptLinks/HostedPromptLinkLanding.tsx | 72 +- .../promptLinks/NewThreadLinkView.tsx | 64 +- .../promptLinks/ThreadLinkPrompt.tsx | 9 +- .../components/promptLinks/copyPromptLink.ts | 7 +- .../components/promptLinks/linkedPrompt.ts | 21 +- .../pullRequest/ChangeBreakdownGrid.tsx | 21 +- .../pullRequest/LinkPullRequestDialog.tsx | 26 +- .../pullRequest/PullRequestActionsMenu.tsx | 169 +- .../PullRequestActivityUnavailableState.tsx | 19 +- .../pullRequest/PullRequestBaseBranch.tsx | 34 +- .../PullRequestChangeBreakdownStat.tsx | 5 +- .../pullRequest/PullRequestChecksPopover.tsx | 54 +- .../pullRequest/PullRequestCodeTab.tsx | 244 +- .../pullRequest/PullRequestCommentBody.tsx | 4 +- .../pullRequest/PullRequestCommentForm.tsx | 33 +- .../PullRequestCompactFilterMenu.tsx | 8 +- .../pullRequest/PullRequestComposer.tsx | 57 +- .../pullRequest/PullRequestCopyableCode.tsx | 11 +- .../pullRequest/PullRequestDetailActions.tsx | 107 +- .../pullRequest/PullRequestDetailCrumbs.tsx | 26 +- .../pullRequest/PullRequestDetailLayout.tsx | 10 +- .../pullRequest/PullRequestDetailPanel.tsx | 450 +- .../PullRequestDiffUnavailableState.tsx | 14 +- .../pullRequest/PullRequestGhosts.tsx | 135 +- .../pullRequest/PullRequestGuideTab.tsx | 39 +- .../pullRequest/PullRequestLabelPicker.tsx | 32 +- .../pullRequest/PullRequestLinkPreview.tsx | 4 +- .../pullRequest/PullRequestListEmptyState.tsx | 38 +- .../pullRequest/PullRequestListFilters.tsx | 113 +- .../pullRequest/PullRequestListGroups.tsx | 4 +- .../pullRequest/PullRequestMarkdown.tsx | 12 +- .../pullRequest/PullRequestMarkdownEditor.tsx | 20 +- .../PullRequestMarkdownTextarea.tsx | 33 +- .../pullRequest/PullRequestMoreReplies.tsx | 12 +- .../pullRequest/PullRequestReactions.tsx | 21 +- .../PullRequestResolveThreadButton.tsx | 8 +- .../PullRequestReviewAnnotation.tsx | 49 +- .../PullRequestReviewForm.browser.test.tsx | 2 +- .../pullRequest/PullRequestReviewForm.tsx | 51 +- .../pullRequest/PullRequestReviewerPicker.tsx | 63 +- .../components/pullRequest/PullRequestRow.tsx | 11 +- .../pullRequest/PullRequestSpeedActions.tsx | 57 +- .../pullRequest/PullRequestStackHeader.tsx | 11 +- .../PullRequestStackLayerContent.tsx | 13 +- .../pullRequest/PullRequestStackMenu.tsx | 104 +- .../pullRequest/PullRequestStackPopover.tsx | 24 +- .../pullRequest/PullRequestSummaryTab.tsx | 194 +- .../pullRequest/PullRequestThreadLinks.tsx | 70 +- .../pullRequest/PullRequestTimelineTab.tsx | 159 +- .../pullRequest/PullRequestTitleEditor.tsx | 27 +- .../pullRequest/PullRequestsColumn.tsx | 39 +- .../pullRequest/PullRequestsPage.tsx | 81 +- .../PullRequestsUnavailableState.tsx | 8 +- .../pullRequest/ThreadPullRequestsPanel.tsx | 97 +- .../pullRequest/changeRequestTerm.ts | 12 + .../pullRequest/filesViewedStore.ts | 6 +- .../pullRequest/guide/GuideExcerpt.tsx | 44 +- .../pullRequest/guide/GuideNotes.tsx | 8 +- .../pullRequest/guide/GuideRail.tsx | 21 +- .../pullRequest/guide/GuideStop.tsx | 49 +- .../pullRequest/guide/GuideTour.tsx | 9 +- .../guide/PullRequestGuideRunCoordinator.tsx | 6 +- .../pullRequest/guide/useGuideDiffFiles.ts | 3 +- .../pullRequest/guide/useReviewGuideWriter.ts | 7 +- .../pullRequest/pullRequestCheckoutToast.ts | 14 +- .../pullRequest/pullRequestDetail.logic.ts | 92 +- .../pullRequest/pullRequestDiffError.test.ts | 7 +- .../pullRequest/pullRequestDiffError.ts | 31 +- .../pullRequest/pullRequestIcons.tsx | 9 +- .../pullRequest/pullRequestLinkContextMenu.ts | 26 +- .../pullRequest/pullRequestList.logic.ts | 7 +- .../pullRequest/pullRequestListOptions.ts | 59 +- .../pullRequest/pullRequestPresentation.tsx | 191 +- .../pullRequest/pullRequestSavedViews.ts | 8 +- .../pullRequest/pullRequestStackSnapshot.ts | 8 +- .../pullRequest/usePullRequestActions.ts | 234 +- .../pullRequest/usePullRequestFilesViewed.ts | 2 + .../pullRequest/useThreadLinkedPullRequest.ts | 7 +- .../search/ProjectContentSearchDialog.tsx | 72 +- .../components/settings/AboutVersionTitle.tsx | 21 +- .../settings/AcpRegistrySearchStep.tsx | 62 +- .../settings/AcpSessionManagementSection.tsx | 119 +- .../settings/AddCodexAccountDialog.tsx | 31 +- .../settings/AddEnvironmentDialog.tsx | 128 +- .../AddProviderInstanceDialog.logic.ts | 19 +- .../settings/AddProviderInstanceDialog.tsx | 134 +- .../AddProviderInstanceWizardSteps.tsx | 5 +- .../settings/AddUsageLimitSourceDialog.tsx | 32 +- .../components/settings/AdvancedSettings.tsx | 3 +- .../settings/AppearanceSettingsPanel.tsx | 137 +- .../settings/ArchivedThreadsPanel.tsx | 62 +- .../settings/AuthorizedClientsSettings.tsx | 203 +- .../settings/BackgroundActivitySettings.tsx | 168 +- .../settings/BranchNamingSettings.tsx | 60 +- .../settings/BrowserImportWizard.tsx | 191 +- .../settings/CaptureShortcutConfig.tsx | 125 +- .../settings/ChatGptAccountPicker.tsx | 16 +- .../settings/ChatGptConnectionButton.tsx | 4 +- .../settings/ChatGptUsageButton.tsx | 3 +- .../settings/ChatGptWelcomeCoordinator.tsx | 19 +- .../settings/CliCommandSettingsRow.tsx | 60 +- .../settings/CloudVoiceConfiguration.tsx | 125 +- .../components/settings/CodexSetupSection.tsx | 266 +- .../ConnectDeviceApprovalSettings.tsx | 65 +- .../settings/ConnectionDiagnosisDetails.tsx | 69 +- .../settings/ConnectionsSettings.logic.ts | 132 +- .../settings/ConnectionsSettings.tsx | 345 +- .../components/settings/CustomModelEditor.tsx | 87 +- .../settings/DatabaseStorageNotice.tsx | 76 +- .../components/settings/DeviceHostEditor.tsx | 73 +- .../settings/DeviceSourcesSettings.tsx | 153 +- .../settings/DiagnosticsSettings.tsx | 341 +- .../settings/EasDeviceHostEditor.tsx | 96 +- .../settings/EnvironmentIconPicker.tsx | 29 +- .../settings/EnvironmentRoutesList.tsx | 40 +- .../components/settings/EnvironmentRow.tsx | 19 +- .../components/settings/ExpandableText.tsx | 7 +- .../components/settings/FontFamilyPicker.tsx | 20 +- .../settings/IntegrationsSettings.tsx | 324 +- .../settings/IntervalSecondsField.tsx | 12 +- .../settings/IssueTrackerSettings.tsx | 52 +- .../settings/KeybindingsSettings.logic.ts | 179 +- .../settings/KeybindingsSettings.tsx | 265 +- .../components/settings/LabsSettingsPanel.tsx | 75 +- .../components/settings/LinkAccessPicker.tsx | 19 +- .../components/settings/LinkMachineSelect.tsx | 31 +- .../settings/LinkedEnvironmentsSettings.tsx | 108 +- .../settings/LoadBalancingSettings.tsx | 47 +- .../settings/LocalEnvironmentSetting.tsx | 37 +- .../settings/MicrophoneOrderList.tsx | 21 +- .../components/settings/MicrophoneTest.tsx | 51 +- .../settings/MobileAppSettingsRow.tsx | 23 +- .../settings/MultipleAccountsNote.tsx | 21 +- .../settings/NotificationSettings.tsx | 32 +- .../settings/OpenSourceLicenses.tsx | 64 +- .../settings/PanelAnimationsPreview.tsx | 4 +- .../settings/ProcessSignalActions.tsx | 24 +- .../settings/ProjectActionsList.tsx | 12 +- .../settings/ProjectActionsSettings.tsx | 39 +- .../settings/ProjectDefaultsSettings.logic.ts | 28 +- .../settings/ProjectDefaultsSettings.tsx | 193 +- .../settings/ProjectFaviconPickerDialog.tsx | 43 +- .../settings/ProjectIconPickerDialog.tsx | 57 +- .../settings/ProjectSettingsPanel.tsx | 177 +- .../components/settings/ProjectsSettings.tsx | 6 +- .../settings/ProviderAccentColorPicker.tsx | 28 +- .../settings/ProviderAuthTerminal.tsx | 8 +- .../ProviderAuthenticationSection.tsx | 138 +- .../settings/ProviderInstanceCard.tsx | 185 +- .../settings/ProviderModelsSection.tsx | 100 +- .../settings/ProviderSettingsForm.tsx | 207 +- .../settings/ProviderSettingsPanel.tsx | 210 +- .../settings/ProviderSetupSection.tsx | 107 +- .../ProviderWizardAuthenticationStep.tsx | 15 +- .../settings/PullRequestRoutingSettings.tsx | 47 +- .../ResourceTelemetryDiagnostics.logic.ts | 40 +- .../settings/ResourceTelemetryDiagnostics.tsx | 453 +- .../settings/RevokeConnectDeviceDialog.tsx | 15 +- .../settings/SavedEnvironmentRows.tsx | 253 +- .../settings/ScheduledTasksSettings.tsx | 572 +- .../src/components/settings/SecretInput.tsx | 7 +- .../settings/SecretProviderDialog.logic.ts | 12 +- .../settings/SecretProviderDialog.tsx | 34 +- .../components/settings/SecretSourceInput.tsx | 41 +- .../settings/SecretsSettings.logic.ts | 17 +- .../components/settings/SecretsSettings.tsx | 67 +- .../settings/SessionPermissions.tsx | 34 +- .../settings/SettingInheritance.tsx | 125 +- .../settings/SettingsBreadcrumb.tsx | 5 +- .../settings/SettingsFontPreviews.tsx | 7 +- .../settings/SettingsPanels.logic.ts | 41 +- .../components/settings/SettingsPanels.tsx | 758 +- .../settings/SettingsScopeContext.tsx | 6 +- .../settings/SettingsScopeNotice.tsx | 8 +- .../settings/SettingsScopeSentence.tsx | 168 +- .../settings/SettingsSidebarNav.tsx | 3 +- .../settings/SimlockDeviceHostEditor.tsx | 89 +- .../settings/SnapShotSettings.logic.ts | 118 +- .../components/settings/SnapShotSettings.tsx | 130 +- .../settings/SnapShotSetupDialog.logic.ts | 20 +- .../settings/SnapShotSetupDialog.tsx | 179 +- .../settings/SnoozePresetsSettings.tsx | 125 +- .../settings/SourceControlAccountSettings.tsx | 106 +- .../SourceControlAppSignInSettings.tsx | 60 +- .../settings/SourceControlHostSettings.tsx | 3 +- .../settings/SourceControlSettings.tsx | 160 +- .../settings/SourceControlTokenSettings.tsx | 48 +- .../settings/SourceControlWritingSettings.tsx | 126 +- .../settings/SpeechLanguageSelect.tsx | 34 +- .../settings/SpeechModelComparison.tsx | 38 +- .../components/settings/StorageSettings.tsx | 266 +- .../settings/TelemetryExportSettings.tsx | 116 +- .../settings/TextGeneratorsSettings.tsx | 166 +- .../components/settings/ThemeColorPicker.tsx | 73 +- .../components/settings/ThemeCssEditor.tsx | 14 +- .../components/settings/ThemeEditorHost.tsx | 10 +- .../components/settings/ThemeEditorPanel.tsx | 206 +- .../components/settings/ThemeImportDialog.tsx | 69 +- .../settings/ThemePreviewCircles.tsx | 10 +- .../settings/ThemeSearchSection.tsx | 111 +- .../src/components/settings/ThemeSettings.tsx | 179 +- .../settings/ThreadDetailsItemsRow.tsx | 20 +- .../ThreadTitleInstructionsSettings.tsx | 15 +- .../settings/TypographySettings.tsx | 92 +- .../settings/UpdateTrackSwitchDialog.tsx | 91 +- .../settings/UsageProviderSettings.tsx | 37 +- .../settings/VoiceSettingsPanel.tsx | 485 +- .../components/settings/WorktreesSettings.tsx | 22 +- .../settings/browserImportWizard.logic.ts | 23 +- .../settings/customModelEditor.logic.ts | 112 +- .../settings/deviceHostConnectionChecks.ts | 11 +- .../settings/deviceHostsSettings.logic.ts | 9 +- .../settings/easDeviceHostsSettings.logic.ts | 25 +- .../src/components/settings/providerStatus.ts | 77 +- .../settings/scheduledTasksSettings.logic.ts | 123 +- .../src/components/settings/scopedSettings.ts | 30 +- .../components/settings/settingsLayout.tsx | 82 +- .../src/components/settings/settingsScope.ts | 30 +- .../settings/settingsSearch.test.ts | 5 +- .../src/components/settings/settingsSearch.ts | 690 +- .../simlockDeviceHostsSettings.logic.ts | 30 +- .../settings/updateTrackSwitch.logic.ts | 69 +- .../useAvailableSettingsSearchItems.ts | 2 + .../settings/useHostConnectionChecks.ts | 4 +- .../settings/useProjectScriptSettings.ts | 20 +- .../settings/useScopedModelAvailability.ts | 11 +- .../components/settings/useScopedSettings.ts | 22 +- .../settings/useSnapShotShortcutRecorder.tsx | 24 +- .../src/components/sidebar/SidebarChrome.tsx | 26 +- .../components/sidebar/SidebarDraftBlock.tsx | 14 +- .../components/sidebar/SidebarFolderDrop.tsx | 24 +- .../sidebar/SidebarProjectFolderHeader.tsx | 21 +- .../sidebar/SidebarProviderUpdatePill.tsx | 27 +- .../sidebar/SidebarThreadHeader.tsx | 23 +- .../components/sidebar/SidebarThreadRow.tsx | 164 +- .../sidebar/SidebarThreadUndoNotice.tsx | 20 +- .../sidebar/SidebarUpdateCapsule.tsx | 49 +- .../components/sidebar/SidebarUpdatePill.tsx | 70 +- .../sidebar/SidebarUpdateReleaseNotes.tsx | 36 +- .../sidebar/UpdateEverythingDialog.tsx | 75 +- .../sidebar/updateEverything.logic.test.ts | 8 +- .../sidebar/updateEverything.logic.ts | 401 +- .../sidebar/updateEverythingRun.tsx | 20 +- .../components/sidebar/useUpdateEverything.ts | 39 +- .../components/sourceControlAppAccessToast.ts | 14 +- .../src/components/threadActionMenu.logic.ts | 121 +- .../threadTitleRegenerationToast.ts | 37 +- .../src/components/ui/anchoredCopyToast.ts | 5 +- apps/web/src/components/ui/color-picker.tsx | 28 +- apps/web/src/components/ui/dialog.tsx | 4 +- apps/web/src/components/ui/sheet.tsx | 4 +- apps/web/src/components/ui/sidebar.tsx | 17 +- apps/web/src/components/ui/spinner.tsx | 4 +- .../web/src/components/ui/standalone-page.tsx | 1 + apps/web/src/components/ui/toast.tsx | 29 +- apps/web/src/components/ui/wizard.tsx | 14 +- apps/web/src/components/usage/UsageLimits.tsx | 96 +- .../components/usage/UsageLimitsPooled.tsx | 124 +- .../src/components/usage/UsageModelDialog.tsx | 43 +- apps/web/src/components/usage/UsagePage.tsx | 287 +- .../components/usage/UsagePriceOverrides.tsx | 160 +- .../components/usage/UsageProviderChart.tsx | 34 +- .../src/components/usage/UsageShareBar.tsx | 6 +- .../src/components/usage/usageBreakdown.ts | 30 +- .../src/components/usage/usagePriceForm.ts | 9 +- .../src/components/usage/usagePriceTable.ts | 60 +- .../src/components/usage/usagePriceTargets.ts | 9 +- .../src/components/usage/usageShortcuts.ts | 15 +- apps/web/src/composer-code-languages.ts | 14 +- apps/web/src/composerPlaceholder.ts | 4 +- apps/web/src/connection/clientMetadata.ts | 2 + apps/web/src/connection/platform.ts | 51 +- apps/web/src/connection/storage.ts | 100 +- apps/web/src/contextMenuFallback.ts | 5 +- apps/web/src/editorLabels.ts | 30 +- apps/web/src/editorPreferences.ts | 17 +- apps/web/src/environments/primary/auth.ts | 18 +- apps/web/src/environments/primary/target.ts | 4 +- apps/web/src/fileContextMenu.ts | 29 +- apps/web/src/hooks/showThreadUndoNotice.ts | 42 +- apps/web/src/hooks/useCopyToClipboard.test.ts | 4 +- apps/web/src/hooks/useCopyToClipboard.ts | 83 +- .../hooks/useIncrementalTimelineEntries.ts | 15 +- apps/web/src/hooks/useNewProject.ts | 41 +- apps/web/src/hooks/useOpenLocalWorkspace.ts | 8 +- apps/web/src/hooks/useProjectGroupUpdate.ts | 32 +- apps/web/src/hooks/usePullRequestLinking.ts | 9 +- apps/web/src/hooks/useRelativeTimeState.ts | 4 +- apps/web/src/hooks/useRemoveClonedProject.ts | 7 +- .../src/hooks/useRightPanelSurfaceClose.ts | 5 +- apps/web/src/hooks/useScratchProject.ts | 9 +- apps/web/src/hooks/useSettings.ts | 73 +- apps/web/src/hooks/useStartTriage.ts | 33 +- apps/web/src/hooks/useThreadActionMenu.ts | 71 +- apps/web/src/hooks/useThreadActions.ts | 92 +- apps/web/src/i18n/initializeI18n.ts | 2 + apps/web/src/i18n/messages.ts | 39 + apps/web/src/i18n/runtime.ts | 2 + apps/web/src/i18n/translations/de.json | 12071 ++++++++++++++- apps/web/src/i18n/translations/en.json | 12072 ++++++++++++++- apps/web/src/i18n/translations/es.json | 12070 ++++++++++++++- apps/web/src/i18n/translations/fr.json | 12087 ++++++++++++++- apps/web/src/i18n/translations/ja.json | 12019 ++++++++++++++- apps/web/src/i18n/translations/ko.json | 12013 ++++++++++++++- apps/web/src/i18n/translations/pt-BR.json | 12090 ++++++++++++++- apps/web/src/i18n/translations/ru.json | 12078 ++++++++++++++- apps/web/src/i18n/translations/sv.json | 12103 +++++++++++++++ apps/web/src/i18n/translations/zh.json | 12138 +++++++++++++++- .../web/src/lib/accessibilityAnnouncements.ts | 6 +- apps/web/src/lib/addProjectToMachine.ts | 19 +- apps/web/src/lib/attachmentUploadQueue.ts | 62 +- apps/web/src/lib/attachmentUploadState.ts | 29 +- apps/web/src/lib/bootError.ts | 5 + apps/web/src/lib/composerContextRecords.ts | 157 +- apps/web/src/lib/copyThreadReference.ts | 19 +- apps/web/src/lib/diffFileContents.ts | 4 +- apps/web/src/lib/diffRendering.ts | 8 +- apps/web/src/lib/discardComposerDraft.ts | 6 +- apps/web/src/lib/imageCompression.ts | 7 +- apps/web/src/lib/openPullRequestLink.ts | 11 +- apps/web/src/lib/projectScriptKeybindings.ts | 9 +- apps/web/src/lib/resourceTelemetryState.ts | 10 +- apps/web/src/lib/snapShotShortcut.ts | 1 + apps/web/src/lib/terminalCloseConfirm.ts | 21 +- apps/web/src/lib/toolCallDiff.ts | 8 +- apps/web/src/lib/utils.ts | 8 +- apps/web/src/localApi.ts | 10 +- apps/web/src/markdown-clipboard.ts | 1 + apps/web/src/onboarding/useProjectScans.ts | 4 +- apps/web/src/openVsxThemes.ts | 135 +- apps/web/src/projectIconColors.ts | 37 +- apps/web/src/projectIconOptions.ts | 62 +- apps/web/src/proposedPlan.ts | 6 +- apps/web/src/providerAuthDelivery.ts | 10 +- apps/web/src/reviewCommentContext.ts | 2 + apps/web/src/rightPanelStore.ts | 10 +- apps/web/src/routes/__root.tsx | 44 +- apps/web/src/routes/_chat.index.tsx | 12 +- apps/web/src/routes/_chat.new.tsx | 10 +- .../src/routes/_chat.settings.providers.tsx | 6 +- apps/web/src/routes/_chat.settings.tsx | 30 +- apps/web/src/session-logic.ts | 119 +- apps/web/src/shortcuts/chatRouteCommands.ts | 6 +- .../src/shortcuts/commandPaletteCommands.ts | 13 +- apps/web/src/sidebarProjectGrouping.ts | 8 +- apps/web/src/speech/browserMicrophones.ts | 4 +- apps/web/src/speech/browserPcmCapture.ts | 23 +- apps/web/src/speech/browserVoiceInput.ts | 9 +- .../src/speech/useEnvironmentSpeechInput.ts | 30 +- apps/web/src/speech/voiceInputSession.ts | 15 +- apps/web/src/state/desktopCliCommand.ts | 7 +- apps/web/src/state/desktopNetworkAccess.ts | 9 +- apps/web/src/state/desktopSnapShot.ts | 7 +- apps/web/src/state/desktopSshHosts.ts | 7 +- apps/web/src/state/desktopUpdate.ts | 9 +- apps/web/src/state/desktopWslState.ts | 7 +- apps/web/src/state/device.ts | 3 + apps/web/src/state/entities.ts | 5 +- apps/web/src/state/filesystem.ts | 22 +- apps/web/src/state/managedPolicy.ts | 13 +- apps/web/src/state/npmRelease.ts | 24 +- apps/web/src/state/queries.ts | 46 +- apps/web/src/state/query.ts | 19 +- apps/web/src/state/sourceControlActions.ts | 20 +- apps/web/src/state/terminalSessions.ts | 4 +- apps/web/src/state/usage.ts | 5 +- .../src/state/use-orchestration-command.ts | 9 +- apps/web/src/state/usePullRequestStack.ts | 5 +- apps/web/src/terminal/ghostty/surface.ts | 6 +- apps/web/src/textGenerators.ts | 21 +- apps/web/src/themePalette.ts | 96 +- apps/web/src/threadNotifications.ts | 9 +- apps/web/src/threadSync.ts | 9 +- apps/web/src/timestampFormat.ts | 150 +- apps/web/src/useNativeFileDrag.ts | 9 +- apps/web/src/versionSkew.ts | 10 +- apps/web/src/vscodeThemeImport.ts | 15 +- docs/internals/i18n.md | 46 + oxlint-plugin-t3code/index.ts | 2 + .../rules/no-untranslated-copy.ts | 452 + package.json | 1 + packages/client-runtime/package.json | 13 + .../src/authorization/service.ts | 23 +- .../client-runtime/src/composerThreadItems.ts | 45 +- .../src/connection/compatibility.ts | 15 +- .../src/connection/diagnosis.ts | 212 +- .../client-runtime/src/connection/driver.ts | 6 +- .../client-runtime/src/connection/errors.ts | 87 +- .../src/connection/hostFreeze.ts | 19 +- .../client-runtime/src/connection/model.ts | 4 + .../src/connection/onboarding.ts | 23 +- .../src/connection/outdatedHostUpdate.ts | 15 +- .../src/connection/presentation.ts | 79 +- .../pullRequestRoutingPermissions.ts | 10 +- .../client-runtime/src/connection/registry.ts | 11 +- .../client-runtime/src/connection/resolver.ts | 14 +- .../client-runtime/src/connection/routes.ts | 26 +- .../src/connection/supervisor.ts | 23 +- packages/client-runtime/src/contractLabels.ts | 287 + .../client-runtime/src/device/screenshot.ts | 10 +- packages/client-runtime/src/device/stream.ts | 85 +- packages/client-runtime/src/errors/index.ts | 1 + packages/client-runtime/src/errors/network.ts | 9 +- .../client-runtime/src/errors/translatable.ts | 115 + packages/client-runtime/src/filePreview.ts | 13 +- .../client-runtime/src/issuePresentation.ts | 52 +- packages/client-runtime/src/linkRequest.ts | 53 +- packages/client-runtime/src/listFormat.ts | 36 + packages/client-runtime/src/locales.ts | 1 + packages/client-runtime/src/modelTraits.ts | 29 +- .../client-runtime/src/operations/commands.ts | 8 +- .../client-runtime/src/operations/projects.ts | 74 +- .../src/operations/threadTitle.ts | 26 +- .../src/preview/serverBrowserStream.ts | 38 +- .../src/providerUpdateRequiredModels.ts | 37 +- .../src/pullRequestLinkInput.ts | 47 +- .../src/pullRequestReactions.ts | 80 +- packages/client-runtime/src/queuedRunEdit.ts | 15 +- .../client-runtime/src/relay/discovery.ts | 8 +- .../client-runtime/src/relay/dpopProof.ts | 6 +- .../src/relay/errorPresentation.ts | 153 +- .../client-runtime/src/relay/managedRelay.ts | 135 +- .../src/relay/managedRelayState.ts | 71 +- .../client-runtime/src/reviewGuideTour.ts | 11 +- packages/client-runtime/src/rpc/client.ts | 36 +- packages/client-runtime/src/rpc/http.ts | 45 +- packages/client-runtime/src/rpc/session.ts | 21 +- packages/client-runtime/src/savedViews.ts | 9 +- .../src/scheduledTaskWebhook.ts | 37 +- packages/client-runtime/src/secretRequest.ts | 88 +- .../src/state/attachmentUploads.ts | 8 +- .../client-runtime/src/state/attachments.ts | 31 +- .../src/state/commandPermissions.ts | 9 +- .../src/state/connectMcpApproval.ts | 8 +- packages/client-runtime/src/state/device.ts | 59 +- .../src/state/environmentHttpAuth.ts | 22 +- .../client-runtime/src/state/filesystem.ts | 33 +- .../client-runtime/src/state/gitActions.ts | 262 +- .../client-runtime/src/state/issueTrackers.ts | 52 +- packages/client-runtime/src/state/models.ts | 17 +- .../client-runtime/src/state/orchestration.ts | 6 +- .../src/state/outdatedServerUpdate.ts | 8 +- .../client-runtime/src/state/presentation.ts | 6 + .../src/state/projectCommands.ts | 10 +- .../src/state/projectGrouping.ts | 19 +- .../src/state/projectRemoval.ts | 79 +- .../src/state/pullRequestDiffHttp.ts | 12 +- .../src/state/pullRequestRouting.ts | 6 +- .../client-runtime/src/state/pullRequests.ts | 6 +- packages/client-runtime/src/state/runtime.ts | 18 +- packages/client-runtime/src/state/server.ts | 89 +- packages/client-runtime/src/state/shell.ts | 9 +- .../src/state/subagentDisplay.ts | 83 +- .../src/state/subagentRuntime.ts | 73 +- .../src/state/threadActivityAnnouncement.ts | 34 +- .../src/state/threadExecution.ts | 155 +- .../src/state/threadFamilies.ts | 4 +- .../src/state/threadFeedback.ts | 54 +- .../src/state/threadRequests.ts | 17 +- .../client-runtime/src/state/threadSettled.ts | 105 +- .../client-runtime/src/state/threadShell.ts | 24 +- .../src/state/threadSubagents.ts | 15 +- .../src/state/threadWorkflows.ts | 9 +- packages/client-runtime/src/state/threads.ts | 32 +- .../client-runtime/src/state/usageAccess.ts | 21 +- .../client-runtime/src/state/usageProgress.ts | 16 +- .../client-runtime/src/state/vcsAction.ts | 77 +- packages/client-runtime/src/t3ToolSummary.ts | 1695 ++- .../client-runtime/src/threadReference.ts | 34 +- packages/client-runtime/src/userMessage.ts | 9 +- .../src/voice-input/controller.ts | 168 +- .../client-runtime/src/voice-input/index.ts | 1 + .../client-runtime/src/voice-input/stream.ts | 35 +- .../src/voice-input/transcription.ts | 5 +- packages/client-runtime/src/webhookAddress.ts | 13 +- .../src/work-log/presentation.ts | 237 +- .../src/work-log/t3ToolSentences.ts | 876 ++ packages/client-runtime/src/zip/boundedZip.ts | 14 +- .../client-runtime/src/zip/zipDirectory.ts | 24 +- packages/client-runtime/src/zip/zipError.ts | 39 + .../src/zip/zipErrorMessages.ts | 22 + packages/shared/package.json | 49 + packages/shared/src/authScopeOptions.ts | 92 +- .../shared/src/codexArtifactTemplatesCopy.ts | 25 + .../shared/src/orchestrationTimingCopy.ts | 26 + packages/shared/src/paletteSearch.test.ts | 3 + packages/shared/src/paletteSearch.ts | 27 +- packages/shared/src/paletteSearchCopy.ts | 20 + packages/shared/src/projectScripts.ts | 8 - packages/shared/src/projectScriptsCopy.ts | 17 + packages/shared/src/promptLinks.ts | 58 +- packages/shared/src/promptLinksCopy.ts | 51 + packages/shared/src/speech.ts | 8 - packages/shared/src/speechCopy.ts | 24 + .../shared/src/t3McpToolPresentationCopy.ts | 128 + packages/shared/src/terminalLabels.ts | 15 +- packages/shared/src/terminalLabelsCopy.ts | 21 + packages/shared/src/thirdPartyLicenses.ts | 51 +- packages/shared/src/threadLinks.ts | 5 +- packages/shared/src/threadLinksCopy.ts | 16 + packages/shared/src/toolActivity.ts | 56 +- packages/shared/src/toolActivityCopy.ts | 57 + packages/shared/src/usageFormat.ts | 95 +- packages/shared/src/usageFormatCopy.ts | 66 + packages/shared/src/usageLimits.test.ts | 2 +- packages/shared/src/usageLimits.ts | 106 +- packages/shared/src/usageLimitsCopy.ts | 215 + pnpm-lock.yaml | 15 + scripts/i18n-check.ts | 24 +- scripts/i18n-untranslated.ts | 41 + vite.config.ts | 14 + 1408 files changed, 220145 insertions(+), 20867 deletions(-) create mode 100644 apps/desktop/gt.config.json create mode 100644 apps/desktop/scripts/i18n-generate.mjs create mode 100644 apps/desktop/src/i18n/messages.ts create mode 100644 apps/desktop/src/i18n/translations/de.json create mode 100644 apps/desktop/src/i18n/translations/en.json create mode 100644 apps/desktop/src/i18n/translations/es.json create mode 100644 apps/desktop/src/i18n/translations/fr.json create mode 100644 apps/desktop/src/i18n/translations/ja.json create mode 100644 apps/desktop/src/i18n/translations/ko.json create mode 100644 apps/desktop/src/i18n/translations/pt-BR.json create mode 100644 apps/desktop/src/i18n/translations/ru.json create mode 100644 apps/desktop/src/i18n/translations/sv.json create mode 100644 apps/desktop/src/i18n/translations/zh.json create mode 100644 apps/mobile/src/features/usage/usageAxisLabels.ts create mode 100644 apps/mobile/src/i18n/messages.ts create mode 100644 apps/mobile/src/i18n/translations/sv.json create mode 100644 apps/mobile/src/lib/changeRequestTerm.ts create mode 100644 apps/web/src/components/files/previewFailure.ts create mode 100644 apps/web/src/components/files/previewFailureMessages.ts create mode 100644 apps/web/src/components/pullRequest/changeRequestTerm.ts create mode 100644 apps/web/src/i18n/messages.ts create mode 100644 apps/web/src/i18n/translations/sv.json create mode 100644 docs/internals/i18n.md create mode 100644 oxlint-plugin-t3code/rules/no-untranslated-copy.ts create mode 100644 packages/client-runtime/src/contractLabels.ts create mode 100644 packages/client-runtime/src/errors/translatable.ts create mode 100644 packages/client-runtime/src/listFormat.ts create mode 100644 packages/client-runtime/src/work-log/t3ToolSentences.ts create mode 100644 packages/client-runtime/src/zip/zipError.ts create mode 100644 packages/client-runtime/src/zip/zipErrorMessages.ts create mode 100644 packages/shared/src/codexArtifactTemplatesCopy.ts create mode 100644 packages/shared/src/orchestrationTimingCopy.ts create mode 100644 packages/shared/src/paletteSearchCopy.ts create mode 100644 packages/shared/src/projectScriptsCopy.ts create mode 100644 packages/shared/src/promptLinksCopy.ts create mode 100644 packages/shared/src/speechCopy.ts create mode 100644 packages/shared/src/t3McpToolPresentationCopy.ts create mode 100644 packages/shared/src/terminalLabelsCopy.ts create mode 100644 packages/shared/src/threadLinksCopy.ts create mode 100644 packages/shared/src/toolActivityCopy.ts create mode 100644 packages/shared/src/usageFormatCopy.ts create mode 100644 packages/shared/src/usageLimitsCopy.ts create mode 100644 scripts/i18n-untranslated.ts diff --git a/apps/desktop/gt.config.json b/apps/desktop/gt.config.json new file mode 100644 index 0000000000000..b77af550c763e --- /dev/null +++ b/apps/desktop/gt.config.json @@ -0,0 +1,10 @@ +{ + "defaultLocale": "en", + "locales": ["de", "es", "fr", "ja", "ko", "pt-BR", "ru", "sv", "zh"], + "src": ["src/**/*.ts", "!**/*.test.ts"], + "files": { + "gt": { + "output": "src/i18n/translations/[locale].json" + } + } +} diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 0daa6f14cf5c4..d91a9ee5e4cfe 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -7,7 +7,8 @@ "scripts": { "ensure:electron": "node scripts/ensure-electron-runtime.mjs", "start": "node scripts/start-electron.mjs", - "test": "vp test run --passWithNoTests" + "test": "vp test run --passWithNoTests", + "i18n:generate": "node scripts/i18n-generate.mjs" }, "dependencies": { "@clerk/electron": "catalog:", @@ -27,6 +28,7 @@ "electron-updater": "6.8.9", "electron-webauthn": "catalog:", "ffi-rs": "1.3.2", + "gt-i18n": "1.0.40", "playwright-core": "1.64.1", "react-grab": "^0.1.32", "tldts": "catalog:" @@ -37,6 +39,7 @@ "acorn": "8.16.0", "cross-env": "^10.1.0", "electron-builder": "26.16.1", + "gt": "2.27.0", "jsdom": "^30.0.1", "tailwindcss": "^4.0.0", "vite-plus": "catalog:" diff --git a/apps/desktop/scripts/i18n-generate.mjs b/apps/desktop/scripts/i18n-generate.mjs new file mode 100644 index 0000000000000..0fc5803202faa --- /dev/null +++ b/apps/desktop/scripts/i18n-generate.mjs @@ -0,0 +1,15 @@ +import * as NodeModule from "node:module"; + +// The gt CLI picks its commands from package.json, and gt-i18n alone gets no `generate`. +const { Command } = NodeModule.createRequire(import.meta.resolve("gt"))("commander"); +const { NodeCLI } = await import("gt/cli/node"); + +const program = new Command("gt"); +new NodeCLI(program, "gt-node", []).init(); +await program.parseAsync([ + "node", + "gt", + "generate", + "--skip-version-check", + ...process.argv.slice(2), +]); diff --git a/apps/desktop/src/app/DesktopApp.ts b/apps/desktop/src/app/DesktopApp.ts index 56fe979cf8c67..34476ee7855b5 100644 --- a/apps/desktop/src/app/DesktopApp.ts +++ b/apps/desktop/src/app/DesktopApp.ts @@ -42,6 +42,8 @@ import * as DesktopSnapShot from "../snapShot/DesktopSnapShot.ts"; import * as DesktopWslBackend from "../wsl/DesktopWslBackend.ts"; import * as DesktopRendererHistory from "../telemetry/DesktopRendererHistory.ts"; import * as HostProcess from "@t3tools/shared/HostProcess"; +import { msg } from "gt-i18n"; +import { m } from "../i18n/messages.ts"; const DEFAULT_DESKTOP_BACKEND_PORT = 3773; const MAX_TCP_PORT = 65_535; @@ -147,7 +149,7 @@ const handleFatalStartupError = Effect.fn("desktop.startup.handleFatalStartupErr const wasQuitting = yield* Ref.getAndSet(state.quitting, true); if (!wasQuitting) { yield* electronDialog.showErrorBox( - "T3 Code failed to start", + m(msg("T3 Code failed to start")), `Stage: ${stage}\n${message}${detail}`, ); } @@ -216,7 +218,7 @@ const startLocalBackend = Effect.gen(function* () { owner: Option.getOrNull(owner), }); yield* (yield* ElectronDialog.ElectronDialog).showErrorBox( - "This T3 home is unavailable", + m(msg("This T3 home is unavailable")), DesktopHomeOwner.homeOwnedMessage(owner), ); yield* (yield* ElectronApp.ElectronApp).quit; diff --git a/apps/desktop/src/app/DesktopStartupRecovery.ts b/apps/desktop/src/app/DesktopStartupRecovery.ts index 769a30cf7680b..768fe2ee3d8d3 100644 --- a/apps/desktop/src/app/DesktopStartupRecovery.ts +++ b/apps/desktop/src/app/DesktopStartupRecovery.ts @@ -7,11 +7,13 @@ import type * as Scope from "effect/Scope"; import * as Stream from "effect/Stream"; import * as SubscriptionRef from "effect/SubscriptionRef"; import type * as Electron from "electron"; +import { msg } from "gt-i18n"; import * as ElectronApp from "../electron/ElectronApp.ts"; import * as ElectronShell from "../electron/ElectronShell.ts"; import * as ElectronTheme from "../electron/ElectronTheme.ts"; import * as ElectronWindow from "../electron/ElectronWindow.ts"; +import { m } from "../i18n/messages.ts"; import * as DesktopUpdates from "../updates/DesktopUpdates.ts"; import type { BackendStartupFailure } from "../backend/DesktopBackendManager.ts"; import * as DesktopEnvironment from "./DesktopEnvironment.ts"; @@ -81,30 +83,59 @@ const actionLink = (action: StartupRecoveryAction, label: string, primary = fals function describeOffer(offer: StartupRecoveryOffer): { text: string; action: string } { switch (offer._tag) { case "Checking": - return { text: "Checking for a newer version…", action: "" }; + return { text: m(msg("Checking for a newer version…")), action: "" }; case "Update": return { - text: `Version ${offer.version} is available. It can contain a fix.`, - action: actionLink("update", `Update to ${offer.version}`, true), + text: m(msg("Version {version} is available. It can contain a fix."), { + version: offer.version, + }), + action: actionLink( + "update", + m(msg("Update to {version}"), { version: offer.version }), + true, + ), }; case "Downloading": return { - text: `Downloading ${offer.version}${offer.percent === null ? "" : ` (${Math.floor(offer.percent / 10) * 10}%)`}. T3 Code restarts when the download is done.`, + text: + offer.percent === null + ? m(msg("Downloading {version}. T3 Code restarts when the download is done."), { + version: offer.version, + }) + : m( + msg( + "Downloading {version} ({percent}%). T3 Code restarts when the download is done.", + ), + { version: offer.version, percent: String(Math.floor(offer.percent / 10) * 10) }, + ), action: "", }; case "Reinstall": return { - text: `Version ${offer.version} started correctly on this computer. Download it and install it to go back.`, - action: actionLink("reinstall", `Download ${offer.version}`, true), + text: m( + msg( + "Version {version} started correctly on this computer. Download it and install it to go back.", + ), + { version: offer.version }, + ), + action: actionLink( + "reinstall", + m(msg("Download {version}"), { version: offer.version }), + true, + ), }; case "Releases": return { - text: "Get a different version from the releases page.", - action: actionLink("releases", "Open releases", true), + text: m(msg("Get a different version from the releases page.")), + action: actionLink("releases", m(msg("Open releases")), true), }; case "ManagedPolicy": return { - text: "Your organization's managed policy stopped T3 Code from starting. Send the details below to your IT administrator.", + text: m( + msg( + "Your organization's managed policy stopped T3 Code from starting. Send the details below to your IT administrator.", + ), + ), action: "", }; } @@ -118,7 +149,8 @@ function buildStartupRecoveryHtml(input: { }): string { const offer = describeOffer(input.offer); const output = input.failure.output.trim(); - return `T3 Code could not start -

T3 Code could not start

+

${title}

${escapeHtml(input.failure.reason)}

${escapeHtml(offer.text)}

-
${offer.action}${actionLink("copy", "Copy details")}${actionLink("quit", "Quit")}
-
${escapeHtml(output.length > 0 ? output : "The server wrote no output.")}
-

Version ${escapeHtml(input.appVersion)}. T3 Code tries again in the background. Logs: ${escapeHtml(input.logDir)}

+
${offer.action}${actionLink("copy", m(msg("Copy details")))}${actionLink("quit", m(msg("Quit", { $context: "button, quits the app" })))}
+
${escapeHtml(output.length > 0 ? output : m(msg("The server wrote no output.")))}
+

${escapeHtml(m(msg("Version {version}. T3 Code tries again in the background. Logs: {logDir}"), { version: input.appVersion, logDir: input.logDir }))}

`; } @@ -270,7 +302,7 @@ export const listen: Effect.Effect< minWidth: 420, minHeight: 320, show: false, - title: "T3 Code could not start", + title: m(msg("T3 Code could not start")), autoHideMenuBar: true, backgroundColor: shouldUseDarkColors ? "#000000" : "#ffffff", webPreferences: { diff --git a/apps/desktop/src/backend/DesktopBackendPool.ts b/apps/desktop/src/backend/DesktopBackendPool.ts index 62c811996b1a0..1221b38d90204 100644 --- a/apps/desktop/src/backend/DesktopBackendPool.ts +++ b/apps/desktop/src/backend/DesktopBackendPool.ts @@ -16,6 +16,7 @@ import * as Schema from "effect/Schema"; import * as Scope from "effect/Scope"; import * as SubscriptionRef from "effect/SubscriptionRef"; import * as SynchronizedRef from "effect/SynchronizedRef"; +import { msg } from "gt-i18n"; import * as FileSystem from "effect/FileSystem"; import { HttpClient } from "effect/http"; @@ -34,6 +35,7 @@ import * as DesktopWindow from "../window/DesktopWindow.ts"; import * as DesktopWslEnvironment from "../wsl/DesktopWslEnvironment.ts"; import * as ElectronDialog from "../electron/ElectronDialog.ts"; import * as ElectronApp from "../electron/ElectronApp.ts"; +import { m } from "../i18n/messages.ts"; const { logWarning: logBackendPoolWarning } = DesktopObservability.makeComponentLogger("desktop-backend-pool"); @@ -189,8 +191,8 @@ export const layer = Layer.effect( { reason }, ); yield* electronDialog.showErrorBox( - "WSL backend is still unavailable", - `${reason}\n\nT3 Code will use the Windows backend for this launch and retry WSL the next time the app starts.`, + m(msg("WSL backend is still unavailable")), + `${reason}\n\n${m(msg("T3 Code will use the Windows backend for this launch and retry WSL the next time the app starts."))}`, ); yield* appSettings.applyWslWindowsFallbackInMemory; return true; @@ -200,8 +202,8 @@ export const layer = Layer.effect( reason, }); yield* electronDialog.showErrorBox( - "WSL backend couldn't start", - `${reason}\n\nFalling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Sharing & access once the WSL distro is fixed.`, + m(msg("WSL backend couldn't start")), + `${reason}\n\n${m(msg("Falling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Sharing & access once the WSL distro is fixed."))}`, ); // Clear wslOnly too so enabling WSL cannot restore a failed mode. // Keep the in-memory fallback if persistence fails. @@ -248,7 +250,7 @@ export const layer = Layer.effect( DesktopHomeOwner.readLiveHomeOwner().pipe( Effect.flatMap((owner) => electronDialog.showErrorBox( - "This T3 home is unavailable", + m(msg("This T3 home is unavailable")), DesktopHomeOwner.homeOwnedMessage(owner), ), ), diff --git a/apps/desktop/src/backend/DesktopHomeOwner.ts b/apps/desktop/src/backend/DesktopHomeOwner.ts index 9313591eb7b9d..7fc833a3fc104 100644 --- a/apps/desktop/src/backend/DesktopHomeOwner.ts +++ b/apps/desktop/src/backend/DesktopHomeOwner.ts @@ -7,8 +7,10 @@ import * as FileSystem from "effect/FileSystem"; import * as Option from "effect/Option"; import * as Path from "effect/Path"; import * as Schema from "effect/Schema"; +import { msg } from "gt-i18n"; import * as DesktopEnvironment from "../app/DesktopEnvironment.ts"; +import { m } from "../i18n/messages.ts"; import { BACKEND_QUIT_STOP_TIMEOUT } from "./DesktopBackendManager.ts"; // The fields of the server's `server-runtime.json` that identify the owner of a T3 home. @@ -92,15 +94,44 @@ export const readLiveHomeOwner = Effect.fn("DesktopHomeOwner.readLiveHomeOwner") export const homeOwnedMessage = (owner: Option.Option): string => Option.match(owner, { onNone: () => - "Another T3 Code server, such as the background service, is using this data directory, or an older background service is set up for it. Stop that server or try `t3 update`. If the older launcher cannot update, run `t3 service uninstall` and optionally reinstall with `t3 service install` from a current CLI. Use `npx t3@latest` if `t3` is missing or outdated, and pass `--base-dir` with the service's T3 home to each command. Then reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + m( + msg( + "Another T3 Code server, such as the background service, is using this data directory, or an older background service is set up for it. Stop that server or try `t3 update`. If the older launcher cannot update, run `t3 service uninstall` and optionally reinstall with `t3 service install` from a current CLI. Use `npx t3@latest` if `t3` is missing or outdated, and pass `--base-dir` with the service's T3 home to each command. Then reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + ), + ), onSome: (owner) => { - const kind = owner.serviceManaged - ? "The T3 Code background service" - : "Another T3 Code server (for example `t3 serve`, or one started over SSH)"; - const version = owner.serverVersion ? `, version ${owner.serverVersion}` : ""; - const stop = owner.serviceManaged - ? "Stop it with `t3 service uninstall`, passing `--base-dir` with this T3 home" - : "If a T3 Code app on another machine started it over SSH, that app restarts it: remove or disconnect that SSH environment there, or quit that app. Then stop the server"; - return `${kind} is using this T3 home (PID ${owner.pid}, port ${owner.port}${version}). ${stop}, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.`; + const variables = { + pid: String(owner.pid), + port: String(owner.port), + version: owner.serverVersion ?? "", + }; + if (owner.serviceManaged) { + return owner.serverVersion + ? m( + msg( + "The T3 Code background service is using this T3 home (PID {pid}, port {port}, version {version}). Stop it with `t3 service uninstall`, passing `--base-dir` with this T3 home, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + ), + variables, + ) + : m( + msg( + "The T3 Code background service is using this T3 home (PID {pid}, port {port}). Stop it with `t3 service uninstall`, passing `--base-dir` with this T3 home, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + ), + variables, + ); + } + return owner.serverVersion + ? m( + msg( + "Another T3 Code server (for example `t3 serve`, or one started over SSH) is using this T3 home (PID {pid}, port {port}, version {version}). If a T3 Code app on another machine started it over SSH, that app restarts it: remove or disconnect that SSH environment there, or quit that app. Then stop the server, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + ), + variables, + ) + : m( + msg( + "Another T3 Code server (for example `t3 serve`, or one started over SSH) is using this T3 home (PID {pid}, port {port}). If a T3 Code app on another machine started it over SSH, that app restarts it: remove or disconnect that SSH environment there, or quit that app. Then stop the server, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + ), + variables, + ); }, }); diff --git a/apps/desktop/src/i18n/messages.ts b/apps/desktop/src/i18n/messages.ts new file mode 100644 index 0000000000000..72fe7487796c3 --- /dev/null +++ b/apps/desktop/src/i18n/messages.ts @@ -0,0 +1,83 @@ +import { resolveLocale } from "@t3tools/client-runtime/locales"; +import * as Effect from "effect/Effect"; +import { decodeOptions, gtFallback } from "gt-i18n"; +import { hashMessage } from "gt-i18n/internal"; + +import * as ElectronApp from "../electron/ElectronApp.ts"; + +type Catalog = Readonly>; + +const DEFAULT_LOCALE = "en"; + +// English is the source text and loads nothing. Keep the keys in step with gt.config.json. +const CATALOGS: Readonly Promise<{ readonly default: Catalog }>>> = { + de: () => import("./translations/de.json", { with: { type: "json" } }), + es: () => import("./translations/es.json", { with: { type: "json" } }), + fr: () => import("./translations/fr.json", { with: { type: "json" } }), + ja: () => import("./translations/ja.json", { with: { type: "json" } }), + ko: () => import("./translations/ko.json", { with: { type: "json" } }), + "pt-BR": () => import("./translations/pt-BR.json", { with: { type: "json" } }), + ru: () => import("./translations/ru.json", { with: { type: "json" } }), + sv: () => import("./translations/sv.json", { with: { type: "json" } }), + zh: () => import("./translations/zh.json", { with: { type: "json" } }), +}; +const SUPPORTED_LOCALES = [DEFAULT_LOCALE, ...Object.keys(CATALOGS)]; + +const loadedCatalogs = new Map([[DEFAULT_LOCALE, {}]]); +const listeners = new Set<() => void>(); +let activeLocale = DEFAULT_LOCALE; +let activeCatalog: Catalog = {}; +let requestedLocale = DEFAULT_LOCALE; + +/** + * Resolves a `msg()` string in the active UI language at call time. Variables are strings so + * ICU never reformats a number (a PID of 12345 would print "12,345"). + */ +export function m(message: string, variables: Readonly> = {}): string { + const decoded = decodeOptions(message); + const source = typeof decoded?.$_source === "string" ? decoded.$_source : message; + const options = typeof decoded?.$_source === "string" ? decoded : variables; + const target = + activeLocale === DEFAULT_LOCALE + ? undefined + : activeCatalog[hashMessage(source, { ...options, $format: "ICU" })]; + // Untranslated text is English, so it takes English plural rules. + return target === undefined + ? gtFallback(source, { ...options, $locale: DEFAULT_LOCALE }) + : gtFallback(target, { ...options, $locale: activeLocale, $_fallback: source }); +} + +/** Runs `listener` after each switch to a different UI language. */ +export function onLocaleChange(listener: () => void): () => void { + listeners.add(listener); + return () => { + listeners.delete(listener); + }; +} + +const loadCatalog = async (locale: string): Promise => { + const loaded = loadedCatalogs.get(locale); + if (loaded) return loaded; + const catalog = (await CATALOGS[locale]!()).default; + loadedCatalogs.set(locale, catalog); + return catalog; +}; + +/** Activates the saved `language` client setting; "system" follows the OS language order. */ +export const applyLanguage = Effect.fn("desktop.i18n.applyLanguage")(function* (language: string) { + const electronApp = yield* ElectronApp.ElectronApp; + const locale = resolveLocale( + language, + yield* electronApp.preferredSystemLanguages, + SUPPORTED_LOCALES, + DEFAULT_LOCALE, + ); + requestedLocale = locale; + if (locale === activeLocale) return; + const catalog = yield* Effect.promise(() => loadCatalog(locale)); + // A later call may have asked for another language while this catalog loaded. + if (requestedLocale !== locale) return; + activeLocale = locale; + activeCatalog = catalog; + for (const listener of listeners) listener(); +}); diff --git a/apps/desktop/src/i18n/translations/de.json b/apps/desktop/src/i18n/translations/de.json new file mode 100644 index 0000000000000..bd128da18cd16 --- /dev/null +++ b/apps/desktop/src/i18n/translations/de.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code konnte nicht gestartet werden", + "45e444e807bececb": "Dieses T3-Home ist nicht verfügbar", + "97665653aa9129ad": "Nach einer neueren Version wird gesucht…", + "dce25e68e60eb512": "Version {version} ist verfügbar. Sie enthält möglicherweise eine Korrektur.", + "2f015e6d5459dce9": "Auf {version} aktualisieren", + "ca9838012a0eb084": "{version} wird heruntergeladen. T3 Code startet neu, wenn der Download fertig ist.", + "c38cbed9acc5b0d1": "{version} wird heruntergeladen ({percent} %). T3 Code startet neu, wenn der Download fertig ist.", + "4b4cf6843a4e0aba": "Version {version} lief auf diesem Computer korrekt. Lade sie herunter und installiere sie, um zurückzuwechseln.", + "b57c6134d74c0848": "{version} herunterladen", + "1eeed583c2254507": "Hol dir eine andere Version von der Release-Seite.", + "4cd5b64eeb26e1ee": "Releases öffnen", + "7e21da2485a8e0bb": "Die verwaltete Richtlinie deiner Organisation hat den Start von T3 Code verhindert. Sende die folgenden Details an deinen IT-Administrator.", + "55a19ca527948aaa": "T3 Code konnte nicht starten", + "4825d2a18a5fc093": "Details kopieren", + "3874c9f538653a6d": "Beenden", + "0eec8b51246f5e2c": "Der Server hat keine Ausgabe geschrieben.", + "6cb1b68bddf39b35": "Version {version}. T3 Code versucht es im Hintergrund erneut. Logs: {logDir}", + "895f988b9de16f88": "Das WSL-Backend ist weiterhin nicht verfügbar", + "eeb7ea62dc4706c1": "T3 Code verwendet für diesen Start das Windows-Backend und versucht es beim nächsten App-Start erneut mit WSL.", + "b5435aa5b470bafd": "Das WSL-Backend konnte nicht starten", + "d82d7c96e1904629": "Es wird auf das Windows-Backend ausgewichen, damit T3 Code sich öffnen kann. Aktiviere das WSL-Backend unter Einstellungen > Freigabe & Zugriff wieder, sobald die WSL-Distribution repariert ist.", + "a4acf18834787a4f": "Ein anderer T3-Code-Server, etwa der Hintergrunddienst, verwendet dieses Datenverzeichnis, oder ein älterer Hintergrunddienst ist dafür eingerichtet. Stoppe diesen Server oder versuche `t3 update`. Wenn der ältere Launcher sich nicht aktualisieren kann, führe `t3 service uninstall` aus und installiere ihn optional mit `t3 service install` aus einer aktuellen CLI neu. Verwende `npx t3@latest`, wenn `t3` fehlt oder veraltet ist, und übergib jedem Befehl `--base-dir` mit dem T3-Home des Dienstes. Öffne T3 Code dann erneut. Du kannst auch ein separates T3CODE_HOME setzen und mit dem laufenden Server koppeln.", + "0e306130a55a3954": "Der T3-Code-Hintergrunddienst verwendet dieses T3-Home (PID {pid}, Port {port}, Version {version}). Stoppe ihn mit `t3 service uninstall` und übergib dabei `--base-dir` mit diesem T3-Home, und öffne T3 Code dann erneut. Du kannst auch ein separates T3CODE_HOME setzen und mit dem laufenden Server koppeln.", + "7379a43c1ac009d2": "Der T3-Code-Hintergrunddienst verwendet dieses T3-Home (PID {pid}, Port {port}). Stoppe ihn mit `t3 service uninstall` und übergib dabei `--base-dir` mit diesem T3-Home, und öffne T3 Code dann erneut. Du kannst auch ein separates T3CODE_HOME setzen und mit dem laufenden Server koppeln.", + "1510c6547cde9c2e": "Ein anderer T3-Code-Server (zum Beispiel `t3 serve` oder einer, der über SSH gestartet wurde) verwendet dieses T3-Home (PID {pid}, Port {port}, Version {version}). Wenn eine T3-Code-App auf einem anderen Rechner ihn über SSH gestartet hat, startet diese App ihn neu: Entferne oder trenne dort diese SSH-Umgebung oder beende diese App. Stoppe dann den Server und öffne T3 Code erneut. Du kannst auch ein separates T3CODE_HOME setzen und mit dem laufenden Server koppeln.", + "8d8628520de0d9f1": "Ein anderer T3-Code-Server (zum Beispiel `t3 serve` oder einer, der über SSH gestartet wurde) verwendet dieses T3-Home (PID {pid}, Port {port}). Wenn eine T3-Code-App auf einem anderen Rechner ihn über SSH gestartet hat, startet diese App ihn neu: Entferne oder trenne dort diese SSH-Umgebung oder beende diese App. Stoppe dann den Server und öffne T3 Code erneut. Du kannst auch ein separates T3CODE_HOME setzen und mit dem laufenden Server koppeln.", + "6574442caf8bfd15": "Bildschirmaufnahme einrichten", + "a8210440c691b062": "Bedienungshilfen einrichten", + "0cbbbd8abd25f9d4": "Festplattenvollzugriff einrichten", + "4cd679200c978949": "Berechtigungshilfe schließen", + "ea4f056c8f6b5c15": "↑ Ziehe T3 Code in die Liste oben", + "4bcb0f4db00936b1": "Ziehe T3 Code in die Systemeinstellungen oder klicke, um es im Finder anzuzeigen", + "278648c9ff6fb9ce": "Keine vertrauenswürdige Stelle hat dieses Zertifikat ausgestellt.", + "cf346dcfb658d4d3": "Dieses Zertifikat gilt nicht für diese Adresse.", + "20665d9b0c7c3e52": "Dieses Zertifikat ist abgelaufen oder noch nicht gültig.", + "565970a378986341": "Öffnen", + "00ad8aeed0a6c461": "Abbrechen", + "2107cc3e7c4ac833": "Diesen {protocol}-Link öffnen?", + "050db36de6624203": "Eine Seite im Browser möchte eine andere Anwendung öffnen:\n\n{url}", + "c1d7515ac0214ca1": "Vertrauen und merken", + "e89b5b30b1bc99bb": "{host} hat ein nicht vertrauenswürdiges Zertifikat", + "16d4c8a1431bd8c2": "Ausgestellt für: {name}", + "5862c92e2dabefab": "Ausgestellt von: {name}", + "cf559f06dc2e5432": "Gültig: {start} – {end}", + "86fe6451f52e722a": "Fingerabdruck: {fingerprint}", + "7b20c92539acb4b6": "Vertraue ihm nur, wenn du weißt, dass dieses Zertifikat zur Website gehört. Beim Löschen der Cookies dieses Browserprofils wird es vergessen.", + "c67ec08c2c8d0cd9": "Dem Zertifikat für {host} konnte nicht vertraut werden", + "935a340963533dcf": "T3 Code konnte diese Genehmigung nicht speichern, daher bleibt die Seite blockiert. Prüfe, ob die Festplatte voll ist und ob ihr Datenordner beschreibbar ist, und versuche es dann erneut.", + "a0315d43e8e5be7e": "Erlauben", + "2ec823ca24387055": "Blockieren", + "8fc0b116123fb50b": "{origin} möchte in die Zwischenablage kopierte Texte und Bilder sehen", + "c0f756221736393f": "Vorschau · {title}", + "6994444f4fec4070": "Browservorschau", + "49de6209699eb616": "Unbenannter Passkey", + "b4a5bb1075d95154": "Passkey auswählen", + "1f12213f4d809e89": "Du bist auf dem neuesten Stand!", + "c6399b55619e2f67": "T3 Code {version} ist derzeit die neueste verfügbare Version.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Update verfügbar", + "d3104b65052b993b": "Eine neue Version von T3 Code ist verfügbar.", + "35fff5a1cd1d6473": "T3 Code {version} ist verfügbar.", + "63fbea040532a9ab": "Du verwendest T3 Code {version}.", + "374b1cb8cb616d27": "Herunterladen", + "b0d022fe9d78def7": "Später", + "b9a0301ee1348da9": "Update wird heruntergeladen", + "bbaf6039d665a7a7": "Eine neue Version von T3 Code wird bereits heruntergeladen.", + "27b49ef7007c126d": "T3 Code {version} wird bereits heruntergeladen.", + "bd6818c7f005654c": "Update bereit", + "e0e13c85665bd62f": "Eine neue Version von T3 Code ist bereit zur Installation.", + "dfe6e415877b0533": "T3 Code {version} ist bereit zur Installation.", + "d1d10979d6dcb162": "T3 Code startet zur Installation neu. Laufende Aufgaben werden unterbrochen.", + "2f0a8211a72e29aa": "Neu starten", + "116a21f6cc215e5f": "Suche nach Updates fehlgeschlagen", + "32c88cd9421abf33": "Es konnte nicht nach Updates gesucht werden.", + "b37aca07d3c644d9": "Ein unbekannter Fehler ist aufgetreten. Bitte versuche es später erneut.", + "c8c23435e780a60c": "Updates nicht verfügbar", + "aecf7c98b81bef7a": "Automatische Updates sind derzeit nicht verfügbar.", + "835247f842c92bc9": "Über {appName}", + "959e09151d75e25b": "Nach Updates suchen...", + "0c753e71e2dca0d0": "Einstellungen...", + "a9fad846cd549d96": "{appName} ausblenden", + "4b375f39bfce229e": "{appName} beenden", + "83506e64878b7b48": "Datei", + "b1f24efbd4e80225": "Entwicklertools schließen", + "2c85ee66be8b81b5": "Fenster schließen", + "31bfa0ca146dc77f": "Bearbeiten", + "ebf150404ed417d5": "Als Text einfügen", + "660715835d05ddca": "Sprachausgabe", + "25994350fd047a38": "Ansicht", + "573a9e6b17f4e9e3": "Neu laden", + "826cb3059ebc7cc3": "Neu laden erzwingen", + "8340487d05e832e8": "Entwicklertools ein-/ausblenden", + "a7ab66e786347118": "Originalgröße", + "a4ad1b27fdc9032d": "Vergrößern", + "df6ed2014f1737a8": "Verkleinern", + "953979a4737f48fa": "Keine Vorschläge", + "202e13f15a3dcd30": "Link kopieren", + "8af79268f2349f4c": "E-Mail-Adresse kopieren", + "a9f9254d458e49fe": "Bild kopieren", + "9c1b20fbc881de5d": "Desktop-Konfiguration", + "1b14230874f19eb9": "Bilder" +} diff --git a/apps/desktop/src/i18n/translations/en.json b/apps/desktop/src/i18n/translations/en.json new file mode 100644 index 0000000000000..ad77a1a07a9a3 --- /dev/null +++ b/apps/desktop/src/i18n/translations/en.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code failed to start", + "45e444e807bececb": "This T3 home is unavailable", + "97665653aa9129ad": "Checking for a newer version…", + "dce25e68e60eb512": "Version {version} is available. It can contain a fix.", + "2f015e6d5459dce9": "Update to {version}", + "ca9838012a0eb084": "Downloading {version}. T3 Code restarts when the download is done.", + "c38cbed9acc5b0d1": "Downloading {version} ({percent}%). T3 Code restarts when the download is done.", + "4b4cf6843a4e0aba": "Version {version} started correctly on this computer. Download it and install it to go back.", + "b57c6134d74c0848": "Download {version}", + "1eeed583c2254507": "Get a different version from the releases page.", + "4cd5b64eeb26e1ee": "Open releases", + "7e21da2485a8e0bb": "Your organization's managed policy stopped T3 Code from starting. Send the details below to your IT administrator.", + "55a19ca527948aaa": "T3 Code could not start", + "4825d2a18a5fc093": "Copy details", + "3874c9f538653a6d": "Quit", + "0eec8b51246f5e2c": "The server wrote no output.", + "6cb1b68bddf39b35": "Version {version}. T3 Code tries again in the background. Logs: {logDir}", + "895f988b9de16f88": "WSL backend is still unavailable", + "eeb7ea62dc4706c1": "T3 Code will use the Windows backend for this launch and retry WSL the next time the app starts.", + "b5435aa5b470bafd": "WSL backend couldn't start", + "d82d7c96e1904629": "Falling back to the Windows backend so T3 Code can open. Re-enable the WSL backend from Settings > Sharing & access once the WSL distro is fixed.", + "a4acf18834787a4f": "Another T3 Code server, such as the background service, is using this data directory, or an older background service is set up for it. Stop that server or try `t3 update`. If the older launcher cannot update, run `t3 service uninstall` and optionally reinstall with `t3 service install` from a current CLI. Use `npx t3@latest` if `t3` is missing or outdated, and pass `--base-dir` with the service's T3 home to each command. Then reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + "0e306130a55a3954": "The T3 Code background service is using this T3 home (PID {pid}, port {port}, version {version}). Stop it with `t3 service uninstall`, passing `--base-dir` with this T3 home, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + "7379a43c1ac009d2": "The T3 Code background service is using this T3 home (PID {pid}, port {port}). Stop it with `t3 service uninstall`, passing `--base-dir` with this T3 home, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + "1510c6547cde9c2e": "Another T3 Code server (for example `t3 serve`, or one started over SSH) is using this T3 home (PID {pid}, port {port}, version {version}). If a T3 Code app on another machine started it over SSH, that app restarts it: remove or disconnect that SSH environment there, or quit that app. Then stop the server, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + "8d8628520de0d9f1": "Another T3 Code server (for example `t3 serve`, or one started over SSH) is using this T3 home (PID {pid}, port {port}). If a T3 Code app on another machine started it over SSH, that app restarts it: remove or disconnect that SSH environment there, or quit that app. Then stop the server, and reopen T3 Code. You can also set a separate T3CODE_HOME and pair with the running server.", + "6574442caf8bfd15": "Set up Screen Recording", + "a8210440c691b062": "Set up Accessibility", + "0cbbbd8abd25f9d4": "Set up Full Disk Access", + "4cd679200c978949": "Close permission helper", + "ea4f056c8f6b5c15": "↑ Drag T3 Code into the list above", + "4bcb0f4db00936b1": "Drag T3 Code to System Settings, or click to reveal in Finder", + "278648c9ff6fb9ce": "No trusted authority issued this certificate.", + "cf346dcfb658d4d3": "This certificate is not for this address.", + "20665d9b0c7c3e52": "This certificate has expired or is not valid yet.", + "565970a378986341": "Open", + "00ad8aeed0a6c461": "Cancel", + "2107cc3e7c4ac833": "Open this {protocol} link?", + "050db36de6624203": "A page in the browser wants to open another application:\n\n{url}", + "c1d7515ac0214ca1": "Trust and Remember", + "e89b5b30b1bc99bb": "{host} has an untrusted certificate", + "16d4c8a1431bd8c2": "Issued to: {name}", + "5862c92e2dabefab": "Issued by: {name}", + "cf559f06dc2e5432": "Valid: {start} – {end}", + "86fe6451f52e722a": "Fingerprint: {fingerprint}", + "7b20c92539acb4b6": "Trust it only if you know this certificate belongs to the site. Clearing this browser profile's cookies forgets it.", + "c67ec08c2c8d0cd9": "Could not trust the certificate for {host}", + "935a340963533dcf": "T3 Code could not save this approval, so the page stays blocked. Check that the disk is not full and its data folder is writable, then try again.", + "a0315d43e8e5be7e": "Allow", + "2ec823ca24387055": "Block", + "8fc0b116123fb50b": "{origin} wants to see text and images copied to the clipboard", + "c0f756221736393f": "Preview · {title}", + "6994444f4fec4070": "Browser preview", + "49de6209699eb616": "Unnamed passkey", + "b4a5bb1075d95154": "Choose a passkey", + "1f12213f4d809e89": "You're up to date!", + "c6399b55619e2f67": "T3 Code {version} is currently the newest version available.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Update available", + "d3104b65052b993b": "A new version of T3 Code is available.", + "35fff5a1cd1d6473": "T3 Code {version} is available.", + "63fbea040532a9ab": "You're running T3 Code {version}.", + "374b1cb8cb616d27": "Download", + "b0d022fe9d78def7": "Later", + "b9a0301ee1348da9": "Update downloading", + "bbaf6039d665a7a7": "A new version of T3 Code is already downloading.", + "27b49ef7007c126d": "T3 Code {version} is already downloading.", + "bd6818c7f005654c": "Update ready", + "e0e13c85665bd62f": "A new version of T3 Code is ready to install.", + "dfe6e415877b0533": "T3 Code {version} is ready to install.", + "d1d10979d6dcb162": "T3 Code will restart to install it. Any running tasks will be interrupted.", + "2f0a8211a72e29aa": "Restart", + "116a21f6cc215e5f": "Update check failed", + "32c88cd9421abf33": "Could not check for updates.", + "b37aca07d3c644d9": "An unknown error occurred. Please try again later.", + "c8c23435e780a60c": "Updates unavailable", + "aecf7c98b81bef7a": "Automatic updates are not available right now.", + "835247f842c92bc9": "About {appName}", + "959e09151d75e25b": "Check for Updates...", + "0c753e71e2dca0d0": "Settings...", + "a9fad846cd549d96": "Hide {appName}", + "4b375f39bfce229e": "Quit {appName}", + "83506e64878b7b48": "File", + "b1f24efbd4e80225": "Close Developer Tools", + "2c85ee66be8b81b5": "Close Window", + "31bfa0ca146dc77f": "Edit", + "ebf150404ed417d5": "Paste as Text", + "660715835d05ddca": "Speech", + "25994350fd047a38": "View", + "573a9e6b17f4e9e3": "Reload", + "826cb3059ebc7cc3": "Force Reload", + "8340487d05e832e8": "Toggle Developer Tools", + "a7ab66e786347118": "Actual Size", + "a4ad1b27fdc9032d": "Zoom In", + "df6ed2014f1737a8": "Zoom Out", + "953979a4737f48fa": "No suggestions", + "202e13f15a3dcd30": "Copy Link", + "8af79268f2349f4c": "Copy Email Address", + "a9f9254d458e49fe": "Copy Image", + "9c1b20fbc881de5d": "Desktop config", + "1b14230874f19eb9": "Images" +} diff --git a/apps/desktop/src/i18n/translations/es.json b/apps/desktop/src/i18n/translations/es.json new file mode 100644 index 0000000000000..0b3243ebe918b --- /dev/null +++ b/apps/desktop/src/i18n/translations/es.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code no pudo iniciarse", + "45e444e807bececb": "Este directorio de T3 no está disponible", + "97665653aa9129ad": "Buscando una versión más reciente…", + "dce25e68e60eb512": "La versión {version} está disponible. Puede incluir una corrección.", + "2f015e6d5459dce9": "Actualizar a {version}", + "ca9838012a0eb084": "Descargando {version}. T3 Code se reiniciará cuando termine la descarga.", + "c38cbed9acc5b0d1": "Descargando {version} ({percent} %). T3 Code se reiniciará cuando termine la descarga.", + "4b4cf6843a4e0aba": "La versión {version} se inició correctamente en este ordenador. Descárgala e instálala para volver a ella.", + "b57c6134d74c0848": "Descargar {version}", + "1eeed583c2254507": "Consigue otra versión en la página de versiones.", + "4cd5b64eeb26e1ee": "Abrir versiones", + "7e21da2485a8e0bb": "La política gestionada de tu organización impidió que T3 Code se iniciara. Envía los detalles de abajo a tu administrador de TI.", + "55a19ca527948aaa": "T3 Code no pudo iniciarse", + "4825d2a18a5fc093": "Copiar detalles", + "3874c9f538653a6d": "Salir", + "0eec8b51246f5e2c": "El servidor no escribió ninguna salida.", + "6cb1b68bddf39b35": "Versión {version}. T3 Code lo vuelve a intentar en segundo plano. Registros: {logDir}", + "895f988b9de16f88": "El backend de WSL sigue sin estar disponible", + "eeb7ea62dc4706c1": "T3 Code usará el backend de Windows en este inicio y volverá a intentar WSL la próxima vez que se abra la app.", + "b5435aa5b470bafd": "No se pudo iniciar el backend de WSL", + "d82d7c96e1904629": "Se usa el backend de Windows para que T3 Code pueda abrirse. Vuelve a activar el backend de WSL en Ajustes > Compartir y acceso cuando la distro de WSL esté arreglada.", + "a4acf18834787a4f": "Otro servidor de T3 Code, como el servicio en segundo plano, está usando este directorio de datos, o hay configurado un servicio en segundo plano antiguo para él. Detén ese servidor o prueba `t3 update`. Si el lanzador antiguo no puede actualizarse, ejecuta `t3 service uninstall` y, si quieres, reinstálalo con `t3 service install` desde una CLI actual. Usa `npx t3@latest` si falta `t3` o está desactualizado, y pasa `--base-dir` con el directorio de T3 del servicio a cada comando. Después vuelve a abrir T3 Code. También puedes definir otro T3CODE_HOME y emparejarte con el servidor en ejecución.", + "0e306130a55a3954": "El servicio en segundo plano de T3 Code está usando este directorio de T3 (PID {pid}, puerto {port}, versión {version}). Detenlo con `t3 service uninstall`, pasando `--base-dir` con este directorio de T3, y vuelve a abrir T3 Code. También puedes definir otro T3CODE_HOME y emparejarte con el servidor en ejecución.", + "7379a43c1ac009d2": "El servicio en segundo plano de T3 Code está usando este directorio de T3 (PID {pid}, puerto {port}). Detenlo con `t3 service uninstall`, pasando `--base-dir` con este directorio de T3, y vuelve a abrir T3 Code. También puedes definir otro T3CODE_HOME y emparejarte con el servidor en ejecución.", + "1510c6547cde9c2e": "Otro servidor de T3 Code (por ejemplo, `t3 serve` o uno iniciado por SSH) está usando este directorio de T3 (PID {pid}, puerto {port}, versión {version}). Si lo inició por SSH una app de T3 Code en otra máquina, esa app lo reinicia: quita o desconecta allí ese entorno SSH, o cierra esa app. Después detén el servidor y vuelve a abrir T3 Code. También puedes definir otro T3CODE_HOME y emparejarte con el servidor en ejecución.", + "8d8628520de0d9f1": "Otro servidor de T3 Code (por ejemplo, `t3 serve` o uno iniciado por SSH) está usando este directorio de T3 (PID {pid}, puerto {port}). Si lo inició por SSH una app de T3 Code en otra máquina, esa app lo reinicia: quita o desconecta allí ese entorno SSH, o cierra esa app. Después detén el servidor y vuelve a abrir T3 Code. También puedes definir otro T3CODE_HOME y emparejarte con el servidor en ejecución.", + "6574442caf8bfd15": "Configurar Grabación de pantalla", + "a8210440c691b062": "Configurar Accesibilidad", + "0cbbbd8abd25f9d4": "Configurar Acceso total al disco", + "4cd679200c978949": "Cerrar el asistente de permisos", + "ea4f056c8f6b5c15": "↑ Arrastra T3 Code a la lista de arriba", + "4bcb0f4db00936b1": "Arrastra T3 Code a Ajustes del Sistema o haz clic para mostrarlo en el Finder", + "278648c9ff6fb9ce": "Ninguna autoridad de confianza emitió este certificado.", + "cf346dcfb658d4d3": "Este certificado no es para esta dirección.", + "20665d9b0c7c3e52": "Este certificado ha caducado o aún no es válido.", + "565970a378986341": "Abrir", + "00ad8aeed0a6c461": "Cancelar", + "2107cc3e7c4ac833": "¿Abrir este enlace {protocol}?", + "050db36de6624203": "Una página del navegador quiere abrir otra aplicación:\n\n{url}", + "c1d7515ac0214ca1": "Confiar y recordar", + "e89b5b30b1bc99bb": "{host} tiene un certificado que no es de confianza", + "16d4c8a1431bd8c2": "Emitido para: {name}", + "5862c92e2dabefab": "Emitido por: {name}", + "cf559f06dc2e5432": "Válido: {start} – {end}", + "86fe6451f52e722a": "Huella digital: {fingerprint}", + "7b20c92539acb4b6": "Confía en él solo si sabes que este certificado pertenece al sitio. Al borrar las cookies de este perfil del navegador se olvida.", + "c67ec08c2c8d0cd9": "No se pudo confiar en el certificado de {host}", + "935a340963533dcf": "T3 Code no pudo guardar esta aprobación, así que la página sigue bloqueada. Comprueba que el disco no está lleno y que se puede escribir en su carpeta de datos y vuelve a intentarlo.", + "a0315d43e8e5be7e": "Permitir", + "2ec823ca24387055": "Bloquear", + "8fc0b116123fb50b": "{origin} quiere ver el texto y las imágenes copiados al portapapeles", + "c0f756221736393f": "Vista previa · {title}", + "6994444f4fec4070": "Vista previa del navegador", + "49de6209699eb616": "Llave de acceso sin nombre", + "b4a5bb1075d95154": "Elige una llave de acceso", + "1f12213f4d809e89": "¡Estás al día!", + "c6399b55619e2f67": "T3 Code {version} es la versión más reciente disponible.", + "b6e5b31255e011c5": "Aceptar", + "2ee2077700686fbb": "Actualización disponible", + "d3104b65052b993b": "Hay una nueva versión de T3 Code disponible.", + "35fff5a1cd1d6473": "T3 Code {version} está disponible.", + "63fbea040532a9ab": "Estás usando T3 Code {version}.", + "374b1cb8cb616d27": "Descargar", + "b0d022fe9d78def7": "Más tarde", + "b9a0301ee1348da9": "Descargando actualización", + "bbaf6039d665a7a7": "Ya se está descargando una nueva versión de T3 Code.", + "27b49ef7007c126d": "Ya se está descargando T3 Code {version}.", + "bd6818c7f005654c": "Actualización lista", + "e0e13c85665bd62f": "Una nueva versión de T3 Code está lista para instalarse.", + "dfe6e415877b0533": "T3 Code {version} está listo para instalarse.", + "d1d10979d6dcb162": "T3 Code se reiniciará para instalarla. Las tareas en ejecución se interrumpirán.", + "2f0a8211a72e29aa": "Reiniciar", + "116a21f6cc215e5f": "Error al buscar actualizaciones", + "32c88cd9421abf33": "No se pudo buscar actualizaciones.", + "b37aca07d3c644d9": "Se produjo un error desconocido. Vuelve a intentarlo más tarde.", + "c8c23435e780a60c": "Actualizaciones no disponibles", + "aecf7c98b81bef7a": "Las actualizaciones automáticas no están disponibles ahora mismo.", + "835247f842c92bc9": "Acerca de {appName}", + "959e09151d75e25b": "Buscar actualizaciones...", + "0c753e71e2dca0d0": "Ajustes...", + "a9fad846cd549d96": "Ocultar {appName}", + "4b375f39bfce229e": "Salir de {appName}", + "83506e64878b7b48": "Archivo", + "b1f24efbd4e80225": "Cerrar las herramientas de desarrollo", + "2c85ee66be8b81b5": "Cerrar ventana", + "31bfa0ca146dc77f": "Edición", + "ebf150404ed417d5": "Pegar como texto", + "660715835d05ddca": "Voz", + "25994350fd047a38": "Ver", + "573a9e6b17f4e9e3": "Recargar", + "826cb3059ebc7cc3": "Forzar recarga", + "8340487d05e832e8": "Mostrar u ocultar las herramientas de desarrollo", + "a7ab66e786347118": "Tamaño real", + "a4ad1b27fdc9032d": "Acercar", + "df6ed2014f1737a8": "Alejar", + "953979a4737f48fa": "Sin sugerencias", + "202e13f15a3dcd30": "Copiar enlace", + "8af79268f2349f4c": "Copiar dirección de correo", + "a9f9254d458e49fe": "Copiar imagen", + "9c1b20fbc881de5d": "Configuración de escritorio", + "1b14230874f19eb9": "Imágenes" +} diff --git a/apps/desktop/src/i18n/translations/fr.json b/apps/desktop/src/i18n/translations/fr.json new file mode 100644 index 0000000000000..a0dcf1bd13ac3 --- /dev/null +++ b/apps/desktop/src/i18n/translations/fr.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "Échec du démarrage de T3 Code", + "45e444e807bececb": "Ce home T3 n’est pas disponible", + "97665653aa9129ad": "Recherche d’une version plus récente…", + "dce25e68e60eb512": "La version {version} est disponible. Elle peut contenir un correctif.", + "2f015e6d5459dce9": "Mettre à jour vers {version}", + "ca9838012a0eb084": "Téléchargement de {version}. T3 Code redémarrera une fois le téléchargement terminé.", + "c38cbed9acc5b0d1": "Téléchargement de {version} ({percent} %). T3 Code redémarrera une fois le téléchargement terminé.", + "4b4cf6843a4e0aba": "La version {version} a démarré correctement sur cet ordinateur. Téléchargez-la et installez-la pour y revenir.", + "b57c6134d74c0848": "Télécharger {version}", + "1eeed583c2254507": "Obtenez une autre version depuis la page des versions.", + "4cd5b64eeb26e1ee": "Ouvrir les versions", + "7e21da2485a8e0bb": "La politique gérée de votre organisation a empêché T3 Code de démarrer. Envoyez les détails ci-dessous à votre administrateur informatique.", + "55a19ca527948aaa": "T3 Code n’a pas pu démarrer", + "4825d2a18a5fc093": "Copier les détails", + "3874c9f538653a6d": "Quitter", + "0eec8b51246f5e2c": "Le serveur n’a écrit aucune sortie.", + "6cb1b68bddf39b35": "Version {version}. T3 Code réessaie en arrière-plan. Journaux : {logDir}", + "895f988b9de16f88": "Le backend WSL est toujours indisponible", + "eeb7ea62dc4706c1": "T3 Code utilisera le backend Windows pour ce lancement et réessaiera WSL au prochain démarrage de l’app.", + "b5435aa5b470bafd": "Le backend WSL n’a pas pu démarrer", + "d82d7c96e1904629": "Retour au backend Windows pour que T3 Code puisse s’ouvrir. Réactivez le backend WSL depuis Paramètres > Partage et accès une fois la distribution WSL réparée.", + "a4acf18834787a4f": "Un autre serveur T3 Code, comme le service en arrière-plan, utilise ce répertoire de données, ou un ancien service en arrière-plan est configuré pour lui. Arrêtez ce serveur ou essayez `t3 update`. Si l’ancien lanceur ne peut pas se mettre à jour, exécutez `t3 service uninstall` puis, si besoin, réinstallez avec `t3 service install` depuis une CLI à jour. Utilisez `npx t3@latest` si `t3` est absent ou obsolète, et passez `--base-dir` avec le home T3 du service à chaque commande. Rouvrez ensuite T3 Code. Vous pouvez aussi définir un T3CODE_HOME distinct et vous appairer avec le serveur en cours d’exécution.", + "0e306130a55a3954": "Le service en arrière-plan de T3 Code utilise ce home T3 (PID {pid}, port {port}, version {version}). Arrêtez-le avec `t3 service uninstall` en passant `--base-dir` avec ce home T3, puis rouvrez T3 Code. Vous pouvez aussi définir un T3CODE_HOME distinct et vous appairer avec le serveur en cours d’exécution.", + "7379a43c1ac009d2": "Le service en arrière-plan de T3 Code utilise ce home T3 (PID {pid}, port {port}). Arrêtez-le avec `t3 service uninstall` en passant `--base-dir` avec ce home T3, puis rouvrez T3 Code. Vous pouvez aussi définir un T3CODE_HOME distinct et vous appairer avec le serveur en cours d’exécution.", + "1510c6547cde9c2e": "Un autre serveur T3 Code (par exemple `t3 serve`, ou un serveur démarré via SSH) utilise ce home T3 (PID {pid}, port {port}, version {version}). Si une app T3 Code sur une autre machine l’a démarré via SSH, cette app le redémarre : supprimez ou déconnectez-y cet environnement SSH, ou quittez cette app. Arrêtez ensuite le serveur et rouvrez T3 Code. Vous pouvez aussi définir un T3CODE_HOME distinct et vous appairer avec le serveur en cours d’exécution.", + "8d8628520de0d9f1": "Un autre serveur T3 Code (par exemple `t3 serve`, ou un serveur démarré via SSH) utilise ce home T3 (PID {pid}, port {port}). Si une app T3 Code sur une autre machine l’a démarré via SSH, cette app le redémarre : supprimez ou déconnectez-y cet environnement SSH, ou quittez cette app. Arrêtez ensuite le serveur et rouvrez T3 Code. Vous pouvez aussi définir un T3CODE_HOME distinct et vous appairer avec le serveur en cours d’exécution.", + "6574442caf8bfd15": "Configurer l’enregistrement de l’écran", + "a8210440c691b062": "Configurer l’accessibilité", + "0cbbbd8abd25f9d4": "Configurer l’accès complet au disque", + "4cd679200c978949": "Fermer l’assistant d’autorisations", + "ea4f056c8f6b5c15": "↑ Faites glisser T3 Code dans la liste ci-dessus", + "4bcb0f4db00936b1": "Faites glisser T3 Code vers Réglages Système, ou cliquez pour l’afficher dans le Finder", + "278648c9ff6fb9ce": "Aucune autorité de confiance n’a émis ce certificat.", + "cf346dcfb658d4d3": "Ce certificat ne correspond pas à cette adresse.", + "20665d9b0c7c3e52": "Ce certificat a expiré ou n’est pas encore valide.", + "565970a378986341": "Ouvrir", + "00ad8aeed0a6c461": "Annuler", + "2107cc3e7c4ac833": "Ouvrir ce lien {protocol} ?", + "050db36de6624203": "Une page du navigateur veut ouvrir une autre application :\n\n{url}", + "c1d7515ac0214ca1": "Faire confiance et mémoriser", + "e89b5b30b1bc99bb": "{host} a un certificat non fiable", + "16d4c8a1431bd8c2": "Délivré à : {name}", + "5862c92e2dabefab": "Délivré par : {name}", + "cf559f06dc2e5432": "Valide : {start} – {end}", + "86fe6451f52e722a": "Empreinte : {fingerprint}", + "7b20c92539acb4b6": "Faites-lui confiance uniquement si vous savez que ce certificat appartient au site. Effacer les cookies de ce profil de navigateur l’oublie.", + "c67ec08c2c8d0cd9": "Impossible de faire confiance au certificat de {host}", + "935a340963533dcf": "T3 Code n’a pas pu enregistrer cette approbation, la page reste donc bloquée. Vérifiez que le disque n’est pas plein et que son dossier de données est accessible en écriture, puis réessayez.", + "a0315d43e8e5be7e": "Autoriser", + "2ec823ca24387055": "Bloquer", + "8fc0b116123fb50b": "{origin} veut voir le texte et les images copiés dans le presse-papiers", + "c0f756221736393f": "Aperçu · {title}", + "6994444f4fec4070": "Aperçu du navigateur", + "49de6209699eb616": "Clé d’accès sans nom", + "b4a5bb1075d95154": "Choisir une clé d’accès", + "1f12213f4d809e89": "Vous êtes à jour !", + "c6399b55619e2f67": "T3 Code {version} est actuellement la version la plus récente.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Mise à jour disponible", + "d3104b65052b993b": "Une nouvelle version de T3 Code est disponible.", + "35fff5a1cd1d6473": "T3 Code {version} est disponible.", + "63fbea040532a9ab": "Vous utilisez T3 Code {version}.", + "374b1cb8cb616d27": "Télécharger", + "b0d022fe9d78def7": "Plus tard", + "b9a0301ee1348da9": "Téléchargement de la mise à jour", + "bbaf6039d665a7a7": "Une nouvelle version de T3 Code est déjà en cours de téléchargement.", + "27b49ef7007c126d": "T3 Code {version} est déjà en cours de téléchargement.", + "bd6818c7f005654c": "Mise à jour prête", + "e0e13c85665bd62f": "Une nouvelle version de T3 Code est prête à être installée.", + "dfe6e415877b0533": "T3 Code {version} est prêt à être installé.", + "d1d10979d6dcb162": "T3 Code va redémarrer pour l’installer. Les tâches en cours seront interrompues.", + "2f0a8211a72e29aa": "Redémarrer", + "116a21f6cc215e5f": "Échec de la recherche de mises à jour", + "32c88cd9421abf33": "Impossible de rechercher des mises à jour.", + "b37aca07d3c644d9": "Une erreur inconnue s’est produite. Veuillez réessayer plus tard.", + "c8c23435e780a60c": "Mises à jour indisponibles", + "aecf7c98b81bef7a": "Les mises à jour automatiques ne sont pas disponibles pour le moment.", + "835247f842c92bc9": "À propos de {appName}", + "959e09151d75e25b": "Rechercher des mises à jour...", + "0c753e71e2dca0d0": "Paramètres...", + "a9fad846cd549d96": "Masquer {appName}", + "4b375f39bfce229e": "Quitter {appName}", + "83506e64878b7b48": "Fichier", + "b1f24efbd4e80225": "Fermer les outils de développement", + "2c85ee66be8b81b5": "Fermer la fenêtre", + "31bfa0ca146dc77f": "Édition", + "ebf150404ed417d5": "Coller en texte brut", + "660715835d05ddca": "Parole", + "25994350fd047a38": "Présentation", + "573a9e6b17f4e9e3": "Recharger", + "826cb3059ebc7cc3": "Forcer le rechargement", + "8340487d05e832e8": "Afficher/masquer les outils de développement", + "a7ab66e786347118": "Taille réelle", + "a4ad1b27fdc9032d": "Zoom avant", + "df6ed2014f1737a8": "Zoom arrière", + "953979a4737f48fa": "Aucune suggestion", + "202e13f15a3dcd30": "Copier le lien", + "8af79268f2349f4c": "Copier l’adresse e-mail", + "a9f9254d458e49fe": "Copier l’image", + "9c1b20fbc881de5d": "Configuration du bureau", + "1b14230874f19eb9": "Images" +} diff --git a/apps/desktop/src/i18n/translations/ja.json b/apps/desktop/src/i18n/translations/ja.json new file mode 100644 index 0000000000000..93553bbf1a743 --- /dev/null +++ b/apps/desktop/src/i18n/translations/ja.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code の起動に失敗しました", + "45e444e807bececb": "この T3 ホームは利用できません", + "97665653aa9129ad": "新しいバージョンを確認しています…", + "dce25e68e60eb512": "バージョン {version} を利用できます。修正が含まれている可能性があります。", + "2f015e6d5459dce9": "{version} に更新", + "ca9838012a0eb084": "{version} をダウンロードしています。ダウンロードが完了すると T3 Code が再起動します。", + "c38cbed9acc5b0d1": "{version} をダウンロードしています ({percent}%)。ダウンロードが完了すると T3 Code が再起動します。", + "4b4cf6843a4e0aba": "バージョン {version} はこのコンピューターで正常に起動しました。元に戻すには、ダウンロードしてインストールしてください。", + "b57c6134d74c0848": "{version} をダウンロード", + "1eeed583c2254507": "リリースページから別のバージョンを入手してください。", + "4cd5b64eeb26e1ee": "リリースを開く", + "7e21da2485a8e0bb": "組織の管理ポリシーにより T3 Code の起動が停止されました。以下の詳細を IT 管理者に送ってください。", + "55a19ca527948aaa": "T3 Code を起動できませんでした", + "4825d2a18a5fc093": "詳細をコピー", + "3874c9f538653a6d": "終了", + "0eec8b51246f5e2c": "サーバーは何も出力しませんでした。", + "6cb1b68bddf39b35": "バージョン {version}。T3 Code はバックグラウンドで再試行します。ログ: {logDir}", + "895f988b9de16f88": "WSL バックエンドはまだ利用できません", + "eeb7ea62dc4706c1": "今回の起動では Windows バックエンドを使用し、次回アプリの起動時に WSL を再試行します。", + "b5435aa5b470bafd": "WSL バックエンドを起動できませんでした", + "d82d7c96e1904629": "T3 Code を開けるように Windows バックエンドに切り替えます。WSL ディストリビューションを修正したら、設定 > 共有とアクセスで WSL バックエンドを再度有効にしてください。", + "a4acf18834787a4f": "バックグラウンドサービスなどの別の T3 Code サーバーがこのデータディレクトリを使用しているか、古いバックグラウンドサービスがこのディレクトリ用に設定されています。そのサーバーを停止するか、`t3 update` を試してください。古いランチャーが更新できない場合は、`t3 service uninstall` を実行し、必要に応じて最新の CLI から `t3 service install` で再インストールしてください。`t3` がない、または古い場合は `npx t3@latest` を使い、各コマンドにサービスの T3 ホームを指定した `--base-dir` を渡してください。その後、T3 Code を開き直してください。別の T3CODE_HOME を設定して、実行中のサーバーとペアリングすることもできます。", + "0e306130a55a3954": "T3 Code のバックグラウンドサービスがこの T3 ホームを使用しています (PID {pid}、ポート {port}、バージョン {version})。この T3 ホームを指定した `--base-dir` を付けて `t3 service uninstall` で停止し、T3 Code を開き直してください。別の T3CODE_HOME を設定して、実行中のサーバーとペアリングすることもできます。", + "7379a43c1ac009d2": "T3 Code のバックグラウンドサービスがこの T3 ホームを使用しています (PID {pid}、ポート {port})。この T3 ホームを指定した `--base-dir` を付けて `t3 service uninstall` で停止し、T3 Code を開き直してください。別の T3CODE_HOME を設定して、実行中のサーバーとペアリングすることもできます。", + "1510c6547cde9c2e": "別の T3 Code サーバー (`t3 serve` や SSH 経由で起動したものなど) がこの T3 ホームを使用しています (PID {pid}、ポート {port}、バージョン {version})。別のマシンの T3 Code アプリが SSH 経由で起動した場合、そのアプリが再起動します。そのアプリで SSH 環境を削除するか切断するか、アプリを終了してください。その後サーバーを停止し、T3 Code を開き直してください。別の T3CODE_HOME を設定して、実行中のサーバーとペアリングすることもできます。", + "8d8628520de0d9f1": "別の T3 Code サーバー (`t3 serve` や SSH 経由で起動したものなど) がこの T3 ホームを使用しています (PID {pid}、ポート {port})。別のマシンの T3 Code アプリが SSH 経由で起動した場合、そのアプリが再起動します。そのアプリで SSH 環境を削除するか切断するか、アプリを終了してください。その後サーバーを停止し、T3 Code を開き直してください。別の T3CODE_HOME を設定して、実行中のサーバーとペアリングすることもできます。", + "6574442caf8bfd15": "画面収録を設定", + "a8210440c691b062": "アクセシビリティを設定", + "0cbbbd8abd25f9d4": "フルディスクアクセスを設定", + "4cd679200c978949": "権限ヘルパーを閉じる", + "ea4f056c8f6b5c15": "↑ T3 Code を上のリストにドラッグしてください", + "4bcb0f4db00936b1": "T3 Code をシステム設定にドラッグするか、クリックして Finder で表示", + "278648c9ff6fb9ce": "この証明書は信頼された認証局によって発行されていません。", + "cf346dcfb658d4d3": "この証明書はこのアドレス用ではありません。", + "20665d9b0c7c3e52": "この証明書は期限切れか、まだ有効になっていません。", + "565970a378986341": "開く", + "00ad8aeed0a6c461": "キャンセル", + "2107cc3e7c4ac833": "この {protocol} リンクを開きますか?", + "050db36de6624203": "ブラウザー内のページが別のアプリケーションを開こうとしています:\n\n{url}", + "c1d7515ac0214ca1": "信頼して記憶", + "e89b5b30b1bc99bb": "{host} の証明書は信頼されていません", + "16d4c8a1431bd8c2": "発行先: {name}", + "5862c92e2dabefab": "発行者: {name}", + "cf559f06dc2e5432": "有効期間: {start} – {end}", + "86fe6451f52e722a": "フィンガープリント: {fingerprint}", + "7b20c92539acb4b6": "この証明書がサイトのものであると確信できる場合にのみ信頼してください。このブラウザープロファイルの Cookie を消去すると、この設定は失われます。", + "c67ec08c2c8d0cd9": "{host} の証明書を信頼できませんでした", + "935a340963533dcf": "T3 Code はこの承認を保存できなかったため、ページはブロックされたままです。ディスクがいっぱいでないこと、データフォルダーに書き込めることを確認してから、もう一度お試しください。", + "a0315d43e8e5be7e": "許可", + "2ec823ca24387055": "ブロック", + "8fc0b116123fb50b": "{origin} がクリップボードにコピーされたテキストと画像の表示を求めています", + "c0f756221736393f": "プレビュー · {title}", + "6994444f4fec4070": "ブラウザープレビュー", + "49de6209699eb616": "名前のないパスキー", + "b4a5bb1075d95154": "パスキーを選択", + "1f12213f4d809e89": "最新の状態です", + "c6399b55619e2f67": "T3 Code {version} が現在利用できる最新バージョンです。", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "更新があります", + "d3104b65052b993b": "T3 Code の新しいバージョンを利用できます。", + "35fff5a1cd1d6473": "T3 Code {version} を利用できます。", + "63fbea040532a9ab": "T3 Code {version} を実行しています。", + "374b1cb8cb616d27": "ダウンロード", + "b0d022fe9d78def7": "後で", + "b9a0301ee1348da9": "更新をダウンロード中", + "bbaf6039d665a7a7": "T3 Code の新しいバージョンはすでにダウンロード中です。", + "27b49ef7007c126d": "T3 Code {version} はすでにダウンロード中です。", + "bd6818c7f005654c": "更新の準備ができました", + "e0e13c85665bd62f": "T3 Code の新しいバージョンをインストールする準備ができました。", + "dfe6e415877b0533": "T3 Code {version} をインストールする準備ができました。", + "d1d10979d6dcb162": "インストールするために T3 Code が再起動します。実行中のタスクは中断されます。", + "2f0a8211a72e29aa": "再起動", + "116a21f6cc215e5f": "更新の確認に失敗しました", + "32c88cd9421abf33": "更新を確認できませんでした。", + "b37aca07d3c644d9": "不明なエラーが発生しました。しばらくしてからもう一度お試しください。", + "c8c23435e780a60c": "更新を利用できません", + "aecf7c98b81bef7a": "現在、自動更新は利用できません。", + "835247f842c92bc9": "{appName} について", + "959e09151d75e25b": "更新を確認...", + "0c753e71e2dca0d0": "設定...", + "a9fad846cd549d96": "{appName} を隠す", + "4b375f39bfce229e": "{appName} を終了", + "83506e64878b7b48": "ファイル", + "b1f24efbd4e80225": "開発者ツールを閉じる", + "2c85ee66be8b81b5": "ウィンドウを閉じる", + "31bfa0ca146dc77f": "編集", + "ebf150404ed417d5": "テキストとして貼り付け", + "660715835d05ddca": "スピーチ", + "25994350fd047a38": "表示", + "573a9e6b17f4e9e3": "再読み込み", + "826cb3059ebc7cc3": "強制再読み込み", + "8340487d05e832e8": "開発者ツールの切り替え", + "a7ab66e786347118": "実際のサイズ", + "a4ad1b27fdc9032d": "拡大", + "df6ed2014f1737a8": "縮小", + "953979a4737f48fa": "候補はありません", + "202e13f15a3dcd30": "リンクをコピー", + "8af79268f2349f4c": "メールアドレスをコピー", + "a9f9254d458e49fe": "画像をコピー", + "9c1b20fbc881de5d": "デスクトップの構成", + "1b14230874f19eb9": "画像" +} diff --git a/apps/desktop/src/i18n/translations/ko.json b/apps/desktop/src/i18n/translations/ko.json new file mode 100644 index 0000000000000..aac215f3a63d1 --- /dev/null +++ b/apps/desktop/src/i18n/translations/ko.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code를 시작하지 못했습니다", + "45e444e807bececb": "이 T3 홈을 사용할 수 없습니다", + "97665653aa9129ad": "새 버전을 확인하는 중…", + "dce25e68e60eb512": "버전 {version}을(를) 사용할 수 있습니다. 문제가 수정되었을 수 있습니다.", + "2f015e6d5459dce9": "{version}(으)로 업데이트", + "ca9838012a0eb084": "{version}을(를) 다운로드하는 중입니다. 다운로드가 끝나면 T3 Code가 다시 시작됩니다.", + "c38cbed9acc5b0d1": "{version}을(를) 다운로드하는 중입니다({percent}%). 다운로드가 끝나면 T3 Code가 다시 시작됩니다.", + "4b4cf6843a4e0aba": "버전 {version}은(는) 이 컴퓨터에서 정상적으로 시작되었습니다. 되돌아가려면 다운로드하여 설치하세요.", + "b57c6134d74c0848": "{version} 다운로드", + "1eeed583c2254507": "릴리스 페이지에서 다른 버전을 받으세요.", + "4cd5b64eeb26e1ee": "릴리스 열기", + "7e21da2485a8e0bb": "조직의 관리 정책 때문에 T3 Code를 시작하지 못했습니다. 아래 세부 정보를 IT 관리자에게 보내세요.", + "55a19ca527948aaa": "T3 Code를 시작할 수 없습니다", + "4825d2a18a5fc093": "세부 정보 복사", + "3874c9f538653a6d": "종료", + "0eec8b51246f5e2c": "서버가 출력을 남기지 않았습니다.", + "6cb1b68bddf39b35": "버전 {version}. T3 Code가 백그라운드에서 다시 시도합니다. 로그: {logDir}", + "895f988b9de16f88": "WSL 백엔드를 여전히 사용할 수 없습니다", + "eeb7ea62dc4706c1": "이번 실행에서는 T3 Code가 Windows 백엔드를 사용하고, 다음에 앱을 시작할 때 WSL을 다시 시도합니다.", + "b5435aa5b470bafd": "WSL 백엔드를 시작할 수 없습니다", + "d82d7c96e1904629": "T3 Code를 열 수 있도록 Windows 백엔드로 전환합니다. WSL 배포판을 고친 후 설정 > 공유 및 액세스에서 WSL 백엔드를 다시 켜세요.", + "a4acf18834787a4f": "백그라운드 서비스 같은 다른 T3 Code 서버가 이 데이터 디렉터리를 사용 중이거나, 이 디렉터리에 이전 백그라운드 서비스가 설정되어 있습니다. 해당 서버를 중지하거나 `t3 update`를 실행해 보세요. 이전 실행기를 업데이트할 수 없으면 `t3 service uninstall`을 실행하고, 필요하면 최신 CLI에서 `t3 service install`로 다시 설치하세요. `t3`이 없거나 오래되었으면 `npx t3@latest`를 사용하고, 각 명령에 서비스의 T3 홈과 함께 `--base-dir`을 전달하세요. 그런 다음 T3 Code를 다시 여세요. 별도의 T3CODE_HOME을 설정하고 실행 중인 서버와 페어링할 수도 있습니다.", + "0e306130a55a3954": "T3 Code 백그라운드 서비스가 이 T3 홈을 사용 중입니다(PID {pid}, 포트 {port}, 버전 {version}). 이 T3 홈과 함께 `--base-dir`을 전달해 `t3 service uninstall`로 중지한 후 T3 Code를 다시 여세요. 별도의 T3CODE_HOME을 설정하고 실행 중인 서버와 페어링할 수도 있습니다.", + "7379a43c1ac009d2": "T3 Code 백그라운드 서비스가 이 T3 홈을 사용 중입니다(PID {pid}, 포트 {port}). 이 T3 홈과 함께 `--base-dir`을 전달해 `t3 service uninstall`로 중지한 후 T3 Code를 다시 여세요. 별도의 T3CODE_HOME을 설정하고 실행 중인 서버와 페어링할 수도 있습니다.", + "1510c6547cde9c2e": "다른 T3 Code 서버(예: `t3 serve` 또는 SSH로 시작한 서버)가 이 T3 홈을 사용 중입니다(PID {pid}, 포트 {port}, 버전 {version}). 다른 머신의 T3 Code 앱이 SSH로 시작했다면 그 앱이 서버를 다시 시작합니다. 그 앱에서 해당 SSH 환경을 제거하거나 연결을 끊거나, 앱을 종료하세요. 그런 다음 서버를 중지하고 T3 Code를 다시 여세요. 별도의 T3CODE_HOME을 설정하고 실행 중인 서버와 페어링할 수도 있습니다.", + "8d8628520de0d9f1": "다른 T3 Code 서버(예: `t3 serve` 또는 SSH로 시작한 서버)가 이 T3 홈을 사용 중입니다(PID {pid}, 포트 {port}). 다른 머신의 T3 Code 앱이 SSH로 시작했다면 그 앱이 서버를 다시 시작합니다. 그 앱에서 해당 SSH 환경을 제거하거나 연결을 끊거나, 앱을 종료하세요. 그런 다음 서버를 중지하고 T3 Code를 다시 여세요. 별도의 T3CODE_HOME을 설정하고 실행 중인 서버와 페어링할 수도 있습니다.", + "6574442caf8bfd15": "화면 기록 설정", + "a8210440c691b062": "손쉬운 사용 설정", + "0cbbbd8abd25f9d4": "전체 디스크 접근 권한 설정", + "4cd679200c978949": "권한 도우미 닫기", + "ea4f056c8f6b5c15": "↑ T3 Code를 위 목록으로 끌어 놓으세요", + "4bcb0f4db00936b1": "T3 Code를 시스템 설정으로 끌어 놓거나, 클릭하여 Finder에서 보기", + "278648c9ff6fb9ce": "신뢰할 수 있는 기관에서 발급한 인증서가 아닙니다.", + "cf346dcfb658d4d3": "이 주소용 인증서가 아닙니다.", + "20665d9b0c7c3e52": "이 인증서는 만료되었거나 아직 유효하지 않습니다.", + "565970a378986341": "열기", + "00ad8aeed0a6c461": "취소", + "2107cc3e7c4ac833": "이 {protocol} 링크를 열까요?", + "050db36de6624203": "브라우저의 페이지에서 다른 애플리케이션을 열려고 합니다:\n\n{url}", + "c1d7515ac0214ca1": "신뢰하고 기억", + "e89b5b30b1bc99bb": "{host}의 인증서를 신뢰할 수 없습니다", + "16d4c8a1431bd8c2": "발급 대상: {name}", + "5862c92e2dabefab": "발급자: {name}", + "cf559f06dc2e5432": "유효 기간: {start} – {end}", + "86fe6451f52e722a": "지문: {fingerprint}", + "7b20c92539acb4b6": "이 인증서가 해당 사이트의 것임을 알 때만 신뢰하세요. 이 브라우저 프로필의 쿠키를 지우면 신뢰 정보도 삭제됩니다.", + "c67ec08c2c8d0cd9": "{host}의 인증서를 신뢰할 수 없습니다", + "935a340963533dcf": "T3 Code가 이 승인을 저장하지 못해 페이지가 계속 차단됩니다. 디스크가 가득 차지 않았는지, 데이터 폴더에 쓸 수 있는지 확인한 후 다시 시도하세요.", + "a0315d43e8e5be7e": "허용", + "2ec823ca24387055": "차단", + "8fc0b116123fb50b": "{origin}에서 클립보드에 복사된 텍스트와 이미지를 보려고 합니다", + "c0f756221736393f": "미리 보기 · {title}", + "6994444f4fec4070": "브라우저 미리 보기", + "49de6209699eb616": "이름 없는 패스키", + "b4a5bb1075d95154": "패스키 선택", + "1f12213f4d809e89": "최신 버전입니다!", + "c6399b55619e2f67": "T3 Code {version}이(가) 현재 사용 가능한 최신 버전입니다.", + "b6e5b31255e011c5": "확인", + "2ee2077700686fbb": "업데이트 사용 가능", + "d3104b65052b993b": "새 버전의 T3 Code를 사용할 수 있습니다.", + "35fff5a1cd1d6473": "T3 Code {version}을(를) 사용할 수 있습니다.", + "63fbea040532a9ab": "T3 Code {version}을(를) 실행 중입니다.", + "374b1cb8cb616d27": "다운로드", + "b0d022fe9d78def7": "나중에", + "b9a0301ee1348da9": "업데이트 다운로드 중", + "bbaf6039d665a7a7": "새 버전의 T3 Code를 이미 다운로드하고 있습니다.", + "27b49ef7007c126d": "T3 Code {version}을(를) 이미 다운로드하고 있습니다.", + "bd6818c7f005654c": "업데이트 준비됨", + "e0e13c85665bd62f": "새 버전의 T3 Code를 설치할 준비가 되었습니다.", + "dfe6e415877b0533": "T3 Code {version}을(를) 설치할 준비가 되었습니다.", + "d1d10979d6dcb162": "설치하려면 T3 Code가 다시 시작됩니다. 실행 중인 작업은 중단됩니다.", + "2f0a8211a72e29aa": "다시 시작", + "116a21f6cc215e5f": "업데이트 확인 실패", + "32c88cd9421abf33": "업데이트를 확인할 수 없습니다.", + "b37aca07d3c644d9": "알 수 없는 오류가 발생했습니다. 나중에 다시 시도하세요.", + "c8c23435e780a60c": "업데이트를 사용할 수 없음", + "aecf7c98b81bef7a": "지금은 자동 업데이트를 사용할 수 없습니다.", + "835247f842c92bc9": "{appName} 정보", + "959e09151d75e25b": "업데이트 확인...", + "0c753e71e2dca0d0": "설정...", + "a9fad846cd549d96": "{appName} 가리기", + "4b375f39bfce229e": "{appName} 종료", + "83506e64878b7b48": "파일", + "b1f24efbd4e80225": "개발자 도구 닫기", + "2c85ee66be8b81b5": "창 닫기", + "31bfa0ca146dc77f": "편집", + "ebf150404ed417d5": "텍스트로 붙여넣기", + "660715835d05ddca": "말하기", + "25994350fd047a38": "보기", + "573a9e6b17f4e9e3": "새로 고침", + "826cb3059ebc7cc3": "강제 새로 고침", + "8340487d05e832e8": "개발자 도구 전환", + "a7ab66e786347118": "실제 크기", + "a4ad1b27fdc9032d": "확대", + "df6ed2014f1737a8": "축소", + "953979a4737f48fa": "제안 없음", + "202e13f15a3dcd30": "링크 복사", + "8af79268f2349f4c": "이메일 주소 복사", + "a9f9254d458e49fe": "이미지 복사", + "9c1b20fbc881de5d": "데스크톱 구성", + "1b14230874f19eb9": "이미지" +} diff --git a/apps/desktop/src/i18n/translations/pt-BR.json b/apps/desktop/src/i18n/translations/pt-BR.json new file mode 100644 index 0000000000000..78e635076cf72 --- /dev/null +++ b/apps/desktop/src/i18n/translations/pt-BR.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "O T3 Code não conseguiu iniciar", + "45e444e807bececb": "Este T3 home não está disponível", + "97665653aa9129ad": "Verificando se há uma versão mais recente…", + "dce25e68e60eb512": "A versão {version} está disponível. Ela pode conter uma correção.", + "2f015e6d5459dce9": "Atualizar para {version}", + "ca9838012a0eb084": "Baixando {version}. O T3 Code reinicia quando o download terminar.", + "c38cbed9acc5b0d1": "Baixando {version} ({percent}%). O T3 Code reinicia quando o download terminar.", + "4b4cf6843a4e0aba": "A versão {version} iniciou corretamente neste computador. Baixe e instale-a para voltar.", + "b57c6134d74c0848": "Baixar {version}", + "1eeed583c2254507": "Obtenha outra versão na página de versões.", + "4cd5b64eeb26e1ee": "Abrir versões", + "7e21da2485a8e0bb": "A política gerenciada da sua organização impediu o T3 Code de iniciar. Envie os detalhes abaixo para o administrador de TI.", + "55a19ca527948aaa": "O T3 Code não pôde iniciar", + "4825d2a18a5fc093": "Copiar detalhes", + "3874c9f538653a6d": "Sair", + "0eec8b51246f5e2c": "O servidor não gerou saída.", + "6cb1b68bddf39b35": "Versão {version}. O T3 Code tenta novamente em segundo plano. Logs: {logDir}", + "895f988b9de16f88": "O backend do WSL continua indisponível", + "eeb7ea62dc4706c1": "O T3 Code vai usar o backend do Windows nesta execução e tentar o WSL de novo na próxima vez que o app iniciar.", + "b5435aa5b470bafd": "O backend do WSL não pôde iniciar", + "d82d7c96e1904629": "Usando o backend do Windows para que o T3 Code possa abrir. Reative o backend do WSL em Configurações > Compartilhamento e acesso quando a distro do WSL for corrigida.", + "a4acf18834787a4f": "Outro servidor do T3 Code, como o serviço em segundo plano, está usando este diretório de dados, ou um serviço em segundo plano mais antigo está configurado para ele. Pare esse servidor ou tente `t3 update`. Se o inicializador mais antigo não conseguir atualizar, execute `t3 service uninstall` e, se quiser, reinstale com `t3 service install` a partir de uma CLI atual. Use `npx t3@latest` se o `t3` estiver ausente ou desatualizado e passe `--base-dir` com o T3 home do serviço em cada comando. Depois, reabra o T3 Code. Você também pode definir um T3CODE_HOME separado e parear com o servidor em execução.", + "0e306130a55a3954": "O serviço em segundo plano do T3 Code está usando este T3 home (PID {pid}, porta {port}, versão {version}). Pare-o com `t3 service uninstall`, passando `--base-dir` com este T3 home, e reabra o T3 Code. Você também pode definir um T3CODE_HOME separado e parear com o servidor em execução.", + "7379a43c1ac009d2": "O serviço em segundo plano do T3 Code está usando este T3 home (PID {pid}, porta {port}). Pare-o com `t3 service uninstall`, passando `--base-dir` com este T3 home, e reabra o T3 Code. Você também pode definir um T3CODE_HOME separado e parear com o servidor em execução.", + "1510c6547cde9c2e": "Outro servidor do T3 Code (por exemplo, `t3 serve` ou um iniciado por SSH) está usando este T3 home (PID {pid}, porta {port}, versão {version}). Se um app do T3 Code em outra máquina o iniciou por SSH, esse app o reinicia: remova ou desconecte esse ambiente SSH lá ou feche esse app. Depois, pare o servidor e reabra o T3 Code. Você também pode definir um T3CODE_HOME separado e parear com o servidor em execução.", + "8d8628520de0d9f1": "Outro servidor do T3 Code (por exemplo, `t3 serve` ou um iniciado por SSH) está usando este T3 home (PID {pid}, porta {port}). Se um app do T3 Code em outra máquina o iniciou por SSH, esse app o reinicia: remova ou desconecte esse ambiente SSH lá ou feche esse app. Depois, pare o servidor e reabra o T3 Code. Você também pode definir um T3CODE_HOME separado e parear com o servidor em execução.", + "6574442caf8bfd15": "Configurar Gravação de Tela", + "a8210440c691b062": "Configurar Acessibilidade", + "0cbbbd8abd25f9d4": "Configurar Acesso Total ao Disco", + "4cd679200c978949": "Fechar o assistente de permissões", + "ea4f056c8f6b5c15": "↑ Arraste o T3 Code para a lista acima", + "4bcb0f4db00936b1": "Arraste o T3 Code para os Ajustes do Sistema ou clique para mostrar no Finder", + "278648c9ff6fb9ce": "Nenhuma autoridade confiável emitiu este certificado.", + "cf346dcfb658d4d3": "Este certificado não é para este endereço.", + "20665d9b0c7c3e52": "Este certificado expirou ou ainda não é válido.", + "565970a378986341": "Abrir", + "00ad8aeed0a6c461": "Cancelar", + "2107cc3e7c4ac833": "Abrir este link {protocol}?", + "050db36de6624203": "Uma página no navegador quer abrir outro aplicativo:\n\n{url}", + "c1d7515ac0214ca1": "Confiar e lembrar", + "e89b5b30b1bc99bb": "{host} tem um certificado não confiável", + "16d4c8a1431bd8c2": "Emitido para: {name}", + "5862c92e2dabefab": "Emitido por: {name}", + "cf559f06dc2e5432": "Válido: {start} – {end}", + "86fe6451f52e722a": "Impressão digital: {fingerprint}", + "7b20c92539acb4b6": "Confie nele só se você souber que este certificado pertence ao site. Limpar os cookies deste perfil do navegador faz com que ele seja esquecido.", + "c67ec08c2c8d0cd9": "Não foi possível confiar no certificado de {host}", + "935a340963533dcf": "O T3 Code não conseguiu salvar esta aprovação, então a página continua bloqueada. Verifique se o disco não está cheio e se a pasta de dados permite gravação e tente novamente.", + "a0315d43e8e5be7e": "Permitir", + "2ec823ca24387055": "Bloquear", + "8fc0b116123fb50b": "{origin} quer ver textos e imagens copiados para a área de transferência", + "c0f756221736393f": "Pré-visualização · {title}", + "6994444f4fec4070": "Pré-visualização do navegador", + "49de6209699eb616": "Chave de acesso sem nome", + "b4a5bb1075d95154": "Escolha uma chave de acesso", + "1f12213f4d809e89": "Você está atualizado!", + "c6399b55619e2f67": "O T3 Code {version} é a versão mais recente disponível.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Atualização disponível", + "d3104b65052b993b": "Há uma nova versão do T3 Code disponível.", + "35fff5a1cd1d6473": "O T3 Code {version} está disponível.", + "63fbea040532a9ab": "Você está usando o T3 Code {version}.", + "374b1cb8cb616d27": "Baixar", + "b0d022fe9d78def7": "Depois", + "b9a0301ee1348da9": "Baixando atualização", + "bbaf6039d665a7a7": "Uma nova versão do T3 Code já está sendo baixada.", + "27b49ef7007c126d": "O T3 Code {version} já está sendo baixado.", + "bd6818c7f005654c": "Atualização pronta", + "e0e13c85665bd62f": "Uma nova versão do T3 Code está pronta para instalar.", + "dfe6e415877b0533": "O T3 Code {version} está pronto para instalar.", + "d1d10979d6dcb162": "O T3 Code será reiniciado para instalá-la. As tarefas em execução serão interrompidas.", + "2f0a8211a72e29aa": "Reiniciar", + "116a21f6cc215e5f": "Falha ao verificar atualizações", + "32c88cd9421abf33": "Não foi possível verificar atualizações.", + "b37aca07d3c644d9": "Ocorreu um erro desconhecido. Tente novamente mais tarde.", + "c8c23435e780a60c": "Atualizações indisponíveis", + "aecf7c98b81bef7a": "As atualizações automáticas não estão disponíveis no momento.", + "835247f842c92bc9": "Sobre o {appName}", + "959e09151d75e25b": "Verificar atualizações...", + "0c753e71e2dca0d0": "Configurações...", + "a9fad846cd549d96": "Ocultar {appName}", + "4b375f39bfce229e": "Sair do {appName}", + "83506e64878b7b48": "Arquivo", + "b1f24efbd4e80225": "Fechar ferramentas do desenvolvedor", + "2c85ee66be8b81b5": "Fechar janela", + "31bfa0ca146dc77f": "Editar", + "ebf150404ed417d5": "Colar como texto", + "660715835d05ddca": "Fala", + "25994350fd047a38": "Exibir", + "573a9e6b17f4e9e3": "Recarregar", + "826cb3059ebc7cc3": "Forçar recarregamento", + "8340487d05e832e8": "Alternar ferramentas do desenvolvedor", + "a7ab66e786347118": "Tamanho real", + "a4ad1b27fdc9032d": "Aumentar zoom", + "df6ed2014f1737a8": "Diminuir zoom", + "953979a4737f48fa": "Nenhuma sugestão", + "202e13f15a3dcd30": "Copiar link", + "8af79268f2349f4c": "Copiar endereço de e-mail", + "a9f9254d458e49fe": "Copiar imagem", + "9c1b20fbc881de5d": "Configuração do desktop", + "1b14230874f19eb9": "Imagens" +} diff --git a/apps/desktop/src/i18n/translations/ru.json b/apps/desktop/src/i18n/translations/ru.json new file mode 100644 index 0000000000000..deb40ac5292c2 --- /dev/null +++ b/apps/desktop/src/i18n/translations/ru.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "Не удалось запустить T3 Code", + "45e444e807bececb": "Этот домашний каталог T3 недоступен", + "97665653aa9129ad": "Поиск новой версии…", + "dce25e68e60eb512": "Доступна версия {version}. В ней может быть исправление.", + "2f015e6d5459dce9": "Обновить до {version}", + "ca9838012a0eb084": "Загрузка {version}. T3 Code перезапустится после завершения загрузки.", + "c38cbed9acc5b0d1": "Загрузка {version} ({percent}%). T3 Code перезапустится после завершения загрузки.", + "4b4cf6843a4e0aba": "Версия {version} корректно запускалась на этом компьютере. Скачайте и установите её, чтобы вернуться.", + "b57c6134d74c0848": "Скачать {version}", + "1eeed583c2254507": "Скачайте другую версию со страницы релизов.", + "4cd5b64eeb26e1ee": "Открыть релизы", + "7e21da2485a8e0bb": "Управляемая политика вашей организации не дала запустить T3 Code. Отправьте сведения ниже вашему ИТ-администратору.", + "55a19ca527948aaa": "T3 Code не удалось запустить", + "4825d2a18a5fc093": "Копировать подробности", + "3874c9f538653a6d": "Выйти", + "0eec8b51246f5e2c": "Сервер ничего не вывел.", + "6cb1b68bddf39b35": "Версия {version}. T3 Code повторит попытку в фоне. Логи: {logDir}", + "895f988b9de16f88": "Бэкенд WSL по-прежнему недоступен", + "eeb7ea62dc4706c1": "T3 Code использует бэкенд Windows при этом запуске и повторит попытку с WSL при следующем запуске приложения.", + "b5435aa5b470bafd": "Не удалось запустить бэкенд WSL", + "d82d7c96e1904629": "Переключение на бэкенд Windows, чтобы T3 Code мог открыться. Снова включите бэкенд WSL в Настройки > Общий доступ, когда дистрибутив WSL будет исправлен.", + "a4acf18834787a4f": "Этот каталог данных использует другой сервер T3 Code, например фоновая служба, или для него настроена старая фоновая служба. Остановите этот сервер или попробуйте `t3 update`. Если старый лаунчер не может обновиться, выполните `t3 service uninstall` и при необходимости переустановите командой `t3 service install` из актуального CLI. Используйте `npx t3@latest`, если `t3` отсутствует или устарел, и передавайте в каждую команду `--base-dir` с домашним каталогом T3 этой службы. Затем снова откройте T3 Code. Также можно задать отдельный T3CODE_HOME и выполнить сопряжение с запущенным сервером.", + "0e306130a55a3954": "Этот домашний каталог T3 использует фоновая служба T3 Code (PID {pid}, порт {port}, версия {version}). Остановите её командой `t3 service uninstall`, передав `--base-dir` с этим домашним каталогом T3, и снова откройте T3 Code. Также можно задать отдельный T3CODE_HOME и выполнить сопряжение с запущенным сервером.", + "7379a43c1ac009d2": "Этот домашний каталог T3 использует фоновая служба T3 Code (PID {pid}, порт {port}). Остановите её командой `t3 service uninstall`, передав `--base-dir` с этим домашним каталогом T3, и снова откройте T3 Code. Также можно задать отдельный T3CODE_HOME и выполнить сопряжение с запущенным сервером.", + "1510c6547cde9c2e": "Этот домашний каталог T3 использует другой сервер T3 Code (например, `t3 serve` или запущенный через SSH) (PID {pid}, порт {port}, версия {version}). Если его запустило через SSH приложение T3 Code на другом компьютере, это приложение перезапустит его: удалите или отключите там это SSH-окружение либо закройте то приложение. Затем остановите сервер и снова откройте T3 Code. Также можно задать отдельный T3CODE_HOME и выполнить сопряжение с запущенным сервером.", + "8d8628520de0d9f1": "Этот домашний каталог T3 использует другой сервер T3 Code (например, `t3 serve` или запущенный через SSH) (PID {pid}, порт {port}). Если его запустило через SSH приложение T3 Code на другом компьютере, это приложение перезапустит его: удалите или отключите там это SSH-окружение либо закройте то приложение. Затем остановите сервер и снова откройте T3 Code. Также можно задать отдельный T3CODE_HOME и выполнить сопряжение с запущенным сервером.", + "6574442caf8bfd15": "Настроить запись экрана", + "a8210440c691b062": "Настроить универсальный доступ", + "0cbbbd8abd25f9d4": "Настроить полный доступ к диску", + "4cd679200c978949": "Закрыть помощник разрешений", + "ea4f056c8f6b5c15": "↑ Перетащите T3 Code в список выше", + "4bcb0f4db00936b1": "Перетащите T3 Code в Системные настройки или нажмите, чтобы показать в Finder", + "278648c9ff6fb9ce": "Этот сертификат выдан недоверенным центром.", + "cf346dcfb658d4d3": "Этот сертификат выдан не для этого адреса.", + "20665d9b0c7c3e52": "Срок действия этого сертификата истёк или ещё не начался.", + "565970a378986341": "Открыть", + "00ad8aeed0a6c461": "Отмена", + "2107cc3e7c4ac833": "Открыть эту ссылку {protocol}?", + "050db36de6624203": "Страница в браузере хочет открыть другое приложение:\n\n{url}", + "c1d7515ac0214ca1": "Доверять и запомнить", + "e89b5b30b1bc99bb": "У {host} недоверенный сертификат", + "16d4c8a1431bd8c2": "Кому выдан: {name}", + "5862c92e2dabefab": "Кем выдан: {name}", + "cf559f06dc2e5432": "Действителен: {start} – {end}", + "86fe6451f52e722a": "Отпечаток: {fingerprint}", + "7b20c92539acb4b6": "Доверяйте, только если знаете, что этот сертификат принадлежит сайту. Очистка cookie этого профиля браузера сбросит доверие.", + "c67ec08c2c8d0cd9": "Не удалось доверять сертификату для {host}", + "935a340963533dcf": "T3 Code не удалось сохранить это разрешение, поэтому страница остаётся заблокированной. Убедитесь, что диск не заполнен, а папка данных доступна для записи, и повторите попытку.", + "a0315d43e8e5be7e": "Разрешить", + "2ec823ca24387055": "Блокировать", + "8fc0b116123fb50b": "{origin} хочет видеть текст и изображения, скопированные в буфер обмена", + "c0f756221736393f": "Предпросмотр · {title}", + "6994444f4fec4070": "Предпросмотр в браузере", + "49de6209699eb616": "Безымянный ключ доступа", + "b4a5bb1075d95154": "Выберите ключ доступа", + "1f12213f4d809e89": "У вас последняя версия!", + "c6399b55619e2f67": "T3 Code {version} — новейшая доступная версия.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Доступно обновление", + "d3104b65052b993b": "Доступна новая версия T3 Code.", + "35fff5a1cd1d6473": "Доступна версия T3 Code {version}.", + "63fbea040532a9ab": "У вас T3 Code {version}.", + "374b1cb8cb616d27": "Скачать", + "b0d022fe9d78def7": "Позже", + "b9a0301ee1348da9": "Загрузка обновления", + "bbaf6039d665a7a7": "Новая версия T3 Code уже загружается.", + "27b49ef7007c126d": "T3 Code {version} уже загружается.", + "bd6818c7f005654c": "Обновление готово", + "e0e13c85665bd62f": "Новая версия T3 Code готова к установке.", + "dfe6e415877b0533": "T3 Code {version} готов к установке.", + "d1d10979d6dcb162": "T3 Code перезапустится для установки. Все выполняющиеся задачи будут прерваны.", + "2f0a8211a72e29aa": "Перезапустить", + "116a21f6cc215e5f": "Ошибка проверки обновлений", + "32c88cd9421abf33": "Не удалось проверить обновления.", + "b37aca07d3c644d9": "Произошла неизвестная ошибка. Повторите попытку позже.", + "c8c23435e780a60c": "Обновления недоступны", + "aecf7c98b81bef7a": "Автоматические обновления сейчас недоступны.", + "835247f842c92bc9": "О приложении {appName}", + "959e09151d75e25b": "Проверить обновления...", + "0c753e71e2dca0d0": "Настройки...", + "a9fad846cd549d96": "Скрыть {appName}", + "4b375f39bfce229e": "Выйти из {appName}", + "83506e64878b7b48": "Файл", + "b1f24efbd4e80225": "Закрыть инструменты разработчика", + "2c85ee66be8b81b5": "Закрыть окно", + "31bfa0ca146dc77f": "Правка", + "ebf150404ed417d5": "Вставить как текст", + "660715835d05ddca": "Речь", + "25994350fd047a38": "Вид", + "573a9e6b17f4e9e3": "Перезагрузить", + "826cb3059ebc7cc3": "Принудительная перезагрузка", + "8340487d05e832e8": "Инструменты разработчика", + "a7ab66e786347118": "Фактический размер", + "a4ad1b27fdc9032d": "Увеличить", + "df6ed2014f1737a8": "Уменьшить", + "953979a4737f48fa": "Нет вариантов", + "202e13f15a3dcd30": "Копировать ссылку", + "8af79268f2349f4c": "Копировать адрес электронной почты", + "a9f9254d458e49fe": "Копировать изображение", + "9c1b20fbc881de5d": "Конфигурация десктопа", + "1b14230874f19eb9": "Изображения" +} diff --git a/apps/desktop/src/i18n/translations/sv.json b/apps/desktop/src/i18n/translations/sv.json new file mode 100644 index 0000000000000..aa30b26073b39 --- /dev/null +++ b/apps/desktop/src/i18n/translations/sv.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code kunde inte starta", + "45e444e807bececb": "Den här T3-hemkatalogen är inte tillgänglig", + "97665653aa9129ad": "Söker efter en nyare version…", + "dce25e68e60eb512": "Version {version} är tillgänglig. Den kan innehålla en korrigering.", + "2f015e6d5459dce9": "Uppdatera till {version}", + "ca9838012a0eb084": "Laddar ner {version}. T3 Code startar om när nedladdningen är klar.", + "c38cbed9acc5b0d1": "Laddar ner {version} ({percent} %). T3 Code startar om när nedladdningen är klar.", + "4b4cf6843a4e0aba": "Version {version} startade korrekt på den här datorn. Ladda ner och installera den för att gå tillbaka.", + "b57c6134d74c0848": "Ladda ner {version}", + "1eeed583c2254507": "Hämta en annan version från versionssidan.", + "4cd5b64eeb26e1ee": "Öppna versioner", + "7e21da2485a8e0bb": "Din organisations hanterade policy hindrade T3 Code från att starta. Skicka informationen nedan till din IT-administratör.", + "55a19ca527948aaa": "T3 Code kunde inte starta", + "4825d2a18a5fc093": "Kopiera detaljer", + "3874c9f538653a6d": "Avsluta", + "0eec8b51246f5e2c": "Servern skrev ingen utdata.", + "6cb1b68bddf39b35": "Version {version}. T3 Code försöker igen i bakgrunden. Loggar: {logDir}", + "895f988b9de16f88": "WSL-backend är fortfarande inte tillgänglig", + "eeb7ea62dc4706c1": "T3 Code använder Windows-backend för den här starten och försöker med WSL igen nästa gång appen startar.", + "b5435aa5b470bafd": "WSL-backend kunde inte starta", + "d82d7c96e1904629": "Faller tillbaka på Windows-backend så att T3 Code kan öppnas. Aktivera WSL-backend igen i Inställningar > Delning och åtkomst när WSL-distributionen är åtgärdad.", + "a4acf18834787a4f": "En annan T3 Code-server, till exempel bakgrundstjänsten, använder den här datakatalogen, eller så är en äldre bakgrundstjänst konfigurerad för den. Stoppa den servern eller prova `t3 update`. Om den äldre startaren inte kan uppdatera kör du `t3 service uninstall` och installerar eventuellt om med `t3 service install` från ett aktuellt CLI. Använd `npx t3@latest` om `t3` saknas eller är inaktuellt, och skicka med `--base-dir` med tjänstens T3-hemkatalog till varje kommando. Öppna sedan T3 Code igen. Du kan också ange en separat T3CODE_HOME och parkoppla med servern som körs.", + "0e306130a55a3954": "T3 Codes bakgrundstjänst använder den här T3-hemkatalogen (PID {pid}, port {port}, version {version}). Stoppa den med `t3 service uninstall`, med `--base-dir` satt till den här T3-hemkatalogen, och öppna T3 Code igen. Du kan också ange en separat T3CODE_HOME och parkoppla med servern som körs.", + "7379a43c1ac009d2": "T3 Codes bakgrundstjänst använder den här T3-hemkatalogen (PID {pid}, port {port}). Stoppa den med `t3 service uninstall`, med `--base-dir` satt till den här T3-hemkatalogen, och öppna T3 Code igen. Du kan också ange en separat T3CODE_HOME och parkoppla med servern som körs.", + "1510c6547cde9c2e": "En annan T3 Code-server (till exempel `t3 serve` eller en som startats över SSH) använder den här T3-hemkatalogen (PID {pid}, port {port}, version {version}). Om en T3 Code-app på en annan dator startade den över SSH startar den appen om den: ta bort eller koppla från SSH-miljön där, eller avsluta appen. Stoppa sedan servern och öppna T3 Code igen. Du kan också ange en separat T3CODE_HOME och parkoppla med servern som körs.", + "8d8628520de0d9f1": "En annan T3 Code-server (till exempel `t3 serve` eller en som startats över SSH) använder den här T3-hemkatalogen (PID {pid}, port {port}). Om en T3 Code-app på en annan dator startade den över SSH startar den appen om den: ta bort eller koppla från SSH-miljön där, eller avsluta appen. Stoppa sedan servern och öppna T3 Code igen. Du kan också ange en separat T3CODE_HOME och parkoppla med servern som körs.", + "6574442caf8bfd15": "Konfigurera skärminspelning", + "a8210440c691b062": "Konfigurera hjälpmedel", + "0cbbbd8abd25f9d4": "Konfigurera Full skivåtkomst", + "4cd679200c978949": "Stäng behörighetshjälpen", + "ea4f056c8f6b5c15": "↑ Dra T3 Code till listan ovan", + "4bcb0f4db00936b1": "Dra T3 Code till Systeminställningar eller klicka för att visa i Finder", + "278648c9ff6fb9ce": "Ingen betrodd utfärdare utfärdade det här certifikatet.", + "cf346dcfb658d4d3": "Det här certifikatet gäller inte den här adressen.", + "20665d9b0c7c3e52": "Det här certifikatet har gått ut eller är inte giltigt än.", + "565970a378986341": "Öppna", + "00ad8aeed0a6c461": "Avbryt", + "2107cc3e7c4ac833": "Öppna den här {protocol}-länken?", + "050db36de6624203": "En sida i webbläsaren vill öppna ett annat program:\n\n{url}", + "c1d7515ac0214ca1": "Lita på och kom ihåg", + "e89b5b30b1bc99bb": "{host} har ett certifikat som inte är betrott", + "16d4c8a1431bd8c2": "Utfärdat till: {name}", + "5862c92e2dabefab": "Utfärdat av: {name}", + "cf559f06dc2e5432": "Giltigt: {start} – {end}", + "86fe6451f52e722a": "Fingeravtryck: {fingerprint}", + "7b20c92539acb4b6": "Lita bara på det om du vet att certifikatet tillhör webbplatsen. Om du rensar cookies i den här webbläsarprofilen glöms det.", + "c67ec08c2c8d0cd9": "Kunde inte lita på certifikatet för {host}", + "935a340963533dcf": "T3 Code kunde inte spara det här godkännandet, så sidan förblir blockerad. Kontrollera att disken inte är full och att datamappen är skrivbar och försök sedan igen.", + "a0315d43e8e5be7e": "Tillåt", + "2ec823ca24387055": "Blockera", + "8fc0b116123fb50b": "{origin} vill se text och bilder som kopierats till urklipp", + "c0f756221736393f": "Förhandsvisning · {title}", + "6994444f4fec4070": "Förhandsvisning i webbläsaren", + "49de6209699eb616": "Namnlös lösenordsnyckel", + "b4a5bb1075d95154": "Välj en lösenordsnyckel", + "1f12213f4d809e89": "Du har den senaste versionen!", + "c6399b55619e2f67": "T3 Code {version} är den senaste tillgängliga versionen.", + "b6e5b31255e011c5": "OK", + "2ee2077700686fbb": "Uppdatering tillgänglig", + "d3104b65052b993b": "En ny version av T3 Code är tillgänglig.", + "35fff5a1cd1d6473": "T3 Code {version} är tillgänglig.", + "63fbea040532a9ab": "Du kör T3 Code {version}.", + "374b1cb8cb616d27": "Ladda ned", + "b0d022fe9d78def7": "Senare", + "b9a0301ee1348da9": "Uppdateringen laddas ner", + "bbaf6039d665a7a7": "En ny version av T3 Code laddas redan ner.", + "27b49ef7007c126d": "T3 Code {version} laddas redan ner.", + "bd6818c7f005654c": "Uppdatering klar", + "e0e13c85665bd62f": "En ny version av T3 Code är redo att installeras.", + "dfe6e415877b0533": "T3 Code {version} är redo att installeras.", + "d1d10979d6dcb162": "T3 Code startar om för att installera den. Uppgifter som körs avbryts.", + "2f0a8211a72e29aa": "Starta om", + "116a21f6cc215e5f": "Sökningen efter uppdateringar misslyckades", + "32c88cd9421abf33": "Kunde inte söka efter uppdateringar.", + "b37aca07d3c644d9": "Ett okänt fel inträffade. Försök igen senare.", + "c8c23435e780a60c": "Uppdateringar är inte tillgängliga", + "aecf7c98b81bef7a": "Automatiska uppdateringar är inte tillgängliga just nu.", + "835247f842c92bc9": "Om {appName}", + "959e09151d75e25b": "Sök efter uppdateringar...", + "0c753e71e2dca0d0": "Inställningar...", + "a9fad846cd549d96": "Dölj {appName}", + "4b375f39bfce229e": "Avsluta {appName}", + "83506e64878b7b48": "Arkiv", + "b1f24efbd4e80225": "Stäng utvecklarverktyg", + "2c85ee66be8b81b5": "Stäng fönster", + "31bfa0ca146dc77f": "Redigera", + "ebf150404ed417d5": "Klistra in som text", + "660715835d05ddca": "Tal", + "25994350fd047a38": "Visa", + "573a9e6b17f4e9e3": "Läs in igen", + "826cb3059ebc7cc3": "Tvinga omladdning", + "8340487d05e832e8": "Växla utvecklarverktyg", + "a7ab66e786347118": "Verklig storlek", + "a4ad1b27fdc9032d": "Zooma in", + "df6ed2014f1737a8": "Zooma ut", + "953979a4737f48fa": "Inga förslag", + "202e13f15a3dcd30": "Kopiera länk", + "8af79268f2349f4c": "Kopiera e-postadress", + "a9f9254d458e49fe": "Kopiera bild", + "9c1b20fbc881de5d": "Skrivbordskonfiguration", + "1b14230874f19eb9": "Bilder" +} diff --git a/apps/desktop/src/i18n/translations/zh.json b/apps/desktop/src/i18n/translations/zh.json new file mode 100644 index 0000000000000..f8c6a6e6be217 --- /dev/null +++ b/apps/desktop/src/i18n/translations/zh.json @@ -0,0 +1,103 @@ +{ + "743bb98558dcdddf": "T3 Code 启动失败", + "45e444e807bececb": "此 T3 主目录不可用", + "97665653aa9129ad": "正在检查新版本…", + "dce25e68e60eb512": "版本 {version} 可用。它可能包含修复。", + "2f015e6d5459dce9": "更新到 {version}", + "ca9838012a0eb084": "正在下载 {version}。下载完成后 T3 Code 将重启。", + "c38cbed9acc5b0d1": "正在下载 {version}({percent}%)。下载完成后 T3 Code 将重启。", + "4b4cf6843a4e0aba": "版本 {version} 曾在此计算机上正常启动。下载并安装它即可回退。", + "b57c6134d74c0848": "下载 {version}", + "1eeed583c2254507": "从发布页面获取其他版本。", + "4cd5b64eeb26e1ee": "打开发布页面", + "7e21da2485a8e0bb": "你的组织托管策略阻止了 T3 Code 启动。请将以下详细信息发送给你的 IT 管理员。", + "55a19ca527948aaa": "T3 Code 无法启动", + "4825d2a18a5fc093": "复制详情", + "3874c9f538653a6d": "退出", + "0eec8b51246f5e2c": "服务器没有输出任何内容。", + "6cb1b68bddf39b35": "版本 {version}。T3 Code 会在后台重试。日志:{logDir}", + "895f988b9de16f88": "WSL 后端仍不可用", + "eeb7ea62dc4706c1": "本次启动 T3 Code 将使用 Windows 后端,并在下次启动应用时重试 WSL。", + "b5435aa5b470bafd": "WSL 后端无法启动", + "d82d7c96e1904629": "正在回退到 Windows 后端,以便打开 T3 Code。修复 WSL 发行版后,请在“设置 > 共享与访问”中重新启用 WSL 后端。", + "a4acf18834787a4f": "另一个 T3 Code 服务器(例如后台服务)正在使用此数据目录,或此目录已配置旧版后台服务。请停止该服务器,或尝试 `t3 update`。如果旧版启动器无法更新,请运行 `t3 service uninstall`,并可使用当前 CLI 运行 `t3 service install` 重新安装。如果 `t3` 缺失或过旧,请使用 `npx t3@latest`,并在每条命令中通过 `--base-dir` 指定该服务的 T3 主目录。然后重新打开 T3 Code。你也可以设置单独的 T3CODE_HOME,并与正在运行的服务器配对。", + "0e306130a55a3954": "T3 Code 后台服务正在使用此 T3 主目录(PID {pid},端口 {port},版本 {version})。请使用 `t3 service uninstall` 停止它,并通过 `--base-dir` 传入此 T3 主目录,然后重新打开 T3 Code。你也可以设置单独的 T3CODE_HOME 并与正在运行的服务器配对。", + "7379a43c1ac009d2": "T3 Code 后台服务正在使用此 T3 主目录(PID {pid},端口 {port})。请使用 `t3 service uninstall` 停止它,并通过 `--base-dir` 传入此 T3 主目录,然后重新打开 T3 Code。你也可以设置单独的 T3CODE_HOME 并与正在运行的服务器配对。", + "1510c6547cde9c2e": "另一个 T3 Code 服务器(例如 `t3 serve`,或通过 SSH 启动的服务器)正在使用此 T3 主目录(PID {pid},端口 {port},版本 {version})。如果是另一台机器上的 T3 Code 应用通过 SSH 启动了它,该应用会重新启动它:请在那里移除或断开该 SSH 环境,或退出该应用。然后停止该服务器,并重新打开 T3 Code。你也可以设置单独的 T3CODE_HOME 并与正在运行的服务器配对。", + "8d8628520de0d9f1": "另一个 T3 Code 服务器(例如 `t3 serve`,或通过 SSH 启动的服务器)正在使用此 T3 主目录(PID {pid},端口 {port})。如果是另一台机器上的 T3 Code 应用通过 SSH 启动了它,该应用会重新启动它:请在那里移除或断开该 SSH 环境,或退出该应用。然后停止该服务器,并重新打开 T3 Code。你也可以设置单独的 T3CODE_HOME 并与正在运行的服务器配对。", + "6574442caf8bfd15": "设置屏幕录制", + "a8210440c691b062": "设置辅助功能", + "0cbbbd8abd25f9d4": "设置完全磁盘访问权限", + "4cd679200c978949": "关闭权限助手", + "ea4f056c8f6b5c15": "↑ 将 T3 Code 拖入上方列表", + "4bcb0f4db00936b1": "将 T3 Code 拖入系统设置,或点击在 Finder 中显示", + "278648c9ff6fb9ce": "此证书并非由受信任的机构签发。", + "cf346dcfb658d4d3": "此证书不适用于当前地址。", + "20665d9b0c7c3e52": "此证书已过期或尚未生效。", + "565970a378986341": "打开", + "00ad8aeed0a6c461": "取消", + "2107cc3e7c4ac833": "要打开此 {protocol} 链接吗?", + "050db36de6624203": "浏览器中的页面想打开另一个应用:\n\n{url}", + "c1d7515ac0214ca1": "信任并记住", + "e89b5b30b1bc99bb": "{host} 的证书不受信任", + "16d4c8a1431bd8c2": "颁发给:{name}", + "5862c92e2dabefab": "颁发者:{name}", + "cf559f06dc2e5432": "有效期:{start} – {end}", + "86fe6451f52e722a": "指纹:{fingerprint}", + "7b20c92539acb4b6": "仅在确认此证书属于该网站时信任它。清除此浏览器配置的 cookies 后将不再信任此证书。", + "c67ec08c2c8d0cd9": "无法信任 {host} 的证书", + "935a340963533dcf": "T3 Code 无法保存此次批准,因此页面仍被阻止。请检查磁盘空间和数据目录的写入权限后重试。", + "a0315d43e8e5be7e": "允许", + "2ec823ca24387055": "阻止", + "8fc0b116123fb50b": "{origin} 想查看复制到剪贴板的文字和图片", + "c0f756221736393f": "预览 · {title}", + "6994444f4fec4070": "浏览器预览", + "49de6209699eb616": "未命名通行密钥", + "b4a5bb1075d95154": "选择通行密钥", + "1f12213f4d809e89": "已是最新版本!", + "c6399b55619e2f67": "T3 Code {version} 已是最新版本。", + "b6e5b31255e011c5": "确定", + "2ee2077700686fbb": "有可用更新", + "d3104b65052b993b": "T3 Code 有新版本可用。", + "35fff5a1cd1d6473": "T3 Code {version} 可用。", + "63fbea040532a9ab": "你当前运行的是 T3 Code {version}。", + "374b1cb8cb616d27": "下载", + "b0d022fe9d78def7": "稍后", + "b9a0301ee1348da9": "正在下载更新", + "bbaf6039d665a7a7": "T3 Code 的新版本已在下载中。", + "27b49ef7007c126d": "T3 Code {version} 已在下载中。", + "bd6818c7f005654c": "更新已就绪", + "e0e13c85665bd62f": "T3 Code 的新版本已准备好安装。", + "dfe6e415877b0533": "T3 Code {version} 已准备好安装。", + "d1d10979d6dcb162": "T3 Code 将重启以安装更新,正在运行的任务会被中断。", + "2f0a8211a72e29aa": "重启", + "116a21f6cc215e5f": "检查更新失败", + "32c88cd9421abf33": "无法检查更新。", + "b37aca07d3c644d9": "发生未知错误,请稍后重试。", + "c8c23435e780a60c": "更新不可用", + "aecf7c98b81bef7a": "目前无法自动更新。", + "835247f842c92bc9": "关于 {appName}", + "959e09151d75e25b": "检查更新…", + "0c753e71e2dca0d0": "设置…", + "a9fad846cd549d96": "隐藏 {appName}", + "4b375f39bfce229e": "退出 {appName}", + "83506e64878b7b48": "文件", + "b1f24efbd4e80225": "关闭开发者工具", + "2c85ee66be8b81b5": "关闭窗口", + "31bfa0ca146dc77f": "编辑", + "ebf150404ed417d5": "粘贴为纯文本", + "660715835d05ddca": "语音", + "25994350fd047a38": "查看", + "573a9e6b17f4e9e3": "重新加载", + "826cb3059ebc7cc3": "强制重新加载", + "8340487d05e832e8": "切换开发者工具", + "a7ab66e786347118": "实际大小", + "a4ad1b27fdc9032d": "放大", + "df6ed2014f1737a8": "缩小", + "953979a4737f48fa": "无建议", + "202e13f15a3dcd30": "复制链接", + "8af79268f2349f4c": "复制邮箱地址", + "a9f9254d458e49fe": "复制图片", + "9c1b20fbc881de5d": "桌面配置", + "1b14230874f19eb9": "图片" +} diff --git a/apps/desktop/src/ipc/methods/clientSettings.ts b/apps/desktop/src/ipc/methods/clientSettings.ts index 7a647a58dc431..56e861944871d 100644 --- a/apps/desktop/src/ipc/methods/clientSettings.ts +++ b/apps/desktop/src/ipc/methods/clientSettings.ts @@ -3,6 +3,7 @@ import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; +import { applyLanguage } from "../../i18n/messages.ts"; import * as DesktopClientSettings from "../../settings/DesktopClientSettings.ts"; import * as DesktopSnapShot from "../../snapShot/DesktopSnapShot.ts"; import * as IpcChannels from "../channels.ts"; @@ -27,5 +28,6 @@ export const setClientSettings = DesktopIpc.makeIpcMethod({ const snapShot = yield* DesktopSnapShot.DesktopSnapShot; yield* clientSettings.set(settings); yield* snapShot.configure(settings); + yield* applyLanguage(settings.language); }), }); diff --git a/apps/desktop/src/ipc/methods/snapShot.ts b/apps/desktop/src/ipc/methods/snapShot.ts index dff64081b70c6..1a37882f4871e 100644 --- a/apps/desktop/src/ipc/methods/snapShot.ts +++ b/apps/desktop/src/ipc/methods/snapShot.ts @@ -14,11 +14,13 @@ import { import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; +import { msg } from "gt-i18n"; import type * as Electron from "electron"; import * as ElectronWindow from "../../electron/ElectronWindow.ts"; import * as ElectronDialog from "../../electron/ElectronDialog.ts"; import * as DesktopSnapShot from "../../snapShot/DesktopSnapShot.ts"; +import { m } from "../../i18n/messages.ts"; import * as IpcChannels from "../channels.ts"; import * as DesktopIpc from "../DesktopIpc.ts"; @@ -118,7 +120,7 @@ export const previewSnapShotConfig = DesktopIpc.makeIpcMethod({ defaultPath: Option.fromUndefinedOr(state.shortcutConfigPath), filters: [ { - name: "Desktop config", + name: m(msg("Desktop config")), extensions: state.linuxBackend === "niri" ? ["kdl"] : ["conf", "lua"], }, ], diff --git a/apps/desktop/src/ipc/methods/window.ts b/apps/desktop/src/ipc/methods/window.ts index 2545cb9dc5390..abf4ec929a7b7 100644 --- a/apps/desktop/src/ipc/methods/window.ts +++ b/apps/desktop/src/ipc/methods/window.ts @@ -45,8 +45,10 @@ import * as ElectronShell from "../../electron/ElectronShell.ts"; import * as ElectronTheme from "../../electron/ElectronTheme.ts"; import * as ElectronWindow from "../../electron/ElectronWindow.ts"; import * as Electron from "electron"; +import { msg } from "gt-i18n"; import * as MacPermissions from "../../permissions/MacPermissions.ts"; import { safariPermissionCheck } from "../../preview/BrowserImport/SafariPermission.ts"; +import { m } from "../../i18n/messages.ts"; import * as IpcChannels from "../channels.ts"; import * as DesktopIpc from "../DesktopIpc.ts"; import { @@ -316,7 +318,7 @@ export const pickProjectFavicon = DesktopIpc.makeIpcMethod({ multiple: false, filters: [ { - name: "Images", + name: m(msg("Images")), extensions: PROJECT_FAVICON_EXTENSIONS.map((extension) => extension.slice(1)), }, ], diff --git a/apps/desktop/src/permissions/MacPermission.ts b/apps/desktop/src/permissions/MacPermission.ts index e72d796c876ad..bc9f41fe286aa 100644 --- a/apps/desktop/src/permissions/MacPermission.ts +++ b/apps/desktop/src/permissions/MacPermission.ts @@ -1,3 +1,5 @@ +import { msg } from "gt-i18n"; + export const MAC_PERMISSION_SETTINGS_URLS = { "screen-recording": "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture", @@ -8,8 +10,8 @@ export const MAC_PERMISSION_SETTINGS_URLS = { export type MacPermission = keyof typeof MAC_PERMISSION_SETTINGS_URLS; -export const MAC_PERMISSION_TITLES: Record = { - "screen-recording": "Screen Recording", - accessibility: "Accessibility", - "full-disk-access": "Full Disk Access", +export const MAC_PERMISSION_SETUP_TITLES: Record = { + "screen-recording": msg("Set up Screen Recording"), + accessibility: msg("Set up Accessibility"), + "full-disk-access": msg("Set up Full Disk Access"), }; diff --git a/apps/desktop/src/permissions/MacPermissionHelper.ts b/apps/desktop/src/permissions/MacPermissionHelper.ts index 0b50e147785f7..cad9c5590609b 100644 --- a/apps/desktop/src/permissions/MacPermissionHelper.ts +++ b/apps/desktop/src/permissions/MacPermissionHelper.ts @@ -1,5 +1,8 @@ // @effect-diagnostics globalTimers:off -- Poll TCC only while the native permission helper is open. import * as Electron from "electron"; +import { msg } from "gt-i18n"; + +import { m } from "../i18n/messages.ts"; import { MAC_PERMISSION_HELPER_CHANNEL } from "../ipc/channels.ts"; import { @@ -8,7 +11,7 @@ import { type SettingsWindow, } from "./MacSettingsWindow.ts"; -import { MAC_PERMISSION_TITLES, type MacPermission } from "./MacPermission.ts"; +import { MAC_PERMISSION_SETUP_TITLES, type MacPermission } from "./MacPermission.ts"; const permissionGranted = (permission: MacPermission) => { if (permission === "screen-recording") @@ -39,10 +42,10 @@ const escapeHtml = (value: string) => }); function helperHtml(permission: MacPermission, icon: string) { - const title = MAC_PERMISSION_TITLES[permission]; + const title = escapeHtml(m(MAC_PERMISSION_SETUP_TITLES[permission])); return ` -Set up ${title}
- -
↑ Drag T3 Code into the list above
- + +
${escapeHtml(m(msg("↑ Drag T3 Code into the list above")))}
+
`; } @@ -109,7 +112,7 @@ export class MacPermissionHelper { fullscreenable: false, alwaysOnTop: true, skipTaskbar: true, - title: `Set up ${MAC_PERMISSION_TITLES[permission]}`, + title: m(MAC_PERMISSION_SETUP_TITLES[permission]), webPreferences: { preload, sandbox: true, contextIsolation: true, nodeIntegration: false }, }); this.window = window; diff --git a/apps/desktop/src/preview/BrowserSession.ts b/apps/desktop/src/preview/BrowserSession.ts index 1400f2c9cbe09..c3a189f08a6dd 100644 --- a/apps/desktop/src/preview/BrowserSession.ts +++ b/apps/desktop/src/preview/BrowserSession.ts @@ -1,6 +1,7 @@ import * as HostProcess from "@t3tools/shared/HostProcess"; import type { Certificate, Session, WebContents } from "electron"; import { BrowserWindow, session } from "electron"; +import { msg } from "gt-i18n"; import * as Context from "effect/Context"; import * as DateTime from "effect/DateTime"; import * as Digest from "effect/crypto/Digest"; @@ -17,6 +18,7 @@ import * as SynchronizedRef from "effect/SynchronizedRef"; import * as ElectronApp from "../electron/ElectronApp.ts"; import * as ElectronDialog from "../electron/ElectronDialog.ts"; +import { m } from "../i18n/messages.ts"; const PREVIEW_PARTITION_PREFIX = "persist:t3code-preview-"; /** Ephemeral partitions omit persist: but retain a product prefix so the webview gate recognizes them. */ @@ -85,9 +87,9 @@ const permissionOrigin = (rawUrl: string | undefined): string | null => { * prompt shows. Every other error keeps Electron's denial. */ const OVERRIDABLE_CERTIFICATE_ERRORS: ReadonlyMap = new Map([ - ["net::ERR_CERT_AUTHORITY_INVALID", "No trusted authority issued this certificate."], - ["net::ERR_CERT_COMMON_NAME_INVALID", "This certificate is not for this address."], - ["net::ERR_CERT_DATE_INVALID", "This certificate has expired or is not valid yet."], + ["net::ERR_CERT_AUTHORITY_INVALID", msg("No trusted authority issued this certificate.")], + ["net::ERR_CERT_COMMON_NAME_INVALID", msg("This certificate is not for this address.")], + ["net::ERR_CERT_DATE_INVALID", msg("This certificate has expired or is not valid yet.")], ]); /** @@ -323,9 +325,16 @@ export const make = Effect.gen(function* BrowserSessionMake() { promptPermission( requester, { - buttons: ["Open", "Cancel"], - message: `Open this ${new URL(url).protocol.slice(0, -1)} link?`, - detail: `A page in the browser wants to open another application:\n\n${truncateForPrompt(url)}`, + buttons: [ + m(msg("Open", { $context: "button, opens a link in another app" })), + m(msg("Cancel")), + ], + message: m(msg("Open this {protocol} link?"), { + protocol: new URL(url).protocol.slice(0, -1), + }), + detail: m(msg("A page in the browser wants to open another application:\n\n{url}"), { + url: truncateForPrompt(url), + }), }, (answer) => callback(answer === true), ); @@ -454,20 +463,29 @@ export const make = Effect.gen(function* BrowserSessionMake() { .showMessageBox( { type: "warning", - buttons: ["Trust and Remember", "Cancel"], + buttons: [m(msg("Trust and Remember")), m(msg("Cancel"))], defaultId: 1, cancelId: 1, signal: dismiss.signal, - message: `${host} has an untrusted certificate`, + message: m(msg("{host} has an untrusted certificate"), { host }), detail: [ - reason, + m(reason), "", - `Issued to: ${promptCertificateName(certificate.subjectName)}`, - `Issued by: ${promptCertificateName(certificate.issuerName)}`, - `Valid: ${promptCertificateDate(certificate.validStart)} – ${promptCertificateDate(certificate.validExpiry)}`, - `Fingerprint: ${approval.fingerprint}`, + m(msg("Issued to: {name}"), { + name: promptCertificateName(certificate.subjectName), + }), + m(msg("Issued by: {name}"), { name: promptCertificateName(certificate.issuerName) }), + m(msg("Valid: {start} – {end}"), { + start: promptCertificateDate(certificate.validStart), + end: promptCertificateDate(certificate.validExpiry), + }), + m(msg("Fingerprint: {fingerprint}"), { fingerprint: approval.fingerprint }), "", - "Trust it only if you know this certificate belongs to the site. Clearing this browser profile's cookies forgets it.", + m( + msg( + "Trust it only if you know this certificate belongs to the site. Clearing this browser profile's cookies forgets it.", + ), + ), ].join("\n"), }, // In the reporter's Windows test, a box owned by the host window @@ -482,8 +500,12 @@ export const make = Effect.gen(function* BrowserSessionMake() { Effect.logWarning("Failed to save a certificate approval.", { cause }).pipe( Effect.andThen( electronDialog.showErrorBox( - `Could not trust the certificate for ${host}`, - "T3 Code could not save this approval, so the page stays blocked. Check that the disk is not full and its data folder is writable, then try again.", + m(msg("Could not trust the certificate for {host}"), { host }), + m( + msg( + "T3 Code could not save this approval, so the page stays blocked. Check that the disk is not full and its data folder is writable, then try again.", + ), + ), ), ), Effect.as(false), @@ -605,8 +627,13 @@ export const make = Effect.gen(function* BrowserSessionMake() { promptPermission( requester, { - buttons: ["Allow", "Block"], - message: `${truncateForPrompt(origin)} wants to see text and images copied to the clipboard`, + buttons: [ + m(msg("Allow", { $context: "button, grants a site permission" })), + m(msg("Block", { $context: "button, denies a site permission" })), + ], + message: m(msg("{origin} wants to see text and images copied to the clipboard"), { + origin: truncateForPrompt(origin), + }), }, (answer) => { if (answer !== undefined) clipboardReadDecisions.set(origin, answer); diff --git a/apps/desktop/src/preview/Manager.ts b/apps/desktop/src/preview/Manager.ts index 32ac876996c81..1f28826bcc196 100644 --- a/apps/desktop/src/preview/Manager.ts +++ b/apps/desktop/src/preview/Manager.ts @@ -61,8 +61,10 @@ import * as Stream from "effect/Stream"; import * as Schedule from "effect/Schedule"; import * as Scope from "effect/Scope"; import * as SynchronizedRef from "effect/SynchronizedRef"; +import { msg } from "gt-i18n"; import * as DesktopEnvironment from "../app/DesktopEnvironment.ts"; +import { m } from "../i18n/messages.ts"; import * as DesktopRendererHistory from "../telemetry/DesktopRendererHistory.ts"; import { MENU_ACTION_CHANNEL, @@ -3157,7 +3159,10 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function height: PICTURE_IN_PICTURE_INITIAL_HEIGHT, minWidth: PICTURE_IN_PICTURE_MIN_WIDTH, minHeight: PICTURE_IN_PICTURE_MIN_HEIGHT, - title: title.length > 0 ? `Preview · ${title}` : "Browser preview", + title: + title.length > 0 + ? m(msg("Preview · {title}"), { title }) + : m(msg("Browser preview")), show: false, alwaysOnTop: true, autoHideMenuBar: true, diff --git a/apps/desktop/src/preview/Passkeys.ts b/apps/desktop/src/preview/Passkeys.ts index 34db1404aacb8..62c47db81f534 100644 --- a/apps/desktop/src/preview/Passkeys.ts +++ b/apps/desktop/src/preview/Passkeys.ts @@ -1,6 +1,7 @@ // @effect-diagnostics globalTimers:off - Ceremonies settle inside IPC handlers, outside an Effect runtime. import type { IpcMainInvokeEvent, Session, WebContents, WebFrameMain } from "electron"; import { app, BrowserWindow, dialog, webContents as electronWebContents } from "electron"; +import { msg } from "gt-i18n"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; @@ -8,6 +9,7 @@ import * as Layer from "effect/Layer"; import * as Schema from "effect/Schema"; import * as DesktopEnvironment from "../app/DesktopEnvironment.ts"; +import { m } from "../i18n/messages.ts"; import { PASSKEY_CREATE_CHANNEL, PASSKEY_GET_CHANNEL } from "./GuestProtocol.ts"; import type { PasskeyBackend, PasskeyCeremonyContext } from "./PasskeyBackend.ts"; import { macPasskeyBackend } from "./PasskeyBackendMac.ts"; @@ -53,7 +55,7 @@ const notAllowed: PasskeyCeremonyResult = { success: false, error: "NotAllowedEr const accountLabel = (account: Electron.WebAuthnAccount) => account.displayName && account.name && account.displayName !== account.name ? `${account.displayName} (${account.name})` - : (account.name ?? account.displayName ?? "Unnamed passkey"); + : (account.name ?? account.displayName ?? m(msg("Unnamed passkey"))); const ownerWindow = (frame: WebFrameMain | null) => { const contents = frame ? electronWebContents.fromFrame(frame) : undefined; @@ -67,9 +69,9 @@ const chooseAccount = async (details: Electron.SelectWebauthnAccountDetails) => if (details.accounts.length === 1) return onlyAccount?.credentialId; const options: Electron.MessageBoxOptions = { type: "none", - message: "Choose a passkey", + message: m(msg("Choose a passkey")), detail: details.relyingPartyId, - buttons: [...details.accounts.map(accountLabel), "Cancel"], + buttons: [...details.accounts.map(accountLabel), m(msg("Cancel"))], cancelId: details.accounts.length, defaultId: 0, noLink: true, diff --git a/apps/desktop/src/window/DesktopApplicationMenu.ts b/apps/desktop/src/window/DesktopApplicationMenu.ts index b4025ebfde8ef..4c5475f8a6023 100644 --- a/apps/desktop/src/window/DesktopApplicationMenu.ts +++ b/apps/desktop/src/window/DesktopApplicationMenu.ts @@ -5,11 +5,15 @@ import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; import * as Electron from "electron"; +import { msg } from "gt-i18n"; import { makeComponentLogger } from "../app/DesktopObservability.ts"; +import * as ElectronApp from "../electron/ElectronApp.ts"; import * as ElectronDialog from "../electron/ElectronDialog.ts"; import * as ElectronMenu from "../electron/ElectronMenu.ts"; import * as DesktopEnvironment from "../app/DesktopEnvironment.ts"; +import { applyLanguage, m, onLocaleChange } from "../i18n/messages.ts"; +import * as DesktopClientSettings from "../settings/DesktopClientSettings.ts"; import * as DesktopUpdates from "../updates/DesktopUpdates.ts"; import * as DesktopWindow from "./DesktopWindow.ts"; @@ -64,9 +68,6 @@ const runMainContentsCommand = Effect.fn("desktop.menu.runMainContentsCommand")( yield* desktopWindow.runMainContentsCommand(command); }); -const describeUpdate = (version: string | null) => - version === null ? "A new version of T3 Code" : `T3 Code ${version}`; - const checkForUpdatesFromMenu = Effect.gen(function* () { const updates = yield* DesktopUpdates.DesktopUpdates; const electronDialog = yield* ElectronDialog.ElectronDialog; @@ -76,17 +77,27 @@ const checkForUpdatesFromMenu = Effect.gen(function* () { if (updateState.status === "up-to-date") { yield* electronDialog.showMessageBox({ type: "info", - title: "You're up to date!", - message: `T3 Code ${updateState.currentVersion} is currently the newest version available.`, - buttons: ["OK"], + title: m(msg("You're up to date!")), + message: m(msg("T3 Code {version} is currently the newest version available."), { + version: updateState.currentVersion, + }), + buttons: [m(msg("OK"))], }); } else if (updateState.status === "available") { const { response } = yield* electronDialog.showMessageBox({ type: "info", - title: "Update available", - message: `${describeUpdate(updateState.availableVersion)} is available.`, - detail: `You're running T3 Code ${updateState.currentVersion}.`, - buttons: ["Download", "Later"], + title: m(msg("Update available")), + message: + updateState.availableVersion === null + ? m(msg("A new version of T3 Code is available.")) + : m(msg("T3 Code {version} is available."), { version: updateState.availableVersion }), + detail: m(msg("You're running T3 Code {version}."), { + version: updateState.currentVersion, + }), + buttons: [ + m(msg("Download", { $context: "button, downloads an app update" })), + m(msg("Later")), + ], defaultId: 0, cancelId: 1, }); @@ -94,17 +105,26 @@ const checkForUpdatesFromMenu = Effect.gen(function* () { } else if (updateState.status === "downloading") { yield* electronDialog.showMessageBox({ type: "info", - title: "Update downloading", - message: `${describeUpdate(updateState.availableVersion)} is already downloading.`, - buttons: ["OK"], + title: m(msg("Update downloading")), + message: + updateState.availableVersion === null + ? m(msg("A new version of T3 Code is already downloading.")) + : m(msg("T3 Code {version} is already downloading."), { + version: updateState.availableVersion, + }), + buttons: [m(msg("OK"))], }); } else if (updateState.status === "downloaded") { + const version = updateState.downloadedVersion ?? updateState.availableVersion; const { response } = yield* electronDialog.showMessageBox({ type: "info", - title: "Update ready", - message: `${describeUpdate(updateState.downloadedVersion ?? updateState.availableVersion)} is ready to install.`, - detail: "T3 Code will restart to install it. Any running tasks will be interrupted.", - buttons: ["Restart", "Later"], + title: m(msg("Update ready")), + message: + version === null + ? m(msg("A new version of T3 Code is ready to install.")) + : m(msg("T3 Code {version} is ready to install."), { version }), + detail: m(msg("T3 Code will restart to install it. Any running tasks will be interrupted.")), + buttons: [m(msg("Restart", { $context: "button, restarts the app" })), m(msg("Later"))], defaultId: 0, cancelId: 1, }); @@ -112,10 +132,10 @@ const checkForUpdatesFromMenu = Effect.gen(function* () { } else if (updateState.status === "error") { yield* electronDialog.showMessageBox({ type: "warning", - title: "Update check failed", - message: "Could not check for updates.", - detail: updateState.message ?? "An unknown error occurred. Please try again later.", - buttons: ["OK"], + title: m(msg("Update check failed")), + message: m(msg("Could not check for updates.")), + detail: updateState.message ?? m(msg("An unknown error occurred. Please try again later.")), + buttons: [m(msg("OK"))], }); } }).pipe(Effect.withSpan("desktop.menu.checkForUpdates")); @@ -130,10 +150,10 @@ const handleCheckForUpdatesMenuClick = Effect.gen(function* () { }); yield* electronDialog.showMessageBox({ type: "info", - title: "Updates unavailable", - message: "Automatic updates are not available right now.", + title: m(msg("Updates unavailable")), + message: m(msg("Automatic updates are not available right now.")), detail: disabledReason.value, - buttons: ["OK"], + buttons: [m(msg("OK"))], }); return; } @@ -148,8 +168,11 @@ const handleCheckForUpdatesMenuClick = Effect.gen(function* () { export const make = Effect.gen(function* () { const electronMenu = yield* ElectronMenu.ElectronMenu; const environment = yield* DesktopEnvironment.DesktopEnvironment; + const electronApp = yield* ElectronApp.ElectronApp; + const clientSettings = yield* Effect.serviceOption(DesktopClientSettings.DesktopClientSettings); const context = yield* Effect.context(); const runPromise = Effect.runPromiseWith(context); + const runFork = Effect.runForkWith(context); const runMenuEffect = ( action: string, @@ -195,45 +218,45 @@ export const make = Effect.gen(function* () { template.push({ label: environment.displayName, submenu: [ - { role: "about", label: `About ${environment.displayName}` }, + { role: "about", label: m(msg("About {appName}"), { appName: environment.displayName }) }, { - label: "Check for Updates...", + label: m(msg("Check for Updates...")), click: checkForUpdatesClick, }, { type: "separator" }, { - label: "Settings...", + label: m(msg("Settings...")), accelerator: "CmdOrCtrl+,", click: settingsClick, }, { type: "separator" }, { role: "services" }, { type: "separator" }, - { role: "hide", label: `Hide ${environment.displayName}` }, + { role: "hide", label: m(msg("Hide {appName}"), { appName: environment.displayName }) }, { role: "hideOthers" }, { role: "unhide" }, { type: "separator" }, - { role: "quit", label: `Quit ${environment.displayName}` }, + { role: "quit", label: m(msg("Quit {appName}"), { appName: environment.displayName }) }, ], }); } template.push( { - label: "File", + label: m(msg("File", { $context: "menu bar title" })), submenu: [ ...(environment.platform === "darwin" ? [] : [ { - label: "Settings...", + label: m(msg("Settings...")), accelerator: "CmdOrCtrl+,", click: settingsClick, }, { type: "separator" as const }, ]), { - label: "Close Developer Tools", + label: m(msg("Close Developer Tools")), accelerator: "CmdOrCtrl+W", visible: false, click: () => { @@ -245,12 +268,12 @@ export const make = Effect.gen(function* () { }, // Cmd/Ctrl+W belongs to the renderer's tab close; it must never close the window. environment.platform === "darwin" - ? { label: "Close Window", click: (_item, window) => window?.close() } + ? { label: m(msg("Close Window")), click: (_item, window) => window?.close() } : { role: "quit" }, ], }, { - label: "Edit", + label: m(msg("Edit", { $context: "menu bar title" })), submenu: [ { role: "undo" }, { role: "redo" }, @@ -259,7 +282,7 @@ export const make = Effect.gen(function* () { { role: "copy" }, { role: "paste" }, { - label: "Paste as Text", + label: m(msg("Paste as Text")), accelerator: "CmdOrCtrl+Shift+V", click: pasteAsTextClick, }, @@ -270,7 +293,7 @@ export const make = Effect.gen(function* () { ? [ { type: "separator" as const }, { - label: "Speech", + label: m(msg("Speech", { $context: "menu, text-to-speech" })), submenu: [{ role: "startSpeaking" as const }, { role: "stopSpeaking" as const }], }, ] @@ -278,25 +301,29 @@ export const make = Effect.gen(function* () { ], }, { - label: "View", + label: m(msg("View", { $context: "menu bar title" })), submenu: [ /* Native reload/DevTools/zoom roles target focused guests; these commands must target the app. */ - { label: "Reload", accelerator: "CmdOrCtrl+R", click: mainContentsClick("reload") }, { - label: "Force Reload", + label: m(msg("Reload")), + accelerator: "CmdOrCtrl+R", + click: mainContentsClick("reload"), + }, + { + label: m(msg("Force Reload")), accelerator: "Shift+CmdOrCtrl+R", click: mainContentsClick("forceReload"), }, { - label: "Toggle Developer Tools", + label: m(msg("Toggle Developer Tools")), accelerator: environment.platform === "darwin" ? "Alt+Command+I" : "Ctrl+Shift+I", click: mainContentsClick("toggleDevTools"), }, { type: "separator" }, - { label: "Actual Size", accelerator: "CmdOrCtrl+0", click: zoomClick("reset") }, - { label: "Zoom In", accelerator: "CmdOrCtrl+=", click: zoomClick("in") }, + { label: m(msg("Actual Size")), accelerator: "CmdOrCtrl+0", click: zoomClick("reset") }, + { label: m(msg("Zoom In")), accelerator: "CmdOrCtrl+=", click: zoomClick("in") }, { - label: "Zoom In", + label: m(msg("Zoom In")), accelerator: "CmdOrCtrl+Plus", visible: false, click: zoomClick("in"), @@ -304,29 +331,29 @@ export const make = Effect.gen(function* () { ...(environment.platform === "darwin" ? [ { - label: "Zoom In", + label: m(msg("Zoom In")), accelerator: "CmdOrCtrl+Shift+=", visible: false, click: zoomClick("in"), }, ] : []), - { label: "Zoom Out", accelerator: "CmdOrCtrl+-", click: zoomClick("out") }, + { label: m(msg("Zoom Out")), accelerator: "CmdOrCtrl+-", click: zoomClick("out") }, // Keypad codes do not match number-row accelerators. { - label: "Actual Size", + label: m(msg("Actual Size")), accelerator: "CmdOrCtrl+num0", visible: false, click: zoomClick("reset"), }, { - label: "Zoom In", + label: m(msg("Zoom In")), accelerator: "CmdOrCtrl+numadd", visible: false, click: zoomClick("in"), }, { - label: "Zoom Out", + label: m(msg("Zoom Out")), accelerator: "CmdOrCtrl+numsub", visible: false, click: zoomClick("out"), @@ -350,7 +377,7 @@ export const make = Effect.gen(function* () { role: "help", submenu: [ { - label: "Check for Updates...", + label: m(msg("Check for Updates...")), click: checkForUpdatesClick, }, ], @@ -360,8 +387,29 @@ export const make = Effect.gen(function* () { yield* electronMenu.setApplicationMenu(template); }).pipe(Effect.withSpan("desktop.menu.configure")); + // Load the saved language before the first build so the menu never starts in English. + const applySavedLanguage = Effect.gen(function* () { + if (Option.isNone(clientSettings)) return; + const saved = yield* clientSettings.value.get.pipe(Effect.orElseSucceed(() => Option.none())); + if (Option.isSome(saved)) { + yield* applyLanguage(saved.value.language).pipe( + Effect.provideService(ElectronApp.ElectronApp, electronApp), + ); + } + }); + + let rebuildsOnLocaleChange = false; return DesktopApplicationMenu.of({ - configure, + configure: applySavedLanguage.pipe( + Effect.andThen(configure), + Effect.tap(() => + Effect.sync(() => { + if (rebuildsOnLocaleChange) return; + rebuildsOnLocaleChange = true; + onLocaleChange(() => runFork(configure)); + }), + ), + ), }); }); diff --git a/apps/desktop/src/window/DesktopWindow.ts b/apps/desktop/src/window/DesktopWindow.ts index 4628be44d5ce1..556853a6cc5f8 100644 --- a/apps/desktop/src/window/DesktopWindow.ts +++ b/apps/desktop/src/window/DesktopWindow.ts @@ -9,6 +9,7 @@ import * as Schema from "effect/Schema"; import * as Semaphore from "effect/Semaphore"; import * as Electron from "electron"; +import { msg } from "gt-i18n"; import { type DesktopSnapShotEvent, DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts"; @@ -39,6 +40,7 @@ import * as PreviewPasskeys from "../preview/Passkeys.ts"; import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts"; import * as DesktopClientSettings from "../settings/DesktopClientSettings.ts"; import * as ElectronApp from "../electron/ElectronApp.ts"; +import { m } from "../i18n/messages.ts"; import * as DesktopRendererHistory from "../telemetry/DesktopRendererHistory.ts"; import { makeQuitShortcutHandler } from "./QuitHold.ts"; import { copyContextMenuImage } from "./ContextMenuImage.ts"; @@ -669,7 +671,7 @@ export const make = Effect.gen(function* () { }); } if (params.dictionarySuggestions.length === 0) { - menuTemplate.push({ label: "No suggestions", enabled: false }); + menuTemplate.push({ label: m(msg("No suggestions")), enabled: false }); } menuTemplate.push({ type: "separator" }); } @@ -677,7 +679,7 @@ export const make = Effect.gen(function* () { if (Option.isSome(ElectronShell.parseSafeExternalUrl(params.linkURL))) { menuTemplate.push( { - label: "Copy Link", + label: m(msg("Copy Link")), click: () => { void runPromise(electronShell.copyText(params.linkURL)); }, @@ -690,7 +692,7 @@ export const make = Effect.gen(function* () { if (Option.isSome(mailtoAddress)) { menuTemplate.push( { - label: "Copy Email Address", + label: m(msg("Copy Email Address")), click: () => { void runPromise(electronShell.copyText(mailtoAddress.value)); }, @@ -701,7 +703,7 @@ export const make = Effect.gen(function* () { if (params.mediaType === "image") { menuTemplate.push({ - label: "Copy Image", + label: m(msg("Copy Image")), click: () => { void runPromise( Effect.tryPromise({ diff --git a/apps/mobile/gt.config.json b/apps/mobile/gt.config.json index 707f56d736cef..2bd924f11922b 100644 --- a/apps/mobile/gt.config.json +++ b/apps/mobile/gt.config.json @@ -1,6 +1,12 @@ { "defaultLocale": "en", - "locales": ["es", "zh", "pt-BR", "fr", "de", "ja", "ko", "ru"], + "locales": ["es", "zh", "pt-BR", "fr", "de", "ja", "ko", "ru", "sv"], + "src": [ + "src/**/*.{ts,tsx}", + "../../packages/client-runtime/src/**/*.{ts,tsx}", + "../../packages/shared/src/**/*.{ts,tsx}", + "!**/*.test.{ts,tsx}" + ], "files": { "gt": { "output": "src/i18n/translations/[locale].json" diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 2ab0e38d89e24..d09a4972312d6 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -63,6 +63,7 @@ "@formatjs/intl-displaynames": "6.8.13", "@formatjs/intl-getcanonicallocales": "2.5.6", "@formatjs/intl-locale": "4.2.13", + "@formatjs/intl-pluralrules": "5.4.6", "@legendapp/list": "catalog:", "@material/material-color-utilities": "0.3.0", "@pierre/diffs": "catalog:", diff --git a/apps/mobile/src/App.tsx b/apps/mobile/src/App.tsx index 84de2bf777cfb..16a77b049efa3 100644 --- a/apps/mobile/src/App.tsx +++ b/apps/mobile/src/App.tsx @@ -4,6 +4,7 @@ import { installThreadOutboxDelivery } from "./state/threadOutboxDelivery"; import * as Linking from "expo-linking"; import * as SplashScreen from "expo-splash-screen"; import { requireNativeModule } from "expo"; +import { useLocale } from "gt-react-native"; import { useEffect, useRef, useState } from "react"; import { Platform, StatusBar } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; @@ -39,6 +40,7 @@ import { } from "./features/agent-awareness/notificationNavigation"; import { installAppShortcuts, + republishAppShortcuts, recordAppShortcutNavigationState, } from "./features/shortcuts/appShortcutsRuntime"; import { @@ -47,6 +49,8 @@ import { useAppearancePreferences, } from "./features/settings/appearance/AppearancePreferencesProvider"; import { RootStack, rootPathnameFromState, workspaceLocationFromState } from "./Stack"; +import { I18nProvider } from "./i18n/I18nProvider"; +import { DEFAULT_LOCALE } from "./i18n/locales"; import { appAtomRegistry } from "./state/atom-registry"; import { subscribeComposerDraftModelReconciliation } from "./state/use-composer-drafts"; import { environmentThreadShells, threadEnvironment } from "./state/threads"; @@ -254,12 +258,27 @@ function SplashScreenCoordinator() { return null; } +function QuickActionsLanguage() { + const locale = useLocale(); + // Shortcuts published before the catalog loaded are English. + const publishedLocale = useRef(DEFAULT_LOCALE); + // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- the launcher keeps quick action titles from the last publish, so a language switch republishes them + useEffect(() => { + if (Platform.OS !== "android" || publishedLocale.current === locale) return; + publishedLocale.current = locale; + republishAppShortcuts(); + }, [locale]); + return null; +} + export default function App() { return ( - + + + @@ -281,6 +300,7 @@ function AppContent() { return ( <> + diff --git a/apps/mobile/src/Stack.tsx b/apps/mobile/src/Stack.tsx index 7b81d0880a401..ca77e1e641d7f 100644 --- a/apps/mobile/src/Stack.tsx +++ b/apps/mobile/src/Stack.tsx @@ -12,6 +12,7 @@ import { useNavigation, } from "@react-navigation/native"; import { createNativeStackScreen } from "@react-navigation/native-stack"; +import { msg, T, useGT, useMessages } from "gt-react-native"; import type { ReactNode } from "react"; import { Platform, Pressable, ScrollView, StyleSheet, useWindowDimensions } from "react-native"; import { useResolveClassNames } from "uniwind"; @@ -152,7 +153,63 @@ import { useNativeLayoutMetrics } from "./native/native-layout-metrics"; import { isPresentedRoute } from "./native/workspace-stack-projection"; import { workspaceDetailRouter } from "./features/layout/workspace/workspace-detail-selection"; -const settingsPage = (title: string) => pageRoute({ title, itemStyle: "standard" }); +const settingsPage = () => pageRoute({ itemStyle: "standard" }); + +const { title: _compactBrandTitle, ...compactBrandHeaderOptions } = getCompactBrandHeaderOptions(); + +// Resolved in the rendered Navigator's screenOptions so each header title follows the UI language; +// route options stay plain objects because registerPresentedRoutes reads them at load. +const ROUTE_TITLES: Readonly> = { + Settings: msg("Settings"), + SettingsEnvironments: msg("Environments"), + SettingsEnvironmentDetail: msg("Environment"), + SettingsEnvironmentNewThreads: msg("Threads"), + SettingsEnvironmentSourceControl: msg("Source control & issues"), + SettingsSourceControlProvider: msg("Provider", { + $context: "settings page of one source control provider", + }), + SettingsIssueTracker: msg("Issue tracker"), + SettingsEnvironmentAgentBehavior: msg("Threads"), + SettingsWorktrees: msg("Worktrees"), + SettingsLabs: msg("Labs"), + SettingsProviderAccounts: msg("Providers"), + SettingsEnvironmentMaintenance: msg("Maintenance"), + SettingsNotifications: msg("Notifications"), + SettingsThreads: msg("Threads"), + SettingsAbout: msg("About"), + SettingsEnvironmentNew: msg("Add Environment"), + SettingsArchive: msg("Archive", { $context: "noun, settings page of archived threads" }), + SettingsNavigation: msg("Navigation tabs"), + SettingsAppearance: msg("Appearance"), + SettingsProjectGrouping: msg("General"), + SettingsOrganization: msg("General"), + SettingsLanguage: msg("Language"), + SettingsProjectOverview: msg("Projects"), + SettingsKeyboard: msg("Keyboard"), + SettingsVoice: msg("Voice"), + SettingsFollowUp: msg("Chat", { $context: "noun, settings page title" }), + SettingsScheduledTasks: msg("Scheduled tasks"), + SettingsScheduledTaskNew: msg("New scheduled task"), + SettingsScheduledTaskEdit: msg("Edit scheduled task"), + SettingsScheduledTaskBranch: msg("Base branch"), + SettingsScheduledTaskThread: msg("Destination"), + SettingsClientStorage: msg("Client Storage"), + SettingsDiagnostics: msg("Diagnostics"), + SettingsUsageAccount: msg("Account"), + SettingsOpenSourceLicenses: msg("Open source licenses"), + SettingsOpenSourceLicense: msg("License notice"), + SettingsUsage: msg("Usage"), + ComponentCatalog: msg("UI components"), + NewTaskProject: msg("Choose project"), + NewTaskEnvironment: msg("Environment"), + NewTaskBranch: msg("Branch"), + AddProject: msg("Add project"), + ThreadFiles: msg("Files"), + SettingsLegal: msg("Legal"), + ConnectOnboarding: msg("Set up {product}", { product: "T3 Connect" }), + Connections: msg("Environments"), + ConnectionsNew: msg("Add Environment"), +}; // Thread settings keep the Duo's vertical bar so cancel, search, filter and confirm sit in the // rail. The picker stack spans the sheet so its header reaches the rail, and insets its content. @@ -172,128 +229,128 @@ const SETTINGS_SCREENS = { screen: SettingsRouteScreen, linking: "settings", options: { - ...pageRoute({ title: "Settings", itemStyle: "standard", root: true }), + ...pageRoute({ itemStyle: "standard", root: true }), ...(Platform.OS === "android" ? { animation: "none" as const } : {}), }, }), SettingsEnvironments: createNativeStackScreen({ screen: SettingsEnvironmentsRouteScreen, linking: "settings/environments", - options: settingsPage("Environments"), + options: settingsPage(), }), SettingsEnvironmentDetail: createNativeStackScreen({ screen: SettingsEnvironmentDetailRouteScreen, linking: "settings/environments/:environmentId", - options: settingsPage("Environment"), + options: settingsPage(), }), // Old links to New threads and Agent behavior open Threads, which absorbed them. SettingsEnvironmentNewThreads: createNativeStackScreen({ screen: SettingsThreadsRouteScreen, linking: "settings/new-threads", - options: settingsPage("Threads"), + options: settingsPage(), }), SettingsEnvironmentSourceControl: createNativeStackScreen({ screen: SettingsEnvironmentSourceControlRouteScreen, linking: "settings/source-control", - options: settingsPage("Source control & issues"), + options: settingsPage(), }), SettingsSourceControlProvider: createNativeStackScreen({ screen: SettingsSourceControlProviderRouteScreen, - options: settingsPage("Provider"), + options: settingsPage(), }), SettingsIssueTracker: createNativeStackScreen({ screen: SettingsIssueTrackerRouteScreen, - options: settingsPage("Issue tracker"), + options: settingsPage(), }), SettingsEnvironmentAgentBehavior: createNativeStackScreen({ screen: SettingsThreadsRouteScreen, linking: "settings/agent-behavior", - options: settingsPage("Threads"), + options: settingsPage(), }), SettingsWorktrees: createNativeStackScreen({ screen: SettingsWorktreesRouteScreen, linking: "settings/worktrees", - options: settingsPage("Worktrees"), + options: settingsPage(), }), SettingsLabs: createNativeStackScreen({ screen: SettingsLabsRouteScreen, linking: "settings/labs", - options: settingsPage("Labs"), + options: settingsPage(), }), SettingsProviderAccounts: createNativeStackScreen({ screen: SettingsProviderAccountsRouteScreen, linking: "settings/provider-accounts", - options: settingsPage("Providers"), + options: settingsPage(), }), SettingsEnvironmentMaintenance: createNativeStackScreen({ screen: SettingsEnvironmentMaintenanceRouteScreen, linking: "settings/maintenance", - options: settingsPage("Maintenance"), + options: settingsPage(), }), SettingsNotifications: createNativeStackScreen({ screen: SettingsNotificationsRouteScreen, linking: "settings/notifications", - options: settingsPage("Notifications"), + options: settingsPage(), }), SettingsThreads: createNativeStackScreen({ screen: SettingsThreadsRouteScreen, linking: "settings/thread-preferences", - options: settingsPage("Threads"), + options: settingsPage(), }), SettingsAbout: createNativeStackScreen({ screen: SettingsAboutRouteScreen, linking: "settings/about", - options: settingsPage("About"), + options: settingsPage(), }), SettingsEnvironmentNew: createNativeStackScreen({ screen: ConnectionsNewRouteScreen, linking: "settings/environment-new", - options: settingsPage("Add Environment"), + options: settingsPage(), }), SettingsArchive: createNativeStackScreen({ screen: ArchivedThreadsRouteScreen, linking: "settings/archive", - options: settingsPage("Archive"), + options: settingsPage(), }), SettingsNavigation: createNativeStackScreen({ screen: SettingsNavigationRouteScreen, linking: "settings/navigation-tabs", - options: settingsPage("Navigation tabs"), + options: settingsPage(), }), SettingsAppearance: createNativeStackScreen({ screen: SettingsAppearanceRouteScreen, linking: "settings/appearance", - options: settingsPage("Appearance"), + options: settingsPage(), }), SettingsProjectGrouping: createNativeStackScreen({ screen: SettingsProjectGroupingRouteScreen, linking: "settings/project-grouping", - options: settingsPage("General"), + options: settingsPage(), }), SettingsOrganization: createNativeStackScreen({ screen: SettingsProjectGroupingRouteScreen, linking: "settings/organization", - options: settingsPage("General"), + options: settingsPage(), }), SettingsLanguage: createNativeStackScreen({ screen: SettingsLanguageRouteScreen, linking: "settings/language", - options: settingsPage("Language"), + options: settingsPage(), }), SettingsProjectOverview: createNativeStackScreen({ screen: SettingsProjectOverviewRouteScreen, linking: "settings/project", - options: settingsPage("Projects"), + options: settingsPage(), }), SettingsKeyboard: createNativeStackScreen({ screen: SettingsKeyboardRouteScreen, linking: "settings/keyboard", - options: settingsPage("Keyboard"), + options: settingsPage(), }), SettingsVoice: createNativeStackScreen({ screen: SettingsVoiceRouteScreen, linking: { path: "settings/voice", alias: ["settings/microphone"] }, - options: settingsPage("Voice"), + options: settingsPage(), }), SettingsVoiceModels: createNativeStackScreen({ screen: SettingsVoiceModelsRouteScreen, @@ -302,32 +359,32 @@ const SETTINGS_SCREENS = { SettingsFollowUp: createNativeStackScreen({ screen: SettingsFollowUpRouteScreen, linking: "settings/follow-ups", - options: settingsPage("Chat"), + options: settingsPage(), }), SettingsScheduledTasks: createNativeStackScreen({ screen: SettingsScheduledTasksRouteScreen, linking: "settings/scheduled-tasks", options: { - ...settingsPage("Scheduled tasks"), + ...settingsPage(), headerTitleStyle: { fontSize: 16, fontWeight: "800" }, }, }), SettingsScheduledTaskNew: createNativeStackScreen({ screen: SettingsScheduledTaskNewRouteScreen, linking: "settings/scheduled-tasks/new", - options: settingsPage("New scheduled task"), + options: settingsPage(), }), SettingsScheduledTaskEdit: createNativeStackScreen({ screen: SettingsScheduledTaskEditRouteScreen, - options: settingsPage("Edit scheduled task"), + options: settingsPage(), }), SettingsScheduledTaskBranch: createNativeStackScreen({ screen: ScheduledTaskBranchPickerRouteScreen, - options: settingsPage("Base branch"), + options: settingsPage(), }), SettingsScheduledTaskThread: createNativeStackScreen({ screen: ScheduledTaskThreadPickerRouteScreen, - options: settingsPage("Destination"), + options: settingsPage(), }), SettingsScheduledTaskModel: createNativeStackScreen({ screen: ScheduledTaskModelPickerRouteScreen, @@ -336,33 +393,33 @@ const SETTINGS_SCREENS = { SettingsClientStorage: createNativeStackScreen({ screen: SettingsClientStorageRouteScreen, linking: "settings/client-storage", - options: settingsPage("Client Storage"), + options: settingsPage(), }), SettingsDiagnostics: createNativeStackScreen({ screen: SettingsDiagnosticsRouteScreen, linking: "settings/diagnostics", - options: settingsPage("Diagnostics"), + options: settingsPage(), }), // These params snapshot the tap time, local filters, and freshly aggregated pools. // A linking path would round-trip them as URL query strings and preserve stale values. SettingsUsageAccount: createNativeStackScreen({ screen: UsageLimitAccountScreen, - options: settingsPage("Account"), + options: settingsPage(), }), SettingsOpenSourceLicenses: createNativeStackScreen({ screen: SettingsOpenSourceLicensesRouteScreen, linking: "settings/open-source-licenses", - options: settingsPage("Open source licenses"), + options: settingsPage(), }), SettingsOpenSourceLicense: createNativeStackScreen({ screen: SettingsOpenSourceLicenseRouteScreen, linking: "settings/open-source-licenses/:entryKey", - options: settingsPage("License notice"), + options: settingsPage(), }), SettingsUsage: createNativeStackScreen({ screen: UsageRouteScreen, linking: "settings/usage", - options: settingsPage("Usage"), + options: settingsPage(), }), SettingsAuth: createNativeStackScreen({ screen: SettingsAuthRouteScreen, @@ -477,13 +534,15 @@ function NotFoundScreen() { style={[{ flex: 1 }, screenBgStyle]} > - Route not found + Route not found navigation.dispatch(StackActions.replace("Home"))} > - Return home + + Return home + ); @@ -494,16 +553,13 @@ const RootStackConfig = createWorkspaceStackNavigator({ UNSTABLE_router: workspaceDetailRouter, // React Navigation calls layouts inline; compiled components would share the navigator's memo cache. layout: (props) => , - screenOptions: { - headerShown: false, - }, + screenOptions: { headerShown: false }, screens: { ...(__DEV__ ? { ComponentCatalog: createNativeStackScreen({ screen: ComponentCatalogScreen, linking: "dev/components", - options: { title: "UI components" }, }), } : {}), @@ -518,7 +574,7 @@ const RootStackConfig = createWorkspaceStackNavigator({ options: { ...pageRoute({ duoMinimize: "never", root: true }), contentStyle: { backgroundColor: "transparent" }, - ...getCompactBrandHeaderOptions(), + ...compactBrandHeaderOptions, }, }), PullRequest: createNativeStackScreen({ @@ -598,23 +654,23 @@ const RootStackConfig = createWorkspaceStackNavigator({ NewTaskProject: createNativeStackScreen({ screen: NewTaskRouteScreen, linking: { path: "new", alias: ["new/project"] }, - options: pageRoute({ title: "Choose project" }), + options: pageRoute(), }), NewTaskEnvironment: createNativeStackScreen({ linking: "new/draft/environment", screen: NewTaskEnvironmentPickerRouteScreen, - options: pageRoute({ title: "Environment" }), + options: pageRoute(), }), NewTaskBranch: createNativeStackScreen({ linking: "new/draft/branch", screen: NewTaskBranchPickerRouteScreen, - options: pageRoute({ title: "Branch" }), + options: pageRoute(), }), AddProject: createNativeStackScreen({ linking: "new/add-project", screen: AddProjectSourceRoute, - options: pageRoute({ title: "Add project" }), + options: pageRoute(), }), AddProjectRepository: createNativeStackScreen({ linking: "new/add-project/repository", @@ -688,7 +744,7 @@ const RootStackConfig = createWorkspaceStackNavigator({ ThreadFiles: createNativeStackScreen({ screen: ThreadFilesTreeScreen, linking: `${THREAD_LINKING_PREFIX}/files`, - options: pageRoute({ title: "Files" }), + options: pageRoute(), }), ThreadFile: createNativeStackScreen({ screen: ThreadFileScreen, @@ -750,13 +806,12 @@ const RootStackConfig = createWorkspaceStackNavigator({ SettingsLegal: createNativeStackScreen({ screen: SettingsLegalRouteScreen, linking: "settings/legal", - options: modalRoute({ header: "solid", title: "Legal" }), + options: modalRoute({ header: "solid" }), }), ConnectOnboarding: createNativeStackScreen({ screen: ConnectOnboardingRouteScreen, linking: "connect-onboarding", options: sheetRoute({ - title: "Set up T3 Connect", header: "solid", detent: 0.6, androidMaxDetent: 0.95, @@ -765,12 +820,12 @@ const RootStackConfig = createWorkspaceStackNavigator({ Connections: createNativeStackScreen({ screen: ConnectionsRouteScreen, linking: "connections", - options: sheetRoute({ title: "Environments", detent: 0.55, maxDetent: 0.7, android: "card" }), + options: sheetRoute({ detent: 0.55, maxDetent: 0.7, android: "card" }), }), ConnectionsNew: createNativeStackScreen({ screen: ConnectionsNewRouteScreen, linking: "connections/new", - options: sheetRoute({ title: "Add Environment", detent: 0.55, maxDetent: 0.7 }), + options: sheetRoute({ detent: 0.55, maxDetent: 0.7 }), }), NotFound: createNativeStackScreen({ screen: NotFoundScreen, @@ -797,15 +852,19 @@ function GuardedScreenLayout(props: { function ScreenRenderFallback(props: RenderFailureProps & { readonly routeName: string }) { const navigation = useNavigation(); + const gt = useGT(); const exit = navigation.canGoBack() - ? { label: "Go back", onPress: () => navigation.goBack() } + ? { label: gt("Go back"), onPress: () => navigation.goBack() } : props.routeName === "Home" ? // Home itself failed, and the Settings list renders inside it; open a Settings page. { - label: "Open settings", + label: gt("Open settings"), onPress: () => openSettings(navigation, DEFAULT_SETTINGS_PAGE), } - : { label: "Return home", onPress: () => navigation.dispatch(StackActions.replace("Home")) }; + : { + label: gt("Return home"), + onPress: () => navigation.dispatch(StackActions.replace("Home")), + }; return ; } @@ -821,22 +880,32 @@ export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navig const { width, height } = useWindowDimensions(); const nativeMetrics = useNativeLayoutMetrics(); const usesSplitView = deriveLayout({ width, height, nativeMetrics }).usesSplitView; + const resolve = useMessages(); /* oxlint-disable react/no-unstable-nested-components -- React Navigation invokes screenLayout as a render callback. */ return ( } - screenOptions={({ route, navigation }) => - Platform.OS === "android" - ? { - animation: androidWorkspaceDestinationAnimation( - route, - navigation.getState().routes, - usesSplitView, - ), - } - : {} - } + screenOptions={({ route, navigation }) => { + const title = + route.name === "Home" + ? getCompactBrandHeaderOptions(undefined, resolve).title + : ROUTE_TITLES[route.name] === undefined + ? undefined + : resolve(ROUTE_TITLES[route.name]); + return { + ...(title === undefined ? {} : { title }), + ...(Platform.OS === "android" + ? { + animation: androidWorkspaceDestinationAnimation( + route, + navigation.getState().routes, + usesSplitView, + ), + } + : {}), + }; + }} /> ); diff --git a/apps/mobile/src/components/BrandMark.tsx b/apps/mobile/src/components/BrandMark.tsx index 28d71929bddb8..b51d0b4a754b3 100644 --- a/apps/mobile/src/components/BrandMark.tsx +++ b/apps/mobile/src/components/BrandMark.tsx @@ -1,5 +1,6 @@ import Constants from "expo-constants"; import { Image } from "expo-image"; +import { msg, T, useMessages } from "gt-react-native"; import { View } from "react-native"; import { AppText as Text } from "./ui/AppText"; @@ -7,12 +8,17 @@ import { T3_CODE_BRAND_MARK_SOURCE } from "./brandAssets"; const appVariant = Constants.expoConfig?.extra?.appVariant; const DEFAULT_STAGE_LABEL = - appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Beta"; + appVariant === "development" + ? msg("Dev", { $context: "app release stage badge" }) + : appVariant === "preview" + ? msg("Preview", { $context: "app release stage badge" }) + : msg("Beta", { $context: "app release stage badge" }); export function BrandMark(props: { readonly compact?: boolean; readonly stageLabel?: string }) { + const m = useMessages(); const compact = props.compact ?? false; const iconSize = compact ? 32 : 44; - const stageLabel = props.stageLabel ?? DEFAULT_STAGE_LABEL; + const stageLabel = props.stageLabel ?? m(DEFAULT_STAGE_LABEL); return ( @@ -36,7 +42,7 @@ export function BrandMark(props: { readonly compact?: boolean; readonly stageLab {!compact ? ( - Mobile control surface for your live coding environments + Mobile control surface for your live coding environments ) : null} diff --git a/apps/mobile/src/components/CompactBrandTitle.tsx b/apps/mobile/src/components/CompactBrandTitle.tsx index 222e536cf4b5c..bf70682462bf4 100644 --- a/apps/mobile/src/components/CompactBrandTitle.tsx +++ b/apps/mobile/src/components/CompactBrandTitle.tsx @@ -1,5 +1,6 @@ import { NATIVE_WORKSPACE_COLUMNS_SUPPORTED } from "../native/NativeWorkspaceColumns"; import Constants from "expo-constants"; +import { useGT } from "gt-react-native"; import { useState } from "react"; import { Platform, View } from "react-native"; @@ -10,6 +11,7 @@ import { resolveMobileStageLabel } from "../lib/mobileBranding"; import { useAndroidControlSizing } from "./ui/useAndroidControlSizing"; const BRAND_MAX_FONT_SCALE = 1.4; +const WORDMARK_SUFFIX = "Code"; export function brandTitleOffset(): number { if (Platform.OS !== "ios") return 0; @@ -24,6 +26,7 @@ export function CompactBrandTitle( readonly fit?: boolean; } = {}, ) { + const gt = useGT(); const stageLabel = resolveMobileStageLabel(Constants.expoConfig?.extra?.appVariant); const titleOffset = brandTitleOffset(); const { scale } = useAndroidControlSizing(); @@ -39,7 +42,7 @@ export function CompactBrandTitle( props.fit && showStage ? (event) => setFullWidth(event.nativeEvent.layout.width) : undefined } aria-level={1} - accessibilityLabel={props.accessibilityLabel ?? "T3 Code, Threads"} + accessibilityLabel={props.accessibilityLabel ?? gt("T3 Code, Threads")} accessible role="heading" className="flex-row items-center gap-1.5" @@ -57,7 +60,7 @@ export function CompactBrandTitle( className="font-t3-medium text-foreground-muted" style={{ fontSize: 21 * scale, letterSpacing: -0.5 * scale }} > - Code + {WORDMARK_SUFFIX} {showStage ? ( @@ -69,8 +71,11 @@ export function ComposerAttachmentThumbnail(props: ComposerAttachmentThumbnailPr accessibilityRole={upload.status === "failed" ? "button" : "text"} accessibilityLabel={ upload.status === "failed" - ? `Retry uploading ${props.attachment.name}` - : `Uploading ${props.attachment.name}, ${Math.floor(upload.progress * 100)}%` + ? gt("Retry uploading {name}", { name: props.attachment.name }) + : gt("Uploading {name}, {percent}%", { + name: props.attachment.name, + percent: Math.floor(upload.progress * 100), + }) } accessibilityHint={upload.status === "failed" ? upload.reason : undefined} disabled={upload.status !== "failed"} @@ -88,7 +93,7 @@ export function ComposerAttachmentThumbnail(props: ComposerAttachmentThumbnailPr /> {!props.compact ? ( - {upload.status === "failed" ? "Retry" : `${Math.floor(upload.progress * 100)}%`} + {upload.status === "failed" ? gt("Retry") : `${Math.floor(upload.progress * 100)}%`} ) : null} @@ -131,6 +136,7 @@ function useComposerImagePreviewUri(attachment: DraftComposerImageAttachment): s function ComposerImageAttachment( props: ComposerAttachmentThumbnailProps & { readonly attachment: DraftComposerImageAttachment }, ) { + const gt = useGT(); const { attachment } = props; const withGallery = useFilePreviewGallery(); const style = { width: props.size, height: props.size, borderRadius: props.borderRadius }; @@ -140,7 +146,7 @@ function ComposerImageAttachment( props.onPressPreview?.( @@ -203,6 +209,7 @@ function ComposerAttachmentContent(props: ComposerAttachmentThumbnailProps) { function ComposerFileAttachment( props: ComposerAttachmentThumbnailProps & { readonly attachment: DraftComposerFileAttachment }, ) { + const gt = useGT(); const { attachment } = props; const style = { width: props.size, height: props.size, borderRadius: props.borderRadius }; const canPreview = isPdfFile(attachment) && props.onPressPreview !== undefined; @@ -213,7 +220,7 @@ function ComposerFileAttachment( canPreview @@ -278,6 +285,7 @@ function ComposerVideoAttachment(props: { } export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) { + const gt = useGT(); const gallery = composerImageGallery(props.attachments); const size = props.imageSize ?? 72; const radius = props.imageBorderRadius ?? 16; @@ -317,7 +325,7 @@ export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) { /> setPreviewOpen(true)} > - {error ?? "Attachment unavailable. Reconnect and try again."} + {error ?? Attachment unavailable. Reconnect and try again.} ) : null}