Skip to content

Update version to 1.4.0, enhance Dropbox upload functionality, and im…#7

Merged
mdroidian merged 2 commits into
mainfrom
misc-fixes
Jun 25, 2026
Merged

Update version to 1.4.0, enhance Dropbox upload functionality, and im…#7
mdroidian merged 2 commits into
mainfrom
misc-fixes

Conversation

@mdroidian

@mdroidian mdroidian commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

…prove error handling in the integration with Dropbox API.


Open in Devin Review

Summary by CodeRabbit

  • New Features

    • Improved Dropbox connection controls with a clearer connected state, reconnect option, and log out actions in a collapsible section.
    • Dropbox uploads now handle more file types more reliably and can generate the appropriate embedded link or preview.
  • Bug Fixes

    • Reduced duplicate upload handling and improved loading behavior while waiting for the editor to be ready.
    • Added better error feedback and more consistent upload cleanup.
  • Chores

    • Updated the app version and refreshed a dependency.

@mdroidian

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6198e11b-8fd8-4c84-9eb9-9dc7066389fa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR bumps package.json to 1.4.0, updates roamjs-components, refactors DropboxOauthPanel into disconnected and connected states, and rewrites Dropbox upload handling in src/index.ts. The upload code adds typed metadata helpers, proxy and error utilities, guarded event handling, shared-link creation/listing, content-type-based block updates, and deduped textarea and file-input listeners.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: version bump, Dropbox upload improvements, and error handling updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

…prove error handling in the integration with Dropbox API.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d0b9a6f and 1d4be65.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • src/components/DropboxOauthPanel.tsx
  • src/index.ts

Comment thread src/components/DropboxOauthPanel.tsx
Comment thread src/index.ts
Comment thread src/index.ts

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread src/index.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@mdroidian mdroidian merged commit 7b3f229 into main Jun 25, 2026
2 checks passed
@mdroidian mdroidian deleted the misc-fixes branch June 25, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant