fix(plugins): add a Retry button when the Share dialog cannot load groups

Merged
RO
1d ago
+52-21

Description

#18682 already makes the Share dialog picker show only groups the user can manage (GET /user-groups/minimal?manageable_for=manage:plugins). This PR now only adds one thing on top of it.

When the group list fails to load, the dialog showed "Close and open this dialog to try again." The user had to close the dialog and lose staged changes.

Change:

  • ShareSkillModal shows a Try again button beside the group-load error. It calls refreshShareableGroups from useShareableGroups, so staged changes stay.
  • The error text no longer tells the user to close the dialog (all locales). New key share.groupsRetry.

The earlier version of this PR had its own GET /skills/shareable-groups endpoint and picker hook. Those are removed, because main's #18682 does the same thing.

How Has This Been Tested?

  • Jest: ShareSkillModal.test.tsx "says when the groups did not load" now clicks Try again and checks that the groups reload. It fails without the fix. All 26 cases pass.
  • tsc --noEmit, oxlint, oxfmt and tools/i18n/check_copy_changes.py --base origin/main pass.

Screenshots (local dev stack)

Groups request failedAfter Try again
Groups error with Try againEngineering group loaded after retry
Phone (390 px)
Groups retry on phone

Docs

  • Customer-facing change: I updated documentation/ for the page's reader and task, at the level of detail of the whole page.
  • No docs change needed: the existing docs stay correct (internal, tests, CI, multi-tenant cloud only, or the UI explains it).

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.

Link to Devin session: https://app.devin.ai/sessions/52bd1b809dae461fbb0b52a5de8aaad3
Open in Devin Desktop: https://app.devin.ai/desktop/session/52bd1b809dae461fbb0b52a5de8aaad3?variant=devin
Requested by: @rohoswagger


🟢 Devin Review found nothing to fix · View findings

Devin Review


Summary by cubic

Adds a Retry button to the Share dialog's group-load error so users can retry fetching groups in place instead of closing and reopening the dialog.

  • Trims the groupsLoadFailed message to drop the close-and-reopen instruction and adds a groupsRetry i18n key across all locales.
  • Adds test coverage for the retry action.

Summary by CodeRabbit

  • Bug Fixes
    • Added a retry button to the skill-sharing dialog when group loading fails, allowing users to reload groups without closing and reopening the dialog.
    • Updated the retry message across supported languages.

[!NOTE]

Add retry button to group-load error in ShareSkillModal

  • When shareable groups fail to load in the skill Share dialog and group shares exist, the error alert now shows a secondary "Try again" button that calls the groups refresh function from the shareable-groups hook (ShareSkillModal.tsx)
  • Rewrites the group-load failure message across all 10 locales to drop the instruction to close and reopen the dialog, and adds a translated retry-button label
  • Extends tests to verify the retry button invokes the refresh function

Macroscope summarized f4f2aec.