Skip to content

Commit 3c34a97

Browse files
Merge remote-tracking branch 'origin/main' into fix/codex-keep-launch-mcp-servers
2 parents bdbe41a + b2fa5d3 commit 3c34a97

619 files changed

Lines changed: 26252 additions & 5272 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.

‎.github/actions/setup-ci-deps/action.yml‎

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,34 @@ runs:
1818
path: ~/.vite-plus
1919
key: vite-plus-home-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}
2020

21+
- name: Setup Vite+
22+
uses: voidzero-dev/setup-vp@v1
23+
with:
24+
node-version-file: package.json
25+
cache: false
26+
run-install: false
27+
28+
- name: Resolve pnpm store path
29+
id: pnpm_store
30+
shell: bash
31+
run: |
32+
store_path="$(vp pm cache dir)"
33+
echo "path=$store_path" >> "$GITHUB_OUTPUT"
34+
35+
# setup-vp's shared cache key ignores install filters. Keep full installs in a
36+
# separate namespace, including fallback restores.
2137
# The pnpm store stays a cache tarball on the runner's own disk. A store on a
2238
# Blacksmith sticky disk mounts in under a second, but pnpm then copies every
2339
# package across filesystems instead of hard-linking it: install took 28-49s
2440
# against 9s plus an 11s restore.
25-
- name: Setup Vite+
26-
uses: voidzero-dev/setup-vp@v1
41+
- name: Cache full pnpm store
42+
uses: actions/cache@v6
2743
with:
28-
node-version-file: package.json
29-
cache: true
30-
run-install: true
44+
path: ${{ steps.pnpm_store.outputs.path }}
45+
key: pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json') }}
46+
restore-keys: |
47+
pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-
48+
49+
- name: Install dependencies
50+
shell: bash
51+
run: vp install

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ jobs:
482482
!/apps/mobile/modules/t3-terminal/Vendor/**/*.a
483483
sparse-checkout-cone-mode: false
484484

485-
# A full install: a filtered one that misses the cache first saves its
486-
# partial store under the shared lockfile key for every later job.
487485
- name: Setup Vite+
488486
uses: ./.github/actions/setup-ci-deps
489487

‎.github/workflows/deploy-relay.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
deploy_relay:
2828
name: Deploy production relay
2929
# A manual run from another branch would deploy that branch to production.
30-
if: github.ref == 'refs/heads/main'
30+
if: github.repository == 'pingdotgg/t3code' && github.ref == 'refs/heads/main'
3131
runs-on: blacksmith-8vcpu-ubuntu-2404
3232
timeout-minutes: 15
3333
environment:

‎.github/workflows/mobile-android-apk.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
jobs:
1616
mirror:
1717
name: Mirror beta APK
18+
if: github.repository == 'pingdotgg/t3code'
1819
runs-on: blacksmith-2vcpu-ubuntu-2404
1920
timeout-minutes: 10
2021
permissions:

‎.github/workflows/mobile-eas-production.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ concurrency:
7575
jobs:
7676
production:
7777
name: EAS ${{ inputs.profile || 'production' }} ${{ github.event_name == 'push' && 'auto' || inputs.mode }}
78+
if: github.repository == 'pingdotgg/t3code'
7879
runs-on: blacksmith-8vcpu-ubuntu-2404
7980
permissions:
8081
contents: read

‎.github/workflows/publish-aur.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ concurrency:
3737
jobs:
3838
publish:
3939
name: Validate and publish
40+
if: github.repository == 'pingdotgg/t3code'
4041
runs-on: blacksmith-8vcpu-ubuntu-2404
4142
timeout-minutes: 30
4243
container:

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
# have already run. Scheduled runs also decide here whether a nightly is due.
5151
resolve_commit:
5252
name: Resolve release commit
53+
if: github.repository == 'pingdotgg/t3code'
5354
runs-on: blacksmith-8vcpu-ubuntu-2404
5455
timeout-minutes: 5
5556
outputs:
@@ -128,12 +129,8 @@ jobs:
128129
!/.repos/
129130
sparse-checkout-cone-mode: false
130131

131-
- name: Setup Vite+
132-
uses: voidzero-dev/setup-vp@v1
133-
with:
134-
node-version-file: package.json
135-
cache: true
136-
run-install: true
132+
- name: Setup dependencies
133+
uses: ./.github/actions/setup-ci-deps
137134
env:
138135
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
139136

@@ -246,12 +243,8 @@ jobs:
246243
!/.repos/
247244
sparse-checkout-cone-mode: false
248245

249-
- name: Setup Vite+
250-
uses: voidzero-dev/setup-vp@v1
251-
with:
252-
node-version-file: package.json
253-
cache: true
254-
run-install: true
246+
- name: Setup dependencies
247+
uses: ./.github/actions/setup-ci-deps
255248

256249
- name: Ensure Electron runtime is installed
257250
run: vp run --filter @t3tools/desktop ensure:electron
@@ -280,12 +273,8 @@ jobs:
280273
!/.repos/
281274
sparse-checkout-cone-mode: false
282275

283-
- name: Setup Vite+
284-
uses: voidzero-dev/setup-vp@v1
285-
with:
286-
node-version-file: package.json
287-
cache: true
288-
run-install: true
276+
- name: Setup dependencies
277+
uses: ./.github/actions/setup-ci-deps
289278

290279
- name: Ensure Electron runtime is installed
291280
run: vp run --filter @t3tools/desktop ensure:electron
@@ -324,12 +313,8 @@ jobs:
324313
!/.repos/
325314
sparse-checkout-cone-mode: false
326315

327-
- name: Setup Vite+
328-
uses: voidzero-dev/setup-vp@v1
329-
with:
330-
node-version-file: package.json
331-
cache: true
332-
run-install: true
316+
- name: Setup dependencies
317+
uses: ./.github/actions/setup-ci-deps
333318

334319
# No Electron setup here: `t3` (apps/server) has no Electron dependency
335320
# and none of its tests touch the runtime. Only the non-server `test`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
!macro customInstall
2+
!ifndef DO_NOT_CREATE_START_MENU_SHORTCUT
3+
${IfNot} ${FileExists} "$newStartMenuLink"
4+
!insertmacro createMenuDirectory
5+
CreateShortCut "$newStartMenuLink" "$appExe" "" "$appExe" 0 "" "" "${APP_DESCRIPTION}"
6+
ClearErrors
7+
WinShell::SetLnkAUMI "$newStartMenuLink" "${APP_ID}"
8+
${EndIf}
9+
!endif
10+
!macroend

‎apps/desktop/scripts/build-preview-annotation-css.mjs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ const compilerInput = [
2929
annotationSource.replace('@import "tailwindcss";', "@tailwind utilities;"),
3030
].join("\n");
3131
const compiler = await compile(compilerInput, { base: appRoot });
32-
const css = compiler.build([...candidates]);
32+
// Shadow-root styles cannot register @property defaults. Make Tailwind's
33+
// fallback unconditional so border, shadow, and ring utilities have defaults.
34+
const compiledCss = compiler.build([...candidates]);
35+
const css = compiledCss.replace(
36+
/(@layer properties \{\n) @supports [^\n]*\{\n([\s\S]*?)\n \}\n(\})/,
37+
"$1$2\n$3",
38+
);
39+
if (css === compiledCss || /@layer properties\s*\{\s*@supports\b/.test(css)) {
40+
throw new Error("Tailwind @property fallback was not unwrapped; update the pattern above.");
41+
}
3342
const encodedCss = `'${css
3443
.replaceAll("\\", "\\\\")
3544
.replaceAll("'", "\\'")

‎apps/desktop/src/app/DesktopEarlyElectronStartup.test.ts‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as NodePath from "node:path";
33
import { assert, describe, it } from "@effect/vitest";
44

55
import {
6+
restoreEarlyLinuxDeviceScaleFactor,
67
resolveEarlyLinuxElectronOptions,
78
resolveEarlyLinuxPasswordStorePreference,
89
resolveLinuxDisableFeaturesSwitch,
@@ -269,3 +270,70 @@ describe("DesktopEarlyElectronStartup", () => {
269270
});
270271
});
271272
});
273+
274+
describe("Linux device scale persistence failures", () => {
275+
const input = {
276+
env: { T3CODE_HOME: "/isolated" },
277+
homeDirectory: "/home/user",
278+
joinPath: NodePath.posix.join,
279+
};
280+
281+
it.each(["0", "Infinity", "garbage"])("ignores invalid persisted scale %j", (value) => {
282+
const applied: Array<[string, string]> = [];
283+
const writes: Array<string> = [];
284+
restoreEarlyLinuxDeviceScaleFactor({
285+
...input,
286+
commandLine: {
287+
hasSwitch: () => false,
288+
getSwitchValue: () => "",
289+
appendSwitch: (name, scale) => applied.push([name, scale]),
290+
},
291+
readFileString: () => value,
292+
writeFileString: (_path, contents) => writes.push(contents),
293+
});
294+
assert.deepEqual(applied, []);
295+
assert.deepEqual(writes, []);
296+
});
297+
298+
it("keeps startup available with default scaling when saved state cannot be read", () => {
299+
const applied: Array<[string, string]> = [];
300+
restoreEarlyLinuxDeviceScaleFactor({
301+
...input,
302+
commandLine: {
303+
hasSwitch: () => false,
304+
getSwitchValue: () => "",
305+
appendSwitch: (name, value) => applied.push([name, value]),
306+
},
307+
readFileString: () => {
308+
throw new Error("ENOENT");
309+
},
310+
writeFileString: () => {},
311+
});
312+
assert.deepEqual(applied, []);
313+
});
314+
315+
it("keeps an explicit scale when saving it fails, without falling back to saved state", () => {
316+
const applied: Array<[string, string]> = [];
317+
const reads: Array<string> = [];
318+
const writes: Array<string> = [];
319+
restoreEarlyLinuxDeviceScaleFactor({
320+
...input,
321+
commandLine: {
322+
hasSwitch: () => true,
323+
getSwitchValue: () => "1",
324+
appendSwitch: (name, value) => applied.push([name, value]),
325+
},
326+
readFileString: (path) => {
327+
reads.push(path);
328+
return "1.75";
329+
},
330+
writeFileString: (_path, value) => {
331+
writes.push(value);
332+
throw new Error("EACCES");
333+
},
334+
});
335+
assert.deepEqual(writes, ["1"]);
336+
assert.deepEqual(reads, []);
337+
assert.deepEqual(applied, []);
338+
});
339+
});

0 commit comments

Comments
 (0)