-
Notifications
You must be signed in to change notification settings - Fork 198
Add in-memory document support to mobile SDK demo #1136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in-memory document support to mobile SDK demo #1136
Conversation
* clean onboarding camera screens * remove remaining aesop artifacts. fix tests
|
Caution Review failedThe pull request is closed. WalkthroughImplements a SelfClient provider and in-memory documents adapter, rewires the app to load/manage a document catalog, updates UI navigation to gate features by catalog state, replaces GenerateMock flow to persist documents and catalog metadata, wraps the app with providers, and expands tests/mocks to support the new client-driven flows. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant App
participant SelfClientProvider
participant SelfClient
participant DocumentsAdapter as InMemoryDocumentsAdapter
User->>App: Launch app
App->>SelfClientProvider: useSelfClient()
SelfClientProvider-->>App: SelfClient instance
App->>SelfClient: loadDocumentCatalog()
SelfClient->>DocumentsAdapter: loadDocumentCatalog()
DocumentsAdapter-->>SelfClient: Catalog (documents, selectedId)
SelfClient-->>App: Catalog
App->>App: Compute screenDescriptors (hasDocuments)
Note over App: Menu buttons enabled/disabled based on catalog
sequenceDiagram
autonumber
actor User
participant App
participant GenerateMock
participant SelfClient
participant DocumentsAdapter as InMemoryDocumentsAdapter
User->>App: Tap "Generate Mock Data"
App->>GenerateMock: Render with onPersist/onBack
User->>GenerateMock: Press Generate
GenerateMock->>SelfClient: saveDocument(...)
SelfClient->>DocumentsAdapter: saveDocument(...)
DocumentsAdapter-->>SelfClient: { id, metadata }
GenerateMock->>SelfClient: loadDocumentCatalog() / saveDocumentCatalog(updated)
SelfClient->>DocumentsAdapter: load/save catalog
GenerateMock-->>App: onPersist()
App->>SelfClient: reload catalog
App->>App: Update menu (now enabled)
User->>GenerateMock: Back
GenerateMock-->>App: onBack()
App->>App: Navigate to menu
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
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 |
|
opened against wrong branch |
Summary
DocumentsAdapterand provider wrapper so the demo can construct a Self client with stubbed adaptersTesting
https://chatgpt.com/codex/tasks/task_b_68d9adc96bfc832db33256f0cdc4ab23
Summary by CodeRabbit
New Features
Improvements
Tests