Skip to content

Commit 1f7aa2b

Browse files
committed
fix(server): preserve delegated approval waits on current main
Merge official main e2cc34f and preserve both approval request kinds and upstream linked-PR imports. Keep task/run ownership, wait behavior and normal completion delivery unchanged. 46 focused tests, contracts types, scoped lint and formatting pass. Full server types retain the same two duplicate Path import errors as the exact official-main control. Independent source review accepts the candidate for upstream publication only. Co-authored-by: Claude Opus 5.5 <[email protected]>
2 parents 08600ee + e2cc34f commit 1f7aa2b

1,308 files changed

Lines changed: 80122 additions & 53670 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/VOUCHED.td‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ github:mackinleysmith
5353
github:maria-rcks
5454
github:MatthewFeroz
5555
github:maxwellyoung
56+
github:mweinbach
5657
github:mwolson
5758
github:myacoub91
5859
github:naMqe-h

‎.github/scripts/mirror-play-apk.cjs‎

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -164,25 +164,15 @@ async function main() {
164164
}
165165
const safeName = build.versionName.replace(/[^0-9A-Za-z.]+/g, "-").replace(/^-|-$/g, "");
166166
const apkName = `t3code-android-${channel}-${safeName}-${build.versionCode}.apk`;
167-
const tag = outputDirectory ? undefined : requireEnv("RELEASE_TAG");
168-
const snapshotTag = `android-beta-${build.versionCode}`;
169-
const release = tag ? readRelease(tag) : undefined;
170-
const snapshot = tag ? readRelease(snapshotTag) : undefined;
171-
const hasApk = (value) =>
172-
value &&
173-
!value.isDraft &&
174-
value.assets.some(
167+
const tag = `android-beta-${build.versionCode}`;
168+
const release = outputDirectory ? undefined : readRelease(tag);
169+
if (
170+
release &&
171+
!release.isDraft &&
172+
release.assets.some(
175173
(asset) => asset.name === apkName && asset.state === "uploaded" && asset.size > 0,
176-
);
177-
const pruneBetaAssets = () => {
178-
for (const stale of release?.assets ?? []) {
179-
if (stale.name.endsWith(".apk") && stale.name !== apkName) {
180-
gh("release", "delete-asset", tag, stale.name, "--yes");
181-
}
182-
}
183-
};
184-
if (hasApk(release) && hasApk(snapshot)) {
185-
pruneBetaAssets();
174+
)
175+
) {
186176
console.log(`${apkName} is already published.`);
187177
return;
188178
}
@@ -209,16 +199,8 @@ async function main() {
209199
"",
210200
"These builds have been promoted for wider testing, but may still contain bugs. The beta is optional; the store app also works with Nightly servers.",
211201
].join("\n");
212-
// Publish the versioned beta first, then advance the stable download page.
213202
// The build number makes retries and unchanged hourly checks idempotent.
214-
publishBeta(
215-
snapshotTag,
216-
apkPath,
217-
notes,
218-
`Android beta ${build.versionName} (${build.versionCode})`,
219-
);
220-
publishBeta(tag, apkPath, notes, "T3 Code for Android (beta)");
221-
pruneBetaAssets();
203+
publishBeta(tag, apkPath, notes, `Android beta ${build.versionName} (${build.versionCode})`);
222204
} finally {
223205
fs.rmSync(path.dirname(apkPath), { recursive: true, force: true });
224206
}

‎.github/workflows/ci.yml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,31 @@ jobs:
268268
- name: Setup Vite+
269269
uses: ./.github/actions/setup-ci-deps
270270

