pi-remote-ios/Sources/UI/Terminal
jay d627fe8e67 test(ios): XCUITest coverage for pairing/switcher/statusbar/settings/modbar/lock
Test target piRemoteUITests now covers 8 features across 7 files (~73s total).

UI tests:
  - SmokeUITests: app launches
  - PairingUITests: launchUnpaired→PairingFlow, deep-link auto-pair
  - StatusBarUITests: three icon buttons (Switcher/Settings/Unpair)
  - SessionSwitcherUITests: list, select, create-with-unique-name, cleanup
  - SettingsUITests: open sheet, Face-ID toggle flip, content checks
  - ModifierBarUITests: button presence, paste sheet
  - LockScreenUITests: lock overlay via --force-lock

App-source changes for testability (all dev/uitest-only):
  - AppState: --reset-state / --enable-faceid / --force-lock launch args
  - piRemoteApp: --pair-with-url launch arg auto-triggers .onOpenURL
  - MainTerminalView: --uitest mode replaces SwiftTerm with static
    placeholder and skips WS connection to keep app idle for XCUI
  - TerminalViewController.feed: defensive guard against nil terminalView

Accessibility identifiers added:
  - StatusBar buttons: accessibilityLabel + identifier
  - ModifierBar BarButton/RepeatingBarButton: accessibilityLabel + .isButton
  - SessionSwitcher '+' button

Tooling notes:
  - cliclick workaround replaced by simctl privacy grant pasteboard
  - Tests pre-fetch fresh pair-token from /pair-qr each run
  - SwiftUI Toggle inside Form needs coordinate tap (not .tap())

Bug fixes uncovered while writing tests:
  - Sidecar POST /sessions response was missing 'state' field
    (now returns { id, name, state, lastOutputAt } to match GET).
    iOS SessionItem decoder hardened to default state='idle' when missing.
2026-05-16 22:07:42 +02:00
..
FontStore.swift fix: default font size 13pt → 11pt for ~53 cols on iPhone 12 mini 2026-05-16 04:04:48 +02:00
MainTerminalView.swift test(ios): XCUITest coverage for pairing/switcher/statusbar/settings/modbar/lock 2026-05-16 22:07:42 +02:00
TerminalFont.swift feat(T-2.3): TerminalView UIKit wrapper, theme store, font store 2026-05-15 18:26:12 +02:00
TerminalTheme.swift feat(T-2.3): TerminalView UIKit wrapper, theme store, font store 2026-05-15 18:26:12 +02:00
TerminalViewController.swift test(ios): XCUITest coverage for pairing/switcher/statusbar/settings/modbar/lock 2026-05-16 22:07:42 +02:00
TerminalViewRepresentable.swift feat(T-2.3): TerminalView UIKit wrapper, theme store, font store 2026-05-15 18:26:12 +02:00
ThemeStore.swift feat(T-2.3): TerminalView UIKit wrapper, theme store, font store 2026-05-15 18:26:12 +02:00