Skip to content

feat(redesign): skills and MCP action controls in settings#942

Open
viper151 wants to merge 4 commits into
mainfrom
feat/skills-mcp-action-redesign
Open

feat(redesign): skills and MCP action controls in settings#942
viper151 wants to merge 4 commits into
mainfrom
feat/skills-mcp-action-redesign

Conversation

@viper151

@viper151 viper151 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
  • Added a unified “Add MCP Server” dropdown for choosing between global and provider-specific server setup.
  • Improved the skill upload experience with a dedicated add panel, queued uploads, and a clearer install flow.
  • Added a reusable menu control for consistent dropdown actions across the app.
image image ## Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a unified “Add MCP Server” dropdown with global and provider-specific options.
    • Reworked skill setup into an “Add Skill” modal with queued uploads, drag/drop, and an install-path panel.
    • Introduced a reusable dropdown action menu component with icons, descriptions, and optional dividers.
  • Bug Fixes

    • Improved add/upload flow by resetting queued items, errors, and success messaging when switching providers and after completion.
  • Documentation

    • Updated shared UI exports to include the new menu component and types.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ccebaffc-ea74-4884-bd3f-16ab49f751db

📥 Commits

Reviewing files that changed from the base of the PR and between 3a9b1d6 and 6317896.

📒 Files selected for processing (2)
  • src/components/skills/view/ProviderSkills.tsx
  • src/shared/view/ui/ActionMenu.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/shared/view/ui/ActionMenu.tsx
  • src/components/skills/view/ProviderSkills.tsx

📝 Walkthrough

Walkthrough

A reusable ActionMenu is added and exported, then used in McpServers for add-server choices. DialogContent gains wrapper class support, and ProviderSkills moves its add/upload flow into a controlled dialog with new state, upload handling, and render updates.

Changes

Shared UI menu and MCP add-server flow

Layer / File(s) Summary
ActionMenu implementation and MCP use
src/shared/view/ui/ActionMenu.tsx, src/shared/view/ui/index.ts, src/components/mcp/view/McpServers.tsx
Adds ActionMenu and ActionMenuItem with trigger, dropdown, selection, dismissal, and focus behavior, then replaces the MCP server add buttons with menu actions for global and provider forms.
Dialog wrapper and ProviderSkills state
src/shared/view/ui/Dialog.tsx, src/components/skills/view/ProviderSkills.tsx
Adds wrapperClassName support to DialogContent and introduces ProviderSkills dialog state, install-path toggling, provider-change resets, and success-state clearing.
ProviderSkills upload panel and dialog render
src/components/skills/view/ProviderSkills.tsx
Builds the modal upload panel, queued-file controls, install-path display, and the Add Skill dialog render with submission actions and status banners.

Possibly related PRs

Poem

A bunny taps the menu span,
Then hops to skills with dialog plan.
One click, one queue, one gentle gleam,
The UI hums in tidy stream.
🐰✨

🚥 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: redesigned skill and MCP action controls in settings.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/skills-mcp-action-redesign

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 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: 1

🧹 Nitpick comments (3)
src/components/skills/view/ProviderSkills.tsx (2)

492-504: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Cancel button stays enabled while a submission is in flight.

isSubmitting disables the Install button (Line 510) but not Cancel, so a user can hide the panel and clear queuedFiles while handleUploadInstall is still awaiting addSkills. The async call still completes in the background and can flip saveStatus/refresh skills after the panel is already dismissed, which is harmless functionally but confusing.

🤖 Prompt for 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.

In `@src/components/skills/view/ProviderSkills.tsx` around lines 492 - 504, The
Cancel button in ProviderSkills should also be disabled while a submission is in
flight so the panel state cannot be reset during an active install. Update the
Button in the cancel handler block to respect isSubmitting, alongside the
existing Install button logic in handleUploadInstall/addSkills flow, so users
cannot clear queuedFiles or close the panel before the async submit finishes.

491-504: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Inconsistent state cleanup between Cancel and the "Add Skill" toggle.

Cancel (Line 497-501) clears queuedFiles/submitError and closes the panel, but clicking the "Add Skill" button again to close it (Line 564, toggling isAddPanelOpen off) leaves queuedFiles untouched. Reopening the panel later then shows previously queued files that the user may have expected to be discarded. Consider clearing queuedFiles whenever the panel is closed (toggle or Cancel) for consistent behavior.

Also applies to: 557-569

🤖 Prompt for 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.

