diff --git a/.github/scripts/mirror-play-apk.cjs b/.github/scripts/mirror-play-apk.cjs deleted file mode 100644 index d017fc907f12..000000000000 --- a/.github/scripts/mirror-play-apk.cjs +++ /dev/null @@ -1,205 +0,0 @@ -// Play signs generated APKs with the app signing key, matching Play Store installs. -const { execFileSync } = require("node:child_process"); -const crypto = require("node:crypto"); -const fs = require("node:fs"); -const os = require("node:os"); -const path = require("node:path"); -const { Readable } = require("node:stream"); -const { pipeline } = require("node:stream/promises"); - -const PLAY_API = "https://androidpublisher.googleapis.com/androidpublisher/v3/applications"; - -function requireEnv(name) { - const value = process.env[name]; - if (!value) throw new Error(`${name} is required.`); - return value; -} - -async function playAccessToken(key) { - const now = Math.floor(Date.now() / 1000); - const encode = (value) => Buffer.from(JSON.stringify(value)).toString("base64url"); - const unsigned = `${encode({ alg: "RS256", typ: "JWT" })}.${encode({ - iss: key.client_email, - scope: "https://www.googleapis.com/auth/androidpublisher", - aud: key.token_uri, - iat: now, - exp: now + 600, - })}`; - const signature = crypto.sign("RSA-SHA256", Buffer.from(unsigned), key.private_key); - const response = await fetch(key.token_uri, { - method: "POST", - body: new URLSearchParams({ - grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", - assertion: `${unsigned}.${signature.toString("base64url")}`, - }), - }); - if (!response.ok) { - throw new Error(`Google token exchange failed: ${response.status} ${await response.text()}`); - } - return (await response.json()).access_token; -} - -async function play(token, method, url) { - const response = await fetch(url, { method, headers: { authorization: `Bearer ${token}` } }); - if (!response.ok) { - throw new Error(`${method} ${url} failed: ${response.status} ${await response.text()}`); - } - return response; -} - -// Opening an edit would invalidate any EAS Submit edit using the same service account. -async function newestTrackBuild(token, appUrl, trackName) { - const { releases = [] } = await ( - await play(token, "GET", `${appUrl}/tracks/${trackName}/releases`) - ).json(); - let newest; - for (const release of releases) { - if (release.releaseLifecycleState !== "RELEASE_LIFECYCLE_STATE_PUBLISHED") continue; - for (const { versionCode } of release.activeArtifacts ?? []) { - if (!newest || versionCode > newest.versionCode) { - newest = { versionCode, versionName: release.releaseName || String(versionCode) }; - } - } - } - return newest; -} - -function gh(...args) { - return execFileSync("gh", args, { encoding: "utf8", stdio: ["ignore", "pipe", "inherit"] }); -} - -function readRelease(tag) { - try { - return JSON.parse(gh("release", "view", tag, "--json", "assets,body,isDraft")); - } catch { - return undefined; - } -} - -// Stage downloads so failed requests cannot leave partial release assets. -async function downloadApk({ token, appUrl, build, apkName }) { - const generated = await ( - await play(token, "GET", `${appUrl}/generatedApks/${build.versionCode}`) - ).json(); - const universal = (generated.generatedApks ?? []).filter((entry) => entry.generatedUniversalApk); - if (universal.length === 0) return undefined; - if (universal.length > 1) { - throw new Error(`Play returned ${universal.length} universal APKs, one per signing key.`); - } - const { downloadId } = universal[0].generatedUniversalApk; - const directory = fs.mkdtempSync(path.join(os.tmpdir(), "apk-")); - const apkPath = path.join(directory, apkName); - try { - const download = await play( - token, - "GET", - `${appUrl}/generatedApks/${build.versionCode}/downloads/${encodeURIComponent(downloadId)}:download?alt=media`, - ); - await pipeline(Readable.fromWeb(download.body), fs.createWriteStream(apkPath)); - return apkPath; - } catch (error) { - fs.rmSync(directory, { recursive: true, force: true }); - throw error; - } -} - -function publishBeta(tag, apkPath, notes, title) { - const release = readRelease(tag); - if ( - release && - !release.isDraft && - release.assets.some( - (asset) => - asset.name === path.basename(apkPath) && asset.state === "uploaded" && asset.size > 0, - ) - ) - return; - if (!release) { - gh( - "release", - "create", - tag, - "--draft", - "--prerelease", - "--latest=false", - "--title", - title, - "--notes", - notes, - ); - } - gh("release", "upload", tag, apkPath, "--clobber"); - gh( - "release", - "edit", - tag, - "--draft=false", - "--prerelease", - "--latest=false", - "--title", - title, - "--notes", - notes, - ); -} - -async function main() { - const packageName = requireEnv("PACKAGE_NAME"); - const outputDirectory = process.env.APK_OUTPUT_DIR; - const channel = outputDirectory ? "internal" : "beta"; - const track = outputDirectory ? "internal" : "alpha"; - const token = await playAccessToken(JSON.parse(requireEnv("GOOGLE_PLAY_SERVICE_ACCOUNT_JSON"))); - const appUrl = `${PLAY_API}/${packageName}`; - const build = await newestTrackBuild(token, appUrl, track); - if (!build) { - console.log(`The ${track} track has no live release.`); - return; - } - const safeName = build.versionName.replace(/[^0-9A-Za-z.]+/g, "-").replace(/^-|-$/g, ""); - const apkName = `t3code-android-${channel}-${safeName}-${build.versionCode}.apk`; - const tag = `android-beta-${build.versionCode}`; - const release = outputDirectory ? undefined : readRelease(tag); - if ( - release && - !release.isDraft && - release.assets.some( - (asset) => asset.name === apkName && asset.state === "uploaded" && asset.size > 0, - ) - ) { - console.log(`${apkName} is already published.`); - return; - } - const apkPath = await downloadApk({ token, appUrl, build, apkName }); - if (!apkPath) { - console.log(`Play is still processing the ${track} APK for ${build.versionCode}.`); - return; - } - try { - if (outputDirectory) { - fs.mkdirSync(outputDirectory, { recursive: true }); - const destination = path.join(outputDirectory, apkName); - const temporary = `${destination}.tmp`; - try { - fs.copyFileSync(apkPath, temporary); - fs.renameSync(temporary, destination); - } finally { - fs.rmSync(temporary, { force: true }); - } - return; - } - const notes = [ - `T3 Code for Android beta, mirrored from Google Play closed testing. Build: ${build.versionName} (${build.versionCode}).`, - "", - "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.", - ].join("\n"); - // The build number makes retries and unchanged hourly checks idempotent. - publishBeta(tag, apkPath, notes, `Android beta ${build.versionName} (${build.versionCode})`); - } finally { - fs.rmSync(path.dirname(apkPath), { recursive: true, force: true }); - } -} - -main().catch((error) => { - console.error(error); - process.exit(1); -}); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70208c7a1647..77aa970f475d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: run: vp run --filter @t3tools/source-control-github generate --check - name: Check generated Expo GraphQL operations - run: vp run --filter t3 generate --check + run: vp run --filter tix generate --check - name: Check generated Linear GraphQL operations run: vp run --filter @t3tools/issue-tracker-linear generate --check diff --git a/.github/workflows/deploy-relay.yml b/.github/workflows/deploy-relay.yml index df54074cd15a..6e9904606c48 100644 --- a/.github/workflows/deploy-relay.yml +++ b/.github/workflows/deploy-relay.yml @@ -25,7 +25,7 @@ jobs: deploy_relay: name: Deploy production relay # A manual run from another branch would deploy that branch to production. - if: github.repository == 'pingdotgg/t3code' && github.ref == 'refs/heads/main' + if: github.repository == 'penouc/tix' && github.ref == 'refs/heads/main' runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 15 permissions: diff --git a/.github/workflows/desktop-macos-preview.yml b/.github/workflows/desktop-macos-preview.yml index 2c54052ea66d..324c7b79d2d0 100644 --- a/.github/workflows/desktop-macos-preview.yml +++ b/.github/workflows/desktop-macos-preview.yml @@ -92,7 +92,7 @@ jobs: # channel. The Linux browser secret helper is not part of a macOS app. - name: Build JS bundle env: - T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && 'preview' || 'dev' }} + T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'penouc/tix' && 'preview' || 'dev' }} run: vp run ${{ steps.bundle_build.outputs.script }} # Same layout as release.yml's js-bundle so release-desktop.yml can diff --git a/.github/workflows/mobile-android-apk.yml b/.github/workflows/mobile-android-apk.yml index 8e028821a685..40e34b97f9e2 100644 --- a/.github/workflows/mobile-android-apk.yml +++ b/.github/workflows/mobile-android-apk.yml @@ -1,53 +1,166 @@ name: Mobile Android APK -# Checks closed testing hourly. Each new beta gets one versioned prerelease. -# Unchanged checks publish nothing. +# Builds a standalone Android release APK without EAS or Google Play and +# optionally attaches it to a GitHub Release. on: - schedule: - # Avoid minute zero, when GitHub scheduled jobs are busiest. - - cron: "23 * * * *" + push: + tags: + - "mobile-v*" workflow_dispatch: + inputs: + version: + description: "App version override (defaults to tag without mobile-v prefix or app.config.ts version)" + required: false + type: string + publish_release: + description: "Create or update a GitHub Release with the built APK" + required: false + default: true + type: boolean permissions: contents: read concurrency: - group: mobile-android-apk + group: mobile-android-apk-${{ github.ref }} cancel-in-progress: false jobs: - mirror: - name: Mirror beta APK - if: github.repository == 'pingdotgg/t3code' - runs-on: blacksmith-2vcpu-ubuntu-2404 - timeout-minutes: 10 + build-apk: + name: Build Android APK + runs-on: ubuntu-latest + timeout-minutes: 45 permissions: contents: write env: - PACKAGE_NAME: com.t3tools.t3code + APP_VARIANT: production + EXPO_NO_GIT_STATUS: "1" + T3CODE_MOBILE_UPDATES_ENABLED: "0" + NODE_OPTIONS: --max-old-space-size=6144 + ORG_GRADLE_PROJECT_reactNativeArchitectures: armeabi-v7a,arm64-v8a steps: - - id: credentials - name: Check for Play credentials + - name: Checkout + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + + - id: meta + name: Resolve release metadata + shell: bash env: - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} + INPUT_VERSION: ${{ inputs.version }} + REF_NAME: ${{ github.ref_name }} + REF_TYPE: ${{ github.ref_type }} run: | - if [ -n "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" ]; then - echo "present=true" >> "$GITHUB_OUTPUT" + set -euo pipefail + if [ -n "$INPUT_VERSION" ]; then + version="$INPUT_VERSION" + elif [ "$REF_TYPE" = "tag" ] && [[ "$REF_NAME" == mobile-v* ]]; then + version="${REF_NAME#mobile-v}" else - echo "present=false" >> "$GITHUB_OUTPUT" - echo "GOOGLE_PLAY_SERVICE_ACCOUNT_JSON is not available; skipping APK mirror." + version="$(sed -n 's/.*T3CODE_MOBILE_VERSION ?? "\([^"]*\)".*/\1/p' apps/mobile/app.config.ts | head -n 1)" fi + version="${version:-2.3.0}" + tag="mobile-v${version}" + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "tag=$tag" >> "$GITHUB_OUTPUT" + echo "apk_name=tix-android-${version}.apk" >> "$GITHUB_OUTPUT" - - name: Checkout - if: steps.credentials.outputs.present == 'true' - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + - name: Setup Node + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 with: - sparse-checkout: .github/scripts + node-version-file: package.json + + - name: Enable corepack + shell: bash + run: | + npm install --global corepack@latest + corepack enable + pnpm --version + + - name: Install mobile dependencies + shell: bash + run: pnpm install --frozen-lockfile --filter=@t3tools/mobile... + + - name: Setup Java + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 + with: + distribution: temurin + java-version: 17 + + - name: Prebuild Android project + working-directory: apps/mobile + env: + T3CODE_MOBILE_VERSION: ${{ steps.meta.outputs.version }} + run: pnpm exec expo prebuild --clean --platform android + + - name: Build release APK + working-directory: apps/mobile/android + run: ./gradlew assembleRelease --no-daemon -x lintVitalAnalyzeRelease -x lintVitalRelease - - name: Mirror the newest APK - if: steps.credentials.outputs.present == 'true' + - name: Prepare and optionally sign APK + shell: bash + env: + APK_NAME: ${{ steps.meta.outputs.apk_name }} + ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + run: | + set -euo pipefail + raw_apk="apps/mobile/android/app/build/outputs/apk/release/app-release.apk" + out_dir="$RUNNER_TEMP/apk-release" + mkdir -p "$out_dir" + out_apk="$out_dir/$APK_NAME" + cp "$raw_apk" "$out_apk" + + if [ -n "$ANDROID_KEYSTORE_BASE64" ] && [ -n "$ANDROID_KEYSTORE_PASSWORD" ] && [ -n "$ANDROID_KEY_ALIAS" ]; then + keystore="$RUNNER_TEMP/release.keystore" + printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$keystore" + build_tools_dir="$(find "${ANDROID_HOME:-$ANDROID_SDK_ROOT}/build-tools" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -n 1)" + "$build_tools_dir/zipalign" -f -p 4 "$out_apk" "$out_dir/aligned.apk" + mv "$out_dir/aligned.apk" "$out_apk" + "$build_tools_dir/apksigner" sign \ + --ks "$keystore" \ + --ks-pass "pass:$ANDROID_KEYSTORE_PASSWORD" \ + --ks-key-alias "$ANDROID_KEY_ALIAS" \ + --key-pass "pass:${ANDROID_KEY_PASSWORD:-$ANDROID_KEYSTORE_PASSWORD}" \ + "$out_apk" + "$build_tools_dir/apksigner" verify "$out_apk" + rm -f "$keystore" + echo "Signed APK with release keystore." + else + echo "No ANDROID_KEYSTORE_BASE64 configured; using default debug-signed release APK." + fi + + (cd "$out_dir" && sha256sum "$APK_NAME" > "${APK_NAME}.sha256") + + - name: Upload APK artifact + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: ${{ steps.meta.outputs.apk_name }} + path: ${{ runner.temp }}/apk-release/* + retention-days: 30 + if-no-files-found: error + + - name: Publish GitHub Release + if: github.event_name == 'push' || inputs.publish_release == true + shell: bash env: GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} - run: node .github/scripts/mirror-play-apk.cjs + RELEASE_TAG: ${{ steps.meta.outputs.tag }} + APP_VERSION: ${{ steps.meta.outputs.version }} + APK_NAME: ${{ steps.meta.outputs.apk_name }} + run: | + set -euo pipefail + out_dir="$RUNNER_TEMP/apk-release" + if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then + gh release upload "$RELEASE_TAG" \ + "$out_dir/$APK_NAME" \ + "$out_dir/${APK_NAME}.sha256" \ + --clobber + else + gh release create "$RELEASE_TAG" \ + "$out_dir/$APK_NAME" \ + "$out_dir/${APK_NAME}.sha256" \ + --title "tix Android ${APP_VERSION}" \ + --generate-notes + fi diff --git a/.github/workflows/mobile-dev-client.yml b/.github/workflows/mobile-dev-client.yml index b3e11c1ed6b6..c8f4195e73dd 100644 --- a/.github/workflows/mobile-dev-client.yml +++ b/.github/workflows/mobile-dev-client.yml @@ -60,7 +60,7 @@ permissions: jobs: android: name: Android ${{ matrix.abi }} - if: github.repository == 'pingdotgg/t3code' && (github.event_name != 'workflow_dispatch' || inputs.platform == 'android') + if: github.repository == 'penouc/tix' && (github.event_name != 'workflow_dispatch' || inputs.platform == 'android') runs-on: blacksmith-32vcpu-ubuntu-2404 timeout-minutes: 45 strategy: @@ -218,7 +218,7 @@ jobs: ios: name: iOS simulator - if: github.repository == 'pingdotgg/t3code' && (github.event_name != 'workflow_dispatch' || inputs.platform == 'ios') + if: github.repository == 'penouc/tix' && (github.event_name != 'workflow_dispatch' || inputs.platform == 'ios') runs-on: blacksmith-12vcpu-macos-27 timeout-minutes: 60 concurrency: diff --git a/.github/workflows/mobile-eas-preview-build.yml b/.github/workflows/mobile-eas-preview-build.yml index d344daeb7671..01498aebf517 100644 --- a/.github/workflows/mobile-eas-preview-build.yml +++ b/.github/workflows/mobile-eas-preview-build.yml @@ -74,7 +74,7 @@ jobs: profile: preview:dev environment: preview expo-token: ${{ secrets.EXPO_PREVIEW_TOKEN }} - output: ${{ runner.temp }}/t3code-preview.apk + output: ${{ runner.temp }}/tix-preview.apk # `eas upload` hosts the APK on EAS and returns the page testers install from. - id: build @@ -83,7 +83,7 @@ jobs: working-directory: apps/mobile shell: bash run: | - eas upload --platform android --build-path "$RUNNER_TEMP/t3code-preview.apk" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" + eas upload --platform android --build-path "$RUNNER_TEMP/tix-preview.apk" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" link="$(sed -n '/^{/,$p' "$RUNNER_TEMP/upload.json" | jq -r '.url // empty')" if [ -z "$link" ]; then echo "::error::eas upload returned no install link" @@ -144,7 +144,7 @@ jobs: profile: preview:dev environment: preview expo-token: ${{ secrets.EXPO_PREVIEW_TOKEN }} - output: ${{ runner.temp }}/t3code-preview.ipa + output: ${{ runner.temp }}/tix-preview.ipa # EAS hosts the signed client and returns its install page. - id: build @@ -153,7 +153,7 @@ jobs: working-directory: apps/mobile shell: bash run: | - eas upload --platform ios --build-path "$RUNNER_TEMP/t3code-preview.ipa" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" + eas upload --platform ios --build-path "$RUNNER_TEMP/tix-preview.ipa" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" link="$(sed -n '/^{/,$p' "$RUNNER_TEMP/upload.json" | jq -r '.url // empty')" if [ -z "$link" ]; then echo "::error::eas upload returned no install link" @@ -169,8 +169,8 @@ jobs: env: LINK: ${{ steps.build.outputs.link }} run: | - profile_path="$(unzip -Z -1 "$RUNNER_TEMP/t3code-preview.ipa" | grep -E '^Payload/[^/]+\.app/embedded\.mobileprovision$')" - unzip -p "$RUNNER_TEMP/t3code-preview.ipa" "$profile_path" > "$RUNNER_TEMP/preview.mobileprovision" + profile_path="$(unzip -Z -1 "$RUNNER_TEMP/tix-preview.ipa" | grep -E '^Payload/[^/]+\.app/embedded\.mobileprovision$')" + unzip -p "$RUNNER_TEMP/tix-preview.ipa" "$profile_path" > "$RUNNER_TEMP/preview.mobileprovision" security cms -D -i "$RUNNER_TEMP/preview.mobileprovision" > "$RUNNER_TEMP/preview-profile.plist" record="$(node .github/scripts/mobile-ios-preview-record.cjs create "$LINK" "$RUNNER_TEMP/preview-profile.plist")" echo "record=$record" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/mobile-eas-preview-fork.yml b/.github/workflows/mobile-eas-preview-fork.yml index a32d2bd98fbf..f228204f9a2a 100644 --- a/.github/workflows/mobile-eas-preview-fork.yml +++ b/.github/workflows/mobile-eas-preview-fork.yml @@ -376,7 +376,7 @@ jobs: profile: preview:dev environment: preview expo-token: ${{ secrets.EXPO_PREVIEW_TOKEN }} - output: ${{ runner.temp }}/t3code-preview.apk + output: ${{ runner.temp }}/tix-preview.apk cache: "false" - id: build @@ -386,7 +386,7 @@ jobs: env: EXPO_TOKEN: ${{ secrets.EXPO_PREVIEW_TOKEN }} run: | - eas upload --platform android --build-path "$RUNNER_TEMP/t3code-preview.apk" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" + eas upload --platform android --build-path "$RUNNER_TEMP/tix-preview.apk" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" link="$(sed -n '/^{/,$p' "$RUNNER_TEMP/upload.json" | jq -r '.url // empty')" if [ -z "$link" ]; then echo "::error::eas upload returned no install link" @@ -451,7 +451,7 @@ jobs: profile: preview:dev environment: preview expo-token: ${{ secrets.EXPO_PREVIEW_TOKEN }} - output: ${{ runner.temp }}/t3code-preview.ipa + output: ${{ runner.temp }}/tix-preview.ipa cache: "false" - id: build @@ -461,7 +461,7 @@ jobs: env: EXPO_TOKEN: ${{ secrets.EXPO_PREVIEW_TOKEN }} run: | - eas upload --platform ios --build-path "$RUNNER_TEMP/t3code-preview.ipa" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" + eas upload --platform ios --build-path "$RUNNER_TEMP/tix-preview.ipa" --fingerprint "$FINGERPRINT" --non-interactive --json | tee "$RUNNER_TEMP/upload.json" link="$(sed -n '/^{/,$p' "$RUNNER_TEMP/upload.json" | jq -r '.url // empty')" if [ -z "$link" ]; then echo "::error::eas upload returned no install link" diff --git a/.github/workflows/mobile-eas-production.yml b/.github/workflows/mobile-eas-production.yml index 249150ff0951..0523c262ea01 100644 --- a/.github/workflows/mobile-eas-production.yml +++ b/.github/workflows/mobile-eas-production.yml @@ -76,7 +76,7 @@ permissions: jobs: production: name: EAS ${{ inputs.profile || 'production' }} ${{ github.event_name == 'push' && 'auto' || inputs.mode }} - if: github.repository == 'pingdotgg/t3code' + if: github.repository == 'penouc/tix' runs-on: blacksmith-8vcpu-ubuntu-2404 # Serialize runs so OTAs publish in merge order. GitHub keeps at most one # queued job per group, so a burst of merges collapses into one run of the diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml index dc88f0150945..f61bb1da98a9 100644 --- a/.github/workflows/publish-aur.yml +++ b/.github/workflows/publish-aur.yml @@ -37,7 +37,7 @@ concurrency: jobs: publish: name: Validate and publish - if: github.repository == 'pingdotgg/t3code' + if: github.repository == 'penouc/tix' runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 30 container: diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index 2d3a38168c79..04ac8a12d57d 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -386,7 +386,7 @@ jobs: env: # The executable bundles the server again, so it needs the same stamp # as release.yml's JS bundle. - T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && inputs.release_channel || 'dev' }} + T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'penouc/tix' && inputs.release_channel || 'dev' }} run: node apps/server/scripts/cli.ts build-exe --verbose ${{ inputs.platform == 'win' && format('--target win-{0}', inputs.arch) || '' }} - name: Import macOS signing certificate for the CLI archive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fe82ebcb006..da380797313e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: # without it and checks the variable itself. resolve_commit: name: Resolve release commit - if: github.repository == 'pingdotgg/t3code' && (github.event_name != 'schedule' || vars.PAUSE_NIGHTLY != 'true') + if: github.repository == 'penouc/tix' && (github.event_name != 'schedule' || vars.PAUSE_NIGHTLY != 'true') runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 5 outputs: @@ -390,7 +390,7 @@ jobs: run: node apps/server/node_modules/playwright-core/cli.js install --with-deps --only-shell chromium - name: Test - run: vp run --filter t3 test --shard ${{ matrix.shard }}/${{ strategy.job-total }} + run: vp run --filter tix test --shard ${{ matrix.shard }}/${{ strategy.job-total }} relay_public_config: name: Resolve T3 Connect public config @@ -598,7 +598,7 @@ jobs: # other repositories report "dev" telemetry. - name: Build JS bundle env: - T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && needs.preflight.outputs.release_channel || 'dev' }} + T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'penouc/tix' && needs.preflight.outputs.release_channel || 'dev' }} run: vp run ${{ steps.bundle_build.outputs.script }} # Two paths under apps/ so the artifact root is apps/; consumers download @@ -844,7 +844,7 @@ jobs: timeout-minutes: 5 env: GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} - PACKAGE_NAME: com.t3tools.t3code + PACKAGE_NAME: com.penouc.tix APK_OUTPUT_DIR: ${{ runner.temp }}/android-apk run: | if [ -n "$GOOGLE_PLAY_SERVICE_ACCOUNT_JSON" ]; then @@ -973,7 +973,7 @@ jobs: > [!WARNING] > **This is a preview build. Do not install it unless you know exactly why you are here.** > - > Preview builds are cut by maintainers from unreleased branches to exercise the release pipeline. They can be broken, receive no fixes, are never offered as updates, and are not supported. If you want T3 Code, install the [latest release](https://github.com/pingdotgg/t3code/releases/latest) or a nightly instead. + > Preview builds are cut by maintainers from unreleased branches to exercise the release pipeline. They can be broken, receive no fixes, are never offered as updates, and are not supported. If you want tix, install the [latest release](https://github.com/penouc/tix/releases/latest) or a nightly instead. Built from `${{ needs.preflight.outputs.ref }}`. EOF @@ -1031,7 +1031,7 @@ jobs: update_feed: name: Check the update feed needs: [preflight, release] - if: ${{ !cancelled() && github.repository == 'pingdotgg/t3code' && ((github.event_name == 'schedule' && vars.PAUSE_NIGHTLY != 'true') || needs.preflight.outputs.release_channel == 'nightly') }} + if: ${{ !cancelled() && github.repository == 'penouc/tix' && ((github.event_name == 'schedule' && vars.PAUSE_NIGHTLY != 'true') || needs.preflight.outputs.release_channel == 'nightly') }} runs-on: blacksmith-2vcpu-ubuntu-2404 timeout-minutes: 5 permissions: diff --git a/README.md b/README.md index b3ad8bae49b7..9838f9004403 100644 --- a/README.md +++ b/README.md @@ -1,121 +1,77 @@

