feat(swift-ios): share into durable composer drafts - #5976
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Simulator evidence from the integrated approved Debug build: Verified on iOS 26.5 against an active disposable backend: the shared draft survived app relaunch/project switching and remained editable. Share-payload parsing, queueing, orphan cleanup, and draft handoff are covered by the exact-head focused tests and passing native CI. |
ApprovabilityVerdict: Needs human review This PR introduces a significant new feature: share-into-destination selection with video support, durable draft staging, and cross-component navigation. The scope includes new user-facing workflows, schema changes, and processing pipelines that warrant human review. You can customize Macroscope's approvability policy. Learn more. |
|
Additional iOS 26.5 simulator proof: Safari’s system share sheet exposes the installed T3 Swift Dev extension, and the host app separately restored the saved New Task composer draft after app relaunch and project switching. The extension-to-host payload handoff, persistence/cancellation races, and cleanup are covered by the exact-head 225-test pass and green native CI. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8c7dd8e. Configure here.
|
Dependency-safe final integration is preserved at The unique share commit keeps the final UITextView/paste/attachments/reasoning/unlimited composer and latest Verification: focused 105/105; full native 105 XCTest + 273 Swift Testing, one expected skip, zero failures; cold share → final editor → Alpha; warm deep link wins exact thread; second warm share → final editor → Zulu; Landing order: #5973 → #5610 → #5985 reasoning (plus tests-only keyboard acceptance) → rebase only |
|
Final dependent New Task lifecycle hardening is now preserved separately at Scope is only Verification: focused 12/12; full native 273 tests/28 suites; integrated real background/foreground share handoff, replacement share, project deep-link cancellation/no ghost, Settings deferral, final cancel/home; Landing order: #5976 unique |
8e7e474 to
85302a2
Compare
|
Current-base repair: rebased the full Share Drafts stack onto the latest SwiftUI owner branch and updated existing-thread routing to enable the destination environment under the current multi-environment model. Focused ComposerDraftStoreTests plus PlatformIncomingShareTests pass: 30/30. The physical-phone blocker is unchanged: the development signing profiles still lack the App Group entitlement. Any provider-catalog fixture failure is the base issue fixed by #6130. |




Summary
Adds a Share-to-T3-Code extension flow with project/recent-thread destinations and durable shared composer drafts. Includes idempotent import, explicit discard, stale-destination recovery, app-group configuration, bounded media handling, and cleanup of incomplete staging.
Visual evidence
Watch the 37-second Safari → share extension → selected-thread composer proof.
Verification
Scope
Targets the active native SwiftUI owner branch (#5178).
Note
Add durable composer drafts for iOS share extension with video and destination selection
PlatformSharedVideoProcessorand attached to the draft; combined media is capped at 8 attachments.NewThreadViewgains full incoming-share draft lifecycle support: pre-load, auto-open project picker, debounced persistence under a share key, discard confirmation, and dismissal blocking while a share is pending.ThreadDetailViewmerges incoming share drafts into the live composer after initial restore, deduplicates by share ID, reports attachment overflow, and persists the merged result atomically.T3SharedRecentThreadStore,T3SharedAppearanceStore) are introduced so the share extension can display recent threads and respect the app's appearance setting.destinationorvideosare decoded with defaults, so old envelopes on device will still load correctly.Macroscope summarized 8e7e474. (Automatic summaries will resume when PR exits draft mode or review begins).
Note
Medium Risk
Large cross-cutting share/import/routing surface with durable drafts and idempotency; video processing and app-group configuration add failure modes, though behavior is heavily tested.
Overview
Share extension now stages content with an optional destination (new thread or a recent thread from app-group storage) instead of only “save and open app.” The UI is a searchable destination list; appearance syncs from the main app. Movies are accepted (bounded size/count) and videos are converted to a JPEG contact-sheet attachment for the composer.
Inbox model bumps to schema v2 with
videos,destination, and legacy v1 decoding; App Group ID can be set via plist. Shared recent threads and appearance live in the app group for the extension.Import pipeline supports project import, thread import, and staging under
incoming-share:keys without removing the inbox until routing completes. Idempotent share-ID ledger prevents duplicate merges if inbox cleanup fails.Host app auto-routes envelopes that already have a destination (stage → new-task sheet, or import → thread composer); manual project picker remains when destination is unset. NewThreadView routes staged shares on project pick with discard/ack flows; ThreadDetailView merges late share imports and warns on attachment overflow.
Reviewed by Cursor Bugbot for commit 8e7e474. Bugbot is set up for automated code reviews on this repo. Configure here.