Skip to content

Commit 5184c4b

Browse files
Merge remote-tracking branch 'upstream/main' into t3code/pr-18264/fix/settings-single-browser-section
# Conflicts: # apps/web/src/components/settings/IntegrationsSettings.test.tsx
2 parents a0d7d9c + da7c4f2 commit 5184c4b

755 files changed

Lines changed: 49687 additions & 47588 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: 48 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -689,11 +689,8 @@ jobs:
689689
resource_key: win32-arm64
690690
cli_archive: true
691691

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
692+
release:
693+
name: Publish GitHub Release
697694
needs:
698695
[
699696
preflight,
@@ -702,74 +699,13 @@ jobs:
702699
test,
703700
test_server,
704701
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,
765702
desktop_mac_x64,
766703
desktop_linux_x64,
767704
desktop_linux_arm64,
768705
desktop_win_x64,
769706
desktop_win_arm64,
770-
publish_cli,
771707
]
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' }}
708+
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' }}
773709
runs-on: blacksmith-8vcpu-ubuntu-2404
774710
timeout-minutes: 30
775711
permissions:
@@ -957,6 +893,49 @@ jobs:
957893
fail_on_unmatched_files: true
958894
token: ${{ github.token }}
959895

896+
# The `t3` npm package is a launcher that downloads this version's CLI
897+
# archive from the GitHub Release, so it publishes only once that release
898+
# exists. Preview publishes too, under the `preview` dist-tag, which
899+
# nothing resolves unless asked for by name.
900+
publish_cli:
901+
name: Publish CLI to npm
902+
needs: [preflight, release]
903+
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' }}
904+
runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
905+
timeout-minutes: 15
906+
permissions:
907+
contents: read
908+
id-token: write
909+
steps:
910+
- name: Checkout
911+
uses: actions/checkout@v6
912+
with:
913+
ref: ${{ needs.preflight.outputs.ref }}
914+
sparse-checkout: |
915+
/*
916+
!/.repos/
917+
sparse-checkout-cone-mode: false
918+
919+
- name: Setup Vite+
920+
uses: voidzero-dev/setup-vp@v1
921+
with:
922+
node-version-file: package.json
923+
cache: true
924+
run-install: |
925+
args:
926+
- --filter=t3...
927+
- --filter=@t3tools/scripts...
928+
929+
- name: Build the npm launcher
930+
run: node scripts/build-npm-launcher.ts --version "${{ needs.preflight.outputs.version }}" --output-dir npm-packages
931+
932+
- name: Publish the npm launcher
933+
run: |
934+
if ! node apps/server/scripts/cli.ts publish --packages-dir npm-packages --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --provenance --verbose; then
935+
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
936+
exit 1
937+
fi
938+
960939
publish_aur:
961940
name: Publish AUR package
962941
needs: [preflight, release]
@@ -1074,8 +1053,8 @@ jobs:
10741053
10751054
deploy_web:
10761055
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' }}
1056+
needs: [preflight, build_web, release, publish_cli]
1057+
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' }}
10791058
runs-on: blacksmith-2vcpu-ubuntu-2404
10801059
timeout-minutes: 10
10811060
env:
-1.05 MB
Binary file not shown.
1.12 MB
Binary file not shown.

‎apps/mobile/modules/t3-native-controls/android/build.gradle‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ dependencies {
2727
implementation project(':expo-modules-core')
2828
implementation 'androidx.compose.ui:ui-android:1.10.6'
2929
implementation 'androidx.compose.material3:material3-android:1.5.0-alpha17'
30+
implementation 'androidx.window:window:1.5.1'
3031
}

0 commit comments

Comments
 (0)