Repository navigation
Add the native Swift iOS app and Swift SDK - #1152
AnthonyRonning wants to merge 28 commits into
Conversation
Add native account, chat, library and audio workflows, branded rendering and retained full-screen navigation, with encrypted SDK transport and CI checks.
Apply device-feedback refinements to launch, menu gestures, the composer, chat options and project management, dictation, and transcript following. Persist project expansion locally and require explicit chat deletion confirmation. Retain version 0.1.0 build 4 and add interaction and ownership regression coverage.
Lazy history rows previously discarded completed rich-text projections when leaving the viewport because retention was limited to menu occlusion. On re-entry, raw Markdown appeared before asynchronous formatting rebuilt the reply, changing its height and destabilizing the transcript. Retain completed message-local projections while the exact account generation and selected-chat storage owner remain current. Reuse suspend() to cancel work and reject late publication without clearing completed formatting. Keep owner replacement and cancellation behavior intact. Add repeated suspension and production-transcript scrolling regression tests, synthetic rich-history fixtures, and content-free DEBUG lifecycle diagnostics. Document the lifecycle contract and increase the native build number to 5. Validation: - 437 package tests and strict Swift formatting checks passed. - Six focused iPhone/iPad simulator UI executions passed, including history, pagination, streaming, and retained-menu checks. - Negative control cleared 8 completed projections; the fix retained all 44 observed iPhone and 32 iPad disappearances without clearing any. - Optimized unsigned build 5 archive verified against the reviewed source. - User confirmed build 5 fixes the reported issue on their physical device.
Wide streamed tables could shift the outer vertical scroll view sideways by 20 points even when viewport and content widths were unchanged. Give the transcript a viewport-based width capped at 850 points with stable 20-point gutters, and set x to zero for programmatic vertical scrolling. Add a content-local UIKit guard that observes the nearest ancestor scroll view and restores its horizontal inset while preserving the current y. Keep the guard scoped to the current account/chat and active scene, with observation cleanup on suspension, removal, or rebinding. Nested table and code scrollers retain their independent horizontal scrolling. Add a staged streaming regression covering prose, wide tables, code, completion, nested table swipes, and vertical dragging. Document the axis contract and increase the native build number to 6 for hardware verification. Validation: - 437 package tests and strict Swift formatting checks passed. - New streaming regression passed on iPhone 17 Pro and iPad Pro 13-inch, both iOS 26.5; related rich-history, pagination, reading-anchor, and user-bubble/tool-row checks also passed. - Release cross-builds and unsigned simulator/device builds passed. - Before/after evidence shows the prior 20-point shift and restored displayed gutters. Intermediate layout offsets remain diagnostics, not proof of displayed movement before synchronous correction. - Optimized unsigned build 6 archive verified; physical-device testing pending.
Replace the custom compact Menu/Chat transition with a retained UINavigationController so UIKit owns drag progress, flick completion, and cancellation. Fence native bar publications and retained content by the current account/controller lease and chat owner, and remove obsolete custom gesture code and tests. Stage the selected existing-chat runtime before closing the menu, then load history without delaying navigation. Keep its empty transcript blank instead of displaying the New Chat greeting. Make the menu control icon only, add Chat Options top clearance, and advance the build number to 8. Validation: strict formatting and 433 unit tests passed; release iOS package cross-builds and unsigned app builds passed. Focused iPhone/iPad checks cover native flick/cancellation, nested scrolling, picker navigation, and blank existing-chat entry before a held history load completes.
Parity audit: Research iOS vs the native Swift app (source of truth for the catch-up)Compared: Research iOS on Maple master Rules applied (Anthony, 2026-10-12/13): no product features the Research iOS app does not have; follow Mark's Swift/UI patterns and extend existing components rather than invent; UI/UX/brand calls belong to Mark and Michael; identity, lanes and App Store Connect cleanup are the final pass and a merge blocker. Master changes since Mark's base Progress 2026-10-14: pass 2 (#1155) is merged into Progress 2026-10-13: pass 1 (#1153) is merged into 1. Fix soon (catch-up work, decided)1a. Contract layer, first because everything else builds on it
1b. Chat correctness
1c. Composer
1d. Library and navigation
1e. Account, settings, trust
1f. Copy batches (one pass each)
2. Before merge (blockers, deliberately last)
3. Passing on (found, decided not to do)Entry page and method-first auth structure; 4. Open UI-convention calls (Mark and Michael, not blocking)Theme device-wide with anti-flash vs per account; the Settings "Default model" row Research lacks; one delete-all confirmation style (Settings uses two buttons, the wordmark menu asks to type DELETE; Research uses two buttons); visible settings gear vs the wordmark menu; auto-clearing transient chat errors after 3 s; in-app 5. Decisions recorded 2026-10-13
|
|
I checked the options-sheet/Menu report independently with native touches and a regression test. It is real on the untouched base; #1153 now restores the bar after both scrim and swipe dismissal. Edge navigation could recover the old state, so "until relaunch" was stronger than the reproduction supported. One extra simulator testing limitation remains: the opt-in Free image-menu check gets an Application-only XCTest accessibility tree when the native menu opens. Direct interaction still reaches Photo library and the paid-plan Images notice. I left the product UI unchanged and recorded that failed automation separately in #1153. OCR testing was deferred as requested. |
ios-native parity pass 1: SDK contracts, chat behavior, and account copy
|
Merged #1153 into Web search now defaults on for all plans, including older preferences with a missing/null field. An explicit saved off choice stays off, and there is no client plan/model gate on web search. I also extended the native dismissal reconciliation to the queue, media notice and paste sheets, plus the shared camera/image cover path. The hook runs at native dismissal completion even if the logical presentation lease was already released. This keeps the existing ownership guards and avoids clearing another presentation’s lease. Validation: 475 app tests passed with OCR excluded, strict formatting passed, and the unsigned simulator, iOS simulator/device package cross-builds and Local runtime build passed. Four native iPhone UI tests passed: options scrim/swipe dismissal, queue Done/swipe dismissal with draft/queue owners retained, image-cover dismissal followed by direct Menu/Close, and covered-completion eligibility. The unchanged SDK has its earlier 120-test and release-build pass. The user also reported that manual smoke testing looked good. Camera hardware, actual paste input and Photo/file picker completion remain unverified; OCR is deferred to the user’s phone. The earlier Free iPad image-menu automation still failed because XCTest exposed an empty hierarchy, although manual simulator interaction reached the expected Images notice. Full evidence and source references are in #1153. |
Bring the native Swift chat, composer and library closer to Maple Research: thinking controls and queued effort capture, transcript/recents refresh, per-item history anchors, legacy/tool rendering, native paste and list continuation, running/unread state, project detail and library actions. Keep the plan/usage summary in Settings under Usage. Clear stale pause state when an empty queue starts a fresh direct run, preserving explicit pause for pending work and edits. Validation: Swift SDK 122/122; app 597/598 with the unchanged Vision OCR baseline failure; canonical simulator and device/simulator release builds; phone/iPad UI checks and manual Local-stack smoke. Detailed evidence and remaining inherited behaviors are recorded in PR #1155.
|
Merged parity pass 2 (#1155) into this branch as one squash commit, This adds thinking-level selection and capture for queued messages, transcript/recents polling, per-item reading-position restoration for older pages, legacy document/thinking rendering and tool details, list continuation and native paste, running/unread indicators, and project/library navigation and actions. The plan/usage summary now lives in Settings → Usage. We also fixed the inherited empty-queue pause latch: after Stop, reload or reconnect, a fresh send can start a new queue; messages already waiting still require Resume. Validation: Swift SDK 122/122; app 597/598, with only the known unchanged Vision OCR test failure; device/simulator release compilation and unsigned simulator build passed. The queue checks passed 5/5 on each device, and the final Settings/navigation checks passed 4/4 on each. Anthony also ran the Local simulator smoke. Detailed evidence is in #1155. A few inherited follow-ups we left for later:
|
Opens @marksftw's
codex-ios-native-swiftbranch as a PR so review and the parity catch-up have a home. Branch and all nine commits are Mark's; PR opened on his behalf at Anthony's request.What is on the branch
sdk/swift:MapleSDK, a Swift-native Maple SDK with no third-party dependencies. Transport V2 (X25519 + HKDF-SHA256 + ChaCha20-Poly1305 over CryptoKit, record framing, single-resend recovery), Nitro attestation (COSE_Sign1/CBOR, P-384, pinned AWS root, PCR0 allowlists plus signed GitHub history), credential authority with Keychain persistence, the Research API surface the app uses (conversations, items, Responses streaming, catalog, transcription, speech, account ceremonies), and the native OAuth handoff (prepare, redeem, confirm).apps/maple-ios: Swift 6 / SwiftUI app for iPhone and iPad, iOS 26 minimum. PackagesMapleAppCoreandMapleAppUI; checked-inMaple.xcodeproj; xcconfig profiles Local / PR / Release withscripts/configure-local.pyandscripts/build.sh. Chat with streaming, queue, drafts stored under Complete Protection, images, dictation, read-aloud player with lock-screen controls, library with pinned chats and projects, settings and account ceremonies. Markdown via a vendoredTextualruntime (MIT, four local patches) and bundled offline KaTeX in a sandboxedWKWebViewfor equations..github/workflows/ios-native.yml,.github/workflows/sdk-swift.yml,scripts/ci/ios-native.sh,scripts/ci/sdk-swift*.sh, change-detection registration and the pre-commit hook.apps/maple-ios/README.md,apps/maple-ios/AGENTS.md,apps/maple-ios/docs/rendering.md,sdk/README.md.Spec, decisions and reviews live in code-docs (
docs/specs/ios-native/, PR #64 there).Status
Draft. Verified on an iOS 26.5 simulator against a local Maple Dev Env stack on 2026-10-11 (sign-in, streaming, title refresh, Markdown, tables, KaTeX); Mark has tested it on TestFlight.
Known before-merge items, deliberately handled last:
macos-26-xlargerunner label andscripts/ci/test_select_xcode.pyrejects inline Xcode selectors; both workflows here still use them.AGENTS.md,.agents/skills/validate-maple/SKILL.md,scripts/ci/change_detection.py(and its test) andflake.nix.The parity audit against Research iOS, with what gets fixed soon, what blocks the merge and what we pass on, is the first comment below and is the source of truth for the catch-up.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.