feat: C2PA-verified video import via share sheet#2878
Conversation
This comment has been minimized.
This comment has been minimized.
rabble
left a comment
There was a problem hiding this comment.
Solid foundational work — good architecture (UI→BLoC→Service), proper BLoC patterns (droppable, addError, status enum), 37 tests, feature-flagged rollout. A few items to address:
Should fix:
- Hardcoded route path —
context.go('/video-metadata?draftId=...')inImportVerificationViewshould usecontext.goNamed(...)per routing rules ("Prefer Name Over Path") - File paths in URL query params — filesystem paths can contain chars that break URL encoding. Use
Uri.encodeComponentor pass via a different mechanism RepositoryProviderwrapping services —C2paImportValidationServiceandVideoImportServiceare services, not repositories. Semantic mismatch with the architecture rules- Confirm
codemagic.yamlchange — removing NotificationServiceExtension bundle ID could break notification push provisioning
Notes:
- No
share_handlerlistener wiring in this PR (feature is inert until follow-up) — expected per PR description - The 2,443-line plan document adds review noise — consider keeping planning docs out of feature PRs
Nice C2PA verification flow and source classification logic. Looking forward to Part 2 with the share handler wiring.
🤖 Generated with Claude Code
Comprehensive plan for allowing users to import externally-created videos (from Adobe Fresco, Premiere Pro, etc.) via OS share sheet, gated by C2PA Content Credentials verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix mock class name typos (underscore prefix)
- Use real constructors for registerFallbackValue (no .empty())
- Add registerFallbackValue for C2paImportResult in BLoC test
- Add missing import failure error test
- Standardize on import_verification_page.dart filename
- Fix exhaustive switch (handle error/imported states)
- Replace context.pop() with context.go('/') for reliability
- Resolve share_handler vs custom extension decision
- Document Codemagic wildcard provisioning approach
- Use specific git add paths instead of broad mobile/lib/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…brary Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add share_handler package for receiving shared files from other apps. Register ImportVerificationPage route in GoRouter as a full-screen standalone route. Provide C2paImportValidationService and VideoImportService via MultiRepositoryProvider so the import verification page can access them through context.read<>(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add c2paVerifiedImport feature flag (FF_C2PA_VERIFIED_IMPORT). Route redirects to home when flag is disabled. Default: off. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… UI) Add tests for importing/error UI states, BlocListener navigation, close button, event Equatable props, state copyWith, file copy verification, and missing source file error handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0962c4f to
7b53e61
Compare
|
Codex seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Mobile PR PreviewPreview refreshed for Last refresh:
|
Draft review notesThe C2PA import architecture is plausible, but the current draft does not look end-to-end complete yet. The main platform entrypoints and success path still need wiring/verification. Top findings
Security/privacy notesAvoid logging full local file paths where possible. Also validate route ReadinessKeep draft until Android/iOS share handling is wired end-to-end, unknown C2PA source types fail closed, metadata draft loading works, and at least one manual/integration path validates the full import journey. |
|
Closing this draft PR as stale and not currently shippable. Reason for closing:
This should come back as a fresh PR from current main if we still want the feature. At that point it should be narrowed to a reviewable, end-to-end shippable slice with green CI and complete platform wiring. Closing rather than leaving a large incomplete draft open avoids confusion about implementation status. |
Closes #2879
Summary
What's included
New files:
C2paImportResultmodel with source type classification (human/AI/composite)C2paImportValidationServicereads C2PA manifests and classifies content originVideoImportBlocmanages the import state machineVideoImportServicecopies file, extracts thumbnail/metadata, creates clip + draftImportVerificationPage/Viewshows verification result or education screenShareExtension/withShareViewController.swiftvideo/*Modified files:
C2paSigningService.signVideo()now acceptsDigitalSourceTypeparameterapp_router.dart- new route for import verificationmain.dart- service registrationpubspec.yaml- addedshare_handlerpackageRemaining work (follow-up PRs)
co.openvine.app.ShareExtensionTest plan
flutter analyzeclean on all new files🤖 Generated with Claude Code