feat(ipad): W1-W3 — adaptive split-view layout + finding fixes
T-iPad-2: AdaptiveRootView/LayoutPolicy (sole size-class decision), SplitRootView (NavigationSplitView sidebar+detail), StackRootView (iPhone path verbatim, zero regression); privacy shade hoisted to shared ZStack top for both branches T-iPad-3: KeyBarVisibility predicate (hide when hardware keyboard present), pointer context menu (copy/new-in-cwd/kill, all via existing channels) T-iPad-4: Projects multi-column grid on iPad (idiom-gated), adaptive sheet detents T-iPad-5 findings (4/4 fixed): kill onKillSession thread-through + AppCoordinator.killCurrentSession; split route-gated to .sessions (iPad first-run pairing); continue-last banner in split sidebar; iPad XCUITest deferred (covered by SidebarSelectionTests) Verified: iPhone 16 277 + iPad Pro 11 278 tests green; packages 261 + integration 10; zero changes under ios/Packages, src/, public/
This commit is contained in:
@@ -11,6 +11,28 @@ import UIKit
|
||||
/// never pops or fights the soft keyboard — same reason the web bar bypasses
|
||||
/// xterm and calls `ws.send`).
|
||||
|
||||
// MARK: - Visibility policy (T-iPad-3)
|
||||
|
||||
/// Pure predicate deciding whether the soft-keyboard KeyBar
|
||||
/// (`inputAccessoryView`) should show — THE single decision point (mirrors
|
||||
/// `PrivacyShadePolicy` / `LayoutPolicy`, no scattered checks in views):
|
||||
/// - a hardware keyboard makes the on-screen key bar redundant → default hidden;
|
||||
/// - no hardware keyboard → shown (unchanged iPhone behavior — zero regression);
|
||||
/// - an explicit user toggle (`userOverride`) always wins over the auto default.
|
||||
///
|
||||
/// Hardware presence is injected (`GCKeyboard.coalesced != nil` at the call
|
||||
/// site) so this stays a fast, device-agnostic unit (`KeyBarVisibilityTests`).
|
||||
enum KeyBarVisibility {
|
||||
/// - Parameters:
|
||||
/// - hardwareKeyboardPresent: injected `GCKeyboard.coalesced != nil`.
|
||||
/// - userOverride: nil = follow the auto default; true/false = the user
|
||||
/// explicitly forced show/hide (wins over the hardware-driven default).
|
||||
static func isVisible(hardwareKeyboardPresent: Bool, userOverride: Bool?) -> Bool {
|
||||
if let userOverride { return userOverride }
|
||||
return !hardwareKeyboardPresent
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Layout data (mirror of KEYBAR_BUTTONS)
|
||||
|
||||
/// One key-bar button: glyph, short function caption (shown under the glyph,
|
||||
|
||||
Reference in New Issue
Block a user