[JJC-20260618-005-B] Fix 6 critical bugs from review

- BUG-1: Restore KeyboardRootView top highlight + divider
- BUG-2: App Group unavailable -> friendly error view (no fatalError)
- BUG-3: pressBegan race condition (sync phase to .requestingPermissions)
- BUG-4: cancelled LLMError no longer re-inserts original text
- BUG-6: mode switch during recording flushes partial
- ARCH-A1: State.Phase add .requestingPermissions + .denied(Reason)

Notes:
- 8/8 tests pass (LLMClientTests)
- BUILD SUCCEEDED for both OSGKeyboard and OSGKeyboardExt
- New file AppGroupErrorView.swift auto-registered via XcodeGen
- Info.plist left untouched (NSSpeechRecognitionUsageDescription kept from A block)
This commit is contained in:
2026-06-18 11:51:26 +08:00
parent ed11a11329
commit 9fa64223af
5 changed files with 159 additions and 8 deletions
+3 -1
View File
@@ -11,12 +11,14 @@ struct OSGKeyboardApp: App {
var body: some Scene {
WindowGroup {
ThemedRoot {
Group {
if AppGroup.isAvailable {
if config.isConfigured {
HomeView()
} else {
OnboardingView(config: config)
}
} else {
AppGroupErrorView()
}
}
}