- - T3 Code logo - + tix mammoth

-

T3 Code

+

tix

The open-source control plane for coding agents.

- Download · - iOS · - Android · - Web · Docs · - Discord + Development · + Branding & Attribution · + MIT License

-

- - T3 Code on desktop with a finished Claude thread, next to the phone app asking to approve a command from Codex - -

- -T3 Code runs the coding agents on your machine and gives them one fast interface. Start a thread at your desk, then approve the next step from your phone. +tix runs the coding agents on your machine and gives them one fast interface across desktop, web, and mobile. -It works with Claude Code, Codex, Cursor, OpenCode, Grok Build, Antigravity, Kiro, Pi, Muse Code, fx, and any [ACP](./docs/user/providers-acp.md) agent. If an agent is set up on your computer, T3 Code can control it. +It works with Claude Code, Codex, Cursor, OpenCode, Grok Build, Antigravity, Kiro, Pi, Muse Code, fx, and any [ACP](./docs/user/providers-acp.md) agent. If an agent is set up on your computer, tix can control it. ## What you get -- **Your subscriptions.** T3 Code does not resell tokens. It drives the agents you are already signed in to. -- **Every agent in one place.** Change models in the middle of a thread. Let Claude hand a task to Codex. -- **Desktop, web, and phone.** One server, and every client shows the same threads. There are apps for iOS and Android. -- **Remote ready.** Run agents on any machine. Connect over your local network, Tailscale, or [T3 Connect](./docs/user/remote-access.md). -- **Git built in.** Each thread can work in its own worktree. Review the diff, then commit, push, and open a pull request with one button. -- **Fast.** Performance is a feature here. We measure it, and we treat a dropped frame as a bug. -- **Open.** Source code is MIT licensed. If you don't like something, fork it under your own branding (see [Trademarks and forks](#trademarks-and-forks)). +- **Your subscriptions.** tix does not resell tokens. It drives the agents you are already signed in to. +- **Every agent in one place.** Switch models or providers mid-thread and coordinate work across agents. +- **Desktop, web, and mobile.** One Node WebSocket server backs the web app, Electron desktop app, and React Native mobile client. +- **Remote ready.** Run agents on any machine and connect over your local network or Tailscale (see [remote access](./docs/user/remote-access.md)). +- **Git built in.** Each thread can work in its own worktree. Review diffs, commit, push, and open pull requests directly from the UI. +- **Open source.** Source code is licensed under the [MIT License](./LICENSE). -## Install +## Getting started from source -### Desktop app +tix is currently built and run from source. -[Download T3 Code](https://t3.codes/download) for macOS, Windows, or Linux. You can also use a package manager: +### Prerequisites -| Platform | Command | -| -------------- | -------------------------------------------------------------------- | -| macOS | `brew install --cask t3-code` | -| Windows | `winget install T3Tools.T3Code` or `scoop install extras/t3code` | -| Arch Linux | `yay -S t3code-bin` | -| Nix | `nix profile add github:NixOS/nixpkgs/nixos-unstable#t3code` | -| Debian, Ubuntu | `.deb` from [Releases](https://github.com/pingdotgg/t3code/releases) | - -### Command line - -This installs the `t3` command. Run `t3` to start the server and open the web app. +- [Vite+](https://viteplus.dev/guide/) (`vp` manages the pinned Node.js version from `package.json`): ```bash -curl -fsSL https://t3.codes/install.sh | sh +curl -fsSL https://vite.plus | bash +# Windows PowerShell: irm https://vite.plus/ps1 | iex ``` -On Windows, in PowerShell: - -```powershell -irm https://t3.codes/install.ps1 | iex -``` - -To try it once without an install, run `npx t3@latest`. - -### Phone - -Get the app from the [App Store](https://apps.apple.com/us/app/t3-code-remote-claude-more/id6787819824) or [Google Play](https://play.google.com/store/apps/details?id=com.t3tools.t3code). Then follow [remote access](./docs/user/remote-access.md) to connect it to your computer. - -### Sign in to an agent +- At least one supported coding agent installed and signed in (for example, [Claude Code](https://claude.com/product/claude-code) via `claude auth login` or [Codex CLI](https://developers.openai.com/codex/cli) via `codex login`). See [provider setup](./docs/user/install.md#providers) for all supported agents. -T3 Code needs one agent that is installed and signed in. For example, install [Claude Code](https://claude.com/product/claude-code) and run `claude auth login`, or install [Codex CLI](https://developers.openai.com/codex/cli) and run `codex login`. +### Run locally -[Provider setup](./docs/user/install.md#providers) has the steps for each agent. [Install T3 Code](./docs/user/install.md) covers nightly builds, AppImage, WSL, and NixOS. - -## "Wait, what are you selling me?" +```bash +git clone https://github.com/penouc/tix.git +cd tix +vp i +vp run dev +``` -Nothing. We built T3 Code because we wanted the best possible development experience with agents. We were inspired by existing solutions like the Codex desktop app, Conductor, Claude Desktop and Cursor Glass, but none met our bar. +Open the pairing URL printed by the dev runner. Other dev entrypoints: -We wanted something performant, remote-ready, and truly open. If we ever go the wrong direction, we want you to have everything you need to fork the source code and build the tool that you want, under your own name and branding. +- `vp run dev:desktop` — Electron desktop app +- `vp run dev:server` — WebSocket server only +- `vp run dev:web` — Web client only +- See [apps/mobile/README.md](./apps/mobile/README.md) for the iOS / Android client and [docs/operations/00_development.md](./docs/operations/00_development.md) for full development details. ## Documentation -- [Install and first run](./docs/user/install.md) +- [Development runbook](./docs/operations/00_development.md) +- [Architecture overview](./docs/internals/01_architecture.md) - [Remote access from a phone or another machine](./docs/user/remote-access.md) - [Permission modes](./docs/user/permission-modes.md) - [Source control](./docs/user/source-control.md) - [Connect outside agents over MCP](./docs/user/outside-agents.md) -- [FAQ](./docs/user/faq.md) [All docs](./docs/README.md) has the full list. -## Contributing - -We have limited review capacity. Small, focused fixes are the most likely to be merged. Features need an approved discussion first. - -- Read [CONTRIBUTING.md](./CONTRIBUTING.md) before you report a bug or open a pull request. -- Put feature requests in [Ideas](https://github.com/pingdotgg/t3code/discussions/categories/ideas). -- Build from source with the [development runbook](./docs/operations/00_development.md#first-checkout). The [architecture overview](./docs/internals/01_architecture.md) explains how it works. -- Get help in [Discord](https://discord.gg/jn4EGJjrvv). - -## License +## License and upstream attribution The source code in this repository is licensed under the [MIT License](./LICENSE). -## Trademarks and forks - -The MIT license applies **only to the source code**. It does not grant any rights to T3 Tools, Inc.'s trademarks, branding, or trade dress, including the **T3 Code** name, wordmark, logos, and application icons. - -If you fork, redistribute, or build on T3 Code's source code: - -- **Use your own branding.** Replace the T3 Code name, wordmark, logos, and application icons in any public fork, redistributed build, website, package, or app store listing. -- **Be explicitly clear that your project is unofficial.** Do not use the T3 Code name, wordmark, logo, or branding in your own projects without making it unmistakably clear that your project is unofficial and not affiliated with or endorsed by T3 Tools, Inc. - -Using our name, wordmark, logo, or branding in a way that suggests official status or affiliation is trademark infringement and unlawful. **Any project indicating or implying that it is an official version of T3 Code when it is not will be pursued to the full extent of the law.** +The MIT license applies only to the source code and does not grant rights to T3 Tools, Inc.'s trademarks or branding. See [TRADEMARK.md](./TRADEMARK.md) for branding details and the upstream trademark policy. -See [TRADEMARK.md](./TRADEMARK.md) for the full trademark and branding policy. +**tix is an unofficial fork of T3 Code. It is not affiliated with, endorsed by, or maintained by T3 Tools, Inc.** diff --git a/TRADEMARK.md b/TRADEMARK.md index 346822bdfbc6..4017a87ace13 100644 --- a/TRADEMARK.md +++ b/TRADEMARK.md @@ -1,4 +1,10 @@ -# Trademark and Branding Policy +# tix Branding and Upstream Attribution + +**tix** is the name of this unofficial fork. Its blue-and-white mammoth is the fork's visual mark. tix is not affiliated with, endorsed by, or maintained by T3 Tools, Inc. + +The following upstream trademark policy applies to the original T3 Code identity. The original source-code license remains in [LICENSE](./LICENSE). + +## Upstream Trademark and Branding Policy The [MIT License](./LICENSE) in this repository applies **only to the source code**. It does not grant any rights to T3 Tools, Inc.'s trademarks, service marks, trade names, trade dress, or branding. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index bd770e285e71..85da800010de 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -44,5 +44,5 @@ "tailwindcss": "^4.0.0", "vite-plus": "catalog:" }, - "productName": "T3 Code (Beta)" + "productName": "tix (Beta)" } diff --git a/apps/desktop/resources/linux/com.t3tools.t3code.metainfo.xml b/apps/desktop/resources/linux/com.penouc.tix.metainfo.xml similarity index 53% rename from apps/desktop/resources/linux/com.t3tools.t3code.metainfo.xml rename to apps/desktop/resources/linux/com.penouc.tix.metainfo.xml index 0ae54a9849fc..66f252d36241 100644 --- a/apps/desktop/resources/linux/com.t3tools.t3code.metainfo.xml +++ b/apps/desktop/resources/linux/com.penouc.tix.metainfo.xml @@ -1,16 +1,16 @@ - com.t3tools.t3code + com.penouc.tix CC0-1.0 MIT - T3 Code + tix Desktop GUI for coding agents - - T3 Tools Inc. + + penouc

- T3 Code is an open-source desktop app for coding agents. Work with your + tix is an open-source desktop app for coding agents. Work with your existing agent subscriptions, review code changes, and run commands in your projects.

@@ -18,15 +18,15 @@ Connect from desktop, web, or mobile to continue working remotely.