271+
# The browser project runs React tests in headless Chromium. Same cache key as
272+
# test_server, so both jobs share one downloaded browser.
273+
- name: Resolve Playwright version
274+
id: playwright_version
275+
run: echo "version=$(node -p "require('./apps/web/node_modules/playwright/package.json').version")" >> "$GITHUB_OUTPUT"
276+
277+
- name: Cache Chromium
278+
id: chromium_cache
279+
uses: actions/cache@v6
280+
with:
281+
path: ~/.cache/ms-playwright
282+
key: playwright-chromium-shell-${{ runner.os }}-${{ runner.arch }}-${{ steps.playwright_version.outputs.version }}
283+
284+
- name: Install Chromium for web browser tests
285+
if: steps.chromium_cache.outputs.cache-hit != 'true'
286+
run: node apps/web/node_modules/playwright/cli.js install --only-shell chromium
287+
288+
- name: Install missing Chromium system dependencies
289+
run: |
290+
browser=$(find "$HOME/.cache/ms-playwright" -name chrome-headless-shell -type f -print -quit)
291+
test -n "$browser"
292+
if ldd "$browser" | grep '=> not found'; then
293+
node apps/web/node_modules/playwright/cli.js install-deps chromium
294+
fi
295+
271296
- name: Test
272297
run: vp run --filter @t3tools/web test
273298

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Mobile Android APK
22

3-
# Checks closed testing hourly. New beta builds get a versioned prerelease and
4-
# update the android-beta download page. Unchanged checks publish nothing.
3+
# Checks closed testing hourly. Each new beta gets one versioned prerelease.
4+
# Unchanged checks publish nothing.
55
on:
66
schedule:
77
# Avoid minute zero, when GitHub scheduled jobs are busiest.
@@ -21,7 +21,6 @@ jobs:
2121
contents: write
2222
env:
2323
PACKAGE_NAME: com.t3tools.t3code
24-
RELEASE_TAG: android-beta
2524
steps:
2625
- id: credentials
2726
name: Check for Play credentials

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,29 @@ jobs:
234234
MOBILE_BUILD_PROFILE: ${{ inputs.profile || 'production' }}
235235
run: eas build --platform ${{ inputs.platform }} --profile "$MOBILE_BUILD_PROFILE" --auto-submit --non-interactive --no-wait
236236

237+
# @expo/fingerprint swallows autolinking errors and returns no Expo module
238+
# sources, so native changes stop moving the hash and OTAs reach binaries
239+
# that lack them. Refuse to publish any OTA from such a fingerprint.
240+
- name: Verify fingerprints hash Expo native modules
241+
if: steps.expo-token.outputs.present == 'true' && (github.event_name == 'push' || inputs.mode == 'update')
242+
working-directory: apps/mobile
243+
env:
244+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
245+
PLATFORM: ${{ inputs.platform || 'all' }}
246+
run: |
247+
if [ "$PLATFORM" = "all" ]; then platforms="ios android"; else platforms="$PLATFORM"; fi
248+
failed=0
249+
for platform in $platforms; do
250+
# eas-cli prints an environment-loaded notice to stdout before the
251+
# JSON even with --json, so discard everything before the document.
252+
expo_modules="$(eas fingerprint:generate --platform "$platform" --environment production --json --non-interactive | sed -n '/^{/,$p' | jq --arg reason "expoAutolinking${platform^}" '[.sources[] | select((.reasons // []) | index($reason))] | length')"
253+
if [ "${expo_modules:-0}" -eq 0 ]; then
254+
failed=1
255+
echo ":x: $platform: the native fingerprint hashes no Expo native modules — OTAs and builds skipped" >> "$GITHUB_STEP_SUMMARY"
256+
fi
257+
done
258+
exit "$failed"
259+
237260
- name: Publish OTA update (manual)
238261
if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.mode == 'update'
239262
working-directory: apps/mobile

‎.github/workflows/release.yml‎

Lines changed: 52 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ jobs:
297297
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
298298
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config build-essential
299299
300+
# The web package's browser project runs React tests in headless Chromium.
301+
- name: Install Chromium for web browser tests
302+
run: node apps/web/node_modules/playwright/cli.js install --with-deps --only-shell chromium
303+
300304
- name: Test
301305
run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test
302306

@@ -689,11 +693,8 @@ jobs:
689693
resource_key: win32-arm64
690694
cli_archive: true
691695

692-
# npm gets the same bytes as the GitHub Release: the launcher plus one
693-
# package per CLI archive. Preview publishes too, under the `preview`
694-
# dist-tag, which nothing resolves unless asked for by name.
695-
publish_cli:
696-
name: Publish CLI to npm
696+
release:
697+
name: Publish GitHub Release
697698
needs:
698699
[
699700
preflight,
@@ -702,74 +703,13 @@ jobs:
702703
test,
703704
test_server,
704705
desktop_mac_arm64,
705-
desktop_linux_x64,
706-
desktop_linux_arm64,
707-
desktop_win_x64,
708-
desktop_win_arm64,
709-
]
710-
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.quality.result == 'success' && needs.test.result == 'success' && needs.test_server.result == 'success' && needs.desktop_mac_arm64.result == 'success' && needs.desktop_linux_x64.result == 'success' && needs.desktop_linux_arm64.result == 'success' && needs.desktop_win_x64.result == 'success' && needs.desktop_win_arm64.result == 'success' }}
711-
runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
712-
timeout-minutes: 15
713-
permissions:
714-
contents: read
715-
id-token: write
716-
steps:
717-
- name: Checkout
718-
uses: actions/checkout@v6
719-
with:
720-
ref: ${{ needs.preflight.outputs.ref }}
721-
sparse-checkout: |
722-
/*
723-
!/.repos/
724-
sparse-checkout-cone-mode: false
725-
726-
- name: Setup Vite+
727-
uses: voidzero-dev/setup-vp@v1
728-
with:
729-
node-version-file: package.json
730-
cache: true
731-
run-install: |
732-
args:
733-
- --filter=t3...
734-
- --filter=@t3tools/scripts...
735-
736-
- name: Download all CLI archives
737-
uses: actions/download-artifact@v8
738-
with:
739-
pattern: cli-*
740-
merge-multiple: true
741-
path: release-cli
742-
743-
- name: Build npm packages from CLI archives
744-
run: node scripts/build-npm-platform-packages.ts --archives-dir release-cli --version "${{ needs.preflight.outputs.version }}" --output-dir npm-packages
745-
746-
# A dry run of every package first: an auth or scope error here (the
747-
# @t3code org missing, a package without a trusted publisher) fails
748-
# before anything is live, instead of after some platforms already are.
749-
- name: Check npm publish access (dry run)
750-
run: |
751-
if ! node apps/server/scripts/cli.ts publish --packages-dir npm-packages --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --provenance --dry-run --verbose; then
752-
echo "::error::npm publish --dry-run failed. Make sure the @t3code npm org exists and that t3 and every @t3code/t3-<platform> package has a trusted publisher registered for .github/workflows/release.yml (see docs/operations/release.md)." >&2
753-
exit 1
754-
fi
755-
756-
- name: Publish CLI packages
757-
run: node apps/server/scripts/cli.ts publish --packages-dir npm-packages --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --provenance --verbose
758-
759-
release:
760-
name: Publish GitHub Release
761-
needs:
762-
[
763-
preflight,
764-
desktop_mac_arm64,
765706
desktop_mac_x64,
766707
desktop_linux_x64,
767708
desktop_linux_arm64,
768709
desktop_win_x64,
769710
desktop_win_arm64,
770-
publish_cli,
771711
]
772-
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.desktop_mac_arm64.result == 'success' && needs.desktop_mac_x64.result == 'success' && needs.desktop_linux_x64.result == 'success' && needs.desktop_linux_arm64.result == 'success' && needs.desktop_win_x64.result == 'success' && needs.desktop_win_arm64.result == 'success' && needs.publish_cli.result == 'success' }}
712+
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.quality.result == 'success' && needs.test.result == 'success' && needs.test_server.result == 'success' && needs.desktop_mac_arm64.result == 'success' && needs.desktop_mac_x64.result == 'success' && needs.desktop_linux_x64.result == 'success' && needs.desktop_linux_arm64.result == 'success' && needs.desktop_win_x64.result == 'success' && needs.desktop_win_arm64.result == 'success' }}
773713
runs-on: blacksmith-8vcpu-ubuntu-2404
774714
timeout-minutes: 30
775715
permissions:
@@ -957,6 +897,49 @@ jobs:
957897
fail_on_unmatched_files: true
958898
token: ${{ github.token }}
959899

900+
# The `t3` npm package is a launcher that downloads this version's CLI
901+
# archive from the GitHub Release, so it publishes only once that release
902+
# exists. Preview publishes too, under the `preview` dist-tag, which
903+
# nothing resolves unless asked for by name.
904+
publish_cli:
905+
name: Publish CLI to npm
906+
needs: [preflight, release]
907+
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' }}
908+
runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
909+
timeout-minutes: 15
910+
permissions:
911+
contents: read
912+
id-token: write
913+
steps:
914+
- name: Checkout
915+
uses: actions/checkout@v6
916+
with:
917+
ref: ${{ needs.preflight.outputs.ref }}
918+
sparse-checkout: |
919+
/*
920+
!/.repos/
921+
sparse-checkout-cone-mode: false
922+
923+
- name: Setup Vite+
924+
uses: voidzero-dev/setup-vp@v1
925+
with:
926+
node-version-file: package.json
927+
cache: true
928+
run-install: |
929+
args:
930+
- --filter=t3...
931+
- --filter=@t3tools/scripts...
932+
933+
- name: Build the npm launcher
934+
run: node scripts/build-npm-launcher.ts --version "${{ needs.preflight.outputs.version }}" --output-dir npm-packages
935+
936+
- name: Publish the npm launcher
937+
run: |
938+
if ! node apps/server/scripts/cli.ts publish --packages-dir npm-packages --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --provenance --verbose; then
939+
echo "::error::npm publish failed. Make sure package t3 has a trusted publisher registered for .github/workflows/release.yml (see docs/operations/release.md)." >&2
940+
exit 1
941+
fi
942+
960943
publish_aur:
961944
name: Publish AUR package
962945
needs: [preflight, release]
@@ -1074,8 +1057,8 @@ jobs:
10741057
10751058
deploy_web:
10761059
name: Deploy hosted web app
1077-
needs: [preflight, build_web, release]
1078-
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build_web.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel != 'preview' }}
1060+
needs: [preflight, build_web, release, publish_cli]
1061+
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build_web.result == 'success' && needs.release.result == 'success' && needs.publish_cli.result == 'success' && needs.preflight.outputs.release_channel != 'preview' }}
10791062
runs-on: blacksmith-2vcpu-ubuntu-2404
10801063
timeout-minutes: 10
10811064
env:

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ dist-electron/
3333
.showcase/
3434
apps/mobile/.showcase/
3535
apps/mobile/.generated/
36+
apps/mobile/.android-cache/
3637
/.generated/
3738
artifacts/app-store/screenshots/
3839
.github/pr-assets/

‎apps/desktop/gnome-extension/metadata.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"uuid": "[email protected]",
33
"name": "T3 Code SnapShots",
44
"description": "Allows T3 Code to capture the focused window, identify it for optional accessibility text, and animate it into T3 Code. Disable this extension to revoke access.",
5-
"shell-version": ["45", "46", "47", "48", "49", "50"],
6-
"version": 2,
5+
"shell-version": ["45", "46", "47", "48", "49", "50", "51"],
6+
"version": 3,
77
"url": "https://github.com/pingdotgg/t3code"
88
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const layerElectronApp = (calls: ElectronAppCalls) =>
4444
name: Effect.succeed("T3 Code"),
4545
systemLocale: Effect.succeed("en-US"),
4646
whenReady: Effect.void,
47+
requestSingleInstanceLock: Effect.succeed(true),
4748
quit: Effect.void,
4849
exit: () => Effect.void,
4950
relaunch: () => Effect.void,

0 commit comments

Comments
 (0)