Update version to 1.4.0, enhance Dropbox upload functionality, and im…#7
Conversation
|
@coderabbitai full review |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe PR bumps Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
✅ Action performedFull review finished. |
…prove error handling in the integration with Dropbox API.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/DropboxOauthPanel.tsx`:
- Around line 315-320: The Log Out action in DropboxOauthPanel should be
disabled while reconnect/loading is in progress so a pending OAuth completion
cannot re-bind the account after logout. Update the button rendered near
removeAccount to respect the existing loading state (and, if needed, guard
removeAccount itself) so logout is unavailable until the reconnect flow
finishes. Use the DropboxOauthPanel component’s loading state and removeAccount
handler as the key points to fix this.
In `@src/index.ts`:
- Around line 188-193: The refresh-failure handling in the catch around the
access-token refresh path is assuming `e.response.data` always exists, which can
itself throw and hide the original error. Update the `.catch` in `src/index.ts`
to format the message using `getErrorMessage` for the caught value instead of
directly accessing `e.response.data`, so the `refreshToken`/refresh flow always
reports the real failure without a secondary exception.
- Around line 292-303: The Dropbox upload path in the upload flow is using the
simple `apiPost`/`DROPBOX_UPLOAD_URL` path with `fileToUpload.arrayBuffer()` for
every file, so add a size guard before this branch and compare
`fileToUpload.size` against the 150 MB limit. If the file exceeds the threshold,
route it through the chunked upload session flow instead of calling
`files/upload`; keep the existing simple upload logic only for files under the
limit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0d56c042-7e50-4ac2-a8e8-30a301ddd5a9
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
package.jsonsrc/components/DropboxOauthPanel.tsxsrc/index.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…prove error handling in the integration with Dropbox API.
Summary by CodeRabbit
New Features
Bug Fixes
Chores