- t3code.desktop - t3code + tix.desktop + tix - t3code + tix Development - https://t3.codes - https://github.com/pingdotgg/t3code/issues - https://github.com/pingdotgg/t3code + https://github.com/penouc/tix + https://github.com/penouc/tix/issues + https://github.com/penouc/tix
diff --git a/apps/desktop/scripts/electron-launcher.mjs b/apps/desktop/scripts/electron-launcher.mjs index e433dc498cad..c013bc9d2c8a 100644 --- a/apps/desktop/scripts/electron-launcher.mjs +++ b/apps/desktop/scripts/electron-launcher.mjs @@ -13,7 +13,7 @@ const repoRoot = NodePath.resolve(desktopDir, "..", ".."); const devBundleIdSuffix = NodePath.basename(repoRoot) .toLowerCase() .replaceAll(/[^a-z0-9]+/g, ""); -const APP_DISPLAY_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Beta)"; +const APP_DISPLAY_NAME = isDevelopment ? "tix (Dev)" : "tix (Beta)"; const APP_BUNDLE_ID = isDevelopment ? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}` : "com.t3tools.t3code"; diff --git a/apps/desktop/src/app/DesktopAppIdentity.test.ts b/apps/desktop/src/app/DesktopAppIdentity.test.ts index 74d134c0b100..7649df165224 100644 --- a/apps/desktop/src/app/DesktopAppIdentity.test.ts +++ b/apps/desktop/src/app/DesktopAppIdentity.test.ts @@ -133,7 +133,7 @@ const withIdentity = ( input.legacyPathProbeError ? Effect.fail(input.legacyPathProbeError) : Effect.succeed( - input.legacyPathExists === true && /T3 Code \((Alpha|Dev)\)/.test(path), + input.legacyPathExists === true && /tix \((Alpha|Dev)\)/.test(path), ), readFileString: () => Effect.succeed(input.packageJson ?? '{"t3codeCommitHash":"abcdef1234567890"}'), @@ -154,7 +154,7 @@ describe("DesktopAppIdentity", () => { const identity = yield* DesktopAppIdentity.DesktopAppIdentity; const userDataPath = yield* identity.resolveUserDataPath; - assert.equal(userDataPath, "/Users/alice/Library/Application Support/t3code-v2"); + assert.equal(userDataPath, "/Users/alice/Library/Application Support/tix-v2"); }), { legacyPathExists: true }, ), @@ -166,7 +166,7 @@ describe("DesktopAppIdentity", () => { const identity = yield* DesktopAppIdentity.DesktopAppIdentity; assert.equal( yield* identity.resolveUserDataPath, - "/Users/alice/Library/Application Support/T3 Code (Dev)", + "/Users/alice/Library/Application Support/tix (Dev)", ); }), { @@ -200,9 +200,9 @@ describe("DesktopAppIdentity", () => { const runtimeName = calls.setName[0]; assert.isDefined(runtimeName); - assert.equal(runtimeName, `T3 Code ${stage}`); + assert.equal(runtimeName, `tix ${stage}`); assert.match(runtimeName.replaceAll(" ", ""), /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/); - assert.equal(calls.setAboutPanelOptions[0]?.applicationName, `T3 Code (${stage})`); + assert.equal(calls.setAboutPanelOptions[0]?.applicationName, `tix (${stage})`); }), { calls, environment }, ); diff --git a/apps/desktop/src/app/DesktopClerk.test.ts b/apps/desktop/src/app/DesktopClerk.test.ts index c17cb00869a3..5e77cc69ac3f 100644 --- a/apps/desktop/src/app/DesktopClerk.test.ts +++ b/apps/desktop/src/app/DesktopClerk.test.ts @@ -123,25 +123,25 @@ describe("DesktopClerk", () => { name: "packaged macOS", isDevelopment: false, platform: "darwin" as const, - userData: "/tmp/app-data/t3code-v2", + userData: "/tmp/app-data/tix-v2", }, { name: "packaged Linux", isDevelopment: false, platform: "linux" as const, - userData: "/tmp/app-data/t3code-v2", + userData: "/tmp/app-data/tix-v2", }, { name: "packaged Windows", isDevelopment: false, platform: "win32" as const, - userData: "/tmp/app-data/t3code-v2", + userData: "/tmp/app-data/tix-v2", }, { name: "development", isDevelopment: true, platform: "win32" as const, - userData: "/tmp/app-data/t3code-dev", + userData: "/tmp/app-data/tix-dev", }, ])( "creates the bridge before startup can yield to the event loop ($name)", @@ -234,10 +234,10 @@ describe("DesktopClerk", () => { createClerkBridgeMock.mockReturnValue({ cleanup: vi.fn(), isPrimaryInstance: true }); const listeners = new Map void>(); const received: string[] = []; - const first = "t3code://new?prompt=first"; - const second = "t3code://threads/env-1/thread-1"; - const later = "t3code://new?prompt=later"; - const launchPair = "t3code://pair?pairingUrl=https%3A%2F%2Fvps.example.com%2F%23token%3Dabc"; + const first = "tix://new?prompt=first"; + const second = "tix://threads/env-1/thread-1"; + const later = "tix://new?prompt=later"; + const launchPair = "tix://pair?pairingUrl=https%3A%2F%2Fvps.example.com%2F%23token%3Dabc"; const delivered = Promise.withResolvers(); const electronApp = { on: (name: string, listener: (...args: unknown[]) => void) => @@ -300,7 +300,7 @@ describe("DesktopClerk", () => { assert.isTrue(Exit.hasInterrupts(exit)); assert.deepEqual(events, [ - "setPath:userData:/tmp/app-data/t3code-v2", + "setPath:userData:/tmp/app-data/tix-v2", "requestSingleInstanceLock", "quit", ]); @@ -333,19 +333,17 @@ it.effect( const clerk = yield* DesktopClerk.DesktopClerk; yield* clerk.configure; const event = { preventDefault: vi.fn() }; - listeners.get("open-url")!(event, "t3code-dev://app/auth/callback?code=clerk-code"); - listeners.get("open-url")!(event, "t3code://app/welcome"); + listeners.get("open-url")!(event, "tix-dev://app/auth/callback?code=clerk-code"); + listeners.get("open-url")!(event, "tix://app/welcome"); assert.equal(loadURL.mock.calls.length, 0); assert.equal(event.preventDefault.mock.calls.length, 0); listeners.get("second-instance")!({}, [ "t3", - "t3code-dev://app/settings/providers?instanceId=work&code=never-forward", + "tix-dev://app/settings/providers?instanceId=work&code=never-forward", ]); yield* Effect.promise(() => revealed.promise); - assert.deepEqual(loadURL.mock.calls, [ - ["t3code-dev://app/settings/providers?instanceId=work"], - ]); - listeners.get("open-url")!(event, "t3code-dev://app/welcome#agents:machine-id"); + assert.deepEqual(loadURL.mock.calls, [["tix-dev://app/settings/providers?instanceId=work"]]); + listeners.get("open-url")!(event, "tix-dev://app/welcome#agents:machine-id"); assert.equal(event.preventDefault.mock.calls.length, 1); }).pipe( Effect.scoped, @@ -456,7 +454,7 @@ it.effect("hands web and app links to the renderer and leaves other links alone" }), } as unknown as ElectronApp.ElectronApp["Service"]; const received: Array = []; - const pairLink = "t3code://pair?pairingUrl=https%3A%2F%2Fvps.example.com%2F%23token%3Dabc"; + const pairLink = "tix://pair?pairingUrl=https%3A%2F%2Fvps.example.com%2F%23token%3Dabc"; yield* Effect.gen(function* () { const clerk = yield* DesktopClerk.DesktopClerk; yield* clerk.configure; @@ -467,18 +465,18 @@ it.effect("hands web and app links to the renderer and leaves other links alone" }; assert.strictEqual(open("https://example.com/page"), 1); assert.strictEqual(open("http://localhost:3000/"), 1); - assert.strictEqual(open("t3code://new?prompt=hi"), 1); - assert.strictEqual(open("t3code://threads/env-1/thread-1"), 1); + assert.strictEqual(open("tix://new?prompt=hi"), 1); + assert.strictEqual(open("tix://threads/env-1/thread-1"), 1); assert.strictEqual(open(pairLink), 1); - assert.strictEqual(open("t3code://pair"), 0); + assert.strictEqual(open("tix://pair"), 0); assert.strictEqual(open("mailto:hello@example.com"), 0); - assert.strictEqual(open("t3code://somewhere-else"), 0); + assert.strictEqual(open("tix://somewhere-else"), 0); yield* Effect.yieldNow; assert.deepStrictEqual(received, [ "https://example.com/page", "http://localhost:3000/", - "t3code://new?prompt=hi", - "t3code://threads/env-1/thread-1", + "tix://new?prompt=hi", + "tix://threads/env-1/thread-1", pairLink, ]); }).pipe( diff --git a/apps/desktop/src/app/DesktopEarlyElectronStartup.ts b/apps/desktop/src/app/DesktopEarlyElectronStartup.ts index 3c571bcf02b1..350fbfcfb96b 100644 --- a/apps/desktop/src/app/DesktopEarlyElectronStartup.ts +++ b/apps/desktop/src/app/DesktopEarlyElectronStartup.ts @@ -31,7 +31,7 @@ export interface EarlyLinuxElectronOptions { } export const resolveLinuxDesktopEntryName = (isDevelopment: boolean): string => - isDevelopment ? "com.t3tools.T3Code.Development.desktop" : "com.t3tools.T3Code.desktop"; + isDevelopment ? "com.penouc.tix.Development.desktop" : "com.penouc.tix.desktop"; const trimNonEmpty = (value: string | undefined): string | null => { const trimmed = value?.trim(); diff --git a/apps/desktop/src/app/DesktopEnvironment.ts b/apps/desktop/src/app/DesktopEnvironment.ts index d5fed4b228b6..199415416cab 100644 --- a/apps/desktop/src/app/DesktopEnvironment.ts +++ b/apps/desktop/src/app/DesktopEnvironment.ts @@ -85,7 +85,7 @@ export class DesktopEnvironment extends Context.Service< } >()("@t3tools/desktop/app/DesktopEnvironment") {} -const APP_BASE_NAME = "T3 Code"; +const APP_BASE_NAME = "tix"; function resolveDesktopAppStageLabel(input: { readonly isDevelopment: boolean; @@ -228,7 +228,7 @@ const make = Effect.fn("desktop.environment.make")(function* ( branding, displayName, appUserModelId: Option.getOrElse(config.appUserModelIdOverride, () => - isDevelopment ? "com.t3tools.t3code.dev" : "com.t3tools.t3code", + isDevelopment ? "com.penouc.tix.dev" : "com.penouc.tix", ), linuxDesktopEntryName: resolveLinuxDesktopEntryName(isDevelopment), linuxApplicationsDir, diff --git a/apps/desktop/src/app/DesktopLifecycle.test.ts b/apps/desktop/src/app/DesktopLifecycle.test.ts index e11e946dd41b..dc7a84311ec3 100644 --- a/apps/desktop/src/app/DesktopLifecycle.test.ts +++ b/apps/desktop/src/app/DesktopLifecycle.test.ts @@ -264,8 +264,8 @@ describe("DesktopLifecycle", () => { Effect.provideService(HostProcess.Arguments, [ "/opt/T3 Code/t3code", "--no-sandbox", - "T3CODE://pair?token=spent", - "t3code://new?prompt=hello", + "TIX://pair?token=spent", + "tix://new?prompt=hello", ]), ); diff --git a/apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts b/apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts index 8e8a2812ab24..f08f60204c19 100644 --- a/apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts +++ b/apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts @@ -251,7 +251,7 @@ describe("DesktopLinuxUrlHandler", () => { recorded.files[0]?.content, "Exec=/home/alice/Applications/T3-Code.AppImage %U", ); - assert.include(recorded.files[0]?.content, "MimeType=x-scheme-handler/t3code;"); + assert.include(recorded.files[0]?.content, "MimeType=x-scheme-handler/tix;"); assert.deepEqual(recorded.commands, [ { command: "update-desktop-database", @@ -259,7 +259,7 @@ describe("DesktopLinuxUrlHandler", () => { }, { command: "xdg-mime", - args: ["default", "com.t3tools.T3Code.desktop", "x-scheme-handler/t3code"], + args: ["default", "com.t3tools.T3Code.desktop", "x-scheme-handler/tix"], }, ]); }); @@ -277,7 +277,7 @@ describe("DesktopLinuxUrlHandler", () => { DesktopLinuxUrlHandler.renderUrlHandlerDesktopEntry({ displayName: "T3 Code (Alpha)", execTarget: process.execPath, - scheme: "t3code", + scheme: "tix", iconPath: "/home/alice/.local/share/icons/com.t3tools.T3Code.desktop.png", }), ); @@ -304,7 +304,7 @@ describe("DesktopLinuxUrlHandler", () => { existingEntry: DesktopLinuxUrlHandler.renderUrlHandlerDesktopEntry({ displayName: "T3 Code (Alpha)", execTarget: "/home/alice/Applications/T3-Code.AppImage", - scheme: "t3code", + scheme: "tix", iconPath: "/home/alice/.local/share/icons/com.t3tools.T3Code.desktop.png", }), }); @@ -318,7 +318,7 @@ describe("DesktopLinuxUrlHandler", () => { }, { command: "xdg-mime", - args: ["default", "com.t3tools.T3Code.desktop", "x-scheme-handler/t3code"], + args: ["default", "com.t3tools.T3Code.desktop", "x-scheme-handler/tix"], }, ]); }); @@ -333,7 +333,7 @@ describe("DesktopLinuxUrlHandler", () => { existingEntry: DesktopLinuxUrlHandler.renderUrlHandlerDesktopEntry({ displayName: "T3 Code (Alpha)", execTarget: "/home/alice/Applications/T3-Code.AppImage", - scheme: "t3code", + scheme: "tix", iconPath, }), }); diff --git a/apps/desktop/src/app/DesktopPreReadyPlatform.test.ts b/apps/desktop/src/app/DesktopPreReadyPlatform.test.ts index 45887a928abb..473d9ff088a8 100644 --- a/apps/desktop/src/app/DesktopPreReadyPlatform.test.ts +++ b/apps/desktop/src/app/DesktopPreReadyPlatform.test.ts @@ -134,7 +134,7 @@ describe("DesktopPreReadyPlatform", () => { let desktopEntry = previousEntry; let iconInstalled = false; const iconSource = "/tmp/.mount_T3/resources/app.asar/apps/desktop/prod-resources/icon.png"; - const iconPath = "/xdg/icons/com.t3tools.T3Code.desktop.png"; + const iconPath = "/xdg/icons/com.penouc.tix.desktop.png"; const iconBytes = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]); readFileSyncMock.mockImplementation((path: string) => { if (path === iconSource) return iconBytes; @@ -144,7 +144,7 @@ describe("DesktopPreReadyPlatform", () => { desktopName = name; }); writeFileSyncMock.mockImplementation((path: string, contents: string | Buffer) => { - if (path === "/xdg/applications/com.t3tools.T3Code.desktop") desktopEntry = String(contents); + if (path === "/xdg/applications/com.penouc.tix.desktop") desktopEntry = String(contents); if (path === iconPath) iconInstalled = Buffer.compare(Buffer.from(contents), iconBytes) === 0; }); @@ -167,14 +167,11 @@ describe("DesktopPreReadyPlatform", () => { ), ); const identity = yield* Effect.promise(() => portalIdentity); - assert.equal(identity.desktopName, "com.t3tools.T3Code.desktop"); + assert.equal(identity.desktopName, "com.penouc.tix.desktop"); assert.include(identity.desktopEntry ?? "", "Exec=/Applications/current.AppImage %U"); - assert.include(identity.desktopEntry ?? "", "Name=T3 Code (Beta)"); - assert.include(identity.desktopEntry ?? "", "MimeType=x-scheme-handler/t3code;"); - assert.include( - identity.desktopEntry ?? "", - "Icon=/xdg/icons/com.t3tools.T3Code.desktop.png", - ); + assert.include(identity.desktopEntry ?? "", "Name=tix (Beta)"); + assert.include(identity.desktopEntry ?? "", "MimeType=x-scheme-handler/tix;"); + assert.include(identity.desktopEntry ?? "", "Icon=/xdg/icons/com.penouc.tix.desktop.png"); assert.equal( copyFileSyncMock.mock.calls.length, 0, @@ -193,7 +190,7 @@ describe("DesktopPreReadyPlatform", () => { ({ relaunchedByUpdater, restored }) => { vi.stubEnv("VITE_DEV_SERVER_URL", ""); getSwitchValueMock.mockReturnValue(""); - const entryPath = "/xdg/applications/com.t3tools.T3Code.desktop"; + const entryPath = "/xdg/applications/com.penouc.tix.desktop"; const files = new Map([[entryPath, "Exec=/Applications/T3-Code-0.1.8-x86_64.AppImage %U\n"]]); readFileSyncMock.mockImplementation((path: string) => files.get(path) ?? "{}"); writeFileSyncMock.mockImplementation((path: string, contents: string | Buffer) => { @@ -245,7 +242,7 @@ describe("DesktopPreReadyPlatform", () => { ), ); const entry = writeFileSyncMock.mock.calls.find( - ([path]) => path === "/xdg/applications/com.t3tools.T3Code.desktop", + ([path]) => path === "/xdg/applications/com.penouc.tix.desktop", )?.[1]; assert.include(entry, 'Exec="/opt/T3 Code/t3code" %U'); }), diff --git a/apps/desktop/src/app/DesktopStartupRecovery.ts b/apps/desktop/src/app/DesktopStartupRecovery.ts index 768fe2ee3d8d..6670314b97d9 100644 --- a/apps/desktop/src/app/DesktopStartupRecovery.ts +++ b/apps/desktop/src/app/DesktopStartupRecovery.ts @@ -20,7 +20,7 @@ import * as DesktopEnvironment from "./DesktopEnvironment.ts"; import * as DesktopObservability from "./DesktopObservability.ts"; import * as DesktopState from "./DesktopState.ts"; -const RELEASES_URL = "https://github.com/pingdotgg/t3code/releases"; +const RELEASES_URL = "https://github.com/penouc/tix/releases"; const LAST_STARTED_VERSION_FILE = "desktop-last-started-version"; // Buttons are plain links to this host; will-navigate cancels them and runs the action. const ACTION_ORIGIN = "https://startup-recovery.invalid"; diff --git a/apps/desktop/src/app/DesktopUserData.test.ts b/apps/desktop/src/app/DesktopUserData.test.ts index 53e548bd1d41..6aa210a6bb4d 100644 --- a/apps/desktop/src/app/DesktopUserData.test.ts +++ b/apps/desktop/src/app/DesktopUserData.test.ts @@ -7,7 +7,7 @@ import * as PlatformError from "effect/PlatformError"; import { clearStaleGpuCaches, resolveUserDataPath } from "./DesktopUserData.ts"; -it.effect.each(["t3code", "T3 Code (Alpha)"])( +it.effect.each(["tix", "tix (Alpha)"])( "preserves Windows credential keys from %s without copying browser databases", (sourceName) => Effect.gen(function* () { @@ -15,9 +15,9 @@ it.effect.each(["t3code", "T3 Code (Alpha)"])( const path = yield* Path.Path; const directory = yield* fs.makeTempDirectoryScoped({ prefix: "t3-v2-profile-" }); const source = path.join(directory, sourceName); - const destination = path.join(directory, "t3code-v2"); + const destination = path.join(directory, "tix-v2"); const state = '{"os_crypt":{"encrypted_key":"test-encrypted-key"}}'; - yield* fs.makeDirectory(path.join(directory, "T3 Code (Alpha)"), { recursive: true }); + yield* fs.makeDirectory(path.join(directory, "tix (Alpha)"), { recursive: true }); yield* fs.makeDirectory(path.join(source, "IndexedDB"), { recursive: true }); yield* fs.writeFileString(path.join(source, "Local State"), state); yield* fs.writeFileString(path.join(source, "IndexedDB", "LOCK"), "V1 owns this database"); diff --git a/apps/desktop/src/app/DesktopUserData.ts b/apps/desktop/src/app/DesktopUserData.ts index 0124aa72e0ad..ab7fedd7220d 100644 --- a/apps/desktop/src/app/DesktopUserData.ts +++ b/apps/desktop/src/app/DesktopUserData.ts @@ -40,8 +40,8 @@ export const resolveUserDataPath = Effect.fn("desktop.userData.resolveUserDataPa const fs = yield* FileSystem.FileSystem; const path = yield* Path.Path; const names = input.isDevelopment - ? { current: "t3code-dev", legacy: "T3 Code (Dev)" } - : { current: "t3code-v2", legacy: "T3 Code (Alpha)" }; + ? { current: "tix-dev", legacy: "tix (Dev)" } + : { current: "tix-v2", legacy: "tix (Alpha)" }; const destinationPath = path.join(input.appDataDirectory, names.current); const legacyPath = path.join(input.appDataDirectory, names.legacy); const inspect = (resourcePath: string) => @@ -62,7 +62,7 @@ export const resolveUserDataPath = Effect.fn("desktop.userData.resolveUserDataPa const legacyState = path.join(legacyPath, "Local State"); const sourceState = (yield* inspect(legacyState)) ? legacyState - : path.join(input.appDataDirectory, "t3code", "Local State"); + : path.join(input.appDataDirectory, "tix", "Local State"); if (!(yield* inspect(sourceState))) return destinationPath; // Windows safeStorage keys live here. Copy only these preferences, never locked databases. const state = yield* fs diff --git a/apps/desktop/src/electron/ElectronProtocol.ts b/apps/desktop/src/electron/ElectronProtocol.ts index 43208638f12d..24ee112faf31 100644 --- a/apps/desktop/src/electron/ElectronProtocol.ts +++ b/apps/desktop/src/electron/ElectronProtocol.ts @@ -13,8 +13,8 @@ import * as Scope from "effect/Scope"; import * as Electron from "electron"; export const DESKTOP_HOST = "app"; -const DESKTOP_PRODUCTION_SCHEME = "t3code"; -const DESKTOP_DEVELOPMENT_SCHEME = "t3code-dev"; +const DESKTOP_PRODUCTION_SCHEME = "tix"; +const DESKTOP_DEVELOPMENT_SCHEME = "tix-dev"; export function getDesktopScheme(isDevelopment: boolean): string { return isDevelopment ? DESKTOP_DEVELOPMENT_SCHEME : DESKTOP_PRODUCTION_SCHEME; diff --git a/apps/desktop/src/window/DesktopWindow.test.ts b/apps/desktop/src/window/DesktopWindow.test.ts index d9d9d2364665..3edcb552e304 100644 --- a/apps/desktop/src/window/DesktopWindow.test.ts +++ b/apps/desktop/src/window/DesktopWindow.test.ts @@ -84,7 +84,7 @@ function makeFakeBrowserWindow() { copyImageAt: vi.fn(), focus: vi.fn(), isDestroyed: vi.fn(() => false), - getURL: vi.fn(() => "t3code-dev://app/"), + getURL: vi.fn(() => "tix-dev://app/"), getZoomLevel: vi.fn(() => zoomLevel), getZoomFactor: vi.fn(() => 1.2 ** zoomLevel), setZoomLevel: vi.fn((level: number) => { @@ -1591,9 +1591,9 @@ describe("DesktopWindow", () => { return yield* Effect.die("will-navigate listener was not registered"); } for (const [url, expectedPrevented] of [ - ["t3code-dev://app/threads?id=1#latest", false], - ["t3code-dev://other/", true], - ["t3code://app/", true], + ["tix-dev://app/threads?id=1#latest", false], + ["tix-dev://other/", true], + ["tix://app/", true], ] as const) { const preventDefault = vi.fn(); willNavigate({ preventDefault }, url); diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index 4866dd32d08f..ad37f7c55a13 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -55,19 +55,19 @@ export default defineConfig({ build: { command: "node scripts/build-browser-secret.mjs && node scripts/build-apple-speech.mjs && node scripts/build-preview-annotation-css.mjs && vp pack", - dependsOn: ["t3#build"], + dependsOn: ["tix#build"], cache: false, }, // CI bundle jobs skip the Linux browser secret helper; packaging stages one per arch. "build:bundle": { command: "node scripts/build-preview-annotation-css.mjs && vp pack", - dependsOn: ["t3#build"], + dependsOn: ["tix#build"], cache: false, }, dev: { command: "node scripts/build-browser-secret.mjs && node scripts/build-apple-speech.mjs && node scripts/build-preview-annotation-css.mjs && cross-env T3CODE_DESKTOP_DEV=1 vp pack --watch", - dependsOn: ["t3#build"], + dependsOn: ["tix#build"], cache: false, }, "dev:bundle": { @@ -77,7 +77,7 @@ export default defineConfig({ }, "dev:electron": { command: "node scripts/dev-electron.mjs", - dependsOn: ["t3#build"], + dependsOn: ["tix#build"], cache: false, }, // A local tsbuildinfo is leftover build state, not a typecheck input. diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts index a868851d5c9d..4159f3e9d08c 100644 --- a/apps/mobile/app.config.ts +++ b/apps/mobile/app.config.ts @@ -43,8 +43,7 @@ const DEVELOPMENT_ASSETS = { iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.developmentIconComposerProject), splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.developmentIosIconPng), androidAdaptiveForeground, - androidAdaptiveBackgroundColor: "#347FF8", - androidAdaptiveBackgroundImage: "./assets/android-icon-background-dev.png", + androidAdaptiveBackgroundColor: "#E7F2FF", androidSplashIcon: "./assets/android-splash-icon-dev.png", androidMonochromeIcon: "./assets/android-icon-mark.png", androidNotificationIcon: "./assets/android-notification-icon.png", @@ -56,8 +55,7 @@ const PREVIEW_ASSETS = { iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIconComposerProject), splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIosIconPng), androidAdaptiveForeground, - androidAdaptiveBackgroundColor: "#111533", - androidAdaptiveBackgroundImage: "./assets/android-icon-background-nightly.png", + androidAdaptiveBackgroundColor: "#E7F2FF", androidSplashIcon: "./assets/android-splash-icon-nightly.png", androidMonochromeIcon: "./assets/android-icon-mark.png", androidNotificationIcon: "./assets/android-notification-icon.png", @@ -69,8 +67,7 @@ const RELEASE_ASSETS = { iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIconComposerProject), splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIosIconPng), androidAdaptiveForeground, - androidAdaptiveBackgroundColor: "#000000", - androidAdaptiveBackgroundImage: undefined, + androidAdaptiveBackgroundColor: "#E7F2FF", androidSplashIcon: "./assets/android-splash-icon-prod.png", androidMonochromeIcon: "./assets/android-icon-mark.png", androidNotificationIcon: "./assets/android-notification-icon.png", @@ -79,27 +76,24 @@ const RELEASE_ASSETS = { const VARIANT_CONFIG = { development: { - appName: "T3 Code Dev", - scheme: "t3code-dev", - iosBundleIdentifier: "com.t3tools.t3code.dev", - androidPackage: "com.t3tools.t3code.dev", - relyingParty: "clerk.t3.codes", + appName: "tix Dev", + scheme: "tix-dev", + iosBundleIdentifier: "com.penouc.tix.dev", + androidPackage: "com.penouc.tix.dev", assets: DEVELOPMENT_ASSETS, }, preview: { - appName: "T3 Code Preview", - scheme: "t3code-preview", - iosBundleIdentifier: "com.t3tools.t3code.preview", - androidPackage: "com.t3tools.t3code.preview", - relyingParty: "clerk.t3.codes", + appName: "tix Preview", + scheme: "tix-preview", + iosBundleIdentifier: "com.penouc.tix.preview", + androidPackage: "com.penouc.tix.preview", assets: PREVIEW_ASSETS, }, production: { - appName: "T3 Code", - scheme: "t3code", - iosBundleIdentifier: "com.t3tools.t3code", - androidPackage: "com.t3tools.t3code", - relyingParty: "clerk.t3.codes", + appName: "tix", + scheme: "tix", + iosBundleIdentifier: "com.penouc.tix", + androidPackage: "com.penouc.tix", assets: RELEASE_ASSETS, }, } as const; @@ -118,8 +112,14 @@ function resolveAppVariant(value: string | undefined): AppVariant { } const variant = VARIANT_CONFIG[APP_VARIANT]; -// Copied thread links open the app. app.t3.codes/.well-known lists every variant's identifiers. -const HOSTED_APP_HOST = "app.t3.codes"; +const relyingPartyHost = process.env.TIX_CLERK_RELYING_PARTY?.trim() || undefined; +const hostedAppHost = process.env.TIX_HOSTED_APP_HOST?.trim() || undefined; +const associatedDomains = [ + ...(relyingPartyHost + ? [`applinks:${relyingPartyHost}`, `webcredentials:${relyingPartyHost}`] + : []), + ...(hostedAppHost ? [`applinks:${hostedAppHost}`] : []), +]; const iosBundleIdentifier = isIosPersonalTeamBuild ? personalTeamBundleIdentifier! : variant.iosBundleIdentifier; @@ -234,7 +234,7 @@ const sharingPlugin: NonNullable[number] = [ const config: ExpoConfig = { name: variant.appName, - slug: "t3-code", + slug: "tix", platforms: ["ios", "android"], scheme: variant.scheme, version: repoEnv.T3CODE_MOBILE_VERSION ?? "2.3.0", @@ -246,8 +246,10 @@ const config: ExpoConfig = { icon: variant.assets.appIcon, userInterfaceStyle: "automatic", updates: { - enabled: repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0", - url: "https://u.expo.dev/d763fcb8-d37c-41ea-a773-b54a0ab4a454", + enabled: Boolean(repoEnv.EXPO_EAS_PROJECT_ID) && repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0", + ...(repoEnv.EXPO_EAS_PROJECT_ID + ? { url: `https://u.expo.dev/${repoEnv.EXPO_EAS_PROJECT_ID}` } + : {}), checkAutomatically: "ON_LOAD", fallbackToCacheTimeout: 0, }, @@ -258,11 +260,7 @@ const config: ExpoConfig = { bundleIdentifier: iosBundleIdentifier, // Avoid Personal Team fallback: it cannot sign App Groups, Apple sign-in or push entitlements. appleTeamId: "ARK85ZXQ4Z", - associatedDomains: [ - `applinks:${variant.relyingParty}`, - `webcredentials:${variant.relyingParty}`, - `applinks:${HOSTED_APP_HOST}`, - ], + ...(associatedDomains.length > 0 ? { associatedDomains } : {}), entitlements: { "keychain-access-groups": [`$(AppIdentifierPrefix)${variant.iosBundleIdentifier}`], }, @@ -304,9 +302,6 @@ const config: ExpoConfig = { : {}), adaptiveIcon: { backgroundColor: variant.assets.androidAdaptiveBackgroundColor, - ...(variant.assets.androidAdaptiveBackgroundImage - ? { backgroundImage: variant.assets.androidAdaptiveBackgroundImage } - : {}), foregroundImage: variant.assets.androidAdaptiveForeground, monochromeImage: variant.assets.androidMonochromeIcon, }, @@ -314,14 +309,18 @@ const config: ExpoConfig = { predictiveBackGestureEnabled: true, // expo-sensors declares this for its pedometer, which the app does not use. blockedPermissions: ["android.permission.ACTIVITY_RECOGNITION"], - intentFilters: [ - { - action: "VIEW", - autoVerify: true, - data: [{ scheme: "https", host: HOSTED_APP_HOST, pathPrefix: "/threads/" }], - category: ["BROWSABLE", "DEFAULT"], - }, - ], + ...(hostedAppHost + ? { + intentFilters: [ + { + action: "VIEW", + autoVerify: true, + data: [{ scheme: "https", host: hostedAppHost, pathPrefix: "/threads/" }], + category: ["BROWSABLE", "DEFAULT"], + }, + ], + } + : {}), }, web: { favicon: variant.assets.appIcon, @@ -380,9 +379,6 @@ const config: ExpoConfig = { shortcut_icon: { foregroundImage: variant.assets.androidAdaptiveForeground, backgroundColor: variant.assets.androidAdaptiveBackgroundColor, - ...(variant.assets.androidAdaptiveBackgroundImage - ? { backgroundImage: variant.assets.androidAdaptiveBackgroundImage } - : {}), }, }, }, @@ -490,11 +486,11 @@ const config: ExpoConfig = { tracesToken: repoEnv.EXPO_PUBLIC_OTLP_TRACES_TOKEN ?? null, }, eas: { - projectId: "d763fcb8-d37c-41ea-a773-b54a0ab4a454", + ...(repoEnv.EXPO_EAS_PROJECT_ID ? { projectId: repoEnv.EXPO_EAS_PROJECT_ID } : {}), observe: { endpointUrl: observeEndpointUrl }, }, }, - owner: "pingdotgg", + owner: "penouc", experiments: { // Metro only runs babel-plugin-react-compiler when this is set; see src/reactCompilerCoverage.test.ts. reactCompiler: true, diff --git a/apps/mobile/assets/android-icon-foreground.png b/apps/mobile/assets/android-icon-foreground.png index 52271dc97c6c..cb814d159a15 100644 Binary files a/apps/mobile/assets/android-icon-foreground.png and b/apps/mobile/assets/android-icon-foreground.png differ diff --git a/apps/mobile/assets/android-icon-mark.png b/apps/mobile/assets/android-icon-mark.png index 3300f22fd5a6..8e5613b962ea 100644 Binary files a/apps/mobile/assets/android-icon-mark.png and b/apps/mobile/assets/android-icon-mark.png differ diff --git a/apps/mobile/assets/android-notification-icon.png b/apps/mobile/assets/android-notification-icon.png index 74de6633cbb5..105bbb9a6bd0 100644 Binary files a/apps/mobile/assets/android-notification-icon.png and b/apps/mobile/assets/android-notification-icon.png differ diff --git a/apps/mobile/assets/android-splash-icon-dev.png b/apps/mobile/assets/android-splash-icon-dev.png index ba280062720f..39869ca5c209 100644 Binary files a/apps/mobile/assets/android-splash-icon-dev.png and b/apps/mobile/assets/android-splash-icon-dev.png differ diff --git a/apps/mobile/assets/android-splash-icon-nightly.png b/apps/mobile/assets/android-splash-icon-nightly.png index 2f84f9fcfbf2..39869ca5c209 100644 Binary files a/apps/mobile/assets/android-splash-icon-nightly.png and b/apps/mobile/assets/android-splash-icon-nightly.png differ diff --git a/apps/mobile/assets/android-splash-icon-prod.png b/apps/mobile/assets/android-splash-icon-prod.png index 971b5c95f0bd..39869ca5c209 100644 Binary files a/apps/mobile/assets/android-splash-icon-prod.png and b/apps/mobile/assets/android-splash-icon-prod.png differ diff --git a/apps/mobile/package.json b/apps/mobile/package.json index c7342ef77566..60a0470a760e 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -5,19 +5,20 @@ "main": "index.ts", "scripts": { "dev": "expo start", - "dev:client": "APP_VARIANT=development expo start --dev-client --scheme t3code-dev --lan", - "dev:client:reset": "APP_VARIANT=development expo start --dev-client --scheme t3code-dev --clear --lan", - "dev:client:preview-env": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=development expo start --dev-client --scheme t3code-dev --lan --port 0'", - "dev:client:preview": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=preview expo start --dev-client --scheme t3code-preview --lan'", + "dev:client": "APP_VARIANT=development expo start --dev-client --scheme tix-dev --lan", + "dev:client:reset": "APP_VARIANT=development expo start --dev-client --scheme tix-dev --clear --lan", + "dev:client:preview-env": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=development expo start --dev-client --scheme tix-dev --lan --port 0'", + "dev:client:preview": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=preview expo start --dev-client --scheme tix-preview --lan'", "i18n:generate": "gt generate", "i18n:translate": "gt translate", "start": "expo start", "start:dev": "APP_VARIANT=development expo start", "start:preview": "APP_VARIANT=preview expo start", "start:prod": "APP_VARIANT=production expo start", - "showcase": "APP_VARIANT=production EXPO_PUBLIC_SHOWCASE=1 expo start --dev-client --scheme t3code", + "showcase": "APP_VARIANT=production EXPO_PUBLIC_SHOWCASE=1 expo start --dev-client --scheme tix", "screenshots": "node ../../scripts/mobile-showcase.ts", "android": "EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android", + "android:apk": "APP_VARIANT=production T3CODE_MOBILE_UPDATES_ENABLED=0 EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && (cd android && ./gradlew assembleRelease --no-daemon -PreactNativeArchitectures=armeabi-v7a,arm64-v8a -x lintVitalAnalyzeRelease -x lintVitalRelease)", "android:dev": "APP_VARIANT=development EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && REACT_NATIVE_PACKAGER_HOSTNAME=localhost expo run:android", "android:preview": "APP_VARIANT=preview EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android", "android:prod": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android", diff --git a/apps/mobile/src/App.tsx b/apps/mobile/src/App.tsx index 16a77b049efa..d7f06de5bc88 100644 --- a/apps/mobile/src/App.tsx +++ b/apps/mobile/src/App.tsx @@ -140,9 +140,9 @@ function getAppStateFromPath(path: string, options: Parameters setFullWidth(event.nativeEvent.layout.width) : undefined } aria-level={1} - accessibilityLabel={props.accessibilityLabel ?? gt("T3 Code, Threads")} + accessibilityLabel={props.accessibilityLabel ?? PRODUCT_NAME} accessible role="heading" className="flex-row items-center gap-1.5" @@ -60,7 +58,7 @@ export function CompactBrandTitle( className="font-t3-medium text-foreground-muted" style={{ fontSize: 21 * scale, letterSpacing: -0.5 * scale }} > - {WORDMARK_SUFFIX} + {PRODUCT_NAME} {showStage ? ( + ); diff --git a/apps/mobile/src/features/settings/lib/legal-document-url.ts b/apps/mobile/src/features/settings/lib/legal-document-url.ts index e0c90c5ec64b..9606745aa58e 100644 --- a/apps/mobile/src/features/settings/lib/legal-document-url.ts +++ b/apps/mobile/src/features/settings/lib/legal-document-url.ts @@ -1,4 +1,4 @@ -const DEFAULT_MARKETING_SITE_URL = "https://t3.codes"; +const DEFAULT_MARKETING_SITE_URL = "https://github.com/penouc/tix"; function resolveMarketingSiteUrl(override: string | undefined): URL { try { diff --git a/apps/mobile/src/widgets/AgentActivity.tsx b/apps/mobile/src/widgets/AgentActivity.tsx index 2def7e7e75f2..b0fd72772d75 100644 --- a/apps/mobile/src/widgets/AgentActivity.tsx +++ b/apps/mobile/src/widgets/AgentActivity.tsx @@ -178,7 +178,7 @@ function AgentActivity( const deepLinkRow = attentionRow ?? row0; const deepLink = deepLinkRow && deepLinkRow.deepLink.startsWith("/") && !deepLinkRow.deepLink.startsWith("//") - ? `t3code://${deepLinkRow.deepLink.slice(1)}` + ? `tix://${deepLinkRow.deepLink.slice(1)}` : null; const linkModifiers = deepLink ? [widgetURL(deepLink)] : []; diff --git a/apps/mobile/src/widgets/AgentActivityWidget.tsx b/apps/mobile/src/widgets/AgentActivityWidget.tsx index 8dff1156da63..b0f78f6e7fde 100644 --- a/apps/mobile/src/widgets/AgentActivityWidget.tsx +++ b/apps/mobile/src/widgets/AgentActivityWidget.tsx @@ -102,7 +102,7 @@ export function AgentActivityWidget( const linkRow = rows[0]; const deepLink = linkRow && linkRow.deepLink.startsWith("/") && !linkRow.deepLink.startsWith("//") - ? `t3code://${linkRow.deepLink.slice(1)}` + ? `tix://${linkRow.deepLink.slice(1)}` : null; const background = accessory ? "clear" : isLightScheme ? "#ffffff" : "#1c1c1e"; diff --git a/apps/server/package.json b/apps/server/package.json index 89d5cef81770..6f9a20181a2e 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,14 +1,14 @@ { - "name": "t3", + "name": "tix", "version": "0.1.11", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/pingdotgg/t3code", + "url": "https://github.com/penouc/tix", "directory": "apps/server" }, "bin": { - "t3": "./dist/bin.mjs" + "tix": "./dist/bin.mjs" }, "files": [ "dist" diff --git a/apps/server/src/auth/EnvironmentAuth.test.ts b/apps/server/src/auth/EnvironmentAuth.test.ts index 2e6bd03c7461..6fce0da364e6 100644 --- a/apps/server/src/auth/EnvironmentAuth.test.ts +++ b/apps/server/src/auth/EnvironmentAuth.test.ts @@ -984,7 +984,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodePlatformCrypto.layer))( origin: "https://box.tail1234.ts.net", "x-forwarded-host": "box.tail1234.ts.net", }); - yield* upgrade({ origin: "t3code://app" }); + yield* upgrade({ origin: "tix://app" }); yield* upgrade({ origin: "http://localhost:5733" }); yield* upgrade({}); diff --git a/apps/server/src/cli/install.ts b/apps/server/src/cli/install.ts index abd32cf0d844..8366890a1f51 100644 --- a/apps/server/src/cli/install.ts +++ b/apps/server/src/cli/install.ts @@ -54,8 +54,8 @@ export const installCli = Effect.fn("cli.install.install")(function* () { const windows = platform === "win32"; if (Option.isNone(runtime)) { const script = windows - ? "irm https://t3.codes/install.ps1 | iex" - : "curl -fsSL https://t3.codes/install.sh | sh"; + ? "irm https://raw.githubusercontent.com/penouc/tix/main/scripts/install.ps1 | iex" + : "curl -fsSL https://raw.githubusercontent.com/penouc/tix/main/scripts/install.sh | sh"; return yield* new CliInstallError({ reason: `Only the standalone t3 can install itself. Use \`${script}\`, or Settings in the desktop app.`, }); diff --git a/apps/server/src/cloud/servicePreflight.test.ts b/apps/server/src/cloud/servicePreflight.test.ts index cdd3906195d0..a0be2dd341b4 100644 --- a/apps/server/src/cloud/servicePreflight.test.ts +++ b/apps/server/src/cloud/servicePreflight.test.ts @@ -27,7 +27,9 @@ it.each([1])("blocks legacy launcher protocol %i with exact recovery steps", (la const reason = result.status === "blocked" ? result.reason : ""; expect(reason).toMatch(new RegExp(`\\b${launcherProtocol}\\b`)); expect(reason).toMatch(new RegExp(`\\b${SERVICE_LAUNCHER_PROTOCOL}\\b`)); - expect(reason).toContain("curl -fsSL https://t3.codes/install.sh | T3CODE_VERSION=9.8.7 sh"); + expect(reason).toContain( + "curl -fsSL https://raw.githubusercontent.com/penouc/tix/main/scripts/install.sh | T3CODE_VERSION=9.8.7 sh", + ); expect(reason).toContain("~/.local/bin/t3 service install"); expect(reason).toContain("t3 --version"); expect(reason).toContain("which -a t3"); diff --git a/apps/server/src/cloud/servicePreflight.ts b/apps/server/src/cloud/servicePreflight.ts index 56b853753834..c3fbdf8fd585 100644 --- a/apps/server/src/cloud/servicePreflight.ts +++ b/apps/server/src/cloud/servicePreflight.ts @@ -51,7 +51,7 @@ export function runServicePreflight(input: { // reinstall itself and report success, so name the exact install and the path check. reason: [ `The installed service launcher speaks protocol ${launcherProtocol}, but t3@${version} requires protocol ${SERVICE_LAUNCHER_PROTOCOL}.`, - `On the server machine, install this exact CLI: \`curl -fsSL https://t3.codes/install.sh | T3CODE_VERSION=${version} sh\`.`, + `On the server machine, install this exact CLI: \`curl -fsSL https://raw.githubusercontent.com/penouc/tix/main/scripts/install.sh | T3CODE_VERSION=${version} sh\`.`, `Check that \`t3 --version\` prints ${version} and that \`which -a t3\` lists no older t3 (such as an npm or nvm install) first, then run \`~/.local/bin/t3 service install\` (the installer's default path).`, "Updating the desktop app does not update this CLI, and `t3 service update` only repairs the service with whichever CLI runs it.", ].join(" "), diff --git a/apps/server/src/httpCors.ts b/apps/server/src/httpCors.ts index b96e58ead9fc..3c33ea5aa282 100644 --- a/apps/server/src/httpCors.ts +++ b/apps/server/src/httpCors.ts @@ -10,7 +10,7 @@ export const browserApiCorsAllowedHeaders = [ ORCHESTRATION_PROTOCOL_HEADER, ] as const; -export const DESKTOP_RENDERER_ORIGINS = ["t3code://app", "t3code-dev://app"] as const; +export const DESKTOP_RENDERER_ORIGINS = ["tix://app", "tix-dev://app"] as const; /** MCP refuses every browser Origin with 403, so the browser CORS layer must not answer for it. */ export const MCP_HTTP_PATH = "/mcp"; diff --git a/apps/server/src/policy/policyTemplates.ts b/apps/server/src/policy/policyTemplates.ts index 5937e21bdc4f..aa80f900cae6 100644 --- a/apps/server/src/policy/policyTemplates.ts +++ b/apps/server/src/policy/policyTemplates.ts @@ -96,7 +96,7 @@ const policies = (): ReadonlyArray => [ kind: "checkbox", list: "Clients", name: "remote", - label: "Remote: phones, other computers, app.t3.codes", + label: "Remote: phones, other computers, Tailscale", defaultChecked: false, }, ], diff --git a/apps/server/src/project/ManagedProjectFolders.ts b/apps/server/src/project/ManagedProjectFolders.ts index d526c381fb40..e84a83cf6248 100644 --- a/apps/server/src/project/ManagedProjectFolders.ts +++ b/apps/server/src/project/ManagedProjectFolders.ts @@ -199,7 +199,7 @@ function namedProjectReadme(name: string): string { "", `# ${name}`, "", - "Created in [T3 Code](https://t3.codes).", + "Created in [tix](https://github.com/penouc/tix).", "", ].join("\n"); } diff --git a/apps/server/src/provider/ModelManifest.ts b/apps/server/src/provider/ModelManifest.ts index 7d790b472f6a..0c37755bd15f 100644 --- a/apps/server/src/provider/ModelManifest.ts +++ b/apps/server/src/provider/ModelManifest.ts @@ -26,7 +26,7 @@ import { import * as ModelCatalog from "@t3tools/provider-core/server/ModelCatalog"; const MODEL_MANIFEST_URL = - "https://raw.githubusercontent.com/pingdotgg/t3code/main/apps/server/src/provider/model-manifest.json"; + "https://raw.githubusercontent.com/penouc/tix/main/apps/server/src/provider/model-manifest.json"; const MANIFEST_TTL_MS = 60 * 60 * 1000; diff --git a/apps/server/src/telemetry/AnalyticsService.test.ts b/apps/server/src/telemetry/AnalyticsService.test.ts index 8fe1698f4770..b33397a62780 100644 --- a/apps/server/src/telemetry/AnalyticsService.test.ts +++ b/apps/server/src/telemetry/AnalyticsService.test.ts @@ -335,6 +335,13 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("AnalyticsService }), ); + it.effect("is disabled by default outside CI unless explicitly opted in", () => + Effect.gen(function* () { + const batches = yield* sendFor(1, respondWithStatus(204), recordTwentyEvents, undefined, {}); + assert.deepEqual(batches, []); + }), + ); + it.effect("drops a batch the endpoint rejects without sending it again", () => Effect.gen(function* () { const batches = yield* sendFor(10, respondWithStatus(400)); diff --git a/apps/server/src/telemetry/AnalyticsService.ts b/apps/server/src/telemetry/AnalyticsService.ts index 3d92a317fd2e..8f9de38d09c1 100644 --- a/apps/server/src/telemetry/AnalyticsService.ts +++ b/apps/server/src/telemetry/AnalyticsService.ts @@ -1,6 +1,6 @@ // T3 ingest retains events and forwards to PostHog; UUIDs deduplicate retries there. import * as HostProcess from "@t3tools/shared/HostProcess"; -import { isCiEnvironment, isDoNotTrackSet } from "@t3tools/shared/otelEnvironment"; +import { isDoNotTrackSet } from "@t3tools/shared/otelEnvironment"; import type { ClientOs } from "@t3tools/contracts"; import * as Clock from "effect/Clock"; import * as Config from "effect/Config"; @@ -68,12 +68,8 @@ function retryDelayMs(failures: number, random: number): number { } const TelemetryEnvConfig = Config.all({ - posthogKey: Config.String("T3CODE_POSTHOG_KEY").pipe( - Config.withDefault("phc_XOWci4oZP4VvLiEyrFqkFjP4CZn55mjYYBMREK5Wd6m"), - ), - posthogHost: Config.String("T3CODE_POSTHOG_HOST").pipe( - Config.withDefault("https://ingest.t3.codes"), - ), + posthogKey: Config.String("T3CODE_POSTHOG_KEY").pipe(Config.withDefault("")), + posthogHost: Config.String("T3CODE_POSTHOG_HOST").pipe(Config.withDefault("")), enabled: Config.Boolean("T3CODE_TELEMETRY_ENABLED").pipe(Config.option), flushBatchSize: Config.Number("T3CODE_TELEMETRY_FLUSH_BATCH_SIZE").pipe(Config.withDefault(20)), maxBufferedEvents: Config.Number("T3CODE_TELEMETRY_MAX_BUFFERED_EVENTS").pipe( @@ -127,14 +123,21 @@ export const make = Effect.gen(function* () { const telemetryConfig = yield* TelemetryEnvConfig; const hostEnvironment = yield* HostProcess.Environment; const awaitingShellConsent = hostEnvironment.T3CODE_DESKTOP_SHELL_DISCOVERY_PENDING === "1"; - const enabledByDefault = !isCiEnvironment(hostEnvironment); + const hasConfiguredEndpoint = + telemetryConfig.posthogKey.trim().length > 0 && telemetryConfig.posthogHost.trim().length > 0; + const enabledByDefault = false; const enabledAtStartup = Option.getOrElse(telemetryConfig.enabled, () => enabledByDefault); // A managed policy can switch analytics off over the environment, never on. const policyAllows = ManagedPolicy.deniedBy(yield* ManagedPolicy.ManagedPolicy, "telemetry") === undefined; // A cached PATH does not establish consent from the current login shell. const telemetryEnabled = Effect.suspend(() => { - if (!enabledAtStartup || !policyAllows || isDoNotTrackSet(hostEnvironment)) + if ( + !hasConfiguredEndpoint || + !enabledAtStartup || + !policyAllows || + isDoNotTrackSet(hostEnvironment) + ) return Effect.succeed(false); if (!awaitingShellConsent) return Effect.succeed(true); if (hostEnvironment.T3CODE_DESKTOP_SHELL_DISCOVERY_PENDING === "1") diff --git a/apps/server/src/triage/TriageService.ts b/apps/server/src/triage/TriageService.ts index 14d12c0af9e1..397323fe2c93 100644 --- a/apps/server/src/triage/TriageService.ts +++ b/apps/server/src/triage/TriageService.ts @@ -16,7 +16,7 @@ import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; import { buildTriageAppPrompt, type TriageSourceClone } from "./triagePrompt.ts"; import { triageSourceCacheDir, writeTriageSession } from "./triageSession.ts"; -const T3CODE_REPOSITORY_URL = "https://github.com/pingdotgg/t3code"; +const T3CODE_REPOSITORY_URL = "https://github.com/penouc/tix"; // No tty: a credential prompt would hang until the timeout, so git must fail // instead. An empty GIT_ASKPASS also skips core.askPass and SSH_ASKPASS helpers. diff --git a/apps/web/index.html b/apps/web/index.html index 7f8be6fa934c..5d269a45713e 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -690,13 +690,13 @@ if (desktopDisplayName) document.title = desktopDisplayName; - T3 Code + tix
-
- +
+

