GeezerVison is showing github.com — Merge branch 'main' into t3code/side-panel-width · pingdotgg/t3code@c3ae60c
File treeExpand file treeCollapse file tree Open diff view settings android/src/main/java/expo/modules/t3nativecontrols
android/src/main/java/expo/modules/t3terminal
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +134Lines changed: 134 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +name: Mobile Showcase Screenshots | | 2 | + | | 3 | +on: | | 4 | + workflow_dispatch: | | 5 | + inputs: | | 6 | + platform: | | 7 | + description: Device platforms to capture | | 8 | + required: true | | 9 | + default: all | | 10 | + type: choice | | 11 | + options: | | 12 | + - all | | 13 | + - ios | | 14 | + - android | | 15 | + appearance: | | 16 | + description: System appearances to capture | | 17 | + required: true | | 18 | + default: both | | 19 | + type: choice | | 20 | + options: | | 21 | + - both | | 22 | + - dark | | 23 | + - light | | 24 | + | | 25 | +permissions: | | 26 | + contents: read | | 27 | + | | 28 | +env: | | 29 | + NODE_OPTIONS: --max-old-space-size=8192 | | 30 | + | | 31 | +jobs: | | 32 | + ios: | | 33 | + name: iPhone 6.9, iPhone 6.5, and iPad 13 | | 34 | + if: inputs.platform == 'all' || inputs.platform == 'ios' | | 35 | + runs-on: blacksmith-12vcpu-macos-26 | | 36 | + timeout-minutes: 60 | | 37 | + steps: | | 38 | + - name: Checkout | | 39 | + uses: actions/checkout@v6 | | 40 | + | | 41 | + - name: Setup Vite+ | | 42 | + uses: voidzero-dev/setup-vp@v1 | | 43 | + with: | | 44 | + node-version-file: package.json | | 45 | + cache: true | | 46 | + run-install: true | | 47 | + | | 48 | + - name: Expose pnpm | | 49 | + run: | | | 50 | + pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")" | | 51 | + vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin" | | 52 | + echo "$vp_pnpm_bin" >> "$GITHUB_PATH" | | 53 | + "$vp_pnpm_bin/pnpm" --version | | 54 | +
| | 55 | + - name: Capture iOS showcase | | 56 | + run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" | | 57 | + | | 58 | + - name: Validate App Store Connect assets | | 59 | + run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --validate-only | | 60 | + | | 61 | + - name: Upload iOS screenshots | | 62 | + if: always() | | 63 | + uses: actions/upload-artifact@v7 | | 64 | + with: | | 65 | + name: app-store-connect-screenshots | | 66 | + path: artifacts/app-store/screenshots/apple/ | | 67 | + if-no-files-found: warn | | 68 | + retention-days: 14 | | 69 | + | | 70 | + android: | | 71 | + name: Android phone, 7-inch tablet, and 10-inch tablet | | 72 | + if: inputs.platform == 'all' || inputs.platform == 'android' | | 73 | + runs-on: blacksmith-16vcpu-ubuntu-2404 | | 74 | + timeout-minutes: 60 | | 75 | + env: | | 76 | + T3_SHOWCASE_ANDROID_ABI: x86_64 | | 77 | + steps: | | 78 | + - name: Checkout | | 79 | + uses: actions/checkout@v6 | | 80 | + | | 81 | + - name: Setup Vite+ | | 82 | + uses: voidzero-dev/setup-vp@v1 | | 83 | + with: | | 84 | + node-version-file: package.json | | 85 | + cache: true | | 86 | + run-install: true | | 87 | + | | 88 | + - name: Expose pnpm | | 89 | + run: | | | 90 | + pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")" | | 91 | + vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin" | | 92 | + echo "$vp_pnpm_bin" >> "$GITHUB_PATH" | | 93 | + "$vp_pnpm_bin/pnpm" --version | | 94 | +
| | 95 | + - name: Setup Java | | 96 | + uses: actions/setup-java@v5 | | 97 | + with: | | 98 | + distribution: temurin | | 99 | + java-version: 17 | | 100 | + | | 101 | + - name: Setup Gradle cache | | 102 | + uses: gradle/actions/setup-gradle@v5 | | 103 | + | | 104 | + - name: Enable KVM | | 105 | + run: | | | 106 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS="static_node=kvm"' \ | | 107 | + | sudo tee /etc/udev/rules.d/99-kvm4all.rules | | 108 | + sudo udevadm control --reload-rules | | 109 | + sudo udevadm trigger --name-match=kvm | | 110 | +
| | 111 | + - name: Capture Android showcase | | 112 | + uses: reactivecircus/android-emulator-runner@v2 | | 113 | + with: | | 114 | + api-level: 36 | | 115 | + target: google_apis | | 116 | + arch: x86_64 | | 117 | + profile: pixel_7_pro | | 118 | + avd-name: Pixel_10_Pro | | 119 | + cores: 8 | | 120 | + ram-size: 4096M | | 121 | + disable-animations: false | | 122 | + script: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" | | 123 | + | | 124 | + - name: Validate Google Play assets | | 125 | + run: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" --validate-only | | 126 | + | | 127 | + - name: Upload Android screenshots | | 128 | + if: always() | | 129 | + uses: actions/upload-artifact@v7 | | 130 | + with: | | 131 | + name: google-play-screenshots | | 132 | + path: artifacts/app-store/screenshots/google-play/ | | 133 | + if-no-files-found: warn | | 134 | + retention-days: 14 |
Collapse file Copy file name to clipboardExpand all lines: .gitignore +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -27,6 +27,9 @@ squashfs-root/ | 27 | 27 | .gstack/ | 28 | 28 | dist-electron/ | 29 | 29 | .electron-runtime/ | | 30 | +.showcase/ | | 31 | +apps/mobile/.showcase/ | | 32 | +artifacts/app-store/screenshots/ | 30 | 33 | node_modules/ | 31 | 34 | .alchemy/ | 32 | 35 | *.log | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/electron/ElectronUpdater.test.ts +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,6 +10,7 @@ const { autoUpdaterMock } = vi.hoisted(() => ({ | 10 | 10 | autoInstallOnAppQuit: true, | 11 | 11 | channel: "latest", | 12 | 12 | disableDifferentialDownload: false, | | 13 | + fullChangelog: false, | 13 | 14 | checkForUpdates: vi.fn(() => Promise.resolve(null)), | 14 | 15 | downloadUpdate: vi.fn(() => Promise.resolve([])), | 15 | 16 | on: vi.fn(), | @@ -33,6 +34,7 @@ describe("ElectronUpdater", () => { | 33 | 34 | autoUpdaterMock.autoInstallOnAppQuit = true; | 34 | 35 | autoUpdaterMock.channel = "latest"; | 35 | 36 | autoUpdaterMock.disableDifferentialDownload = false; | | 37 | + autoUpdaterMock.fullChangelog = false; | 36 | 38 | autoUpdaterMock.checkForUpdates.mockClear(); | 37 | 39 | autoUpdaterMock.checkForUpdates.mockImplementation(() => Promise.resolve(null)); | 38 | 40 | autoUpdaterMock.downloadUpdate.mockClear(); | @@ -98,6 +100,18 @@ describe("ElectronUpdater", () => { | 98 | 100 | }).pipe(Effect.provide(ElectronUpdater.layer)), | 99 | 101 | ); | 100 | 102 |
| | 103 | + it.effect("sets full changelog mode", () => | | 104 | + Effect.gen(function* () { | | 105 | + const updater = yield* ElectronUpdater.ElectronUpdater; | | 106 | + | | 107 | + yield* updater.setFullChangelog(true); | | 108 | + assert.equal(autoUpdaterMock.fullChangelog, true); | | 109 | + | | 110 | + yield* updater.setFullChangelog(false); | | 111 | + assert.equal(autoUpdaterMock.fullChangelog, false); | | 112 | + }).pipe(Effect.provide(ElectronUpdater.layer)), | | 113 | + ); | | 114 | + | 101 | 115 | it.effect("preserves quit-and-install flags and the execution-time channel", () => | 102 | 116 | Effect.gen(function* () { | 103 | 117 | const cause = new Error("quit and install failed"); | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/electron/ElectronUpdater.ts +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -66,6 +66,7 @@ export class ElectronUpdater extends Context.Service< | 66 | 66 | readonly setAllowPrerelease: (value: boolean) => Effect.Effect<void>; | 67 | 67 | readonly allowDowngrade: Effect.Effect<boolean>; | 68 | 68 | readonly setAllowDowngrade: (value: boolean) => Effect.Effect<void>; | | 69 | + readonly setFullChangelog: (value: boolean) => Effect.Effect<void>; | 69 | 70 | readonly setDisableDifferentialDownload: (value: boolean) => Effect.Effect<void>; | 70 | 71 | readonly checkForUpdates: Effect.Effect<void, ElectronUpdaterCheckForUpdatesError>; | 71 | 72 | readonly downloadUpdate: Effect.Effect<void, ElectronUpdaterDownloadUpdateError>; | @@ -112,6 +113,11 @@ export const make = ElectronUpdater.of({ | 112 | 113 | autoUpdater.allowDowngrade = value; | 113 | 114 | return Effect.void; | 114 | 115 | }), | | 116 | + setFullChangelog: (value) => | | 117 | + Effect.suspend(() => { | | 118 | + autoUpdater.fullChangelog = value; | | 119 | + return Effect.void; | | 120 | + }), | 115 | 121 | setDisableDifferentialDownload: (value) => | 116 | 122 | Effect.suspend(() => { | 117 | 123 | autoUpdater.disableDifferentialDownload = value; | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/updates/DesktopUpdates.test.ts +49Lines changed: 49 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -38,6 +38,7 @@ const flushCallbacks = Effect.yieldNow; | 38 | 38 | function makeHarness(options: UpdatesHarnessOptions = {}) { | 39 | 39 | let checkCount = 0; | 40 | 40 | let allowDowngrade = false; | | 41 | + let fullChangelog = false; | 41 | 42 | const feedUrls: ElectronUpdater.ElectronUpdaterFeedUrl[] = []; | 42 | 43 | const listeners = new Map<string, Set<(...args: readonly unknown[]) => void>>(); | 43 | 44 | const sentStates: DesktopUpdateState[] = []; | @@ -73,6 +74,10 @@ function makeHarness(options: UpdatesHarnessOptions = {}) { | 73 | 74 | Effect.sync(() => { | 74 | 75 | allowDowngrade = value; | 75 | 76 | }), | | 77 | + setFullChangelog: (value) => | | 78 | + Effect.sync(() => { | | 79 | + fullChangelog = value; | | 80 | + }), | 76 | 81 | setDisableDifferentialDownload: () => options.setDisableDifferentialDownload ?? Effect.void, | 77 | 82 | checkForUpdates: Effect.sync(() => { | 78 | 83 | checkCount += 1; | @@ -186,6 +191,7 @@ function makeHarness(options: UpdatesHarnessOptions = {}) { | 186 | 191 | layer, | 187 | 192 | checkCount: () => checkCount, | 188 | 193 | feedUrls: () => feedUrls, | | 194 | + fullChangelog: () => fullChangelog, | 189 | 195 | listenerCount: () => | 190 | 196 | Array.from(listeners.values()).reduce( | 191 | 197 | (total, eventListeners) => total + eventListeners.size, | @@ -287,6 +293,49 @@ describe("DesktopUpdates", () => { | 287 | 293 | ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer))); | 288 | 294 | }); | 289 | 295 |
| | 296 | + it.effect("enables nightly full changelog release notes and broadcasts summaries", () => { | | 297 | + const harness = makeHarness(); | | 298 | + | | 299 | + return Effect.scoped( | | 300 | + Effect.gen(function* () { | | 301 | + const updates = yield* DesktopUpdates.DesktopUpdates; | | 302 | + yield* updates.configure; | | 303 | + | | 304 | + yield* updates.setChannel("nightly"); | | 305 | + assert.equal(harness.fullChangelog(), true); | | 306 | + | | 307 | + harness.emit("update-available", { | | 308 | + version: "1.2.4-nightly.20260709.766", | | 309 | + releaseNotes: [ | | 310 | + { | | 311 | + version: "1.2.4-nightly.20260709.766", | | 312 | + note: `<h2>What's Changed</h2><ul><li>feat(client): persist offline environment data by <a>@juliusmarminge</a> in <a>#3795</a></li></ul><h2>Full Changelog</h2>`, | | 313 | + }, | | 314 | + { | | 315 | + version: "1.2.4-nightly.20260709.765", | | 316 | + note: "- [codex] Upgrade Clerk stack by @juliusmarminge in #3821", | | 317 | + }, | | 318 | + ], | | 319 | + }); | | 320 | + yield* flushCallbacks; | | 321 | + | | 322 | + const state = yield* updates.getState; | | 323 | + assert.equal(state.status, "available"); | | 324 | + assert.deepEqual(state.releaseNotes, [ | | 325 | + { | | 326 | + version: "1.2.4-nightly.20260709.766", | | 327 | + items: ["feat(client): persist offline environment data by @juliusmarminge in #3795"], | | 328 | + }, | | 329 | + { | | 330 | + version: "1.2.4-nightly.20260709.765", | | 331 | + items: ["[codex] Upgrade Clerk stack by @juliusmarminge in #3821"], | | 332 | + }, | | 333 | + ]); | | 334 | + assert.deepEqual(harness.sentStates.at(-1)?.releaseNotes, state.releaseNotes); | | 335 | + }), | | 336 | + ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer))); | | 337 | + }); | | 338 | + | 290 | 339 | it.effect("keeps raw updater event failures out of update state", () => { | 291 | 340 | const harness = makeHarness(); | 292 | 341 | const cause = new Error( | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/updates/DesktopUpdates.ts +13-2Lines changed: 13 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -27,6 +27,7 @@ import * as ElectronUpdater from "../electron/ElectronUpdater.ts"; | 27 | 27 | import * as ElectronWindow from "../electron/ElectronWindow.ts"; | 28 | 28 | import * as IpcChannels from "../ipc/channels.ts"; | 29 | 29 | import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts"; | | 30 | +import { normalizeDesktopUpdateReleaseNotes } from "./releaseNotes.ts"; | 30 | 31 | import { resolveDefaultDesktopUpdateChannel } from "./updateChannels.ts"; | 31 | 32 | import { | 32 | 33 | createInitialDesktopUpdateState, | @@ -49,6 +50,10 @@ type AppUpdateYmlConfig = typeof AppUpdateYmlConfig.Type; | 49 | 50 |
| 50 | 51 | const UpdateInfo = Schema.Struct({ | 51 | 52 | version: Schema.String, | | 53 | + // Left unvalidated on purpose: a malformed release-notes payload must never | | 54 | + // fail the decode and block the update state transition. The shape is | | 55 | + // validated defensively in normalizeDesktopUpdateReleaseNotes. | | 56 | + releaseNotes: Schema.optional(Schema.Unknown), | 52 | 57 | }); | 53 | 58 |
| 54 | 59 | const DownloadProgressInfo = Schema.Struct({ | @@ -330,10 +335,12 @@ export const make = Effect.gen(function* () { | 330 | 335 | yield* electronUpdater.setChannel(channel); | 331 | 336 | yield* electronUpdater.setAllowPrerelease(allowsPrerelease); | 332 | 337 | yield* electronUpdater.setAllowDowngrade(allowsPrerelease); | | 338 | + yield* electronUpdater.setFullChangelog(allowsPrerelease); | 333 | 339 | yield* logUpdaterInfo("using update channel", { | 334 | 340 | channel, | 335 | 341 | allowPrerelease: allowsPrerelease, | 336 | 342 | allowDowngrade: allowsPrerelease, | | 343 | + fullChangelog: allowsPrerelease, | 337 | 344 | }); | 338 | 345 | }); | 339 | 346 |
| @@ -567,11 +574,15 @@ export const make = Effect.gen(function* () { | 567 | 574 | } | 568 | 575 |
| 569 | 576 | const checkedAt = yield* currentIsoTimestamp; | | 577 | + const releaseNotes = normalizeDesktopUpdateReleaseNotes(info.releaseNotes, info.version); | 570 | 578 | yield* setState( | 571 | | - reduceDesktopUpdateStateOnUpdateAvailable(state, info.version, checkedAt), | | 579 | + reduceDesktopUpdateStateOnUpdateAvailable(state, info.version, checkedAt, releaseNotes), | 572 | 580 | ); | 573 | 581 | yield* Ref.set(lastLoggedDownloadMilestoneRef, -1); | 574 | | - yield* logUpdaterInfo("update available", { version: info.version }); | | 582 | + yield* logUpdaterInfo("update available", { | | 583 | + version: info.version, | | 584 | + releaseNoteGroups: releaseNotes.length, | | 585 | + }); | 575 | 586 | }), | 576 | 587 | ), | 577 | 588 | Effect.catchCause((cause) => { | |
Collapse file Copy file name to clipboard +67Lines changed: 67 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +import { describe, expect, it } from "vite-plus/test"; | | 2 | + | | 3 | +import { normalizeDesktopUpdateReleaseNotes } from "./releaseNotes.ts"; | | 4 | + | | 5 | +describe("normalizeDesktopUpdateReleaseNotes", () => { | | 6 | + it("splits a plain string note into items under the fallback version", () => { | | 7 | + const notes = normalizeDesktopUpdateReleaseNotes( | | 8 | + "## What's changed\n- First fix\n- Second fix", | | 9 | + "1.2.3", | | 10 | + ); | | 11 | + expect(notes).toEqual([{ version: "1.2.3", items: ["First fix", "Second fix"] }]); | | 12 | + }); | | 13 | + | | 14 | + it("keeps per-version groups and drops empty ones", () => { | | 15 | + const notes = normalizeDesktopUpdateReleaseNotes( | | 16 | + [ | | 17 | + { version: "1.2.3", note: "- Newer change" }, | | 18 | + { version: "1.2.2", note: "Full changelog: https://example.com/compare/x...y" }, | | 19 | + { version: "1.2.1", note: "- Older change" }, | | 20 | + ], | | 21 | + "1.2.3", | | 22 | + ); | | 23 | + expect(notes).toEqual([ | | 24 | + { version: "1.2.3", items: ["Newer change"] }, | | 25 | + { version: "1.2.1", items: ["Older change"] }, | | 26 | + ]); | | 27 | + }); | | 28 | + | | 29 | + it("decodes valid HTML entities", () => { | | 30 | + const notes = normalizeDesktopUpdateReleaseNotes("- Fix & polish 😀", "1.0.0"); | | 31 | + expect(notes).toEqual([{ version: "1.0.0", items: ["Fix & polish 😀"] }]); | | 32 | + }); | | 33 | + | | 34 | + it("ignores malformed entries instead of throwing", () => { | | 35 | + const notes = normalizeDesktopUpdateReleaseNotes( | | 36 | + [ | | 37 | + { version: "1.2.3", note: "- Valid change" }, | | 38 | + { version: 42, note: "- Bad version type" }, | | 39 | + { version: "1.2.1", note: { html: "<p>object note</p>" } }, | | 40 | + "not an object", | | 41 | + null, | | 42 | + ], | | 43 | + "1.2.3", | | 44 | + ); | | 45 | + expect(notes).toEqual([{ version: "1.2.3", items: ["Valid change"] }]); | | 46 | + }); | | 47 | + | | 48 | + it("returns non-empty groups even when preceded by many boilerplate-only groups", () => { | | 49 | + const boilerplate = Array.from({ length: 7 }, (_, index) => ({ | | 50 | + version: `1.3.${9 - index}`, | | 51 | + note: "Full changelog: https://example.com/compare/x...y", | | 52 | + })); | | 53 | + const notes = normalizeDesktopUpdateReleaseNotes( | | 54 | + [...boilerplate, { version: "1.3.2", note: "- Older but real change" }], | | 55 | + "1.3.9", | | 56 | + ); | | 57 | + expect(notes).toEqual([{ version: "1.3.2", items: ["Older but real change"] }]); | | 58 | + }); | | 59 | + | | 60 | + it("does not throw on out-of-range numeric entities and keeps the literal", () => { | | 61 | + expect(() => | | 62 | + normalizeDesktopUpdateReleaseNotes("- Broken entity �", "1.0.0"), | | 63 | + ).not.toThrow(); | | 64 | + const notes = normalizeDesktopUpdateReleaseNotes("- Broken entity �", "1.0.0"); | | 65 | + expect(notes).toEqual([{ version: "1.0.0", items: ["Broken entity �"] }]); | | 66 | + }); | | 67 | +}); |
|