Conversation
|
The failing "should not sync two clients at the same time" test indicates that locking doesn't work yet. |
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive OneDrive integration to Floccus, enabling bookmark synchronization via Microsoft OneDrive. The implementation follows the existing patterns established by the Google Drive adapter, with proper OAuth2 authentication using PKCE, file locking mechanisms, optional end-to-end encryption, and token caching for improved performance. The integration includes full UI support across web, Android, and iOS platforms, along with comprehensive test coverage.
Changes:
- Added complete OneDrive adapter with OAuth2 PKCE authentication, file operations, locking mechanism, and token caching
- Integrated OneDrive option into all UI flows (account creation, account options, native views)
- Added test cases and CI/CD configuration for OneDrive sync (encrypted and unencrypted)
- Enhanced crypto utilities with PKCE support and improved OAuth error handling
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/adapters/OneDrive.ts | New OneDrive adapter implementation with OAuth2, file operations, locking, and encryption support |
| src/lib/adapters/GoogleDrive.ts | Renamed OAuthTokenError to GoogleOAuthTokenError for consistency |
| src/lib/Crypto.ts | Added PKCE code challenge generation utilities for OAuth2 |
| src/lib/Account.ts | Registered OneDrive adapter in factory |
| src/lib/browser/BrowserAccount.ts | Added data.id assignment before adapter creation for token storage |
| src/lib/native/NativeAccount.ts | Added data.id assignment before adapter creation for token storage |
| src/errors/Error.ts | Added OneDrive-specific error types (authentication, OAuth, search) |
| src/ui/views/NewAccount.vue | Added OneDrive setup flow and configuration |
| src/ui/views/AccountOptions.vue | Integrated OneDrive options component |
| src/ui/views/native/Options.vue | Added OneDrive options to native view |
| src/ui/views/native/AddBookmarkIntent.vue | Added OneDrive icon mapping |
| src/ui/components/OptionsOneDrive.vue | New component for OneDrive-specific settings |
| src/ui/components/native/Drawer.vue | Added OneDrive icon to drawer |
| src/test/test.js | Added OneDrive test configurations and cleanup logic |
| test/selenium-runner.js | Added OneDrive test token configuration |
| onedrive-api.credentials.json | OneDrive OAuth credentials configuration file |
| google-api.credentials.json | Reformatted for consistency |
| gulpfile.js | Added OneDrive credentials file handling |
| android/app/src/main/AndroidManifest.xml | Added OAuth redirect intent filter |
| _locales/en/messages.json | Added OneDrive localization strings |
| README.md | Updated feature list to include OneDrive |
| fastlane/metadata/android/en-US/full_description.txt | Updated description to mention OneDrive |
| .github/workflows/tests.yml | Added OneDrive test configurations to CI |
| .github/ISSUE_TEMPLATE/bug_report.yml | Added OneDrive to adapter options |
| manifest.firefox.json | Removed invalid chrome_style property from browser_action |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
OneDrive Setup1. Open Microsoft Developer ConsoleGo to portal.azure.com Portal HomeIn this page you will find your account details on the top right and search bar in the top center. On the left top we will find hamburger menu for extra entries Look for App registrationsOnce you are in portal home, find the search bar Search for New RegistrationUnder App registrations page Click on Create app
Note: You can add more redirect URI's later in app dashboard App DashboardHere we will find tabs like Deactivate, Delete, Endpoints More details of app like display name, application (client) ID, redirect URI's On the left we find entries for Authentication, API permissions Note: Copy application (client) ID as it needs to be produced in API Permissions
Find API permissions on the left menu
Public ClientOn the left menu find Goto Enable Turn it ON. Redirect URI
Find the Authentication (Preview) on the left menu
BrandingOn the left menu find Add branding information for the app like
|

Web
Screenshots
Test Cases
Screenshots
Android Emulator
Screenshots
iPhone 13 Mini
Screenshots