diff --git a/apps/web/public/apple-touch-icon.png b/apps/web/public/apple-touch-icon.png index 3eed25ea6b78..b937c1902eb2 100644 Binary files a/apps/web/public/apple-touch-icon.png and b/apps/web/public/apple-touch-icon.png differ diff --git a/apps/web/public/favicon-16x16.png b/apps/web/public/favicon-16x16.png index a3431b8c6dfe..434bec501c32 100644 Binary files a/apps/web/public/favicon-16x16.png and b/apps/web/public/favicon-16x16.png differ diff --git a/apps/web/public/favicon-32x32.png b/apps/web/public/favicon-32x32.png index 862f7629971f..e489e4a9e1eb 100644 Binary files a/apps/web/public/favicon-32x32.png and b/apps/web/public/favicon-32x32.png differ diff --git a/apps/web/public/favicon.ico b/apps/web/public/favicon.ico index 750da22602ee..c2ce1f2df0e8 100644 Binary files a/apps/web/public/favicon.ico and b/apps/web/public/favicon.ico differ diff --git a/apps/web/public/icon-192x192.png b/apps/web/public/icon-192x192.png index 3e2637386b1d..56d60c7355bb 100644 Binary files a/apps/web/public/icon-192x192.png and b/apps/web/public/icon-192x192.png differ diff --git a/apps/web/public/icon-512x512.png b/apps/web/public/icon-512x512.png index 1fac754a327f..00c7a1597c51 100644 Binary files a/apps/web/public/icon-512x512.png and b/apps/web/public/icon-512x512.png differ diff --git a/apps/web/public/manifest.webmanifest b/apps/web/public/manifest.webmanifest index 26d1c2e0d38a..869107fa48be 100644 --- a/apps/web/public/manifest.webmanifest +++ b/apps/web/public/manifest.webmanifest @@ -1,7 +1,7 @@ { "id": "/", - "name": "T3 Code", - "short_name": "T3 Code", + "name": "tix", + "short_name": "tix", "start_url": "/", "scope": "/", "display": "standalone", diff --git a/apps/web/src/branding.ts b/apps/web/src/branding.ts index bf5b76f0dd1b..53e1bacac2b5 100644 --- a/apps/web/src/branding.ts +++ b/apps/web/src/branding.ts @@ -19,7 +19,7 @@ const hostedAppChannel = import.meta.env.VITE_HOSTED_APP_CHANNEL?.trim().toLower export const HOSTED_APP_CHANNEL = hostedAppChannel === "latest" || hostedAppChannel === "nightly" ? hostedAppChannel : null; export const HOSTED_APP_CHANNEL_LABEL = resolveHostedAppChannelLabel(HOSTED_APP_CHANNEL); -export const APP_BASE_NAME = injectedDesktopAppBranding?.baseName ?? "T3 Code"; +export const APP_BASE_NAME = injectedDesktopAppBranding?.baseName ?? "tix"; export const APP_STAGE_LABEL = injectedDesktopAppBranding?.stageLabel ?? resolveWebAppStageLabel({ @@ -30,6 +30,5 @@ export const APP_DISPLAY_NAME = injectedDesktopAppBranding?.displayName ?? formatAppDisplayName({ baseName: APP_BASE_NAME, stageLabel: APP_STAGE_LABEL }); export const APP_VERSION = import.meta.env.APP_VERSION || "0.0.0"; -export const DESKTOP_DOWNLOAD_URL = "https://t3.codes/download"; -// Redirects to the App Store or Google Play to match the phone that opens it. -export const MOBILE_APP_URL = "https://t3.codes/mobile"; +export const DESKTOP_DOWNLOAD_URL = "https://github.com/penouc/tix/releases/latest"; +export const MOBILE_APP_URL = "https://github.com/penouc/tix/releases/latest"; diff --git a/apps/web/src/components/GitHubStarPrompt.test.ts b/apps/web/src/components/GitHubStarPrompt.test.ts index f748ec8b8220..dcd45254a9d0 100644 --- a/apps/web/src/components/GitHubStarPrompt.test.ts +++ b/apps/web/src/components/GitHubStarPrompt.test.ts @@ -178,7 +178,7 @@ describe("recordPromptSent", () => { await (await startSession()).send(); click(add.mock.lastCall?.[0].actionProps); await vi.advanceTimersByTimeAsync(0); - expect(openExternal).toHaveBeenCalledWith("https://github.com/pingdotgg/t3code"); + expect(openExternal).toHaveBeenCalledWith("https://github.com/penouc/tix"); expect(update.mock.lastCall?.[1]).not.toMatchObject({ actionProps: { children: "Open GitHub" }, }); diff --git a/apps/web/src/components/GitHubStarPrompt.tsx b/apps/web/src/components/GitHubStarPrompt.tsx index 097289d9829c..8bd21f7da71e 100644 --- a/apps/web/src/components/GitHubStarPrompt.tsx +++ b/apps/web/src/components/GitHubStarPrompt.tsx @@ -14,7 +14,7 @@ import { toastManager } from "./ui/toast"; // Separate keys so a count written by another tab can never undo a dismissal. const SENT_KEY = "t3code:github-star-prompt:sent"; const DISMISSED_KEY = "t3code:github-star-prompt:dismissed"; -const REPOSITORY = "pingdotgg/t3code"; +const REPOSITORY = "penouc/tix"; const PROMPTS_BEFORE_ASKING = 5; const IDLE_MS = 30_000; // User-driven actions (send, navigate, type, scroll) start with one of these; touch fires pointerdown. diff --git a/apps/web/src/components/InstallT3Commands.tsx b/apps/web/src/components/InstallT3Commands.tsx index 0206f22c3b83..2239a3b1b977 100644 --- a/apps/web/src/components/InstallT3Commands.tsx +++ b/apps/web/src/components/InstallT3Commands.tsx @@ -17,9 +17,9 @@ export function InstallT3Commands({ return (

macOS, Linux

- +

Windows (PowerShell)

- +

Then

diff --git a/apps/web/src/components/T3Wordmark.tsx b/apps/web/src/components/T3Wordmark.tsx index d0882a5dd61e..243aeb0e79dd 100644 --- a/apps/web/src/components/T3Wordmark.tsx +++ b/apps/web/src/components/T3Wordmark.tsx @@ -1,12 +1,10 @@ import type { SVGProps } from "react"; +import mammothUrl from "../../../../assets/prod/app-icon.icon/Assets/mammoth.svg"; export function T3Wordmark(props: SVGProps) { return ( - - + + ); } diff --git a/apps/web/src/components/desktopUpdate.logic.test.ts b/apps/web/src/components/desktopUpdate.logic.test.ts index 601527e51a20..0b6b508f37f1 100644 --- a/apps/web/src/components/desktopUpdate.logic.test.ts +++ b/apps/web/src/components/desktopUpdate.logic.test.ts @@ -156,10 +156,10 @@ describe("desktop update UI helpers", () => { "falls back to upstream for an invalid configured repository: %s", (repository) => { expect(getDesktopUpdateReleaseHistoryUrl(repository)).toBe( - "https://github.com/pingdotgg/t3code/releases", + "https://github.com/penouc/tix/releases", ); expect(getDesktopUpdateReleaseUrl("1.2.3", repository)).toBe( - "https://github.com/pingdotgg/t3code/releases/tag/v1.2.3", + "https://github.com/penouc/tix/releases/tag/v1.2.3", ); }, ); diff --git a/apps/web/src/components/desktopUpdate.logic.ts b/apps/web/src/components/desktopUpdate.logic.ts index 4922ee3b524b..b286a5f21558 100644 --- a/apps/web/src/components/desktopUpdate.logic.ts +++ b/apps/web/src/components/desktopUpdate.logic.ts @@ -12,7 +12,7 @@ import { channelSwitchLabel } from "./sidebar/updateEverything.logic"; export type DesktopUpdateButtonAction = "download" | "install" | "none"; -const DEFAULT_DESKTOP_RELEASE_REPOSITORY = "pingdotgg/t3code"; +const DEFAULT_DESKTOP_RELEASE_REPOSITORY = "penouc/tix"; const GITHUB_REPOSITORY_SEGMENT = /^[A-Za-z0-9._-]+$/u; function isValidRepositorySegment(value: string | undefined): value is string { diff --git a/apps/web/src/components/settings/MultipleAccountsNote.tsx b/apps/web/src/components/settings/MultipleAccountsNote.tsx index aad091562f0a..94449a8cfac3 100644 --- a/apps/web/src/components/settings/MultipleAccountsNote.tsx +++ b/apps/web/src/components/settings/MultipleAccountsNote.tsx @@ -7,7 +7,7 @@ import { serverEnvironment } from "../../state/server"; import { Alert, AlertDescription } from "../ui/alert"; const MULTIPLE_ACCOUNTS_FAQ_URL = - "https://github.com/pingdotgg/t3code/blob/main/docs/user/faq.md#can-i-add-a-bunch-of-accounts-for-one-provider"; + "https://github.com/penouc/tix/blob/main/docs/user/faq.md#can-i-add-a-bunch-of-accounts-for-one-provider"; const PROVIDER_NAMES = new Map([ ["codex", "Codex"], diff --git a/apps/web/src/components/sidebar/SidebarChrome.tsx b/apps/web/src/components/sidebar/SidebarChrome.tsx index 1dbc9b9fc636..58da27e7f20a 100644 --- a/apps/web/src/components/sidebar/SidebarChrome.tsx +++ b/apps/web/src/components/sidebar/SidebarChrome.tsx @@ -168,10 +168,8 @@ function HistoryNavigationButton({ } function SidebarBrand({ onBackdrop }: { onBackdrop: boolean }) { - const gt = useGT(); return ( + - {/* oxlint-disable-next-line t3code/no-untranslated-copy -- product wordmark */} - {"Code"} + {"tix"} ); diff --git a/apps/web/src/components/ui/standalone-page.tsx b/apps/web/src/components/ui/standalone-page.tsx index 987c4c09a911..6061023054f0 100644 --- a/apps/web/src/components/ui/standalone-page.tsx +++ b/apps/web/src/components/ui/standalone-page.tsx @@ -23,10 +23,9 @@ export function StandalonePageHeader({ return ( <>
- + - {/* oxlint-disable-next-line t3code/no-untranslated-copy -- product wordmark */} - Code + tix {context ? {context} : null}
diff --git a/apps/web/src/components/workflows/WorkflowRunsView.tsx b/apps/web/src/components/workflows/WorkflowRunsView.tsx index 48d788c29b60..3458c0899fb7 100644 --- a/apps/web/src/components/workflows/WorkflowRunsView.tsx +++ b/apps/web/src/components/workflows/WorkflowRunsView.tsx @@ -38,7 +38,7 @@ import { workflowRunInvolves, } from "@t3tools/client-runtime/workflows"; -const WORKFLOWS_GUIDE_URL = "https://github.com/pingdotgg/t3code/blob/main/docs/user/workflows.md"; +const WORKFLOWS_GUIDE_URL = "https://github.com/penouc/tix/blob/main/docs/user/workflows.md"; const EVERY_WORKFLOW = ""; // Never a kind: the questions of no kind are filtered by the empty kind. const EVERY_KIND = "*"; diff --git a/apps/web/src/legalLinks.ts b/apps/web/src/legalLinks.ts index 2c42b814355f..55dfd662b989 100644 --- a/apps/web/src/legalLinks.ts +++ b/apps/web/src/legalLinks.ts @@ -1 +1 @@ -export const PRIVACY_POLICY_URL = "https://t3.codes/privacy-policy"; +export const PRIVACY_POLICY_URL = "https://github.com/penouc/tix"; diff --git a/apps/web/src/lib/bootError.test.ts b/apps/web/src/lib/bootError.test.ts index 60d655cccadc..4cdd090a0cd1 100644 --- a/apps/web/src/lib/bootError.test.ts +++ b/apps/web/src/lib/bootError.test.ts @@ -43,18 +43,18 @@ describe("resolveTriageCommand", () => { it("falls back to npx without a usable desktop launcher", async () => { using _warn = vi.spyOn(console, "warn").mockImplementation(() => {}); - await expect(resolveTriageCommand(undefined)).resolves.toBe("npx t3 triage"); - await expect(resolveTriageCommand({} as DesktopBridge)).resolves.toBe("npx t3 triage"); + await expect(resolveTriageCommand(undefined)).resolves.toBe("npx tix triage"); + await expect(resolveTriageCommand({} as DesktopBridge)).resolves.toBe("npx tix triage"); await expect(resolveTriageCommand(desktopWith(async () => notOnPath(null)))).resolves.toBe( - "npx t3 triage", + "npx tix triage", ); const staleWindowsPathEntry = { ...notOnPath(null), supported: true, onPath: true }; await expect( resolveTriageCommand(desktopWith(async () => staleWindowsPathEntry)), - ).resolves.toBe("npx t3 triage"); + ).resolves.toBe("npx tix triage"); await expect( resolveTriageCommand(desktopWith(() => Promise.reject(new Error("ipc closed")))), - ).resolves.toBe("npx t3 triage"); + ).resolves.toBe("npx tix triage"); }); }); diff --git a/apps/web/src/lib/bootError.ts b/apps/web/src/lib/bootError.ts index d2852e2d70ef..d699e43d9b0a 100644 --- a/apps/web/src/lib/bootError.ts +++ b/apps/web/src/lib/bootError.ts @@ -1,8 +1,8 @@ import type { DesktopBridge, DesktopUpdateState } from "@t3tools/contracts"; -const FALLBACK_TRIAGE_COMMAND = "npx t3 triage"; -const DOWNLOAD_URL = "https://t3.codes/download"; -const ISSUE_URL = "https://github.com/pingdotgg/t3code/issues/new"; +const FALLBACK_TRIAGE_COMMAND = "npx tix triage"; +const DOWNLOAD_URL = "https://github.com/penouc/tix/releases"; +const ISSUE_URL = "https://github.com/penouc/tix/issues/new"; const LAST_FAILURE_KEY = "t3code:boot-failed-at"; const REPEAT_FAILURE_MS = 5 * 60_000; const MAX_CAUSES = 3; diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 2a68257cbfa6..01472cbe5b88 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -290,7 +290,7 @@ function bootstrapTitlePlugin(): Plugin { hostedAppChannel: configuredHostedAppChannel, development, }); - const title = formatAppDisplayName({ baseName: "T3 Code", stageLabel }); + const title = formatAppDisplayName({ baseName: "tix", stageLabel }); return html.replace(/[^<]*<\/title>/, `<title>${title}`); }, }; diff --git a/assets/README.md b/assets/README.md index f03136d3231b..86e0cade67dd 100644 --- a/assets/README.md +++ b/assets/README.md @@ -1,67 +1,7 @@ -# Brand icons +# tix brand icons -The three Icon Composer projects are the source of truth for full application icons: +The [mammoth SVG](prod/app-icon.icon/Assets/mammoth.svg) is the master artwork. All release channels use the same Icon Composer project. Legacy export filenames remain stable so existing packaging and update scripts can find them. -- `dev/app-icon.icon` -- `nightly/app-icon.icon` -- `prod/app-icon.icon` - -Each project uses `text.svg` for the T3 mark and `background.svg` when the background is a vector layer. Additional layers use semantic names that describe their role and placement. - -Run `vp run icons:export` from the repository root to regenerate the tracked iOS, Linux, Windows, and web assets. The development web exports are also copied to `apps/web/public` for the browser favicon, web app manifest icons, and splash screen. Run `vp run icons:check` to verify that the generated assets and public copies match their sources without changing files. - -Exporting requires Icon Composer 2 or newer on macOS. The script selects the newest compatible exporter from Xcode or a standalone Icon Composer installation and pins design generation 26. Set `ICON_COMPOSER_TOOL` to the full path of `Icon Composer.app/Contents/Executables/ictool` to override automatic discovery. - -## macOS exports - -Icon Composer's command-line exporter does not expose the `macOS pre-Tahoe` preset. A plain command-line `macOS` export is full bleed and is not suitable for the desktop app, so the export script intentionally leaves the tracked macOS PNGs unchanged and prints a reminder after every run. - -After changing an Icon Composer project, open it in Icon Composer and export the macOS PNG with exactly these settings: - -- Platform: `macOS pre-Tahoe` -- Appearance: `Default` -- Size: `1024pt` -- Scale: `1×` - -Save the three exports to: - -- `dev/app-icon.icon` -> `dev/blueprint-macos-1024.png` -- `nightly/app-icon.icon` -> `nightly/nightly-macos-1024.png` -- `prod/app-icon.icon` -> `prod/black-macos-1024.png` - -The result must be a 1024×1024 PNG with the classic macOS safe area: the opaque icon body is 824×824, inset 100 pixels on every side, with only the native Icon Composer shadow extending into the surrounding transparent canvas. - -To have Codex perform the native exports, paste this prompt into a task opened at the repository root: - -```text -Use [@Computer](plugin://computer-use@openai-bundled) and the Icon Composer app to export the three macOS app icons in this repository. - -For each project below, use Platform: macOS pre-Tahoe, Appearance: Default, Size: 1024pt, and Scale: 1×, then save the PNG to the exact destination: - -- assets/dev/app-icon.icon -> assets/dev/blueprint-macos-1024.png -- assets/nightly/app-icon.icon -> assets/nightly/nightly-macos-1024.png -- assets/prod/app-icon.icon -> assets/prod/black-macos-1024.png - -Do not resize, composite, or otherwise post-process the exported PNGs. - -Verify every result is 1024×1024 and has the classic macOS safe area: an 824×824 opaque body inset 100px on every side, with only Icon Composer's native shadow extending beyond it. -``` - -Do not edit the generated PNG or ICO files directly. - -## Android launcher and splash artwork - -Android masks the central 72dp of a 108dp adaptive canvas, and the Android 12+ splash screen masks -the central two thirds of a 288dp canvas, so the Icon Composer exports cannot be used directly: -their rounded-square silhouette gets framed again and the wordmark is cropped. The Android artwork -is instead rendered from the same Icon Composer SVG sources by `vp run icons:export:android`: - -- `apps/mobile/assets/android-icon-foreground.png`: the shared transparent wordmark, sized to stay - inside the safe zone -- `apps/mobile/assets/android-icon-background-dev.png` and `-nightly.png`: full-bleed variant - artwork (blueprint grid and annotations; night sky and clouds). Production uses a solid color. -- `apps/mobile/assets/android-splash-icon-*.png`: the two layers composed into one 288dp image, so - the splash mask reproduces the launcher icon's framing. - -Rerun the export after changing a layer SVG. `android-icon-mark.png` remains a flat silhouette for -Android's monochrome themed icon. +- Run `vp run icons:export` on macOS with Icon Composer 2 or newer to regenerate the iOS, Linux, Windows, and web icons and copy development web icons into `apps/web/public`. Use `vp run icons:check` to check for stale exports. +- Run `vp run icons:export:android` to regenerate the adaptive foreground, themed icon, notification silhouette, and splash icons from the same artwork. +- For macOS, export the shared project in Icon Composer with **macOS pre-Tahoe**, **Default**, **1024pt**, and **1×**. Use the same export for `dev/blueprint-macos-1024.png`, `nightly/nightly-macos-1024.png`, and `prod/black-macos-1024.png`. Preserve the 824×824 icon body inside the 1024×1024 canvas. diff --git a/assets/dev/blueprint-ios-1024.png b/assets/dev/blueprint-ios-1024.png index a53c8d19aa83..d54b4b32bd2a 100644 Binary files a/assets/dev/blueprint-ios-1024.png and b/assets/dev/blueprint-ios-1024.png differ diff --git a/assets/dev/blueprint-macos-1024.png b/assets/dev/blueprint-macos-1024.png index 68a567058be1..31430e71fde4 100644 Binary files a/assets/dev/blueprint-macos-1024.png and b/assets/dev/blueprint-macos-1024.png differ diff --git a/assets/dev/blueprint-universal-1024.png b/assets/dev/blueprint-universal-1024.png index a53c8d19aa83..d54b4b32bd2a 100644 Binary files a/assets/dev/blueprint-universal-1024.png and b/assets/dev/blueprint-universal-1024.png differ diff --git a/assets/dev/blueprint-web-apple-touch-180.png b/assets/dev/blueprint-web-apple-touch-180.png index 3eed25ea6b78..b937c1902eb2 100644 Binary files a/assets/dev/blueprint-web-apple-touch-180.png and b/assets/dev/blueprint-web-apple-touch-180.png differ diff --git a/assets/dev/blueprint-web-favicon-16x16.png b/assets/dev/blueprint-web-favicon-16x16.png index a3431b8c6dfe..434bec501c32 100644 Binary files a/assets/dev/blueprint-web-favicon-16x16.png and b/assets/dev/blueprint-web-favicon-16x16.png differ diff --git a/assets/dev/blueprint-web-favicon-32x32.png b/assets/dev/blueprint-web-favicon-32x32.png index 862f7629971f..e489e4a9e1eb 100644 Binary files a/assets/dev/blueprint-web-favicon-32x32.png and b/assets/dev/blueprint-web-favicon-32x32.png differ diff --git a/assets/dev/blueprint-web-favicon.ico b/assets/dev/blueprint-web-favicon.ico index 750da22602ee..c2ce1f2df0e8 100644 Binary files a/assets/dev/blueprint-web-favicon.ico and b/assets/dev/blueprint-web-favicon.ico differ diff --git a/assets/dev/blueprint-web-icon-192x192.png b/assets/dev/blueprint-web-icon-192x192.png index 3e2637386b1d..56d60c7355bb 100644 Binary files a/assets/dev/blueprint-web-icon-192x192.png and b/assets/dev/blueprint-web-icon-192x192.png differ diff --git a/assets/dev/blueprint-web-icon-512x512.png b/assets/dev/blueprint-web-icon-512x512.png index 1fac754a327f..00c7a1597c51 100644 Binary files a/assets/dev/blueprint-web-icon-512x512.png and b/assets/dev/blueprint-web-icon-512x512.png differ diff --git a/assets/dev/blueprint-windows.ico b/assets/dev/blueprint-windows.ico index 750da22602ee..c2ce1f2df0e8 100644 Binary files a/assets/dev/blueprint-windows.ico and b/assets/dev/blueprint-windows.ico differ diff --git a/assets/nightly/nightly-ios-1024.png b/assets/nightly/nightly-ios-1024.png index 42ce5589e9ca..d54b4b32bd2a 100644 Binary files a/assets/nightly/nightly-ios-1024.png and b/assets/nightly/nightly-ios-1024.png differ diff --git a/assets/nightly/nightly-macos-1024.png b/assets/nightly/nightly-macos-1024.png index 1beacd9f34ad..31430e71fde4 100644 Binary files a/assets/nightly/nightly-macos-1024.png and b/assets/nightly/nightly-macos-1024.png differ diff --git a/assets/nightly/nightly-universal-1024.png b/assets/nightly/nightly-universal-1024.png index 42ce5589e9ca..d54b4b32bd2a 100644 Binary files a/assets/nightly/nightly-universal-1024.png and b/assets/nightly/nightly-universal-1024.png differ diff --git a/assets/nightly/nightly-web-apple-touch-180.png b/assets/nightly/nightly-web-apple-touch-180.png index f09a169458ab..b937c1902eb2 100644 Binary files a/assets/nightly/nightly-web-apple-touch-180.png and b/assets/nightly/nightly-web-apple-touch-180.png differ diff --git a/assets/nightly/nightly-web-favicon-16x16.png b/assets/nightly/nightly-web-favicon-16x16.png index 20208f5f3695..434bec501c32 100644 Binary files a/assets/nightly/nightly-web-favicon-16x16.png and b/assets/nightly/nightly-web-favicon-16x16.png differ diff --git a/assets/nightly/nightly-web-favicon-32x32.png b/assets/nightly/nightly-web-favicon-32x32.png index b9008d518bce..e489e4a9e1eb 100644 Binary files a/assets/nightly/nightly-web-favicon-32x32.png and b/assets/nightly/nightly-web-favicon-32x32.png differ diff --git a/assets/nightly/nightly-web-favicon.ico b/assets/nightly/nightly-web-favicon.ico index b6a0b43b93d2..c2ce1f2df0e8 100644 Binary files a/assets/nightly/nightly-web-favicon.ico and b/assets/nightly/nightly-web-favicon.ico differ diff --git a/assets/nightly/nightly-web-icon-192x192.png b/assets/nightly/nightly-web-icon-192x192.png index 95e9256dc8ab..56d60c7355bb 100644 Binary files a/assets/nightly/nightly-web-icon-192x192.png and b/assets/nightly/nightly-web-icon-192x192.png differ diff --git a/assets/nightly/nightly-web-icon-512x512.png b/assets/nightly/nightly-web-icon-512x512.png index 6ce057fba4a6..00c7a1597c51 100644 Binary files a/assets/nightly/nightly-web-icon-512x512.png and b/assets/nightly/nightly-web-icon-512x512.png differ diff --git a/assets/nightly/nightly-windows.ico b/assets/nightly/nightly-windows.ico index b6a0b43b93d2..c2ce1f2df0e8 100644 Binary files a/assets/nightly/nightly-windows.ico and b/assets/nightly/nightly-windows.ico differ diff --git a/assets/prod/app-icon.icon/Assets/mammoth.svg b/assets/prod/app-icon.icon/Assets/mammoth.svg new file mode 100644 index 000000000000..c6f2fad424ba --- /dev/null +++ b/assets/prod/app-icon.icon/Assets/mammoth.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/prod/app-icon.icon/icon.json b/assets/prod/app-icon.icon/icon.json index 6976a6a724c8..0880c0a12ad4 100644 --- a/assets/prod/app-icon.icon/icon.json +++ b/assets/prod/app-icon.icon/icon.json @@ -1,15 +1,15 @@ { "fill": { - "solid": "display-p3:0.00000,0.00000,0.00000,1.00000" + "solid": "display-p3:0.90000,0.95000,1.00000,1.00000" }, "groups": [ { "layers": [ { - "image-name": "text.svg", - "name": "Text", + "image-name": "mammoth.svg", + "name": "Mammoth", "position": { - "scale": 8.5, + "scale": 7.2, "translation-in-points": [0, 0] } } diff --git a/assets/prod/black-ios-1024.png b/assets/prod/black-ios-1024.png index bfc80410aadc..d54b4b32bd2a 100644 Binary files a/assets/prod/black-ios-1024.png and b/assets/prod/black-ios-1024.png differ diff --git a/assets/prod/black-macos-1024.png b/assets/prod/black-macos-1024.png index 6a0fe10d3dac..31430e71fde4 100644 Binary files a/assets/prod/black-macos-1024.png and b/assets/prod/black-macos-1024.png differ diff --git a/assets/prod/black-universal-1024.png b/assets/prod/black-universal-1024.png index bfc80410aadc..d54b4b32bd2a 100644 Binary files a/assets/prod/black-universal-1024.png and b/assets/prod/black-universal-1024.png differ diff --git a/assets/prod/t3-black-web-apple-touch-180.png b/assets/prod/t3-black-web-apple-touch-180.png index 327a8ac55faf..b937c1902eb2 100644 Binary files a/assets/prod/t3-black-web-apple-touch-180.png and b/assets/prod/t3-black-web-apple-touch-180.png differ diff --git a/assets/prod/t3-black-web-favicon-16x16.png b/assets/prod/t3-black-web-favicon-16x16.png index 6ba6d92c0379..434bec501c32 100644 Binary files a/assets/prod/t3-black-web-favicon-16x16.png and b/assets/prod/t3-black-web-favicon-16x16.png differ diff --git a/assets/prod/t3-black-web-favicon-32x32.png b/assets/prod/t3-black-web-favicon-32x32.png index fb354d60ace9..e489e4a9e1eb 100644 Binary files a/assets/prod/t3-black-web-favicon-32x32.png and b/assets/prod/t3-black-web-favicon-32x32.png differ diff --git a/assets/prod/t3-black-web-favicon.ico b/assets/prod/t3-black-web-favicon.ico index 5fac0d8b24ea..c2ce1f2df0e8 100644 Binary files a/assets/prod/t3-black-web-favicon.ico and b/assets/prod/t3-black-web-favicon.ico differ diff --git a/assets/prod/t3-black-web-icon-192x192.png b/assets/prod/t3-black-web-icon-192x192.png index aa7944053b5d..56d60c7355bb 100644 Binary files a/assets/prod/t3-black-web-icon-192x192.png and b/assets/prod/t3-black-web-icon-192x192.png differ diff --git a/assets/prod/t3-black-web-icon-512x512.png b/assets/prod/t3-black-web-icon-512x512.png index 597cfcc59237..00c7a1597c51 100644 Binary files a/assets/prod/t3-black-web-icon-512x512.png and b/assets/prod/t3-black-web-icon-512x512.png differ diff --git a/assets/prod/t3-black-windows.ico b/assets/prod/t3-black-windows.ico index 5fac0d8b24ea..c2ce1f2df0e8 100644 Binary files a/assets/prod/t3-black-windows.ico and b/assets/prod/t3-black-windows.ico differ diff --git a/package.json b/package.json index bd2d02f30a2a..7d6ca6d2f8ae 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dev:marketing": "vp run --filter @t3tools/marketing dev", "dev:desktop": "node scripts/dev-runner.ts dev:desktop", "migrate-dev-db": "node apps/server/scripts/migrate-dev-db.ts", - "start": "vp run --filter t3 start", + "start": "vp run --filter tix start", "start:desktop": "vp run --filter @t3tools/desktop start", "start:marketing": "vp run --filter @t3tools/marketing preview", "start:mock-update-server": "node scripts/mock-update-server.ts", @@ -24,7 +24,7 @@ "icons:export:android": "node scripts/export-android-icons.ts", "build": "vp run --filter './apps/*' build", "build:marketing": "vp run --filter @t3tools/marketing build", - "build:desktop": "vp run --filter @t3tools/desktop --filter t3 build", + "build:desktop": "vp run --filter @t3tools/desktop --filter tix build", "build:desktop:bundle": "vp run --filter @t3tools/desktop build:bundle", "build:resource-monitor": "cargo build --locked --release --manifest-path native/resource-monitor/Cargo.toml", "typecheck": "vp run -r --cache --concurrency-limit 4 typecheck", diff --git a/packages/contracts/src/environmentHttp.ts b/packages/contracts/src/environmentHttp.ts index 2a6c0dc43d50..170de5c8ce27 100644 --- a/packages/contracts/src/environmentHttp.ts +++ b/packages/contracts/src/environmentHttp.ts @@ -528,7 +528,7 @@ export type T3ConnectTroubleshootingSection = (typeof T3_CONNECT_TROUBLESHOOTING /** Clients, the CLI, and server logs link here as "More info". */ export function t3ConnectTroubleshootingUrl(section: T3ConnectTroubleshootingSection): string { - return `https://github.com/pingdotgg/t3code/blob/main/docs/user/t3-connect-troubleshooting.md#${section}`; + return `https://github.com/penouc/tix/blob/main/docs/user/t3-connect-troubleshooting.md#${section}`; } const REACHABILITY_SECTION = { diff --git a/packages/shared/src/cliRelease.ts b/packages/shared/src/cliRelease.ts index 07a0c73b1794..caed4ffb05d1 100644 --- a/packages/shared/src/cliRelease.ts +++ b/packages/shared/src/cliRelease.ts @@ -3,7 +3,7 @@ import * as Schema from "effect/Schema"; import { compareSemverVersions } from "./semver.ts"; -const CLI_RELEASE_REPOSITORY = "pingdotgg/t3code"; +const CLI_RELEASE_REPOSITORY = "penouc/tix"; export const CLI_RELEASES_PAGE_URL = `https://github.com/${CLI_RELEASE_REPOSITORY}/releases`; export const CLI_RELEASE_CHECKSUMS_FILE = "SHA256SUMS"; export const CLI_RELEASE_BASE_URL_ENV = "T3CODE_RELEASE_BASE_URL"; diff --git a/packages/shared/src/codexAuthHandoff.ts b/packages/shared/src/codexAuthHandoff.ts index 84e48c420551..7757179f6330 100644 --- a/packages/shared/src/codexAuthHandoff.ts +++ b/packages/shared/src/codexAuthHandoff.ts @@ -65,7 +65,7 @@ export function codexCallbackUrl(value: string, redirectUri: string, state: stri } export function codexAuthHandoffUrl(input: CodexAuthHandoff, development = false) { - const url = new URL(`${development ? "t3code-dev" : "t3code"}://auth/codex`); + const url = new URL(`${development ? "tix-dev" : "tix"}://auth/codex`); url.searchParams.set("request", encodeHandoff(input)); return url.toString(); } @@ -75,7 +75,7 @@ export function readCodexAuthHandoff(value: string, development: boolean) { const url = new URL(value); if ( value.length > 32_768 || - url.protocol !== (development ? "t3code-dev:" : "t3code:") || + url.protocol !== (development ? "tix-dev:" : "tix:") || url.host !== "auth" || url.pathname !== "/codex" || url.username || diff --git a/packages/shared/src/promptLinks.test.ts b/packages/shared/src/promptLinks.test.ts index 0f549c6974a3..8f14e87e5def 100644 --- a/packages/shared/src/promptLinks.test.ts +++ b/packages/shared/src/promptLinks.test.ts @@ -116,13 +116,13 @@ describe("link round trips", () => { const path = promptLinkAppPath(link); expect(path).toBe("/env-1/mcp%3A1"); const deepLink = promptLinkDeepLink(path!); - expect(deepLink).toBe("t3code://threads/env-1/mcp%3A1"); + expect(deepLink).toBe("tix://threads/env-1/mcp%3A1"); expect(promptLinkAppPath(deepLink)).toBe(path); }); it("maps app scheme and hosted links to in-app paths, and nothing else", () => { - expect(promptLinkAppPath("t3code://new?prompt=hi")).toBe("/new?prompt=hi"); - expect(promptLinkAppPath("t3code-dev://threads/env-1/thread-1")).toBe("/env-1/thread-1"); + expect(promptLinkAppPath("tix://new?prompt=hi")).toBe("/new?prompt=hi"); + expect(promptLinkAppPath("tix-dev://threads/env-1/thread-1")).toBe("/env-1/thread-1"); expect(promptLinkAppPath("https://app.t3.codes/env-1/thread-1?prompt=go")).toBe( "/env-1/thread-1?prompt=go", ); @@ -137,7 +137,7 @@ describe("link round trips", () => { expect(promptLinkAppPath("https://app.t3.codes/threads/env-1")).toBeNull(); expect(promptLinkAppPath("https://app.t3.codes/settings/general")).toBeNull(); expect(promptLinkAppPath("https://evil.test/new?prompt=hi")).toBeNull(); - expect(promptLinkAppPath("t3code://app/index.html")).toBeNull(); + expect(promptLinkAppPath("tix://app/index.html")).toBeNull(); }); it("maps links in browsers without URL.canParse, such as Safari before 17", () => { diff --git a/packages/shared/src/promptLinks.ts b/packages/shared/src/promptLinks.ts index 17da5ec8d99e..eaaedf92eae6 100644 --- a/packages/shared/src/promptLinks.ts +++ b/packages/shared/src/promptLinks.ts @@ -206,7 +206,7 @@ export function buildNewThreadLink(input: { return url.toString(); } -const APP_SCHEME = /^t3code(?:-[a-z]+)?:$/; +const APP_SCHEME = /^tix(?:-[a-z]+)?:$/; const THREAD_PATH = /^\/([^/]+)\/([^/]+)\/?$/; export function promptLinkAppPath( @@ -233,7 +233,7 @@ export function promptLinkAppPath( return thread ? `/${thread[1]}/${thread[2]}${url.search}` : null; } -export function promptLinkDeepLink(appPath: string, scheme = "t3code"): string { +export function promptLinkDeepLink(appPath: string, scheme = "tix"): string { const url = new URL(appPath, "https://app.invalid"); const host = url.pathname === "/new" ? "new" : `threads${url.pathname}`; return `${scheme}://${host}${url.search}`; diff --git a/packages/shared/src/providerAuthReturnUrl.test.ts b/packages/shared/src/providerAuthReturnUrl.test.ts index 7e057496e915..149b6fa84f39 100644 --- a/packages/shared/src/providerAuthReturnUrl.test.ts +++ b/packages/shared/src/providerAuthReturnUrl.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from "vite-plus/test"; import { providerAuthReturnUrl } from "./providerAuthReturnUrl.ts"; describe("provider auth return destinations", () => { - it.each(["t3code", "t3code-dev"])( + it.each(["tix", "tix-dev"])( "returns to %s Welcome and the selected settings instance", (scheme) => { expect(providerAuthReturnUrl(`${scheme}://app/welcome?code=secret#agents:machine-id`)).toBe( @@ -14,8 +14,15 @@ describe("provider auth return destinations", () => { }, ); it.each([ - "t3code://attacker/welcome", - "t3code://app/welcome/../evil", + "tix://attacker/welcome", + "tix://app/welcome/../evil", "https://attacker.example/welcome", + "https://app.t3.codes/welcome", ])("rejects %s", (url) => expect(providerAuthReturnUrl(url)).toBeUndefined()); + + it("allows tailnet web return destinations", () => { + expect( + providerAuthReturnUrl("https://my-mac.tailnet.ts.net/welcome?code=secret#agents:m1"), + ).toBe("https://my-mac.tailnet.ts.net/welcome#agents:m1"); + }); }); diff --git a/packages/shared/src/providerAuthReturnUrl.ts b/packages/shared/src/providerAuthReturnUrl.ts index 1adc969fa1f5..b3d48cc1562b 100644 --- a/packages/shared/src/providerAuthReturnUrl.ts +++ b/packages/shared/src/providerAuthReturnUrl.ts @@ -1,13 +1,17 @@ import { isLoopbackHost } from "./preview.ts"; +function isTailnetHost(hostname: string): boolean { + return hostname.toLowerCase().endsWith(".ts.net"); +} + export function providerAuthReturnUrl(value: string | undefined): string | undefined { if (!value) return undefined; try { const url = new URL(value); - const desktop = ["t3code:", "t3code-dev:"].includes(url.protocol) && url.host === "app"; + const desktop = ["tix:", "tix-dev:"].includes(url.protocol) && url.host === "app"; const web = ["http:", "https:"].includes(url.protocol) && - (isLoopbackHost(url.hostname) || url.origin === "https://app.t3.codes"); + (isLoopbackHost(url.hostname) || isTailnetHost(url.hostname)); if ( url.username || url.password || diff --git a/packages/shared/src/remote.test.ts b/packages/shared/src/remote.test.ts index 30f30a2ad966..3a407135b949 100644 --- a/packages/shared/src/remote.test.ts +++ b/packages/shared/src/remote.test.ts @@ -147,13 +147,13 @@ describe("remote", () => { it("round-trips pairing urls through app links on every channel scheme", () => { const pairingUrl = "https://vps.example.com/pair#token=ABC123"; const appLink = buildPairingAppLink(pairingUrl); - expect(appLink.startsWith("t3code://pair?")).toBe(true); + expect(appLink.startsWith("tix://pair?")).toBe(true); expect(readPairingAppLink(appLink)).toBe(pairingUrl); - expect(readPairingAppLink(appLink.replace("t3code:", "t3code-dev:"))).toBe(pairingUrl); - expect(readPairingAppLink("t3code://pair")).toBeNull(); + expect(readPairingAppLink(appLink.replace("tix:", "tix-dev:"))).toBe(pairingUrl); + expect(readPairingAppLink("tix://pair")).toBeNull(); expect(readPairingAppLink(appLink.replace("//pair?", "//pair/other?"))).toBeNull(); expect( - readPairingAppLink(`t3code://threads?pairingUrl=${encodeURIComponent(pairingUrl)}`), + readPairingAppLink(`tix://threads?pairingUrl=${encodeURIComponent(pairingUrl)}`), ).toBeNull(); expect( readPairingAppLink(`https://pair?pairingUrl=${encodeURIComponent(pairingUrl)}`), diff --git a/packages/shared/src/remote.ts b/packages/shared/src/remote.ts index 69439feddf7f..4c239b97ba37 100644 --- a/packages/shared/src/remote.ts +++ b/packages/shared/src/remote.ts @@ -6,7 +6,7 @@ const PAIRING_TOKEN_PARAM = "token"; const HOSTED_PAIRING_HOST_PARAM = "host"; const HOSTED_PAIRING_LABEL_PARAM = "label"; const PAIRING_APP_LINK_PARAM = "pairingUrl"; -const APP_LINK_PROTOCOL = /^t3code(?:-[a-z]+)?:$/; +const APP_LINK_PROTOCOL = /^tix(?:-[a-z]+)?:$/; const SUPPORTED_REMOTE_BACKEND_PROTOCOLS = new Set(["http:", "https:", "ws:", "wss:"]); export const readHashParams = (url: URL): URLSearchParams => @@ -189,11 +189,11 @@ export const readHostedPairingRequest = (url: URL): HostedPairingRequest | null }; }; -/** Wraps a pairing URL in the `t3code://pair` link that desktop opens and mobile scans. */ +/** Wraps a pairing URL in the `tix://pair` link that desktop opens and mobile scans. */ export const buildPairingAppLink = (pairingUrl: string): string => - `t3code://pair?${new URLSearchParams([[PAIRING_APP_LINK_PARAM, pairingUrl]])}`; + `tix://pair?${new URLSearchParams([[PAIRING_APP_LINK_PARAM, pairingUrl]])}`; -/** Reads the pairing URL from a `t3code://pair` link on any app channel scheme. */ +/** Reads the pairing URL from a `tix://pair` link on any app channel scheme. */ export const readPairingAppLink = (value: string): string | null => { const url = parseUrl(value); if (!url) return null; diff --git a/packages/ssh/src/tunnel.ts b/packages/ssh/src/tunnel.ts index 8a50f7c45c89..a011b9bf4e65 100644 --- a/packages/ssh/src/tunnel.ts +++ b/packages/ssh/src/tunnel.ts @@ -549,7 +549,7 @@ if ! t3_runtime_ready; then elif command -v wget >/dev/null 2>&1; then wget -q --timeout=30 --tries=1 "$1" -O "$2" else printf 'Remote host needs curl or wget to download %s.\\n' "$T3_ARCHIVE" >&2; exit 1 fi || { - printf 'Could not download t3 %s from %s. If this host cannot reach it, install t3 %s on it with https://t3.codes/install.sh (T3CODE_VERSION=%s; T3CODE_RELEASE_BASE_URL selects a mirror).\\n' "$T3_ARCHIVE_VERSION" "$1" "$T3_ARCHIVE_VERSION" "$T3_ARCHIVE_VERSION" >&2 + printf 'Could not download t3 %s from %s. If this host cannot reach it, install t3 %s on it with https://raw.githubusercontent.com/penouc/tix/main/scripts/install.sh (T3CODE_VERSION=%s; T3CODE_RELEASE_BASE_URL selects a mirror).\\n' "$T3_ARCHIVE_VERSION" "$1" "$T3_ARCHIVE_VERSION" "$T3_ARCHIVE_VERSION" >&2 exit 1 } } diff --git a/scripts/build-cli-archive.ts b/scripts/build-cli-archive.ts index d55d8799f6c9..d6c6fee38544 100644 --- a/scripts/build-cli-archive.ts +++ b/scripts/build-cli-archive.ts @@ -621,7 +621,7 @@ const buildCliArchive = Effect.fn("buildCliArchive")(function* (input: { builtExecutable, `Run \`node apps/server/scripts/cli.ts build-exe${targetKey === hostKey ? "" : ` --target ${targetKey}`}\` first.`, ); - yield* requireInput(path.join(webClient, "index.html"), "Run `vp run --filter t3 build` first."); + yield* requireInput(path.join(webClient, "index.html"), "Run `vp run --filter tix build` first."); yield* requireInput( resourceMonitorDir, "Build the resource monitor or pass --resource-monitor-dir.", diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index 43e89846bded..cab6a3e83a4f 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -566,7 +566,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { undefined, ); - assert.nestedPropertyVal(linux, "linux.desktop.entry.StartupWMClass", "com.t3tools.T3Code"); + assert.nestedPropertyVal(linux, "linux.desktop.entry.StartupWMClass", "com.penouc.tix"); }), ); @@ -1565,7 +1565,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { }); assert.deepStrictEqual(configuration, { - appId: "com.t3tools.t3code", + appId: "com.penouc.tix", teamId: "ABC1234567", rpDomains: ["example.clerk.accounts.dev"], provisioningProfilePath: "/tmp/t3code.provisionprofile", @@ -1588,7 +1588,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { "clerk.example.com", "example.clerk.accounts.dev", ]); - assert.include(entitlements, "ABC1234567.com.t3tools.t3code"); + assert.include(entitlements, "ABC1234567.com.penouc.tix"); assert.include(entitlements, "webcredentials:clerk.example.com"); assert.include(entitlements, "webcredentials:example.clerk.accounts.dev"); assert.include(entitlements, "com.apple.security.cs.allow-jit"); diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 1d334ad98e5f..0830b168ad06 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -63,7 +63,7 @@ import { Command, Flag } from "effect/cli"; import { ChildProcess, ChildProcessSpawner } from "effect/process"; const LINUX_ICON_SIZES = [16, 22, 24, 32, 48, 64, 128, 256, 512] as const; -const DESKTOP_APP_ID = "com.t3tools.t3code"; +const DESKTOP_APP_ID = "com.penouc.tix"; const APPLE_TEAM_ID_PATTERN = /^[A-Z0-9]{10}$/u; const BuildPlatform = Schema.Literals(["mac", "linux", "win"]); @@ -2799,8 +2799,8 @@ export function resolvePackageManagerUserAgent(packageManager: string): string { export function resolveDesktopProductName(version: string): string { return resolveDesktopUpdateChannel(version) === "nightly" - ? "T3 Code (Nightly)" - : (desktopPackageJson.productName ?? "T3 Code"); + ? "tix (Nightly)" + : (desktopPackageJson.productName ?? "tix"); } export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( @@ -2907,8 +2907,8 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( }, protocols: [ { - name: "T3 Code", - schemes: ["t3code", "t3code-dev"], + name: "tix", + schemes: ["tix", "tix-dev"], }, { name: "Web site URL", @@ -2953,21 +2953,21 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( buildConfig.afterPack = path.join(repoRoot, "scripts/linux-after-pack.ts"); buildConfig.linux = { target: target === "AppImage" ? [target, "deb"] : [target], - executableName: "t3code", + executableName: "tix", icon: "icons", category: "Development", synopsis: "Desktop GUI for coding agents", - maintainer: "T3 Tools ", + maintainer: "tix ", protocols: [ { - name: "T3 Code", - schemes: ["t3code", "t3code-dev"], + name: "tix", + schemes: ["tix", "tix-dev"], }, ], desktop: { entry: { // Match Electron's WM_CLASS from setDesktopName so docks use this launcher. - StartupWMClass: "com.t3tools.T3Code", + StartupWMClass: "com.penouc.tix", }, }, }; @@ -2975,14 +2975,14 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( if (buildConfig.publish) { buildConfig.appImage = { artifactName: - updateChannel === "nightly" ? "T3-Code-Nightly-${arch}.${ext}" : "T3-Code-${arch}.${ext}", + updateChannel === "nightly" ? "tix-Nightly-${arch}.${ext}" : "tix-${arch}.${ext}", }; } buildConfig.deb = { // FPM runs outside the staged app directory, so source paths must be absolute. fpm: [ - `${path.join(repoRoot, "apps/desktop/resources/linux/com.t3tools.t3code.metainfo.xml")}=/usr/share/metainfo/com.t3tools.t3code.metainfo.xml`, - `${path.join(repoRoot, "LICENSE")}=/usr/share/doc/t3code/copyright`, + `${path.join(repoRoot, "apps/desktop/resources/linux/com.penouc.tix.metainfo.xml")}=/usr/share/metainfo/com.penouc.tix.metainfo.xml`, + `${path.join(repoRoot, "LICENSE")}=/usr/share/doc/tix/copyright`, ], // Debian 13 and Ubuntu 24.04 use 64-bit-time names; retain old-name fallbacks. depends: [ @@ -3967,10 +3967,10 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f private: true, packageManager: rootPackageJson.packageManager, description: - "T3 Code is an open-source desktop app for coding agents. Work with your existing agent subscriptions, review code changes, and run commands in your projects. Connect from desktop, web, or mobile to continue working remotely.", + "tix is an open-source desktop app for coding agents. Work with your existing agent subscriptions, review code changes, and run commands in your projects. Connect from desktop, web, or mobile to continue working remotely.", license: "MIT", - homepage: "https://t3.codes", - author: "T3 Tools", + homepage: "https://github.com/penouc/tix", + author: "penouc", main: "apps/desktop/dist-electron/boot.cjs", build: yield* createBuildConfig( options.platform, diff --git a/scripts/dev-runner.test.ts b/scripts/dev-runner.test.ts index 99efdbf4e673..6b4ce6eef1c9 100644 --- a/scripts/dev-runner.test.ts +++ b/scripts/dev-runner.test.ts @@ -953,7 +953,7 @@ it.layer(NodeServices.layer)("dev-runner", (it) => { ); assert.deepStrictEqual(spawned.at(-1), [ "run", - "--filter=t3", + "--filter=tix", "dev", ...devServerInput.runArgs, ]); diff --git a/scripts/dev-runner.ts b/scripts/dev-runner.ts index e40daa0e181b..5c997d76f25b 100644 --- a/scripts/dev-runner.ts +++ b/scripts/dev-runner.ts @@ -76,11 +76,11 @@ const MODE_ARGS = { "run", "--filter=@t3tools/contracts", "--filter=@t3tools/web", - "--filter=t3", + "--filter=tix", "--parallel", "dev", ], - "dev:server": ["run", "--filter=t3", "dev"], + "dev:server": ["run", "--filter=tix", "dev"], "dev:web": ["run", "--filter=@t3tools/web", "dev"], "dev:desktop": ["run", "--filter=@t3tools/desktop", "--filter=@t3tools/web", "dev"], } as const satisfies Record>; @@ -90,7 +90,7 @@ const MODE_ARGS = { const BUILT_DEV_ARGS = [ "run", "--filter=@t3tools/web", - "--filter=t3", + "--filter=tix", "--parallel", "dev:built", ] as const; diff --git a/scripts/export-android-icons.ts b/scripts/export-android-icons.ts index 812f24f96002..8e7746432374 100644 --- a/scripts/export-android-icons.ts +++ b/scripts/export-android-icons.ts @@ -1,212 +1,28 @@ #!/usr/bin/env node -// Android masks a 72dp safe area inside 108dp; full-bleed backgrounds and a separate wordmark avoid double silhouettes/cropping. - -import * as NodeRuntime from "@effect/platform-node/NodeRuntime"; -import * as NodeServices from "@effect/platform-node/NodeServices"; -import * as Console from "effect/Console"; -import * as Effect from "effect/Effect"; -import * as FileSystem from "effect/FileSystem"; -import * as Path from "effect/Path"; -import * as Schema from "effect/Schema"; +import * as NodeFSP from "node:fs/promises"; import sharp from "sharp"; -type IconVariant = "dev" | "nightly" | "prod"; - -const ADAPTIVE_CANVAS = 432; -const SPLASH_CANVAS = 1152; -const TEXT = { x: 15.53, y: 37, width: 94.5, height: 57 }; -const WORDMARK_FRACTION = 0.48; -const COMPOSER_CANVAS_PT = 1024; -const SVG_DENSITY = 300; -const OUTPUT_DIRECTORY = "apps/mobile/assets"; -const PRODUCTION_BACKGROUND_COLOR = "#000000"; - -export class AndroidIconRenderError extends Schema.TaggedError()( - "AndroidIconRenderError", - { layer: Schema.String, cause: Schema.Defect() }, -) {} - -const wordmarkTransform = (size: number) => { - const scale = (size * WORDMARK_FRACTION) / TEXT.width; - const tx = (size - TEXT.width * scale) / 2 - TEXT.x * scale; - const ty = (size - TEXT.height * scale) / 2 - TEXT.y * scale; - return `translate(${tx.toFixed(3)} ${ty.toFixed(3)}) scale(${scale.toFixed(4)})`; -}; - -const canvasSvg = (size: number, inner: string) => - `${inner}`; - -// Remove the iOS 10pt corner clip; Android's own mask needs full bleed. -const fullBleed = (svg: string) => - svg.replace(//, ''); - -const rasterize = (layer: string, svg: string, width: number, height = width) => - Effect.tryPromise({ - try: () => - sharp(Buffer.from(svg), { density: SVG_DENSITY }).resize(width, height).png().toBuffer(), - catch: (cause) => new AndroidIconRenderError({ layer, cause }), - }); - -const composite = ( - layer: string, - base: Buffer, - overlays: ReadonlyArray<{ input: Buffer; left?: number; top?: number }>, -) => - Effect.tryPromise({ - try: () => - sharp(base) - .composite([...overlays]) - .png() - .toBuffer(), - catch: (cause) => new AndroidIconRenderError({ layer, cause }), - }); - -const solidCanvas = (layer: string, size: number, background: string) => - Effect.tryPromise({ - try: () => - sharp({ create: { width: size, height: size, channels: 4, background } }) - .png() - .toBuffer(), - catch: (cause) => new AndroidIconRenderError({ layer, cause }), - }); - -const readLayerSource = Effect.fn("androidIcons.readLayerSource")(function* ( - repositoryRoot: string, - variant: IconVariant, - file: string, -) { - const fs = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - return yield* fs.readFileString( - path.join(repositoryRoot, "assets", variant, "app-icon.icon", "Assets", file), - ); -}); - -const renderForeground = Effect.fn("androidIcons.renderForeground")(function* ( - repositoryRoot: string, - size: number, -) { - const text = yield* readLayerSource(repositoryRoot, "prod", "text.svg"); - const paths = text.match(/]*\/>/g) ?? []; - return yield* rasterize( - "foreground", - canvasSvg(size, `${paths.join("")}`), - size, - ); -}); - -const renderDevelopmentBackground = Effect.fn("androidIcons.renderDevelopmentBackground")( - function* (repositoryRoot: string, size: number) { - const annotations = yield* readLayerSource(repositoryRoot, "dev", "annotations.svg"); - const defs = annotations.match(/[\s\S]*?<\/defs>/)?.[0] ?? ""; - const body = annotations.replace(/^[\s\S]*?<\/defs>/, "").replace(/<\/svg>\s*$/, ""); - const paper = yield* readLayerSource(repositoryRoot, "dev", "background.svg"); - const background = yield* rasterize("dev-background", fullBleed(paper), size); - const overlay = yield* rasterize( - "dev-annotations", - canvasSvg(size, `${defs}${body}`), - size, - ); - return yield* composite("dev-background", background, [{ input: overlay }]); - }, +const source = await NodeFSP.readFile( + new URL("../assets/prod/app-icon.icon/Assets/mammoth.svg", import.meta.url), + "utf8", ); +const paths = source.match(/]*\/>/g) ?? []; +const outputDirectory = new URL("../apps/mobile/assets/", import.meta.url); -const renderNightlyBackground = Effect.fn("androidIcons.renderNightlyBackground")(function* ( - repositoryRoot: string, - size: number, -) { - // Match assets/nightly/app-icon.icon/icon.json; omit blur, which Icon Composer ignores and rasterization smears. - const clouds = [ - { file: "cloud-lower-left.svg", scale: 25, translation: [-309.6375, 268.66077693836917] }, - { - file: "cloud-upper-right.svg", - scale: 15, - translation: [387.9605131881942, -134.30064713259117], - }, - ] as const; - const k = size / COMPOSER_CANVAS_PT; - const overlays = yield* Effect.forEach(clouds, (cloud) => - Effect.gen(function* () { - const width = Math.round(64 * cloud.scale * k); - const height = Math.round(32 * cloud.scale * k); - const left = Math.round((COMPOSER_CANVAS_PT / 2 + cloud.translation[0]) * k - width / 2); - const top = Math.round((COMPOSER_CANVAS_PT / 2 + cloud.translation[1]) * k - height / 2); - const source = yield* readLayerSource(repositoryRoot, "nightly", cloud.file); - const png = yield* rasterize( - cloud.file, - source.replace(/ filter="url\(#soft\)"/, ""), - width, - height, - ); - const x0 = Math.max(0, left); - const y0 = Math.max(0, top); - const x1 = Math.min(size, left + width); - const y1 = Math.min(size, top + height); - const clipped = yield* Effect.tryPromise({ - try: () => - sharp(png) - .extract({ left: x0 - left, top: y0 - top, width: x1 - x0, height: y1 - y0 }) - .png() - .toBuffer(), - catch: (cause) => new AndroidIconRenderError({ layer: cloud.file, cause }), - }); - return { input: clipped, left: x0, top: y0 }; - }), - ); - const sky = yield* readLayerSource(repositoryRoot, "nightly", "background.svg"); - const background = yield* rasterize("nightly-background", fullBleed(sky), size); - return yield* composite("nightly-background", background, overlays); -}); - -const renderBackground = Effect.fn("androidIcons.renderBackground")(function* ( - repositoryRoot: string, - variant: IconVariant, - size: number, -) { - switch (variant) { - case "dev": - return yield* renderDevelopmentBackground(repositoryRoot, size); - case "nightly": - return yield* renderNightlyBackground(repositoryRoot, size); - case "prod": - return yield* solidCanvas("prod-background", size, PRODUCTION_BACKGROUND_COLOR); - } -}); - -const renderSplashIcon = Effect.fn("androidIcons.renderSplashIcon")(function* ( - repositoryRoot: string, - variant: IconVariant, -) { - const background = yield* renderBackground(repositoryRoot, variant, SPLASH_CANVAS); - const foreground = yield* renderForeground(repositoryRoot, SPLASH_CANVAS); - return yield* composite(`${variant}-splash`, background, [{ input: foreground }]); -}); - -const exportAndroidIcons = Effect.gen(function* () { - const fs = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const repositoryRoot = path.resolve(import.meta.dirname, ".."); - const outputs = [ - ["android-icon-foreground.png", yield* renderForeground(repositoryRoot, ADAPTIVE_CANVAS)], - [ - "android-icon-background-dev.png", - yield* renderDevelopmentBackground(repositoryRoot, ADAPTIVE_CANVAS), - ], - [ - "android-icon-background-nightly.png", - yield* renderNightlyBackground(repositoryRoot, ADAPTIVE_CANVAS), - ], - ["android-splash-icon-dev.png", yield* renderSplashIcon(repositoryRoot, "dev")], - ["android-splash-icon-nightly.png", yield* renderSplashIcon(repositoryRoot, "nightly")], - ["android-splash-icon-prod.png", yield* renderSplashIcon(repositoryRoot, "prod")], - ] as const; - for (const [name, contents] of outputs) { - yield* fs.writeFile(path.join(repositoryRoot, OUTPUT_DIRECTORY, name), contents); - yield* Console.log(`wrote ${OUTPUT_DIRECTORY}/${name}`); - } -}); - -if (import.meta.main) { - exportAndroidIcons.pipe(Effect.provide(NodeServices.layer), NodeRuntime.runMain); +function render(name: string, size: number, artwork: string, background = "none") { + const svg = `${artwork}`; + return sharp(Buffer.from(svg)).png().toFile(new URL(name, outputDirectory).pathname); } + +const silhouette = paths[0]?.replace(/fill="[^"]*"/, 'fill="#FFF"'); +if (!silhouette) throw new Error("The mammoth SVG is missing its silhouette."); + +await Promise.all([ + render("android-icon-foreground.png", 432, paths.join("")), + render("android-icon-mark.png", 432, silhouette), + render("android-notification-icon.png", 96, silhouette), + ...["dev", "nightly", "prod"].map((variant) => + render(`android-splash-icon-${variant}.png`, 1152, paths.join(""), "#E7F2FF"), + ), +]); diff --git a/scripts/install.ps1 b/scripts/install.ps1 index d767c7060890..b8309d9d1b58 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -1,7 +1,7 @@ # Installs the T3 Code CLI from a GitHub Release archive on Windows. Needs # only PowerShell 5.1+; no Node, npm, or compiler. # -# irm https://t3.codes/install.ps1 | iex +# irm https://raw.githubusercontent.com/penouc/tix/main/scripts/install.ps1 | iex # # Environment: # T3CODE_CHANNEL release train to follow: stable, nightly, or preview @@ -16,7 +16,7 @@ $ErrorActionPreference = "Stop" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$repo = "pingdotgg/t3code" +$repo = "penouc/tix" $baseUrl = if ($env:T3CODE_RELEASE_BASE_URL) { $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "https://github.com/$repo/releases/download" } $t3Home = if ($env:T3CODE_HOME) { $env:T3CODE_HOME } else { Join-Path $HOME ".t3" } $binDir = if ($env:T3CODE_INSTALL_BIN_DIR) { $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" } diff --git a/scripts/install.sh b/scripts/install.sh index 4f30deda6858..9ba83cea622d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # Installs the T3 Code CLI from a GitHub Release archive. Needs only sh, tar, # sha256sum or shasum, and curl or wget; no Node, npm, or compiler. # -# curl -fsSL https://t3.codes/install.sh | sh +# curl -fsSL https://raw.githubusercontent.com/penouc/tix/main/scripts/install.sh | sh # # Environment: # T3CODE_CHANNEL release train to follow: stable, nightly, or preview @@ -17,7 +17,7 @@ # instead of fetching the release again. set -eu -repo="pingdotgg/t3code" +repo="penouc/tix" base_url="${T3CODE_RELEASE_BASE_URL:-https://github.com/${repo}/releases/download}" t3_home="${T3CODE_HOME:-$HOME/.t3}" case "$t3_home" in @@ -171,7 +171,7 @@ case "$(uname -m)" in *) fail "unsupported architecture $(uname -m)" ;; esac if [ "${platform}-${arch}" = darwin-x64 ]; then - fail "there is no t3 CLI for Intel Macs. Install the desktop app from https://t3.codes/download, or run a server from source: https://github.com/${repo}/blob/main/docs/user/install.md#intel-macs" + fail "there is no t3 CLI for Intel Macs. Install the desktop app from https://github.com/${repo}/releases/latest, or run a server from source: https://github.com/${repo}/blob/main/docs/user/install.md#intel-macs" fi command -v tar >/dev/null 2>&1 || fail "tar is required" if command -v sha256sum >/dev/null 2>&1; then diff --git a/scripts/lib/brand-assets.ts b/scripts/lib/brand-assets.ts index cde89a42b7d3..555db6f22637 100644 --- a/scripts/lib/brand-assets.ts +++ b/scripts/lib/brand-assets.ts @@ -1,5 +1,5 @@ export const BRAND_ASSET_PATHS = { - developmentIconComposerProject: "assets/dev/app-icon.icon", + developmentIconComposerProject: "assets/prod/app-icon.icon", developmentIosIconPng: "assets/dev/blueprint-ios-1024.png", developmentUniversalIconPng: "assets/dev/blueprint-universal-1024.png", @@ -15,7 +15,7 @@ export const BRAND_ASSET_PATHS = { productionWebIcon192Png: "assets/prod/t3-black-web-icon-192x192.png", productionWebIcon512Png: "assets/prod/t3-black-web-icon-512x512.png", - nightlyIconComposerProject: "assets/nightly/app-icon.icon", + nightlyIconComposerProject: "assets/prod/app-icon.icon", nightlyIosIconPng: "assets/nightly/nightly-ios-1024.png", nightlyMacIconPng: "assets/nightly/nightly-macos-1024.png", nightlyLinuxIconPng: "assets/nightly/nightly-universal-1024.png",