feat(keyboard): harden clipboard command and add What's New sheet

Stabilize clipboard long-press prepare/resume across paste alerts and cold start, add an in-app release-notes sheet with remote bilingual HTML, localize typing input settings, and bump build to 55.
This commit is contained in:
Rocky
2026-08-08 00:20:42 +08:00
parent f197b68573
commit 9da32b81e9
45 changed files with 3670 additions and 422 deletions
@@ -547,6 +547,20 @@ public enum FlowSessionBridge {
setPendingHostBundleId(nil, defaults: defaults)
}
/// True when a recent keyboard `startflow` arm should not be repeated.
public static func isPiPArmInCooldown(defaults: UserDefaults? = nil) -> Bool {
let store = resolvedDefaults(defaults)
let last = store.double(forKey: FlowSessionKeys.lastPiPArmAttemptAt)
guard last > 0 else { return false }
return Date().timeIntervalSince1970 - last < FlowSessionKeys.pipArmCooldown
}
public static func markPiPArmAttempt(defaults: UserDefaults? = nil) {
let store = resolvedDefaults(defaults)
store.set(Date().timeIntervalSince1970, forKey: FlowSessionKeys.lastPiPArmAttemptAt)
flush(store)
}
// MARK: - Session validity (keyboard)
/// True while the persistent PiP session contract is active.