Skip to content

Conversation

@reneshen0328
Copy link
Contributor

@reneshen0328 reneshen0328 commented Nov 3, 2025

What

  • Update USM package to include below fix
    • Shared link settings modal component should not render indefinitely when shared link is undefined
    • form data should not be set indefinitely when initFormData has not changed
    • When the user clicks "X" icon to close out the shared link settings modal, the modal state should be reset
    • When the user updates the shared link settings successfully, then reopen the shared link settings modal, the modal should render the updated data not the stale state before refreshing the page.
  • Fix race condition that destroys before the API is being called to get the collaborators data. (get Item and get collaborators uses the same api, so if get item does not pass in shouldDestroy with false, get collaborators call will be destroyed and not be called)

Testing

  • Should see the shared with collaborators icon (tested against local repo that mimic CDN release since local BUIE has always passed even without the code changes)
Screenshot 2025-11-03 at 12 19 28 PM

Summary by CodeRabbit

  • Chores
    • Updated unified-share-modal dependency to the latest compatible version for improved stability and performance.
  • Bug Fixes
    • Improved content sharing behavior and reliability when accessing file and folder sharing features.

@reneshen0328 reneshen0328 requested review from a team as code owners November 3, 2025 20:19
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

The PR bumps @box/unified-share-modal from ^1.5.1 to ^1.7.1 in package.json and changes the sharing hook to call getFileAPI(false) and getFolderAPI(false) (passing false) when obtaining file/folder APIs.

Changes

Cohort / File(s) Summary
Dependency Updates
package.json
Updated @box/unified-share-modal from ^1.5.1 to ^1.7.1 in dependencies, devDependencies, and peerDependencies.
API Usage Changes
src/elements/content-sharing/hooks/useSharingService.ts
Replaced parameterless getFileAPI() / getFolderAPI() calls with getFileAPI(false) / getFolderAPI(false) for TYPE_FILE and TYPE_FOLDER branches.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant UI as ContentSharing UI
    participant Hook as useSharingService
    participant APIClient as API Client Factory
    note right of Hook `#DFF6E0`: New behavior
    UI->>Hook: request sharingService for item (file/folder)
    Hook->>APIClient: getFileAPI(false) / getFolderAPI(false)
    APIClient-->>Hook: file/folder API instance
    Hook-->>UI: sharingService (uses provided API instance)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Localized changes: dependency bump + small API call argument change.
  • Attention points:
    • Ensure getFileAPI(false) / getFolderAPI(false) semantics match expected behavior (auth/scoped client differences).
    • Verify no call sites rely on previous default parameter behavior.

Possibly related PRs

Suggested reviewers

  • tjuanitas
  • jfox-box
  • jpan-box

Poem

🐰
A version hop, a tiny tweak,
APIs now take a flag unique.
Sharing hops with careful cheer,
False in place, the path is clear —
Rabbit claps, the modal’s near!

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: updating the shared link modal and fixing collaborators retrieval, which aligns with the primary objectives.
Description check ✅ Passed The description is comprehensive, detailing what was fixed, why (race condition explanation), and testing approach with a screenshot. It covers the main objectives well.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-content-sharing-shared-link-and-collabortor

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19d4012 and 9af75e4.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Rule: Automatic merge queue (queue)
  • GitHub Check: lint_test_build
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Summary
  • GitHub Check: Queue: Embarked in merge queue

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 and usage tips.

@mergify
Copy link
Contributor

mergify bot commented Nov 3, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks.

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mergify mergify bot added dequeued and removed queued labels Nov 3, 2025
@mergify mergify bot added queued and removed dequeued labels Nov 3, 2025
@mergify mergify bot merged commit 76e94f1 into master Nov 3, 2025
11 checks passed
@mergify mergify bot deleted the fix-content-sharing-shared-link-and-collabortor branch November 3, 2025 22:24
@mergify mergify bot removed the queued label Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants