Skip to content

feat: Plugins settings page#3033

Open
adityathebe wants to merge 1 commit into
mainfrom
feat/plugins-settings
Open

feat: Plugins settings page#3033
adityathebe wants to merge 1 commit into
mainfrom
feat/plugins-settings

Conversation

@adityathebe

@adityathebe adityathebe commented May 30, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a new Plugins page in settings displaying available plugins with names, descriptions, versions, and associated agents.
    • Users can manually refresh the plugin list to fetch the latest information.

Review Change Stack

@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aws-preview Ready Ready Preview May 30, 2026 9:49am
flanksource-ui Ready Ready Preview May 30, 2026 9:49am

Request Review

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f197604-7d1a-4953-82c4-0815f4d825c5

📥 Commits

Reviewing files that changed from the base of the PR and between bdc06a4 and ed27993.

📒 Files selected for processing (5)
  • src/App.tsx
  • src/api/services/plugins.ts
  • src/context/UserAccessContext/permissions.ts
  • src/pages/Settings/PluginsPage.tsx
  • src/services/permissions/features.ts

Walkthrough

This PR introduces a new Plugins settings page accessible from the application's settings menu. It adds permission controls, a plugin listing API service, React UI components for displaying plugins in a table, and integrates the page into the main app's routing and navigation.

Changes

Plugins Settings Page Implementation

Layer / File(s) Summary
Permission and access control configuration
src/services/permissions/features.ts, src/context/UserAccessContext/permissions.ts
The settings.plugins feature flag and plugins table identifier are registered, enabling feature-gating and role-based access control for the Plugins page.
Plugin API service
src/api/services/plugins.ts
A new PluginListing type and getPlugins() service function are defined to fetch plugin data from the /plugins backend endpoint.
Plugins page UI components
src/pages/Settings/PluginsPage.tsx
PluginsPage component fetches plugins via useQuery, renders a PluginsList table with columns for name, description, version, and agent, and wires SearchLayout's onRefresh to refetch().
App routing and navigation wiring
src/App.tsx
FaPlug icon is imported, PluginsPage is dynamically imported, a "Plugins" entry is added to the settings submenu (gated by feature flag and table permission), and a /settings/plugins route is registered with authorization access check.

Sequence Diagram

sequenceDiagram
  participant User
  participant AppRouter
  participant AuthCheck as withAuthorizationAccessCheck
  participant PluginsPage
  participant useQuery
  participant getPlugins
  participant APIBackend as /plugins endpoint
  
  User->>AppRouter: Navigate to /settings/plugins
  AppRouter->>AuthCheck: Check access to tables.plugins (read)
  AuthCheck-->>AppRouter: Access granted
  AppRouter->>PluginsPage: Render component
  PluginsPage->>useQuery: Initialize query with getPlugins
  useQuery->>getPlugins: Call on mount
  getPlugins->>APIBackend: GET /plugins
  APIBackend-->>getPlugins: Return PluginListing[]
  getPlugins-->>useQuery: Resolve with plugin data
  useQuery-->>PluginsPage: Update with data and loading state
  PluginsPage->>PluginsPage: Render SearchLayout + MRTDataTable
  PluginsPage-->>User: Display plugins table
Loading
🚥 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 'feat: Plugins settings page' directly and clearly describes the main change: adding a new Plugins page to the settings section.
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.

✨ 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/plugins-settings
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/plugins-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 and usage tips.

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