Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
0b3ebcf
fix(web): sent messages keep the spaces typed at the start of a line …
matthewcosier Nov 17, 2026
33542a5
fix(server): delegating a task no longer records failed projection re…
mInrOz Nov 17, 2026
218c18b
fix(server): a host-narrowed issue list still names every tracker (#3…
juliusmarminge Nov 17, 2026
9830b85
feat(desktop): drag file pills into Explorer on Windows (#38096)
Yash-Singh1 Nov 17, 2026
79aa7a7
fix(server): failed OTLP exports no longer go unrecorded (#38091)
mInrOz Nov 17, 2026
ecde579
fix(server): preview_open reports a desktop tab it reveals as visible…
juliusmarminge Nov 17, 2026
d3c9100
fix(gitlab): issue timelines keep system events past the first page o…
juliusmarminge Nov 17, 2026
ecb2955
fix(server): Git Bash drive paths load images and files on Windows (#…
juliusmarminge Nov 17, 2026
25fada9
fix(server): a waiting child run marks its parent task waiting (#38112)
juliusmarminge Nov 17, 2026
758291c
fix(server): preserve line breaks in repository identity paths (#38114)
Lucenx9 Nov 17, 2026
1da3f3f
fix(web): review comments added to the chat arrive whole with their l…
juliusmarminge Nov 17, 2026
5842231
fix(server): DOCX text for agents no longer includes object position …
SouthCarpet Nov 17, 2026
81049d2
fix(web): importing light and dark theme files together keeps their c…
StiensWout Nov 17, 2026
077b206
fix(web): same-named themes renamed on batch import keep their CSS (#…
StiensWout Nov 17, 2026
28d2262
fix(web): theme wallpaper stays in the live preview when connectivity…
StiensWout Nov 17, 2026
05d3cc9
fix(web): collapsing a timeline review thread no longer hits Unresolv…
RedHot099 Nov 17, 2026
ea6d3fc
fix(server): a Codex speed change sent during a running turn reaches …
genesiscz Nov 17, 2026
31706f3
fix(shared): theme CSS check no longer rejects @import text inside a …
StiensWout Nov 17, 2026
e9b48b7
fix(muse): usage scanning no longer makes mise download Muse (#38158)
juliusmarminge Nov 17, 2026
0c676d9
fix(web): screen readers name thread details issue and PR rows by num…
juliusmarminge Nov 17, 2026
dd40cb5
fix(web): dictating a citation comment keeps Save beside Cancel (#38172)
juliusmarminge Nov 17, 2026
bee9c3b
fix(server): Devin questions accept a typed answer when allowOther is…
juliusmarminge Nov 17, 2026
47888ec
fix(server): storage cleanup's merge-check fetch no longer times out …
juliusmarminge Nov 17, 2026
cc8593e
fix(server): keep truncated document text valid Unicode (#38171)
Lucenx9 Nov 17, 2026
8009cd8
fix(server): a Codex speed pick made during a running turn reaches Co…
genesiscz Nov 17, 2026
d085ee5
fix(web): decode HEIC previews under desktop CSP (#38188)
Yash-Singh1 Nov 17, 2026
100ba49
fix(ssh): Host patterns match Unicode aliases byte by byte like OpenS…
StiensWout Nov 17, 2026
56e449f
fix(server): worktree recovery no longer fails on Windows when the em…
thenuts Nov 17, 2026
983654b
fix(web): an invalid host filter in an Issues link no longer crashes …
StiensWout Nov 17, 2026
b91ea54
fix(shared): keep Unicode whitespace in launch argument values (#38193)
Lucenx9 Nov 17, 2026
b4dfd75
fix(client-runtime): issues held by two environments list once (#38205)
juliusmarminge Nov 17, 2026
9b3b1c7
fix(client): a thread search that fails says so instead of "No result…
RajvardhanPatil07 Nov 17, 2026
ddb1427
fix(server): a Claude goal no longer shows as set after the CLI drops…
jancuk Nov 17, 2026
ffc5bbf
fix(mobile): fully pushed feature branch offers Create PR (#38182)
StiensWout Nov 17, 2026
7338212
fix(ssh): read wildcard Includes in UTF-8 byte order (#38208)
Lucenx9 Nov 17, 2026
c516061
fix(server): Forgejo PR lookup reads tea API pages over 1 MB (#38211)
juliusmarminge Nov 17, 2026
705c7f2
fix(mobile): bottom of Git panel lists clears the Android nav bar (#3…
vinceglb Nov 17, 2026
a99faf5
feat(antigravity): edit earlier messages with Edit from here (#38227)
Yash-Singh1 Nov 17, 2026
3fdd9fc
fix(mobile): settings filter keeps a selected environment while it is…
StiensWout Nov 17, 2026
0597532
fix(server): queue a provider switch sent while a Claude turn runs (#…
VendettaGhub Nov 17, 2026
4d0e2f5
fix(cli): concurrent installs no longer nest a duplicate runtime (#38…
StiensWout Nov 17, 2026
b46edac
fix(acp): MCP bridge disconnect gives up on an endpoint that never an…
StiensWout Nov 17, 2026
f596689
chore(deps): bump @legendapp/list to 3.7.3 and drop its patch (#38220)
jmeistrich Nov 17, 2026
bfd37b2
feat(speech): recommend local models by language, speed and accuracy …
UtkarshUsername Nov 17, 2026
38f7761
fix(shared): keep literal quotes in POSIX PATH directories (#38238)
Lucenx9 Nov 17, 2026
1063b42
fix(shared): large MCP SSE results in small chunks parse in linear ti…
StiensWout Nov 17, 2026
68108be
fix(web): minimap previews show cited assistant text, not the raw lin…
nikalezah Nov 17, 2026
e5d757f
fix(server): t3_thread_launch without a workspace follows the worktre…
juliusmarminge Nov 17, 2026
6ab633f
fix(server): Android SDK detection looks past an ANDROID_HOME that is…
juliusmarminge Nov 17, 2026
a774d7f
fix(server): issue links on a custom GitHub Enterprise hostname resol…
juliusmarminge Nov 17, 2026
f92c5e8
fix(web): review summary line comments keep which side they refer to …
StiensWout Nov 17, 2026
74b1f97
fix(web): reopening Settings reloads WSL distributions (#38281)
StiensWout Nov 17, 2026
2df750e
fix(web): MCP app full screen header clears the native window control…
juliusmarminge Nov 17, 2026
33892dc
fix(server): images from refused Claude starts survive a fresh-sessio…
StiensWout Nov 17, 2026
de7b5e0
fix(server): t3_thread_read names the thread a pasted link points to …
juliusmarminge Nov 17, 2026
fd7d2ae
fix(azure-devops): issue list no longer fails looking up the signed-i…
Patryks1 Nov 17, 2026
439c965
fix(server): review diffs no longer stall on large reordered files (#…
juliusmarminge Nov 17, 2026
b3df479
fix(ci): a PR title edit no longer cancels the native fingerprint che…
juliusmarminge Nov 17, 2026
e394971
fix(web): restore the Issues right panel shortcut (#38309)
Bil0000 Nov 17, 2026
13ecf5b
feat(cursor): edit earlier messages by rewinding the Cursor agent (#3…
Yash-Singh1 Nov 17, 2026
3d7b74a
fix(server): omit ODF comments from extracted document text (#38313)
Marve10s Nov 17, 2026
81fd069
fix(server): steering onto another Codex instance keeps its context h…
juliusmarminge Nov 17, 2026
e9dc20d
test(server): document extraction slot test no longer races its secon…
juliusmarminge Nov 17, 2026
b387e3a
fix(server): Claude turns receive MCP app model context (#38307)
juliusmarminge Nov 17, 2026
51eb2d5
fix(web): usage chart's screen-reader caption stays hidden in Firefox…
juliusmarminge Nov 17, 2026
94dc06e
fix(cli): keep the old database when project or thread records are mi…
Ari-03 Nov 17, 2026
54ad956
fix(server): file search keeps Git-ignored files a .ignore re-include…
juliusmarminge Nov 17, 2026
4ecbe55
fix(pi): Reasoning that Pi starts again no longer repeats the abandon…
mwolson Nov 17, 2026
2ebe7f8
fix(pi): fork historical turns from their original session (#38315)
Bean0-0 Nov 17, 2026
009966d
fix(web): find in thread paints only matches near the viewport (#38329)
shivamhwp Nov 17, 2026
73e62fc
fix(server): Copilot MCP calls and glob searches keep their identity …
juliusmarminge Nov 17, 2026
7b44788
fix(server): omit page-specific headers and footers from RTF text (#3…
Lucenx9 Nov 17, 2026
856c84e
fix(desktop): picked element keeps its screenshot when the page re-re…
juliusmarminge Nov 17, 2026
24467d6
fix(client): a subagent prompt that opens with comment dividers no lo…
mInrOz Nov 18, 2026
ef57728
fix(gitlab): GitLab issues open again; issue reactions come from REST…
juliusmarminge Nov 18, 2026
959c4c1
fix(server): count only actual slides in PowerPoint attachment text (…
Lucenx9 Nov 18, 2026
1c818a8
fix(server): settling a thread closes its waiting link cards (#38380)
juliusmarminge Nov 18, 2026
25875c1
fix(azure-devops): list issues when work item metadata is large (#38387)
amv146 Nov 18, 2026
65accaf
chore: vouch maschwenk (#38394)
t3dotgg Nov 18, 2026
42763ff
fix(web): screen readers read a pull request's number once in thread …
juliusmarminge Nov 18, 2026
08f3249
fix(server): preserve positional tabs in DOCX attachment text (#38393)
Lucenx9 Nov 18, 2026
724f5c6
fix(server): a refused hub read keeps the account's last good usage r…
Krarilotus Nov 18, 2026
055b449
feat(web,mobile,desktop): translate the whole app into every supporte…
maria-rcks Nov 18, 2026
3e1b7c4
fix(web): a line typed after a composer list is sent after the list (…
juliusmarminge Nov 18, 2026
b8b5aff
fix(server): agents read a Linear issue once when given its link (#38…
StiensWout Nov 18, 2026
2216ffe
fix(server): All issues pages skip the signed-in account read (#38431)
StiensWout Nov 18, 2026
5b6f7c8
fix(server): recover JSON-stringified delegate targets (#38436)
MINIlaolao Nov 18, 2026
baab17b
fix(mobile): retrying an issue filter only reloads repositories that …
StiensWout Nov 18, 2026
c488253
fix(web): pairing links never use the desktop app's t3code:// address…
juliusmarminge Nov 18, 2026
a3b7dbc
chore(fork): merge upstream/main into collin/main
collissimo Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/VOUCHED.td
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ github:lnieuwenhuis
github:Lucenx9
github:mackinleysmith
github:maria-rcks
github:maschwenk
github:MatthewFeroz
github:maxwellyoung
github:mweinbach
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/mobile-fingerprint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ on:
types: [opened, synchronize, reopened, edited]

concurrency:
group: mobile-fingerprint-check-${{ github.event.pull_request.number }}
# A title or body edit gets its own group, so it cannot cancel the PR's real
# run and leave a cancelled check on the head commit.
group: mobile-fingerprint-check-${{ github.event.action == 'edited' && !github.event.changes.base && format('edit-{0}', github.run_id) || github.event.pull_request.number }}
cancel-in-progress: true

jobs:
fingerprint:
name: Native fingerprint diff
if: github.event.action != 'edited' || github.event.changes.base
runs-on: blacksmith-8vcpu-ubuntu-2404
permissions:
contents: read
Expand Down
10 changes: 10 additions & 0 deletions apps/desktop/gt.config.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
5 changes: 4 additions & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand All @@ -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:"
Expand All @@ -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:"
Expand Down
15 changes: 15 additions & 0 deletions apps/desktop/scripts/i18n-generate.mjs
Original file line number Diff line number Diff line change
@@ -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),
]);
6 changes: 4 additions & 2 deletions apps/desktop/src/app/DesktopApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}`,
);
}
Expand Down Expand Up @@ -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;
Expand Down
62 changes: 47 additions & 15 deletions apps/desktop/src/app/DesktopStartupRecovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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: "",
};
}
Expand All @@ -118,7 +149,8 @@ function buildStartupRecoveryHtml(input: {
}): string {
const offer = describeOffer(input.offer);
const output = input.failure.output.trim();
return `<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'"><title>T3 Code could not start</title><style>
const title = escapeHtml(m(msg("T3 Code could not start")));
return `<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'"><title>${title}</title><style>
:root{color-scheme:light dark;--bg:#fff;--fg:#111;--muted:#666;--line:#ddd;--code:#f4f4f4}
@media (prefers-color-scheme:dark){:root{--bg:#000;--fg:#fff;--muted:#999;--line:#333;--code:#111}}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg)}
Expand All @@ -129,12 +161,12 @@ h1{font-size:18px;margin:0}p{margin:0}.muted{color:var(--muted)}
.button.primary{background:var(--fg);color:var(--bg);border-color:var(--fg)}
pre{flex:1;min-height:60px;margin:0;overflow:auto;background:var(--code);border:1px solid var(--line);border-radius:6px;padding:10px;font:11px/1.4 ui-monospace,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word}
</style></head><body>
<h1>T3 Code could not start</h1>
<h1>${title}</h1>
<p>${escapeHtml(input.failure.reason)}</p>
<p>${escapeHtml(offer.text)}</p>
<div class="actions">${offer.action}${actionLink("copy", "Copy details")}${actionLink("quit", "Quit")}</div>
<pre>${escapeHtml(output.length > 0 ? output : "The server wrote no output.")}</pre>
<p class="muted">Version ${escapeHtml(input.appVersion)}. T3 Code tries again in the background. Logs: ${escapeHtml(input.logDir)}</p>
<div class="actions">${offer.action}${actionLink("copy", m(msg("Copy details")))}${actionLink("quit", m(msg("Quit", { $context: "button, quits the app" })))}</div>
<pre>${escapeHtml(output.length > 0 ? output : m(msg("The server wrote no output.")))}</pre>
<p class="muted">${escapeHtml(m(msg("Version {version}. T3 Code tries again in the background. Logs: {logDir}"), { version: input.appVersion, logDir: input.logDir }))}</p>
</body></html>`;
}

Expand Down Expand Up @@ -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: {
Expand Down
12 changes: 7 additions & 5 deletions apps/desktop/src/backend/DesktopBackendPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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");
Expand Down Expand Up @@ -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;
Expand All @@ -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.
Expand Down Expand Up @@ -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),
),
),
Expand Down
49 changes: 40 additions & 9 deletions apps/desktop/src/backend/DesktopHomeOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -92,15 +94,44 @@ export const readLiveHomeOwner = Effect.fn("DesktopHomeOwner.readLiveHomeOwner")
export const homeOwnedMessage = (owner: Option.Option<HomeOwner>): 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,
);
},
});
Loading
Loading