fix(ipad): ship iPad P0 layout/globe fixes, edit-last-input, drop clipboard commands

Adapt typing/voice surfaces for iPad width and height, add the system globe
key and last-input editing flow, harden host-only Rime deployment, and remove
clipboard voice commands. Bump build to 61.
This commit is contained in:
Rocky
2026-08-10 13:50:50 +08:00
parent 53abad2050
commit 2bc8c1b87d
85 changed files with 5703 additions and 3997 deletions
@@ -0,0 +1,63 @@
import XCTest
@testable import OSGKeyboardShared
final class EditableInputReferenceTests: XCTestCase {
func testReferenceExpiresAfterTenMinutes() {
let reference = EditableInputReference(
displayText: "hello",
insertedText: " hello",
postInsertionFingerprint: "field",
extensionInstanceID: UUID(),
createdAt: 100
)
XCTAssertFalse(reference.isExpired(at: 699))
XCTAssertTrue(reference.isExpired(at: 700))
}
func testRebuiltExtensionRequiresFullSuffixAndFingerprint() {
let reference = EditableInputReference(
displayText: "hello",
insertedText: " hello",
postInsertionFingerprint: "field",
extensionInstanceID: UUID(),
createdAt: Date().timeIntervalSince1970
)
XCTAssertTrue(
reference.isFullyVerified(
contextBeforeInput: "prefix hello",
fieldFingerprint: "field"
)
)
XCTAssertFalse(
reference.isFullyVerified(
contextBeforeInput: "prefix hello",
fieldFingerprint: "other"
)
)
XCTAssertFalse(
reference.isFullyVerified(
contextBeforeInput: "different",
fieldFingerprint: "field"
)
)
}
func testStoreRoundTripAndExpiryCleanup() throws {
let suite = "EditableInputReferenceTests.\(UUID().uuidString)"
let defaults = try XCTUnwrap(UserDefaults(suiteName: suite))
defer { defaults.removePersistentDomain(forName: suite) }
let reference = EditableInputReference(
displayText: "hello",
insertedText: "hello",
postInsertionFingerprint: nil,
extensionInstanceID: UUID(),
createdAt: 100
)
EditableInputReferenceStore.save(reference, defaults: defaults)
XCTAssertEqual(
EditableInputReferenceStore.load(defaults: defaults, now: 200),
reference
)
XCTAssertNil(EditableInputReferenceStore.load(defaults: defaults, now: 701))
}
}