Skip to content

Commit f9ad3d4

Browse files
authored
Merge branch 'main' into shivam/cursor-transport-failure
2 parents 92c363b + 4e969f3 commit f9ad3d4

297 files changed

Lines changed: 20922 additions & 7411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.coderabbit.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
reviews:
22
review_status: false
33
auto_review:
4-
enabled: false
4+
enabled: true

‎.github/SECURITY.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Security policy
2+
3+
Report security vulnerabilities affecting T3 Code or T3 Tools-operated infrastructure to
4+
[[email protected]](mailto:[email protected]). Please do not disclose them publicly until we have had
5+
a reasonable opportunity to investigate and remediate them.
6+
7+
See the [full security policy](https://t3.codes/security-policy) for reporting details, scope,
8+
and safe harbor terms for good-faith research.

‎.github/scripts/check-nightly-release.cjs‎

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
const MINIMUM_RELEASE_GAP_MS = 6 * 60 * 60 * 1000;
22

3-
// Runs after the workflow acquires the nightly concurrency lock.
4-
async function shouldReleaseNightly({ github, context, core, now = Date.now() }) {
3+
const isNightlyTag = (tag) => /^v.*-nightly\./.test(tag) || tag.startsWith("nightly-v");
4+
5+
// Newest published nightly by publication time, or undefined when none exists.
6+
async function findLatestNightly({ github, context }) {
57
const releases = await github.paginate(github.rest.repos.listReleases, {
68
...context.repo,
79
per_page: 100,
810
});
9-
const lastNightly = releases
10-
.filter(
11-
(release) =>
12-
!release.draft &&
13-
release.published_at &&
14-
(/^v.*-nightly\./.test(release.tag_name) || release.tag_name.startsWith("nightly-v")),
15-
)
11+
return releases
12+
.filter((release) => !release.draft && release.published_at && isNightlyTag(release.tag_name))
1613
.sort((a, b) => Date.parse(b.published_at) - Date.parse(a.published_at))[0];
14+
}
15+
16+
// Runs after the workflow acquires the nightly concurrency lock.
17+
async function shouldReleaseNightly({ github, context, core, now = Date.now() }) {
18+
const lastNightly = await findLatestNightly({ github, context });
1719

1820
if (!lastNightly) {
1921
core.info("No published nightly found. Proceeding with release.");
@@ -41,4 +43,25 @@ async function shouldReleaseNightly({ github, context, core, now = Date.now() })
4143
return true;
4244
}
4345

44-
module.exports = { shouldReleaseNightly };
46+
// Stable releases build the commit the latest nightly shipped, so the stable
47+
// build is one nightly users already ran. Returns the nightly tag, its commit,
48+
// and the stable version that nightly was a preview of.
49+
async function resolveLatestNightlyCommit({ github, context, core }) {
50+
const lastNightly = await findLatestNightly({ github, context });
51+
if (!lastNightly) {
52+
throw new Error("No published nightly found. Stable releases build the latest nightly commit.");
53+
}
54+
55+
const tag = lastNightly.tag_name;
56+
// repos.getCommit dereferences annotated tags, so this is the commit either way.
57+
const { data: commit } = await github.rest.repos.getCommit({ ...context.repo, ref: tag });
58+
const version = /^(?:nightly-)?v(\d+\.\d+\.\d+)-nightly\./.exec(tag)?.[1];
59+
if (!version) {
60+
throw new Error(`Cannot derive a stable version from nightly tag ${tag}.`);
61+
}
62+
63+
core.info(`Latest nightly ${tag} shipped ${commit.sha} as a preview of ${version}.`);
64+
return { tag, sha: commit.sha, version };
65+
}
66+
67+
module.exports = { shouldReleaseNightly, resolveLatestNightlyCommit };

‎.github/scripts/check-nightly-release.test.cjs‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,45 @@ for (const status of ["behind", "diverged"]) {
9999
assert.equal(await shouldReleaseNightly(options), false);
100100
});
101101
}
102+
103+
const { resolveLatestNightlyCommit } = require("./check-nightly-release.cjs");
104+
105+
function nightlyCommitFixture({ releases, commitSha = "abc123" }) {
106+
const refs = [];
107+
const { options } = fixture({ releases });
108+
options.github.rest.repos.getCommit = async ({ ref }) => {
109+
refs.push(ref);
110+
return { data: { sha: commitSha } };
111+
};
112+
return { options, refs };
113+
}
114+
115+
test("stable releases resolve the commit of the newest published nightly", async () => {
116+
const { options, refs } = nightlyCommitFixture({
117+
releases: [
118+
nightly(10, { tag_name: "v1.0.1-nightly.20260905.100" }),
119+
nightly(1, { tag_name: "v1.0.1-nightly.20260905.123" }),
120+
nightly(0, { tag_name: "v1.0.0" }),
121+
nightly(0, { draft: true, tag_name: "v1.0.1-nightly.20260905.999" }),
122+
],
123+
commitSha: "deadbeef",
124+
});
125+
assert.deepEqual(await resolveLatestNightlyCommit(options), {
126+
tag: "v1.0.1-nightly.20260905.123",
127+
sha: "deadbeef",
128+
version: "1.0.1",
129+
});
130+
assert.deepEqual(refs, ["v1.0.1-nightly.20260905.123"]);
131+
});
132+
133+
test("stable releases derive the version from legacy nightly tags", async () => {
134+
const { options } = nightlyCommitFixture({
135+
releases: [nightly(1, { tag_name: "nightly-v0.9.0-nightly.20260905.5" })],
136+
});
137+
assert.equal((await resolveLatestNightlyCommit(options)).version, "0.9.0");
138+
});
139+
140+
test("stable releases fail without a published nightly", async () => {
141+
const { options } = nightlyCommitFixture({ releases: [nightly(0, { tag_name: "v1.0.0" })] });
142+
await assert.rejects(resolveLatestNightlyCommit(options), /No published nightly/);
143+
});

‎.github/workflows/release.yml‎

Lines changed: 105 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- stable
2020
- nightly
2121
version:
22-
description: "Release version (for example 1.2.3 or v1.2.3)"
22+
description: "Stable version override (for example 1.2.3). Defaults to the version the latest nightly previewed."
2323
required: false
2424
type: string
2525

@@ -39,33 +39,54 @@ permissions:
3939
id-token: none
4040

4141
jobs:
42-
check_changes:
43-
name: Check automatic nightly release
44-
if: github.event_name == 'schedule'
42+
# Picks the commit every later job builds. Nightlies and tag pushes build the
43+
# triggering commit. Manual stable releases build the commit of the latest
44+
# published nightly, so stable only ever ships a build that nightly users
45+
# have already run. Scheduled runs also decide here whether a nightly is due.
46+
resolve_commit:
47+
name: Resolve release commit
4548
runs-on: blacksmith-8vcpu-ubuntu-2404
4649
timeout-minutes: 5
4750
outputs:
48-
has_changes: ${{ steps.check.outputs.result }}
51+
ref: ${{ steps.resolve.outputs.ref }}
52+
nightly_version: ${{ steps.resolve.outputs.nightly_version }}
53+
has_changes: ${{ steps.resolve.outputs.has_changes }}
4954
steps:
5055
- name: Checkout
5156
uses: actions/checkout@v6
5257
with:
5358
sparse-checkout: .github/scripts
5459

55-
- id: check
56-
name: Check release gap and new commits
60+
- id: resolve
61+
name: Resolve release commit
5762
uses: actions/github-script@v8
63+
env:
64+
DISPATCH_CHANNEL: ${{ inputs.channel }}
5865
with:
5966
script: |
60-
const { shouldReleaseNightly } = require('./.github/scripts/check-nightly-release.cjs');
61-
return await shouldReleaseNightly({ github, context, core });
67+
const {
68+
shouldReleaseNightly,
69+
resolveLatestNightlyCommit,
70+
} = require('./.github/scripts/check-nightly-release.cjs');
71+
72+
if (context.eventName === 'schedule') {
73+
core.setOutput('has_changes', await shouldReleaseNightly({ github, context, core }));
74+
core.setOutput('ref', context.sha);
75+
} else if (context.eventName === 'workflow_dispatch' && process.env.DISPATCH_CHANNEL !== 'nightly') {
76+
const { tag, sha, version } = await resolveLatestNightlyCommit({ github, context, core });
77+
core.notice(`Stable release builds ${sha}, the commit shipped by ${tag}.`);
78+
core.setOutput('ref', sha);
79+
core.setOutput('nightly_version', version);
80+
} else {
81+
core.setOutput('ref', context.sha);
82+
}
6283
6384
preflight:
6485
name: Preflight
65-
needs: [check_changes]
86+
needs: [resolve_commit]
6687
if: |
67-
!failure() && !cancelled() &&
68-
(github.event_name != 'schedule' || needs.check_changes.outputs.has_changes == 'true')
88+
needs.resolve_commit.result == 'success' &&
89+
(github.event_name != 'schedule' || needs.resolve_commit.outputs.has_changes == 'true')
6990
runs-on: blacksmith-8vcpu-ubuntu-2404
7091
timeout-minutes: 10
7192
outputs:
@@ -78,11 +99,12 @@ jobs:
7899
cli_dist_tag: ${{ steps.release_meta.outputs.cli_dist_tag }}
79100
is_prerelease: ${{ steps.release_meta.outputs.is_prerelease }}
80101
make_latest: ${{ steps.release_meta.outputs.make_latest }}
81-
ref: ${{ github.sha }}
102+
ref: ${{ needs.resolve_commit.outputs.ref }}
82103
steps:
83104
- name: Checkout
84105
uses: actions/checkout@v6
85106
with:
107+
ref: ${{ needs.resolve_commit.outputs.ref }}
86108
fetch-depth: 0
87109
sparse-checkout: |
88110
/*
@@ -104,8 +126,9 @@ jobs:
104126
env:
105127
DISPATCH_CHANNEL: ${{ github.event.inputs.channel }}
106128
DISPATCH_VERSION: ${{ github.event.inputs.version }}
129+
NIGHTLY_VERSION: ${{ needs.resolve_commit.outputs.nightly_version }}
107130
NIGHTLY_DATE: ${{ github.run_started_at }}
108-
NIGHTLY_SHA: ${{ github.sha }}
131+
NIGHTLY_SHA: ${{ needs.resolve_commit.outputs.ref }}
109132
NIGHTLY_RUN_NUMBER: ${{ github.run_number }}
110133
run: |
111134
if [[ "${GITHUB_EVENT_NAME}" == "schedule" || ( "${GITHUB_EVENT_NAME}" == "workflow_dispatch" && "${DISPATCH_CHANNEL:-stable}" == "nightly" ) ]]; then
@@ -123,9 +146,9 @@ jobs:
123146
echo "make_latest=false" >> "$GITHUB_OUTPUT"
124147
else
125148
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
126-
raw="${DISPATCH_VERSION}"
149+
raw="${DISPATCH_VERSION:-$NIGHTLY_VERSION}"
127150
if [[ -z "$raw" ]]; then
128-
echo "workflow_dispatch stable releases require the version input." >&2
151+
echo "workflow_dispatch stable releases need a version input or a published nightly." >&2
129152
exit 1
130153
fi
131154
else
@@ -210,14 +233,12 @@ jobs:
210233

211234
relay_public_config:
212235
name: Resolve T3 Connect public config
213-
# Consumes only the commit SHA, not preflight's resolved version, so it runs
214-
# alongside preflight instead of after it. The condition mirrors preflight's:
215-
# check_changes is skipped on manual and tag releases (skipped is neither failure
216-
# nor success, so success() would be wrong here).
217-
needs: [check_changes]
236+
# Consumes only the release commit, not preflight's resolved version, so it
237+
# runs alongside preflight instead of after it. The condition mirrors preflight's.
238+
needs: [resolve_commit]
218239
if: |
219-
!failure() && !cancelled() &&
220-
(github.event_name != 'schedule' || needs.check_changes.outputs.has_changes == 'true')
240+
needs.resolve_commit.result == 'success' &&
241+
(github.event_name != 'schedule' || needs.resolve_commit.outputs.has_changes == 'true')
221242
runs-on: blacksmith-8vcpu-ubuntu-2404
222243
timeout-minutes: 5
223244
environment:
@@ -239,7 +260,7 @@ jobs:
239260
- name: Checkout
240261
uses: actions/checkout@v6
241262
with:
242-
ref: ${{ github.sha }}
263+
ref: ${{ needs.resolve_commit.outputs.ref }}
243264
sparse-checkout: |
244265
/*
245266
!/.repos/
@@ -312,19 +333,19 @@ jobs:
312333
# machine. node-pty is N-API, so one binary works across all WSL Node versions.
313334
build_wsl_node_pty:
314335
name: Build WSL node-pty (linux-x64)
315-
# Same gating as relay_public_config: only the commit SHA is needed, so this
316-
# runs alongside preflight. See the condition comment there.
317-
needs: [check_changes]
336+
# Same gating as relay_public_config: only the release commit is needed, so
337+
# this runs alongside preflight. See the condition comment there.
338+
needs: [resolve_commit]
318339
if: |
319-
!failure() && !cancelled() &&
320-
(github.event_name != 'schedule' || needs.check_changes.outputs.has_changes == 'true')
340+
needs.resolve_commit.result == 'success' &&
341+
(github.event_name != 'schedule' || needs.resolve_commit.outputs.has_changes == 'true')
321342
runs-on: blacksmith-8vcpu-ubuntu-2404
322343
timeout-minutes: 15
323344
steps:
324345
- name: Checkout
325346
uses: actions/checkout@v6
326347
with:
327-
ref: ${{ github.sha }}
348+
ref: ${{ needs.resolve_commit.outputs.ref }}
328349
sparse-checkout: |
329350
/*
330351
!/.repos/
@@ -1036,6 +1057,60 @@ jobs:
10361057
"${vercel_scope_args[@]}"
10371058
fi
10381059
1060+
deploy_marketing:
1061+
name: Deploy marketing site
1062+
needs: [preflight, release]
1063+
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'nightly' }}
1064+
runs-on: blacksmith-8vcpu-ubuntu-2404
1065+
timeout-minutes: 10
1066+
env:
1067+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
1068+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1069+
VERCEL_TEAM_SLUG: ${{ vars.VERCEL_TEAM_SLUG }}
1070+
steps:
1071+
- name: Checkout
1072+
uses: actions/checkout@v6
1073+
with:
1074+
ref: ${{ needs.preflight.outputs.ref }}
1075+
sparse-checkout: |
1076+
/*
1077+
!/.repos/
1078+
sparse-checkout-cone-mode: false
1079+
1080+
- name: Setup Vite+
1081+
uses: voidzero-dev/setup-vp@v1
1082+
with:
1083+
node-version-file: package.json
1084+
cache: true
1085+
run-install: |
1086+
args:
1087+
- --filter=@t3tools/marketing...
1088+
1089+
- name: Deploy marketing site to Vercel
1090+
shell: bash
1091+
run: |
1092+
set -euo pipefail
1093+
1094+
if [[ -z "${VERCEL_TOKEN:-}" || -z "${VERCEL_ORG_ID:-}" ]]; then
1095+
echo "Missing one or more required Vercel secrets: VERCEL_TOKEN, VERCEL_ORG_ID." >&2
1096+
exit 1
1097+
fi
1098+
1099+
VERCEL_PROJECT_ID="$(
1100+
curl --fail --silent --show-error \
1101+
--header "Authorization: Bearer $VERCEL_TOKEN" \
1102+
"https://api.vercel.com/v9/projects/t3code-marketing?teamId=$VERCEL_ORG_ID" \
1103+
| jq --exit-status --raw-output '.id'
1104+
)"
1105+
export VERCEL_PROJECT_ID
1106+
1107+
vp dlx [email protected] deploy \
1108+
--archive=tgz \
1109+
--prod \
1110+
--yes \
1111+
--token "$VERCEL_TOKEN" \
1112+
--scope "${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
1113+
10391114
finalize:
10401115
name: Finalize release
10411116
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}

‎.macroscope/check-run-agents/effect-service-conventions.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Effect Service Conventions
3-
model: claude-opus-5
4-
effort: high
3+
model: gpt-5-6-sol
4+
effort: medium
55
input: full_diff
66
tools:
77
- browse_code
@@ -16,6 +16,7 @@ labels:
1616
- vouch:trusted
1717
requires:
1818
- Check
19+
maxBudgetPerRun: 5
1920
maxBudgetPerPR: 25
2021
conclusion: failure
2122
showToolCalls: true

‎.macroscope/check-run-agents/ui-consistency.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: UI Consistency
3-
model: claude-opus-5
3+
model: gpt-5-6-terra
44
effort: medium
55
input: full_diff
66
tools:
@@ -15,9 +15,9 @@ labels:
1515
- vouch:trusted
1616
requires:
1717
- Check
18-
maxBudgetPerPR: 25
18+
maxBudgetPerRun: 2
19+
maxBudgetPerPR: 10
1920
conclusion: failure
20-
maxBudgetPerRun: 10
2121
---
2222

2323
# UI consistency review

‎apps/desktop/src/settings/DesktopClientSettings.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const clientSettings: ClientSettings = {
2727
confirmThreadDelete: false,
2828
confirmThreadUnpin: false,
2929
contextWindowMeterEnabled: false,
30-
composerCollapseOnBlur: false,
3130
composerCollapseOnScroll: true,
3231
dismissedProviderUpdateNotificationKeys: [],
3332
diffIgnoreWhitespace: true,

0 commit comments

Comments
 (0)