feat(extensions): Phase 5 — WordPress UI contributed by serverkit-wordpress

Completes #38: the WordPress frontend now belongs to the extension too, not just
the backend. The tab-group constraint (contributed routes are flat — there's no
way to contribute a shared TabGroupLayout parent inside the dashboard) is solved
by contributing a SINGLE splat route `wordpress/*` whose component
(WordPressExtension) self-renders the whole WordPress sub-router — reproducing the
exact structure core App.jsx used to own:
  - TabGroupLayout + WORDPRESS_TABS over the 3 list pages (sites / plugin library /
    pipelines),
  - full-bleed site + pipeline detail routes as siblings,
  - the legacy /wordpress/projects → /wordpress/pipelines deprecation redirects.

The 5 page components stay in core pages/ and are re-used (Pattern A, same as
serverkit-git/email/workflows); only the routing + nav/palette/title ownership
moves into the manifest.

- builtin-extensions/serverkit-wordpress/frontend/index.jsx (source) → synced to
  frontend/src/plugins/serverkit-wordpress/ (pre-bundled, D5) via
  scripts/sync-builtin-frontends.mjs (drift check green).
- plugin.json contributions: nav (WordPress), routes ([{path:"wordpress/*",
  component:"WordPressExtension"}]), page_titles, command_palette.
- Core App.jsx: removed the WordPress imports, the TabGroupLayout WORDPRESS_TABS
  route block, the detail routes, LegacyWpPipelineRedirect, and the now-unused
  ModuleRoute + WORDPRESS_TABS imports (kept the dynamic /wordpress/ title
  fallbacks). Removed the sidebar nav item and the two command-palette entries.
  WordPress now disappears cleanly (nav+routes+API) when the extension is
  uninstalled.

Verified: npm run lint (0 errors) + npm run build clean; the screenshots skill
renders /wordpress/42 correctly (visually confirmed — full detail page, Overview
tab, sidebar item active); backend flagship still seeds/loads (has_frontend now
true) with tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Juan DenisandClaude Opus 4.8 committed 2026-07-02 00:50:10 -04:00
1 parent a55e50bc16
commit 39d21f7a46
9 files changed
+240 -55

No files matched your search

+1 -2
View File
@@ -19,8 +19,7 @@ const STATIC_PAGES = [
{ label: 'SSL Certificates', path: '/ssl', category: 'Pages', keywords: 'https tls' },
{ label: 'Templates', path: '/templates', category: 'Pages', keywords: 'deploy one-click' },
{ label: 'Deployments', path: '/deployments', category: 'Pages', keywords: 'deploy jobs status logs' },
{ label: 'WordPress', path: '/wordpress', category: 'Pages', keywords: 'wp sites' },
{ label: 'WordPress Pipelines', path: '/wordpress/pipelines', category: 'Pages', keywords: 'wp environments projects pipeline' },
// WordPress palette entries are contributed by the serverkit-wordpress extension.
{ label: 'Files', path: '/files', category: 'Pages', keywords: 'file manager explorer' },
{ label: 'FTP Server', path: '/ftp', category: 'Pages', keywords: 'sftp upload' },
{ label: 'Observability', path: '/monitoring', category: 'Pages', keywords: 'metrics uptime monitoring alerts' },
+3 -13
View File
@@ -86,19 +86,9 @@ export const SIDEBAR_ITEMS = [
category: 'infrastructure',
icon: '<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/>'
},
{
// Redesign: WordPress uses the top-bar layout (REDESIGN_MAP §6 dec. 3).
// Pipeline now lives in the page's top bar (PageTopbar WORDPRESS_TABS),
// not as a sidebar sub-item. The pipeline list is at /wordpress/pipelines
// (renamed from /wordpress/projects in §2; old URLs redirect).
id: 'wordpress',
label: 'WordPress',
route: '/wordpress',
category: 'infrastructure',
// Hidden when an admin disables the WordPress module (Settings → Modules).
requiresCondition: 'wordpressEnabled',
icon: '<circle cx="12" cy="12" r="10"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/><path d="M3.5 9h17M3.5 15h17"/>'
},
// WordPress is now the serverkit-wordpress builtin extension (Phase 5 #38);
// its sidebar item is contributed by the extension manifest (nav), so it
// disappears cleanly when the extension is uninstalled.
// Workflow Builder is now the serverkit-workflows builtin extension; its
// sidebar item is contributed by the extension manifest.
{