Skip to content

Commit 9de7040

Browse files
Merge pull request #37 from ScriptedAlchemy/sync/upstream-2026-10-31
chore: sync t3code fork with upstream v0.1.6
2 parents e747cef + 7b90da3 commit 9de7040

31 files changed

Lines changed: 256 additions & 458 deletions

‎.github/workflows/windows-tests.yml‎

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ permissions:
2626
jobs:
2727
test:
2828
name: Test (${{ inputs.package || 'all non-server' }})
29-
runs-on: blacksmith-8vcpu-windows-2025
29+
# Forks do not inherit upstream's Blacksmith runner integration.
30+
runs-on: ${{ github.repository == 'pingdotgg/t3code' && 'blacksmith-8vcpu-windows-2025' || 'windows-2025' }}
3031
timeout-minutes: 45
3132
steps:
3233
- name: Checkout
@@ -64,6 +65,18 @@ jobs:
6465
if: inputs.package == '' || inputs.package == 'apps/desktop'
6566
run: vp run --filter "@t3tools/desktop" ensure:electron
6667

68+
- name: Install Chromium
69+
if: inputs.package == '' || inputs.package == 'apps/web'
70+
run: node apps/web/node_modules/playwright/cli.js install --only-shell chromium
71+
72+
- name: Install server Chromium
73+
if: inputs.package == 'apps/server'
74+
run: node apps/server/node_modules/playwright-core/cli.js install --only-shell chromium
75+
76+
- name: Build server native addon
77+
if: inputs.package == 'apps/server' && inputs.files != ''
78+
run: node native/project-memory/build.mjs
79+
6780
# `vp run ... test -- <files>` does not forward positional args to vitest,
6881
# so file-scoped runs call `vp test run` inside the package instead.
6982
- name: Test
@@ -72,7 +85,21 @@ jobs:
7285
$package = '${{ inputs.package }}'
7386
$files = '${{ inputs.files }}'
7487
if ($package -eq '') {
75-
vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test
88+
$packages = node -e "const { readWorkspace } = require('./.github/scripts/ci-changes.cjs'); for (const pkg of readWorkspace()) if (pkg.hasTest && pkg.name !== 't3' && pkg.name !== '@t3tools/monorepo') console.log(pkg.dir)"
89+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
90+
$failed = @()
91+
foreach ($workspace in $packages) {
92+
Write-Output "::group::Test $workspace"
93+
vp run --filter "./$workspace" test
94+
$exitCode = $LASTEXITCODE
95+
Write-Output "::endgroup::"
96+
if ($exitCode -ne 0) { $failed += $workspace }
97+
}
98+
if ($failed.Count -gt 0) {
99+
Write-Output "::error::Failed test suites: $($failed -join ', ')"
100+
exit 1
101+
}
102+
exit 0
76103
} elseif ($files -eq '') {
77104
vp run --filter "./$package" test
78105
} else {

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@t3tools/desktop",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": true,
55
"type": "module",
66
"main": "dist-electron/boot.cjs",

‎apps/mobile/src/features/threads/ThreadRouteScreen.tsx‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import { useSelectedThreadWorktree } from "../../state/use-selected-thread-workt
8181
import { useThreadComposerState } from "../../state/use-thread-composer-state";
8282
import { resolveMergeBackTargetThreadId } from "@t3tools/client-runtime/state/thread-relationships";
8383
import { resolveLatestMergeBackRun } from "@t3tools/client-runtime/state/thread-workflows";
84-
import { threadEnvironment, useThreadFamily } from "../../state/threads";
84+
import { threadEnvironment } from "../../state/threads";
8585
import { EMPTY_ENVIRONMENT_THREAD_STATE } from "@t3tools/client-runtime/state/threads";
8686
import { useProjects } from "../../state/entities";
8787
import { projectThreadContentPresentation } from "./threadContentPresentation";
@@ -244,12 +244,6 @@ function LiveThreadRouteController(props: ThreadRouteScreenProps) {
244244
const connectionsReady = useConnectionsReady();
245245
const { connectionState } = useRemoteConnectionStatus();
246246
const { selectedThread } = useThreadSelection();
247-
// Subagent rows, the open child's own row and its ancestors come from the family when the
248-
// shell leaves idle children out.
249-
useThreadFamily(
250-
selectedThread?.environmentId ?? null,
251-
selectedThread?.lineage.rootThreadId ?? null,
252-
);
253247
const params = props.route.params ?? {};
254248
const environmentIdRaw = firstRouteParam(params.environmentId);
255249
const threadIdRaw = firstRouteParam(params.threadId);

‎apps/mobile/src/state/threads.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
} from "@t3tools/client-runtime/state/threads";
1212
import type { EnvironmentId, ThreadId } from "@t3tools/contracts";
1313
import { AsyncResult, Atom } from "effect/reactivity";
14-
import { useEffect } from "react";
1514

1615
import { environmentCatalog } from "../connection/catalog";
1716
import { connectionAtomRuntime } from "../connection/runtime";
@@ -45,18 +44,6 @@ export const environmentThreadShells = createEnvironmentThreadShellAtoms({
4544
snapshotAtom: threadEnvironment.snapshotAtom,
4645
});
4746

48-
/** Keeps the subagent tree under `rootThreadId` in the thread list while the caller shows it. */
49-
export function useThreadFamily(
50-
environmentId: EnvironmentId | null,
51-
rootThreadId: ThreadId | null,
52-
): void {
53-
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- mounts the subagent tree under the root thread into the shared thread registry while the caller shows it
54-
useEffect(() => {
55-
if (environmentId === null || rootThreadId === null) return;
56-
return threadFamilies.mount(appAtomRegistry, environmentId, rootThreadId);
57-
}, [environmentId, rootThreadId]);
58-
}
59-
6047
// Long enough for the opened screen to subscribe; its subscription keeps the thread after this.
6148
const OPENING_THREAD_HOLD_MS = 3_000;
6249

‎apps/server/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "t3",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"license": "MIT",
55
"repository": {
66
"type": "git",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"agent-device": "0.21.31",
3-
"expo-device-hub": "0.19.0-canary-20261023-1357114"
3+
"expo-device-hub": "0.19.1"
44
}

‎apps/server/src/provider/antigravityUsageLimits.test.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ const fixture = Effect.fn("AntigravityUsageTest.fixture")(function* (
110110
);
111111
}
112112
expect(JSON.parse(body)).toEqual({ project: "project-id" });
113+
expect(request.headers["user-agent"]).toMatch(/^antigravity\/hub\/2\.24\.0 /);
113114
return HttpClientResponse.fromWeb(
114115
request,
115116
request.url.endsWith(":retrieveUserQuotaSummary")
@@ -475,6 +476,28 @@ describe("Antigravity subscription limits", () => {
475476
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
476477
);
477478

479+
it.effect("labels Argon's weekly quota apart from the default Gemini weekly quota", () =>
480+
Effect.gen(function* () {
481+
const { probe } = yield* fixture({
482+
summary: {
483+
groups: [
484+
...summary.groups,
485+
{
486+
displayName: "Gemini 4 Argon",
487+
buckets: [
488+
{ bucketId: "gemini-argon-wtu-weekly", window: "weekly", remainingFraction: 0.6 },
489+
],
490+
},
491+
],
492+
},
493+
});
494+
const limits = yield* probe;
495+
const byId = new Map(limits.windows.map((window) => [window.id, window]));
496+
expect(byId.get("gemini-weekly")?.label).toBe("Gemini · Weekly");
497+
expect(byId.get("gemini-argon-wtu-weekly")?.label).toBe("Gemini 4 Argon · Weekly");
498+
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
499+
);
500+
478501
it.effect("keeps one endpoint's quotas when the other fails", () =>
479502
Effect.gen(function* () {
480503
const { probe } = yield* fixture({

‎apps/server/src/provider/antigravityUsageLimits.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,14 @@ function summaryWindows(summary: typeof Summary.Type, requestedAt: number) {
124124
for (const group of groups ?? []) {
125125
for (const bucket of group.buckets ?? []) {
126126
if (bucket.disabled) continue;
127-
const family = bucket.bucketId.startsWith("gemini-")
128-
? "Gemini"
129-
: bucket.bucketId.startsWith("3p-")
130-
? "Claude & GPT (shared)"
131-
: group.displayName?.trim() || bucket.bucketId;
127+
// Argon is metered apart from the default Gemini buckets; keep its group name.
128+
const family = bucket.bucketId.startsWith("gemini-argon-")
129+
? group.displayName?.trim() || "Gemini Argon"
130+
: bucket.bucketId.startsWith("gemini-")
131+
? "Gemini"
132+
: bucket.bucketId.startsWith("3p-")
133+
? "Claude & GPT (shared)"
134+
: group.displayName?.trim() || bucket.bucketId;
132135
const weekly = bucket.window === "weekly";
133136
const session = bucket.window === "5h";
134137
const windowDurationMins = SUMMARY_WINDOW_MINS.get(bucket.window ?? "");
@@ -284,7 +287,7 @@ export const makeAntigravityUsageProbe = Effect.fn("makeAntigravityUsageProbe")(
284287
HttpClientRequest.post(`${endpoint}/v1internal:${operation}`).pipe(
285288
HttpClientRequest.setHeaders({
286289
Authorization: `Bearer ${accessToken}`,
287-
"User-Agent": `antigravity/hub/1.0.0 (aidev_client; os_type=${platform}; arch=${architecture}; cl=963137146)`,
290+
"User-Agent": `antigravity/hub/2.24.0 (aidev_client; os_type=${platform}; arch=${architecture}; cl=963137146)`,
288291
}),
289292
HttpClientRequest.bodyJsonUnsafe(
290293
token.project_id ? { project: token.project_id } : {},

‎apps/web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@t3tools/web",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": true,
55
"type": "module",
66
"scripts": {

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ import { isEditableFocused } from "../lib/editableFocus";
185185
import { DEFAULT_RESOLVED_KEYBINDINGS } from "@t3tools/shared/keybindings";
186186
import { shortcutLabelForCommand } from "../keybindings";
187187
import { cn } from "~/lib/utils";
188+
import { isModelPickerOpen } from "../modelPickerVisibility";
188189
import { COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS } from "~/workspaceTitlebar";
189190
import { toastManager } from "./ui/toast";
190191
import { projectScriptIdFromCommand } from "~/projectScripts";
@@ -234,7 +235,7 @@ import {
234235
primaryServerKeybindingsAtom,
235236
serverEnvironment,
236237
} from "../state/server";
237-
import { threadEnvironment, useThreadFamily } from "../state/threads";
238+
import { threadEnvironment } from "../state/threads";
238239
import { resolveProviderSkillsForCwd } from "@t3tools/client-runtime/providerSkills";
239240
import { vcsEnvironment } from "../state/vcs";
240241
import {
@@ -488,14 +489,6 @@ export default function ChatView(props: ChatViewProps) {
488489
});
489490
const serverThreadProjection = useQuietThreadProjection(routeThreadDetailRef);
490491
const serverProjection = serverThreadProjection?.projection ?? null;
491-
// Subagent rows, an open child's own row and its ancestors come from the family when the shell
492-
// leaves idle children out. Every source agrees on the root, so the key never flips.
493-
useThreadFamily(
494-
routeKind === "server" ? environmentId : null,
495-
serverThreadShell?.lineage.rootThreadId ??
496-
serverProjection?.thread.lineage.rootThreadId ??
497-
null,
498-
);
499492
// Only the shell-less fallback needs these; with a shell, the shell carries them.
500493
const fallbackDetailRef = serverThreadShell === null ? routeThreadDetailRef : null;
501494
const fallbackUpdatedAt = useThreadUpdatedAt(fallbackDetailRef);
@@ -1858,7 +1851,8 @@ export default function ChatView(props: ChatViewProps) {
18581851
);
18591852
const scheduleComposerFocus = () => {
18601853
window.requestAnimationFrame(() => {
1861-
focusComposer();
1854+
// The model picker stays open through its own changes, so it keeps focus.
1855+
if (!isModelPickerOpen()) focusComposer();
18621856
});
18631857
};
18641858
const scheduleComposerFocusStable = useStableCallback(scheduleComposerFocus);

0 commit comments

Comments
 (0)