name: echo-ios-agent-vs-xcode description: >- Splits Echo iOS work between headless agents (SPM logic, tests) and Xcode (SwiftUI, app target, manual E2E). Use for any ios/Echo task, Phase 3 messaging UI, onboarding screens, or when adding Swift files to the project.
Echo iOS — agent vs Xcode
Layout
| Location | Role |
|---|---|
ios/Echo/Sources/ |
SPM library Echo (shared code) |
ios/Echo/EchoApp.xcodeproj |
App target, schemes, signing |
ios/Echo/Package.swift |
SPM targets |
ios/Echo/Tests/ |
EchoTests (may not compile — advisory CI) |
ios/Echo/SecurityTests/ |
WO-208/211/223/224 — CI hard gate |
ios/Echo/Phase3Tests/ |
Phase 3 signals — CI hard gate |
App entry EchoApp.swift is excluded from SPM; lives in Xcode project.
Agent CAN do (no Xcode UI)
- Models, services, networking (
ConversationSignalService,ReactionsAPI, …) - ViewModels (
ChatDetailViewModel, extendMessagingViewModel) - Pure logic (
ConversationSignalLogic.swift) - Unit tests in
EchoSecurityTestsorEchoPhase3Tests Package.swifttest target registration- DI registration in
Core/DI/Container.swift(#if os(iOS))
Verify:
cd ios/Echo
DEVELOPER_DIR=/Applications/Xcode.app swift build --target Echo
swift test --filter EchoPhase3Tests
CI uses macOS + Xcode 16.x (see .github/workflows/ios-ci.yml).
Xcode REQUIRED
- New Swift files → add to
EchoApp.xcodeproj(SPM alone does not update app target) - SwiftUI views:
TypingIndicatorView,ReactionPickerView, wiringChatView @Bindable/ navigation integration with coordinators- Code signing, TestFlight (
docs/E2E_LAUNCH_AND_TESTING.md§8) - Manual two-client tests vs
make dev(seePHASE3_IOS_UI_SPEC.mdStep 5)
Canonical types (avoid duplicates)
| Use | Avoid in wired paths |
|---|---|
Domain/Models/Models.swift → Message, Reaction |
Mock ChatMessage in MessagingScreens.swift |
Features/Evidence/DeliveryStatus.swift |
MessageStatus in MessageBubbles.swift |
Refactor ChatView to consume ChatDetailViewModel + domain types when wiring Phase 3.
Privacy settings (typing / receipts)
- Global:
EnhancedPrivacySettings.typingIndicators,.readReceipts - Persona:
PersonaPrivacySettings.sendTypingIndicators,.sendReadReceipts - Merge via
MessagingPrivacyPreferences.mergedinConversationSignalLogic.swift
Phase 3 wiring checklist (Xcode)
- Add new source files to Xcode project
- Inject
ConversationSignalService+ReactionsAPIfromDIContainer - On chat open:
configure(...)+connect(accessToken:)from Keychain - Bind input →
onInputChanged; messageonAppear→ read receipts - Long-press →
toggleReaction - Show
TypingIndicatorViewwhenpeerIsTyping - Run manual checklist in
docs/PHASE3_IOS_UI_SPEC.md
Frozen — onboarding & login (do not redesign)
Shipped flows are correct: FirstRunCoordinator (welcome → display name → options → Face ID → recovery/VIP) and GlacialLoginScreen for returning users. Agents may fix bugs and wire APIs; do not restyle or re-route from the React prototype (Echo Design System Setup_latest/src/app/pages/onboarding/*). E2E: docs/E2E_QUICK_START.md §2. Policy: docs/ECHO_IOS_UI_IMPLEMENTATION_SPEC.md §0.
Feature specs
- Phase 3 messaging UI:
docs/PHASE3_IOS_UI_SPEC.md - UX / Glacial:
docs/ux-spec.md(onboarding/login frozen; post-auth uses prototype + Signal/Telegram refs)