fix(ios): stabilize keyboard toolbar, image picker, and scrolling (#15182)

## Summary
- keep the editor active when iOS keyboard toolbar interactions move
focus into range-sync excluded widgets
- use the native iOS image picker/source sheet and sync native
presentation with the app theme
- pin `ListViewKit` to `1.1.6` so the iOS workspace resolves with Xcode
16.3
- restore vertical scrolling in the iOS `WKWebView` by removing the
global `contentOffset` reset while preserving zoom prevention

## Test plan
- [x] `yarn vitest --run --config \"vitest.config.ts\"
--browser.enabled=false \"src/__tests__/inline/active.unit.spec.ts\"`
- [x] `LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 xcodebuild
-resolvePackageDependencies -workspace
\"packages/frontend/apps/ios/App/App.xcworkspace\" -scheme \"App\"`
- [x] `xcodebuild -workspace \"App.xcworkspace\" -scheme \"App\"
-destination \"generic/platform=iOS Simulator\" build
CODE_SIGNING_ALLOWED=NO ONLY_ACTIVE_ARCH=YES ARCHS=arm64`
- [x] Xcode build validation for the updated PR branch
This commit is contained in:
keepClamDown
2026-07-09 11:11:55 +08:00
committed by GitHub
parent 9f8e5c0eb3
commit a868f54eeb
19 changed files with 1095 additions and 28 deletions

View File

@@ -2,7 +2,15 @@ import os from 'node:os';
import path from 'node:path';
import fs from 'fs-extra';
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import {
afterEach,
beforeAll,
beforeEach,
describe,
expect,
test,
vi,
} from 'vitest';
const electronMock = vi.hoisted(() => ({
tmpDir: '',
@@ -32,6 +40,13 @@ vi.mock('../../src/main/logger', () => ({
},
}));
// Warm the handler module's transform once so the first per-test dynamic
// import doesn't race the default 60s test timeout on loaded CI shards, where
// cold-transforming the heavy `@toeverything/infra` graph can starve.
beforeAll(async () => {
await import('@affine/electron/main/byok-storage/handlers');
}, 120_000);
beforeEach(async () => {
vi.useRealTimers();
vi.resetModules();