ReviewOS

also looking at this

craft-native/craft

fix(mobile): preserve native editing, navigation, and durable media requests

#369
Merged chris wants to merge codex/native-vertical-scroll-tab-swipes into main
36 files +864 -185

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

.github/workflows/mobile-e2e.ymlmodified+16-13
Changes to .github/workflows/mobile-e2e.yml
@@ -154,7 +154,7 @@ jobs:
154154 - name: Setup Bun
155155 uses: oven-sh/setup-bun@v2
156156 with:
157 bun-version: '1.3.14'
157 bun-version: '1.4.2'
158158
159159 - name: Install XcodeGen
160160 run: brew install xcodegen
@@ -176,10 +176,7 @@ jobs:
176176 - name: Install stx compiler dependencies
177177 if: ${{ startsWith(matrix.suite, 'navigation') }}
178178 working-directory: .stx-compiler
179 # Pantry ships Bun 1.3.14, which cannot frozen-install the pinned stx
180 # lockfile. Resolve the unchanged external manifest without rewriting
181 # its checkout; Craft's own install remains frozen above.
182 run: bun install --no-save
179 run: bun install --frozen-lockfile
183180
184181 - name: Test native UIKit reconciliation
185182 id: uikit
@@ -274,6 +271,11 @@ jobs:
274271 with:
275272 version: '0.11.94'
276273
274 - name: Setup Bun for the frozen stx compiler lockfile
275 uses: oven-sh/setup-bun@v2
276 with:
277 bun-version: '1.4.2'
278
277279 - name: Install XcodeGen
278280 run: brew install xcodegen
279281
@@ -294,10 +296,7 @@ jobs:
294296
295297 - name: Install stx compiler dependencies
296298 working-directory: .stx-compiler
297 # Pantry ships Bun 1.3.14, which cannot frozen-install the pinned stx
298 # lockfile. Resolve the unchanged external manifest without rewriting
299 # its checkout; Craft's own install remains frozen above.
300 run: bun install --no-save
299 run: bun install --frozen-lockfile
301300
302301 - name: Test hybrid web navigation transitions
303302 env:
@@ -407,6 +406,11 @@ jobs:
407406 with:
408407 version: '0.11.94'
409408
409 - name: Setup Bun for the frozen stx compiler lockfile
410 uses: oven-sh/setup-bun@v2
411 with:
412 bun-version: '1.4.2'
413
410414 - name: Setup Java
411415 uses: actions/setup-java@v6
412416 with:
@@ -442,8 +446,7 @@ jobs:
442446
443447 - name: Install Android stx compiler dependencies
444448 working-directory: .stx-compiler
445 # Keep this @stacksjs/stx compiler install aligned with the iOS job.
446 run: bun install --no-save
449 run: bun install --frozen-lockfile
447450
448451 - name: Cache Zig artifacts
449452 uses: actions/cache@v5
@@ -629,7 +632,7 @@ jobs:
629632 - uses: actions/checkout@v6
630633 - uses: oven-sh/setup-bun@v2
631634 with:
632 bun-version: '1.3.14'
635 bun-version: '1.4.2'
633636 - uses: actions/setup-java@v6
634637 with:
635638 distribution: temurin
@@ -647,7 +650,7 @@ jobs:
647650 repository: stacksjs/stx
648651 ref: 0d85afbab4b569ac2f09113a6c9a5d11d926145f
649652 path: .stx-compiler
650 - run: bun install --no-save
653 - run: bun install --frozen-lockfile
651654 working-directory: .stx-compiler
652655 - name: Compile native fixtures before booting Android
653656 id: native-project
scripts/release-workflow.test.tsmodified+15-1
Changes to scripts/release-workflow.test.ts
@@ -14,7 +14,7 @@ type Job = {
1414 if?: string
1515 uses?: string
1616 with?: { enforce_high?: boolean, 'release-draft'?: string, release?: string, version?: string }
17 steps?: { name?: string, run?: string, uses?: string, env?: Record<string, string>, with?: { 'version'?: string, 'bun-version'?: string, 'publish'?: string, 'release-draft'?: string, release?: string, 'package-dir'?: string, install?: string } }[]
17 steps?: { name?: string, run?: string, uses?: string, 'working-directory'?: string, env?: Record<string, string>, with?: { 'version'?: string, 'bun-version'?: string, 'publish'?: string, 'release-draft'?: string, release?: string, 'package-dir'?: string, install?: string } }[]
1818 strategy?: { 'fail-fast'?: boolean, matrix: { platform: { name: string, os: string }[] } }
1919}
2020const release = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/release.yml'), 'utf8')) as { jobs: Record<string, Job> }
@@ -67,6 +67,20 @@ test('mobile device jobs use the same pinned stx compiler', () => {
6767 expect((step.with as Record<string, string>).ref).toBe(stxCompilerCommit)
6868})
6969
70test('native compiler jobs use a supported Bun and preserve its frozen lockfile', () => {
71 const workflow = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/mobile-e2e.yml'), 'utf8')) as { jobs: Record<string, Job> }
72 for (const name of ['ios-native', 'ios-simulator', 'android-emulator', 'android-navigation']) {
73 const job = workflow.jobs[name]
74 const jobSteps = job.steps ?? []
75 const tool = jobSteps.findIndex(step => step.uses === 'oven-sh/setup-bun@v2' && step.with?.['bun-version'] === '1.4.2')
76 const install = jobSteps.findIndex(step => step['working-directory'] === '.stx-compiler')
77 expect(tool).toBeGreaterThanOrEqual(0)
78 expect(install).toBeGreaterThan(tool)
79 expect(jobSteps[install].run).toBe('bun install --frozen-lockfile')
80 expect(steps(job)).not.toContain('bun install --no-save')
81 }
82})
83
7084test('native iOS suites and protocol checks have independent required jobs', () => {
7185 const workflow = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/mobile-e2e.yml'), 'utf8')) as { jobs: Record<string, Job> }
7286 const native = workflow.jobs['ios-native']