Skip to content

Complete plugin-driven Admin UI navigation; remove FALLBACK_PAGES and PLUGIN_VIEW_COMPONENTS#40

Merged
intel352 merged 5 commits intomainfrom
copilot/complete-plugin-driven-navigation
Feb 22, 2026
Merged

Complete plugin-driven Admin UI navigation; remove FALLBACK_PAGES and PLUGIN_VIEW_COMPONENTS#40
intel352 merged 5 commits intomainfrom
copilot/complete-plugin-driven-navigation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

Admin UI navigation was split between a hardcoded FALLBACK_PAGES static list, a PLUGIN_VIEW_COMPONENTS map, and a series of activeView === conditionals in AppLayout. Core views were not plugin-aware, so the nav/view system had two separate code paths. This unifies them: all navigation is now sourced exclusively from /api/v1/admin/plugins.

Backend

  • plugin/admincore — new NativePlugin declaring UIPages for all 9 core admin views (Dashboard, Editor, Marketplace, Templates, Environments, Settings, Executions, Logs, Events). Registered via init() + RegisterNativePluginFactory, auto-enabled at startup alongside storebrowser and docmanager.
  • cmd/server/main.go — blank import to trigger admincore registration.

Frontend

  • pluginStore.ts — deleted FALLBACK_PAGES entirely. deriveEnabledPages now uses only plugin-provided pages; initial enabledPages is [].
  • App.tsx — replaced the limited PLUGIN_VIEW_COMPONENTS (3 entries, plugin-only) with a unified VIEW_REGISTRY covering all 12 views. Removed all hardcoded activeView === 'dashboard' etc. content-area conditionals. AppLayout now dispatches via a single lookup:
const page = enabledPages.find((p) => p.id === activeView);
const ViewComponent = VIEW_REGISTRY[activeView];
if (ViewComponent) return <ViewComponent />;
if (page?.template) return <TemplatePage page={page} />;
  • Added LogsView and EventsView as proper named wrapper components (previously inline JSX).

Tests

  • AppNav.test.tsx — explicitly populates enabledPages with CORE_PAGES matching admincore output, removing the implicit dependency on the now-deleted FALLBACK_PAGES default.
Original prompt

This section details on the original issue you should resolve

<issue_title>Complete Plugin-Driven Admin UI Navigation and Remove Fallbacks</issue_title>
<issue_description>Replace all hardcoded navigation/views in Admin UI with plugin-driven components, killing the FALLBACK_PAGES array and PLUGIN_VIEW_COMPONENTS map.

Tasks

  • Refactor core admin views (Dashboard, Editor, Executions, Logs, Marketplace, Templates, Environments, Settings) into NativePlugins.
  • Each plugin declares UIPages and RegistersRoutes.
  • React UI builds navigation solely from /api/v1/admin/plugins.
  • Remove all hardcoded view conditionals from App.tsx.
  • Remove FALLBACK_PAGES and pluginStore fallback logic.
  • Document required plugin conventions for UI components (registry autoload pattern).

Acceptance

  • Admin UI navigation and views entirely driven by enabled plugins.
  • No static fallback logic.

Copilot Agent assigned (can be tackled in parallel).

Linked to broader UI refactor effort.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 22, 2026 09:36
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
…ES and PLUGIN_VIEW_COMPONENTS

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
… PLUGIN_VIEW_COMPONENTS

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor Admin UI navigation to be plugin-driven Complete plugin-driven Admin UI navigation; remove FALLBACK_PAGES and PLUGIN_VIEW_COMPONENTS Feb 22, 2026
Copilot AI requested a review from intel352 February 22, 2026 09:48
@intel352 intel352 marked this pull request as ready for review February 22, 2026 09:53
@intel352 intel352 merged commit 6ddaad2 into main Feb 22, 2026
10 of 11 checks passed
@intel352 intel352 deleted the copilot/complete-plugin-driven-navigation branch February 22, 2026 09:53
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.

Complete Plugin-Driven Admin UI Navigation and Remove Fallbacks

2 participants