apps/ios/Sources/Litter/contains the iOS app code.apps/ios/Sources/Litter/Views/holds SwiftUI screens,Models/contains app state/session logic, andBridge/contains JSON-RPC + C FFI bridge code.apps/android/app/src/main/java/com/litter/android/ui/contains Android Compose shell/screens.apps/android/app/src/main/java/com/litter/android/state/contains Android app state, server/session manager, SSH, and websocket transport.apps/android/core/bridge/contains Android core native bridge bootstrap and websocket client.apps/android/core/network/contains Android discovery services (Bonjour/Tailscale/LAN probing).apps/android/app/src/test/java/contains Android unit tests.apps/android/docs/qa-matrix.mdtracks Android parity QA coverage.shared/rust-bridge/codex-bridge/is the shared Rust library (libcodex_bridge.a) exposed throughshared/rust-bridge/codex-bridge/include/codex_bridge.h.shared/third_party/codex/is the upstream Codex submodule.apps/ios/Frameworks/contains generated/downloaded iOS XCFrameworks (codex_bridge.xcframeworkandios_system/*); these artifacts are not committed.apps/ios/project.ymlis the source of truth for project generation; regenerateapps/ios/Litter.xcodeprojinstead of hand-editing project files.
- iOS root layout:
ContentViewuses aZStackwith a persistentHeaderView, main content area, and aSidebarOverlaythat slides from the left. - iOS state management:
ConversationStore(ObservableObject) manages WebSocket connection, JSON-RPC calls, and message state.AppState(ObservableObject) manages UI state (sidebar, server, model/reasoning selection). - iOS server flow:
DiscoveryView(sheet) discovers and connects to servers; sidebar/session flows usethread/list,thread/resume, andthread/start. - Android root layout:
LitterAppShellis the Compose entry;DefaultLitterAppStatemaps backend state into UI state. - Android state/transport:
ServerManagerhandles multi-server threads/models/account state and routes notifications viaBridgeRpcTransport. - Android server flow: Discovery sheet + SSH login sheet + settings/account sheets drive connection, auth, and server management.
- Message rendering parity: both platforms support reasoning/system sections, code block rendering, and inline image handling.
- Citadel — SSH client for remote server connections.
- MarkdownUI — Renders Markdown in assistant/system messages with custom theming.
- Inject — Hot reload support for simulator development (Debug builds only).
- Compose Material3 — primary Android UI toolkit.
- Markwon — Markdown rendering for assistant/system text.
- JSch — SSH transport for remote bootstrap flow.
- androidx.security:security-crypto — encrypted credential storage.
./apps/ios/scripts/download-ios-system.sh: download requiredios_systemXCFrameworks../apps/ios/scripts/build-rust.sh: cross-compile Rust bridge fromshared/rust-bridge/codex-bridgefor device/simulator and rebuildapps/ios/Frameworks/codex_bridge.xcframework.xcodegen generate --spec apps/ios/project.yml --project apps/ios/Litter.xcodeproj: regenerate iOS project after spec/path changes.open apps/ios/Litter.xcodeproj: open and run from Xcode.xcodebuild -project apps/ios/Litter.xcodeproj -scheme Litter -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build: CI-friendly local build../apps/ios/scripts/testflight-setup.sh: create/check TestFlight internal group and optionally update beta review contact details../apps/ios/scripts/testflight-upload.sh: archive iOS app, export IPA, upload to TestFlight withasc, and auto-attach build to internal beta group.gradle -p apps/android :app:assembleOnDeviceDebug :app:assembleRemoteOnlyDebug: build Android flavors.gradle -p apps/android :app:testOnDeviceDebugUnitTest :app:testRemoteOnlyDebugUnitTest: run Android unit tests.adb -e install -r apps/android/app/build/outputs/apk/onDevice/debug/app-onDevice-debug.apk: install Android on-device flavor APK to running emulator.
- Install:
brew install --cask injectioniii - Key views have
@ObserveInjection+.enableInjection()wired up (ContentView, ConversationView, HeaderView, SessionSidebarView, MessageBubbleView). - Debug builds include
-Xlinker -interposablein linker flags. - Run the app in simulator, open InjectionIII pointed at the project directory, then save any Swift file to see changes without relaunching.
- Swift style follows standard Xcode defaults: 4-space indentation,
UpperCamelCasefor types,lowerCamelCasefor properties/functions. - Kotlin style follows standard Android/Kotlin conventions: 4-space indentation,
UpperCamelCasetypes,lowerCamelCasemembers. - Dark theme: pure
Color.blackbackgrounds,#00FF9Caccent,SFMono-Regularfont throughout. - Keep concurrency boundaries explicit (
actor,@MainActor) and avoid cross-actor mutable state. - Group iOS files by layer (
Views,Models,Bridge) and Android files by module (app/ui,app/state,core/*). - No repository-local SwiftLint/SwiftFormat config is currently committed; keep formatting consistent with existing files.
- iOS tests: prefer XCTest and create
Tests/CodexIOSTests/with files named*Tests.swift. - Android tests: place unit tests under
apps/android/app/src/test/java/. - iOS test command:
xcodebuild testusing the same project/scheme/destination pattern as build commands. - Android test command:
gradle -p apps/android :app:testOnDeviceDebugUnitTest :app:testRemoteOnlyDebugUnitTest. - Keep
apps/android/docs/qa-matrix.mdupdated when parity scope changes.
- Use concise, imperative commit subjects with optional scope (example:
bridge: retry initialize handshake). - PRs should include: purpose, key changes, verification steps (commands/device), and screenshots for UI changes.
- If project structure changes, include updates to
apps/ios/project.ymland mention whether project regeneration was run.