fix(skills): fix P2 bugs found in skills QA
Description
Fixes the 10 P2 bugs that the Skills QA found.
- New plugin version:
save_plugin_uploadand the preview now compute name conflicts for a new version too. The upload modal and the save toast say when a new version clashes with another skill. - Group shares:
GET /user-groups/minimaltakesmanageable_for. The share and bulk-share modals ask only for the groups the user can manage withMANAGE_PLUGINS. An existing share of another group stays visible, but its menu is disabled. - Stale share saves:
serializeSkillSharingtakes the loaded skill and leaves out each field that did not change, so a save does not remove grants that another user added after the modal opened. - Skill limit usage:
skill_usage_by_userrunsorder_skill_namesand does not count plugins that lose their name. - Required holder: turning on a skill whose name is held by a skill the user cannot turn off shows a toast instead of a "Switch" dialog.
- Bulk enable/disable: targets only rows the user can toggle and are not already in that state; skipped rows are reported.
- Editor frontmatter: an uploaded
SKILL.mdwith no other files is kept as an upload, so the backend keeps its other frontmatter (license,metadata, ...). - Partial editor save: when a later step fails, the page reloads the version the earlier steps saved, and Save retries only the rest from that version.
- Failed first send: the unsent message (with skill mentions) is also written to the draft of the new chat, so it is not cleared when the composer switches to that chat.
- Craft picker:
/skills/chatreturnsplugin_id; the Craft picker hides plugins in the sessionskillOmissions.
How Has This Been Tested?
- Backend external-dependency tests (new: clashing new version, hidden duplicate not counted, manageable groups):
test_plugin_upload.py,test_skill_write_limit.py,test_minimal_user_groups.py— 32 passed. - Jest: new tests for bulk skips, required holder, picker omissions, unmanageable group share, SKILL.md-only upload, partial save + retry. 1977 tests in the touched areas pass. Each new test fails without its fix.
tsc --noEmitandprekon changed files pass.- Failed first send: reproduced and checked in a real browser on the local stack (message is lost before the fix, kept after). New Playwright spec
tests/e2e/chat/failed_first_send.spec.ts; I could not run it locally because the Playwright global setup needs a Business dev license.
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/a195766cc9ba48218d9239ff11541145
Open in Devin Desktop: https://app.devin.ai/desktop/session/a195766cc9ba48218d9239ff11541145?variant=devin
Requested by: @rohoswagger
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work
Summary by cubic
Fixes the 10 P2 bugs found in the Skills QA pass.
Sharing and permissions
- Plugin uploads report name conflicts for new versions and for duplicate names, including when the new version is saved in the off state.
- Share modals offer only groups the user can manage; if any existing group share is outside the user's scope, all group shares are locked and the dialog explains why; a separate alert shows when the groups cannot be loaded.
- Share saves send only the fields that changed, so a save no longer removes grants added by others after the modal opened.
- The skill-limit write check compares whole usage before and after, so a save that lets a same-name loser run is caught even when it does not touch that plugin; a turn-off is never refused, even when it lets an over-limit loser run.
- Turning on a skill whose name is held by a required skill shows a toast instead of a switch dialog.
- Bulk enable sends only off rows the user can toggle; disable sends only rows the user turned on, including rows a same-name holder keeps showing off, since those run once the holder turns off; skipped rows are reported.
Editor and chat
- A SKILL.md-only upload is kept as an upload so the backend preserves its other frontmatter.
- If a later editor-save step fails, the page reloads the version the earlier steps saved, and retrying continues from that version.
- A failed first send now writes the unsent message to the new chat's draft so it is not cleared.
- The Craft picker hides plugins omitted from the session, using the new
plugin_idfrom/skills/chat.
Summary by CodeRabbit
- New Features
- Skill pickers now respect skills omitted from the current build session.
- Sharing controls show groups you can manage, prevent edits to unavailable groups, and save only changed settings.
- Bulk skill and plugin actions report items that cannot be toggled.
- Plugin uploads and updates warn about skill-name conflicts, with clearer messages for conflicting skills.
- Bug Fixes
- Skill limits now account for which same-named skill is active.
- Required skills with conflicting names can prevent other skills from being enabled.
- Failed chat sends restore the draft; skill editor saves better preserve uploaded content and completed changes.
[!NOTE]
Description
Fixes the 10 P2 bugs that the Skills QA found.
- New plugin version:
save_plugin_upload and the preview now compute name conflicts for a new version too. The upload modal and the save toast say when a new version clashes with another skill.
- Group shares:
GET /user-groups/minimal takes manageable_for. The share and bulk-share modals ask only for the groups the user can manage with MANAGE_PLUGINS. An existing share of another group stays visible, but its menu is disabled.
- Stale share saves:
serializeSkillSharing takes the loaded skill and leaves out each field that did not change, so a save does not remove grants that another user added after the modal opened.
- Skill limit usage:
skill_usage_by_user runs order_skill_names and does not count plugins that lose their name.
- Required holder: turning on a skill whose name is held by a skill the user cannot turn off shows a toast instead of a "Switch" dialog.
- Bulk enable/disable: targets only rows the user can toggle and are not already in that state; skipped rows are reported.
- Editor frontmatter: an uploaded
SKILL.md with no other files is kept as an upload, so the backend keeps its other frontmatter (license, metadata, ...).
- Partial editor save: when a later step fails, the page reloads the version the earlier steps saved, and Save retries only the rest from that version.
- Failed first send: the unsent message (with skill mentions) is also written to the draft of the new chat, so it is not cleared when the composer switches to that chat.
- Craft picker:
/skills/chat returns plugin_id; the Craft picker hides plugins in the session skillOmissions.
How Has This Been Tested?
- Backend external-dependency tests (new: clashing new version, hidden duplicate not counted, manageable groups):
test_plugin_upload.py, test_skill_write_limit.py, test_minimal_user_groups.py — 32 passed.
- Jest: new tests for bulk skips, required holder, picker omissions, unmanageable group share, SKILL.md-only upload, partial save + retry. 1977 tests in the touched areas pass. Each new test fails without its fix.
tsc --noEmit and prek on changed files pass.
- Failed first send: reproduced and checked in a real browser on the local stack (message is lost before the fix, kept after). New Playwright spec
tests/e2e/chat/failed_first_send.spec.ts; I could not run it locally because the Playwright global setup needs a Business dev license.
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/a195766cc9ba48218d9239ff11541145
Open in Devin Desktop: https://app.devin.ai/desktop/session/a195766cc9ba48218d9239ff11541145?variant=devin
Requested by: @rohoswagger
🟢 Devin fixed all 3 findings · Follow Devin's work
Summary by cubic
Fixes the 10 P2 bugs found in the Skills QA pass.
Sharing and permissions
- Plugin uploads now report name conflicts for new versions and for duplicate names; a new version saved in the off state gets no clash warning.
- Share modals offer only groups the user can manage; existing unmanageable group shares remain visible but their permission menu is disabled.
- Share saves send only the fields that changed, so a save no longer removes grants added by others after the modal opened.
- The skill-limit write check compares whole usage before and after, so a save that lets a same-name loser run is caught even when it does not touch that plugin; a turn-off is never refused, even when it lets an over-limit loser run.
- Turning on a skill whose name is held by a required skill shows a toast instead of a switch dialog.
- Bulk enable sends only off rows the user can toggle; disable sends only rows the user turned on, including rows a same-name holder keeps showing off, since those run once the holder turns off; skipped rows are reported.
Editor and chat
-
A SKILL.md-only upload is kept as an upload so the backend preserves its other frontmatter.
-
If a later editor-save step fails, the page reloads the version the earlier steps saved, and retrying continues from that version.
-
A failed first send now writes the unsent message to the new chat's draft so it is not cleared.
-
The Craft picker hides plugins omitted from the session, using the new plugin_id from /skills/chat.
Summary by CodeRabbit
- New Features
- Skill pickers now respect skills omitted from the current build session.
- Sharing controls show groups you can manage, prevent edits to unavailable groups, and save only changed settings.
- Bulk skill and plugin actions report items that cannot be toggled.
- Plugin uploads and updates warn about skill-name conflicts, with clearer messages for conflicting skills.
- Bug Fixes
- Skill limits now account for which same-named skill is active.
- Required skills with conflicting names can prevent other skills from being enabled.
- Failed chat sends restore the draft; skill editor saves better preserve uploaded content and completed changes.
Changes since #18682 opened
- Changed the name-conflict warning toast condition in the plugin upload dialog so it appears after every non-unchanged save that reports name conflicts. [bd6ad96]
- Updated the skills feature-map documentation to clarify name-conflict and write-limit behavior. [bd6ad96]
- Added a groups-load-failure alert to the
ShareSkillModal component [a446e32]
- Added the
skills.modals.share.groupsLoadFailed translation key to the locale message files [a446e32]
- Added a test for the groups-load-failure alert in the
ShareSkillModal test suite [a446e32]
- Added a groupSharesLocked condition to the ShareSkillModal component so group shares are locked for non-organization managers [8349168]
- Added a test in ShareSkillModal.test.tsx for group-share locking [8349168]
- Added the groupSharesLocked translation to all locale message files [8349168]
- Added a note to the skills feature-map documentation describing group-share scope handling for scoped managers. [c280386]