In `@src/components/skills/view/ProviderSkills.tsx` around lines 491 - 504, The
panel close behavior in ProviderSkills is inconsistent: the Cancel handler
clears queuedFiles and submitError, but the Add Skill toggle path only flips
isAddPanelOpen and leaves queuedFiles behind. Update the close logic used by
both the Cancel button and the Add Skill toggle so closing the panel always
resets queuedFiles (and submitError if appropriate), keeping reopen behavior
consistent. Use the existing state setters in ProviderSkills and the add-panel
toggle handler to centralize the cleanup.
src/shared/view/ui/ActionMenu.tsx (1)

48-105: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Menu opens without shifting focus into it; closing doesn't restore focus to the trigger.

role="menu" sets accessibility-tree expectations (arrow-key roving, focus moving into the menu) that aren't met here — focus stays on the trigger when opened, and isn't returned to it on close (Escape/selection/outside-click). Items remain reachable via Tab, so this isn't a hard blocker, but it's a quick fix that meaningfully improves screen-reader/keyboard UX.

♿ Suggested fix: shift focus on open, restore on close
+  const firstItemRef = React.useRef<HTMLButtonElement | null>(null);
+  const triggerRef = React.useRef<HTMLButtonElement | null>(null);
+
   React.useEffect(() => {
     if (!isOpen) {
+      triggerRef.current?.focus();
       return;
     }
+    firstItemRef.current?.focus();

     const closeOnOutsideClick = (event: MouseEvent) => {
🤖 Prompt for 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.

In `@src/shared/view/ui/ActionMenu.tsx` around lines 48 - 105, The ActionMenu
opens and closes without managing focus, so the trigger keeps focus instead of
moving into the menu and focus is not restored after close. Update ActionMenu in
the component using isOpen, rootRef, menuId, and runItem so that opening the
menu programmatically focuses the first menu item or the menu container, and
closing via Escape, outside click, or item selection returns focus to the
trigger button. Keep the existing role="menu" behavior aligned with the focus
handling so keyboard and screen-reader interaction matches the menu semantics.
🤖 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/skills/view/ProviderSkills.tsx`:
- Around line 357-363: The success banner in ProviderSkills is using persistent
hook state from saveStatus, which can become stale after the add panel is
reopened and cancelled. Update the banner logic in ProviderSkills to rely on a
local “just installed” flag (or otherwise reset saveStatus) so it only shows
after a real successful install. Clear that flag when the Add Skill panel is
opened, cancelled, or when the provider changes, and make sure the success
banner condition no longer depends directly on the hook-level saveStatus alone.

---

Nitpick comments:
In `@src/components/skills/view/ProviderSkills.tsx`:
- Around line 492-504: The Cancel button in ProviderSkills should also be
disabled while a submission is in flight so the panel state cannot be reset
during an active install. Update the Button in the cancel handler block to
respect isSubmitting, alongside the existing Install button logic in
handleUploadInstall/addSkills flow, so users cannot clear queuedFiles or close
the panel before the async submit finishes.
- Around line 491-504: The panel close behavior in ProviderSkills is
inconsistent: the Cancel handler clears queuedFiles and submitError, but the Add
Skill toggle path only flips isAddPanelOpen and leaves queuedFiles behind.
Update the close logic used by both the Cancel button and the Add Skill toggle
so closing the panel always resets queuedFiles (and submitError if appropriate),
keeping reopen behavior consistent. Use the existing state setters in
ProviderSkills and the add-panel toggle handler to centralize the cleanup.

In `@src/shared/view/ui/ActionMenu.tsx`:
- Around line 48-105: The ActionMenu opens and closes without managing focus, so
the trigger keeps focus instead of moving into the menu and focus is not
restored after close. Update ActionMenu in the component using isOpen, rootRef,
menuId, and runItem so that opening the menu programmatically focuses the first
menu item or the menu container, and closing via Escape, outside click, or item
selection returns focus to the trigger button. Keep the existing role="menu"
behavior aligned with the focus handling so keyboard and screen-reader
interaction matches the menu semantics.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5cd890f3-d8c4-4fbe-9158-8abd44034990

📥 Commits

Reviewing files that changed from the base of the PR and between 2ebe64f and 244b820.

📒 Files selected for processing (4)
  • src/components/mcp/view/McpServers.tsx
  • src/components/skills/view/ProviderSkills.tsx
  • src/shared/view/ui/ActionMenu.tsx
  • src/shared/view/ui/index.ts

Comment thread src/components/skills/view/ProviderSkills.tsx Outdated
viper151 and others added 2 commits June 30, 2026 22:35
Gate the skills install success banner behind a local just-installed flag
so it no longer re-appears stale after reopening and cancelling the add
dialog, and disable the cancel/close controls while an install is in
flight. Add keyboard focus management to ActionMenu: focus the first item
on open and restore focus to the trigger on Escape or item selection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants