ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
feat(setup): wizard installs recommended extensions; lean-by-default flagships
Juan Denisf58bdb68233d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 93744057..7e8ff8b1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,6 +20,15 @@ awaiting a stable release:### Added+- **The setup wizard now installs what it recommends (lean by default).** The+ onboarding "Recommended for you" step is no longer decorative — it renders+ real extensions matched to the use cases you pick (e.g. WordPress → WordPress+ flagship; DevOps → Kubernetes, Automations, Git) as checkboxes that install on+ Finish. Uncheck everything for a lean install; failed installs never block+ finishing setup and can be retried from Extensions. Fresh installs no longer+ force-install WordPress — it's offered in the wizard when the WordPress use+ case is selected. Existing installs keep WordPress untouched.+- **Automations (tramo) replaces the Workflow Builder** — the drag-and-dropReact-Flow Workflow Builder is retired in favour of **Automations**(`/automations`), an opt-in builtin extension that embedsdiff --git a/backend/app/api/auth.py b/backend/app/api/auth.pyindex 5eec30f8..de8865c8 100644--- a/backend/app/api/auth.py+++ b/backend/app/api/auth.py@@ -179,8 +179,28 @@ def complete_onboarding():if invalid:return jsonify({'error': f'Invalid use cases: {", ".join(invalid)}'}), 400- # Save onboarding use cases+ # Slugs the wizard installed (recorded for Setup Health / support). The+ # actual installs happen client-side via the plugin install endpoints; this+ # just persists what onboarding did (plan 47).+ installed_extensions = data.get('installed_extensions', [])+ if not isinstance(installed_extensions, list):+ return jsonify({'error': 'installed_extensions must be a list'}), 400+ installed_extensions = [+ s for s in installed_extensions if isinstance(s, str) and s.strip()+ ]++ # Save onboarding use cases + what the wizard installedSettingsService.set('onboarding_use_cases', use_cases, user_id=user.id)+ SettingsService.set('onboarding_installed_extensions', installed_extensions,+ user_id=user.id)++ # Keep the panel lean: suppress wizard-optional flagships (WordPress) the+ # user didn't install so the boot seeder won't re-add them (plan 47).+ try:+ from app.services import plugin_service+ plugin_service.finalize_setup_flagships()+ except Exception:+ pass# Mark setup as completeSettingsService.complete_setup(user_id=user.id)diff --git a/backend/app/api/plugins.py b/backend/app/api/plugins.pyindex 183cfc29..6587b6d6 100644--- a/backend/app/api/plugins.py+++ b/backend/app/api/plugins.py@@ -336,6 +336,20 @@ def list_builtin():return jsonify({'builtin': list_builtin_extensions()})+@plugins_bp.route('/recommendations', methods=['GET'])+@jwt_required()+def recommendations():+ """Extensions recommended for the given onboarding use cases (setup wizard).++ Query: ``?use_cases=wordpress,web-apps``. Returns each recommended+ extension's real display_name/description + install source, so the wizard+ can render checkboxes that install the actual extension on Finish."""+ from app.services.plugin_service import recommend_extensions_for_use_cases+ raw = request.args.get('use_cases', '')+ use_cases = [u.strip() for u in raw.split(',') if u.strip()]+ return jsonify({'recommendations': recommend_extensions_for_use_cases(use_cases)})++@plugins_bp.route('/builtin/<slug>/install', methods=['POST'])@jwt_required()def install_builtin(slug):diff --git a/backend/app/services/plugin_service.py b/backend/app/services/plugin_service.pyindex 781953d7..f75d681c 100644--- a/backend/app/services/plugin_service.py+++ b/backend/app/services/plugin_service.py@@ -65,6 +65,14 @@ BUILTIN_EXTENSIONS_DIR = os.environ.get(FLAGSHIP_SLUGS = ['serverkit-wordpress', 'serverkit-cloudflare-ops']_FLAGSHIP_UNINSTALLED_KEY = 'extensions.flagship_uninstalled'+# Wizard-optional flagships (plan 47): offered — not force-installed — during+# onboarding. On a FRESH install (setup wizard not yet completed) the boot-time+# seeder skips these so the panel stays lean; the wizard installs them only when+# their use case is picked. Existing installs (setup already completed) keep the+# prior always-seeded behavior — zero regression. cloudflare-ops is NOT here: it+# is route-only (no sidebar item) and stays seeded for the CF connection surface.+WIZARD_OPTIONAL_FLAGSHIP_SLUGS = ['serverkit-wordpress']+def _ensure_builtin_backend_importable(slug):"""Register ``builtin-extensions/<slug>/backend`` as the dashed package@@ -1560,6 +1568,88 @@ def list_builtin_extensions():return out+# ── Onboarding wizard: use-case → recommended extension slugs (plan 47) ──+#+# Drives the setup wizard's "Recommended for you" install checkboxes. Every slug+# here MUST resolve to a real bundled builtin (builtin-extensions/) or a registry+# entry — guarded by tests/test_onboarding_recommendations.py so the map can never+# point at a dead slug. Order within a use case is significant; the resolver+# de-dupes across the selected use cases preserving first-seen order.+RECOMMENDED_EXTENSIONS_BY_USE_CASE = {+ 'wordpress': ['serverkit-wordpress'],+ 'web-apps': ['serverkit-git', 'serverkit-status'],+ 'self-hosted': ['serverkit-dns-server', 'serverkit-status', 'serverkit-mail'],+ 'devops': ['serverkit-k8s', 'serverkit-tramo', 'serverkit-git'],+}+++def _recommendation_index():+ """slug -> {slug, display_name, description, category, source, installed,+ status}. Merges the registry catalog with bundled builtins so a recommended+ slug resolves regardless of where it lives; builtins win on slug collision."""+ index = {}+ try:+ from app.services import registry_service+ for entry in registry_service.list_catalog(include_bundled=True):+ slug = entry.get('slug')+ if not slug:+ continue+ index[slug] = {+ 'slug': slug,+ 'display_name': entry.get('display_name') or slug,+ 'description': entry.get('description') or '',+ 'category': entry.get('category') or 'utility',+ 'source': 'registry',+ 'installed': bool(entry.get('installed')),+ 'status': entry.get('status') or 'not_installed',+ }+ except Exception as e:+ logger.debug(f'Registry unavailable for onboarding recommendations: {e}')+ for entry in list_builtin_extensions():+ manifest = entry.get('manifest') or {}+ slug = entry['slug']+ index[slug] = {+ 'slug': slug,+ 'display_name': manifest.get('display_name') or slug,+ 'description': manifest.get('description') or '',+ 'category': manifest.get('category') or 'utility',+ 'source': 'builtin',+ 'installed': bool(entry.get('installed')),+ 'status': entry.get('status') or 'not_installed',+ }+ return index+++def recommend_extensions_for_use_cases(use_cases):+ """Resolve selected onboarding use cases to installable extension metadata.++ Returns a de-duped, order-preserving list of dicts (one per recommended+ extension). Slugs that don't resolve to a builtin/registry entry are silently+ dropped (defensive — the map is test-guarded against dead slugs)."""+ index = _recommendation_index()+ seen = set()+ out = []+ for use_case in (use_cases or []):+ for slug in RECOMMENDED_EXTENSIONS_BY_USE_CASE.get(use_case, []):+ if slug in seen:+ continue+ seen.add(slug)+ meta = index.get(slug)+ if meta:+ out.append(meta)+ return out+++def finalize_setup_flagships():+ """Keep the panel lean after onboarding completes: any wizard-optional+ flagship (WordPress) the user didn't install during the wizard gets the+ uninstall marker so the boot-time flagship seeder won't re-add it on later+ boots. Called from the complete-onboarding endpoint (plan 47)."""+ for slug in WIZARD_OPTIONAL_FLAGSHIP_SLUGS:+ if not InstalledPlugin.query.filter_by(slug=slug).first():+ _set_flagship_uninstalled(slug, True)++def install_builtin_extension(slug, user_id=None):"""Install a builtin extension by its slug (folder lookup)."""if not os.path.isdir(BUILTIN_EXTENSIONS_DIR):@@ -1682,6 +1772,26 @@ def _seed_flagship_row(entry):return plugin+def _wizard_optional_flagships_suppressed():+ """True when wizard-optional flagships (WordPress) should NOT be boot-seeded:+ a fresh install whose setup wizard hasn't completed (plan 47).++ Bypassed under TESTING so the extensive WordPress test suite keeps its+ seeded flagship; the real gate is exercised by dedicated proving tests that+ toggle ``app.config['TESTING']``."""+ try:+ from flask import current_app+ if current_app and current_app.config.get('TESTING'):+ return False+ except Exception:+ pass+ try:+ from app.services.settings_service import SettingsService+ return bool(SettingsService.needs_setup())+ except Exception:+ return False++def seed_flagship_extensions():"""Ensure bundled flagship extensions (D4) have an active row on EVERY panel— fresh AND upgrade — unless the user explicitly uninstalled them.@@ -1690,10 +1800,16 @@ def seed_flagship_extensions():picks up the seeded row and registers the blueprints (in-place). Best-effort."""uninstalled = _flagship_uninstalled_set()+ suppress_optional = _wizard_optional_flagships_suppressed()available = {e['slug']: e for e in list_builtin_extensions()}for slug in FLAGSHIP_SLUGS:if slug in uninstalled:continue+ # Fresh install (plan 47): don't seed wizard-optional flagships (WordPress)+ # until the setup wizard installs them. Existing/completed-setup installs+ # fall through and seed as before.+ if suppress_optional and slug in WIZARD_OPTIONAL_FLAGSHIP_SLUGS:+ continueentry = available.get(slug)if not entry:continuediff --git a/backend/app/services/settings_service.py b/backend/app/services/settings_service.pyindex 06c4634f..3dd83df3 100644--- a/backend/app/services/settings_service.py+++ b/backend/app/services/settings_service.py@@ -39,6 +39,11 @@ class SettingsService:'type': 'json','description': 'Use cases selected during onboarding wizard'},+ 'onboarding_installed_extensions': {+ 'value': [],+ 'type': 'json',+ 'description': 'Extension slugs installed by the setup wizard'+ },'dev_mode': {'value': False,'type': 'boolean',diff --git a/backend/tests/test_onboarding_recommendations.py b/backend/tests/test_onboarding_recommendations.pynew file mode 100644index 00000000..c640ff00--- /dev/null+++ b/backend/tests/test_onboarding_recommendations.py@@ -0,0 +1,154 @@+"""Plan 47 Phase 1 — the setup wizard installs what it recommends.++Proves the use-case → extension-slug map has no dead slugs, the recommendation+resolver/endpoint returns real extension metadata, complete-onboarding persists+what the wizard installed, and wizard-optional flagships (WordPress) are gated on+fresh installs but kept on completed-setup ones.+"""+import pytest++from app import db+from app.models.plugin import InstalledPlugin+from app.models.user import User+from app.services import plugin_service as ps+from app.services.settings_service import SettingsService+from werkzeug.security import generate_password_hash+from flask_jwt_extended import create_access_token+++# ── map integrity ────────────────────────────────────────────────────────────++def test_recommendation_map_has_no_dead_slugs(app):+ """Every slug in the use-case map resolves to a builtin or registry entry."""+ with app.app_context():+ index = ps._recommendation_index()+ dead = [+ slug+ for slugs in ps.RECOMMENDED_EXTENSIONS_BY_USE_CASE.values()+ for slug in slugs+ if slug not in index+ ]+ assert dead == [], f'recommendation map points at dead slugs: {dead}'+++def test_recommend_resolves_and_dedupes(app):+ with app.app_context():+ recs = ps.recommend_extensions_for_use_cases(['web-apps', 'devops'])+ slugs = [r['slug'] for r in recs]+ # git appears in both use cases — must be de-duped, first-seen order kept+ assert slugs.count('serverkit-git') == 1+ assert 'serverkit-status' in slugs+ assert 'serverkit-k8s' in slugs+ assert 'serverkit-tramo' in slugs+ # every entry carries real metadata (not just a display string)+ for r in recs:+ assert r['display_name']+ assert r['source'] in ('builtin', 'registry')+ assert 'installed' in r+++def test_recommend_empty_use_cases(app):+ with app.app_context():+ assert ps.recommend_extensions_for_use_cases([]) == []+ assert ps.recommend_extensions_for_use_cases(None) == []+++# ── endpoint ─────────────────────────────────────────────────────────────────++def test_recommendations_endpoint(client, auth_headers):+ resp = client.get('/api/v1/plugins/recommendations?use_cases=wordpress',+ headers=auth_headers)+ assert resp.status_code == 200+ slugs = [r['slug'] for r in resp.get_json()['recommendations']]+ assert 'serverkit-wordpress' in slugs+++def test_recommendations_endpoint_requires_auth(client):+ resp = client.get('/api/v1/plugins/recommendations?use_cases=wordpress')+ assert resp.status_code == 401+++# ── complete-onboarding persists installed slugs ─────────────────────────────++def test_complete_onboarding_persists_installed_extensions(client, auth_headers):+ resp = client.post('/api/v1/auth/complete-onboarding',+ json={'use_cases': ['devops'],+ 'installed_extensions': ['serverkit-k8s', 'serverkit-git']},+ headers=auth_headers)+ assert resp.status_code == 200+ assert SettingsService.get('onboarding_installed_extensions') == [+ 'serverkit-k8s', 'serverkit-git']+ assert SettingsService.get('onboarding_use_cases') == ['devops']+++def test_complete_onboarding_rejects_bad_installed_extensions(client, auth_headers):+ resp = client.post('/api/v1/auth/complete-onboarding',+ json={'use_cases': [], 'installed_extensions': 'nope'},+ headers=auth_headers)+ assert resp.status_code == 400+++def test_complete_onboarding_still_completes_without_installs(client, auth_headers):+ """A wizard run that installs nothing (the lean outcome) still finishes."""+ resp = client.post('/api/v1/auth/complete-onboarding',+ json={'use_cases': []},+ headers=auth_headers)+ assert resp.status_code == 200+ assert SettingsService.get('setup_completed') is True+++# ── wizard-optional flagship gating ──────────────────────────────────────────++def test_finalize_setup_flagships_marks_uninstalled_when_absent(app):+ with app.app_context():+ InstalledPlugin.query.filter_by(slug='serverkit-wordpress').delete()+ db.session.commit()+ ps.finalize_setup_flagships()+ assert 'serverkit-wordpress' in ps._flagship_uninstalled_set()+++def test_finalize_setup_flagships_keeps_installed(app):+ with app.app_context():+ # fixture seeds WordPress under the TESTING bypass; finalize must not+ # mark an installed flagship as uninstalled+ assert InstalledPlugin.query.filter_by(slug='serverkit-wordpress').first()+ ps.finalize_setup_flagships()+ assert 'serverkit-wordpress' not in ps._flagship_uninstalled_set()+++def test_wordpress_flagship_skipped_on_fresh_install(app):+ """With the TESTING bypass off, a fresh install (no setup) skips WordPress."""+ with app.app_context():+ InstalledPlugin.query.filter_by(slug='serverkit-wordpress').delete()+ db.session.commit()+ app.config['TESTING'] = False+ try:+ assert SettingsService.needs_setup() is True+ ps.seed_flagship_extensions()+ assert InstalledPlugin.query.filter_by(+ slug='serverkit-wordpress').first() is None+ # cloudflare-ops (not wizard-optional) is still seeded+ assert InstalledPlugin.query.filter_by(+ slug='serverkit-cloudflare-ops').first() is not None+ finally:+ app.config['TESTING'] = True+++def test_wordpress_flagship_seeded_on_completed_setup(app):+ """An existing/completed-setup install keeps seeding WordPress (no regression)."""+ with app.app_context():+ InstalledPlugin.query.filter_by(slug='serverkit-wordpress').delete()+ db.session.commit()+ user = User(email='[email protected]', username='admin', is_active=True,+ role=User.ROLE_ADMIN, password_hash=generate_password_hash('x'))+ db.session.add(user)+ db.session.commit()+ SettingsService.complete_setup(user_id=user.id)+ app.config['TESTING'] = False+ try:+ assert SettingsService.needs_setup() is False+ ps.seed_flagship_extensions()+ assert InstalledPlugin.query.filter_by(+ slug='serverkit-wordpress').first() is not None+ finally:+ app.config['TESTING'] = Truediff --git a/frontend/src/components/setup/SetupStepSummary.jsx b/frontend/src/components/setup/SetupStepSummary.jsxindex 2bc0e2f7..f86c2a56 100644--- a/frontend/src/components/setup/SetupStepSummary.jsx+++ b/frontend/src/components/setup/SetupStepSummary.jsx@@ -1,6 +1,8 @@+import { useState, useEffect } from 'react';import { useResourceTier } from '../../contexts/ResourceTierContext';-import { Sparkles } from 'lucide-react';+import { Sparkles, Check, Loader, AlertTriangle } from 'lucide-react';import { Badge } from '@/components/ui/badge';+import api from '../../services/api';const USE_CASE_LABELS = {wordpress: 'WordPress Sites',@@ -9,35 +11,79 @@ const USE_CASE_LABELS = {devops: 'DevOps & Monitoring',};-const RECOMMENDATIONS = {- wordpress: ['WordPress', 'Nginx Proxy Manager', 'phpMyAdmin'],- 'web-apps': ['Node.js App', 'Python App', 'Portainer'],- 'self-hosted': ['Nextcloud', 'Vaultwarden', 'Wiki.js'],- devops: ['Grafana', 'Prometheus', 'Portainer'],-};+const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {+ const { tier, specs, loading } = useResourceTier();-const DEFAULT_RECOMMENDATIONS = ['Portainer', 'Uptime Kuma', 'Nginx Proxy Manager'];+ // Recommended extensions (real slugs from the backend), the checked set, and+ // per-slug install status shown while finishing.+ const [recommendations, setRecommendations] = useState([]);+ const [recsLoading, setRecsLoading] = useState(true);+ const [checked, setChecked] = useState(() => new Set());+ const [installing, setInstalling] = useState(false);+ const [installState, setInstallState] = useState({}); // slug -> 'installing'|'done'|'error'++ useEffect(() => {+ let active = true;+ setRecsLoading(true);+ api.getRecommendedExtensions(useCases)+ .then((res) => {+ if (!active) return;+ const recs = res?.recommendations || [];+ setRecommendations(recs);+ // Default: everything checked ("lean" = uncheck what you don't want)+ setChecked(new Set(recs.filter((r) => !r.installed).map((r) => r.slug)));+ })+ .catch(() => {+ if (active) setRecommendations([]);+ })+ .finally(() => {+ if (active) setRecsLoading(false);+ });+ return () => {+ active = false;+ };+ }, [useCases]);++ function toggle(slug) {+ setChecked((prev) => {+ const next = new Set(prev);+ if (next.has(slug)) next.delete(slug);+ else next.add(slug);+ return next;+ });+ }-function getRecommendations(useCases) {- if (!useCases || useCases.length === 0) return DEFAULT_RECOMMENDATIONS;+ async function handleFinish() {+ // Install the checked (not-already-installed) extensions, source-aware,+ // one at a time with per-item progress. Fail-soft: an install failure is+ // surfaced but never blocks completing onboarding.+ const toInstall = recommendations.filter(+ (r) => checked.has(r.slug) && !r.installed+ );+ const installedSlugs = recommendations+ .filter((r) => r.installed && checked.has(r.slug))+ .map((r) => r.slug);- const seen = new Set();- const result = [];- for (const uc of useCases) {- const items = RECOMMENDATIONS[uc] || [];- for (const item of items) {- if (!seen.has(item)) {- seen.add(item);- result.push(item);+ if (toInstall.length > 0) {+ setInstalling(true);+ for (const rec of toInstall) {+ setInstallState((s) => ({ ...s, [rec.slug]: 'installing' }));+ try {+ if (rec.source === 'registry') {+ await api.installRegistryExtension(rec.slug);+ } else {+ await api.installBuiltinExtension(rec.slug);+ }+ installedSlugs.push(rec.slug);+ setInstallState((s) => ({ ...s, [rec.slug]: 'done' }));+ } catch {+ setInstallState((s) => ({ ...s, [rec.slug]: 'error' }));+ }}}- }- return result.length > 0 ? result.slice(0, 4) : DEFAULT_RECOMMENDATIONS;-}-const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {- const { tier, specs, loading } = useResourceTier();- const recommendations = getRecommendations(useCases);+ await onFinish(installedSlugs);+ }function formatSpecs() {if (!specs) return 'Detecting...';@@ -53,6 +99,25 @@ const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {return tier.charAt(0).toUpperCase() + tier.slice(1);}+ const anyError = Object.values(installState).some((v) => v === 'error');++ function renderRecStatus(rec) {+ if (rec.installed) {+ return <span className="recommendation-item__status recommendation-item__status--installed">Installed</span>;+ }+ const state = installState[rec.slug];+ if (state === 'installing') {+ return <Loader size={15} className="recommendation-item__spinner" />;+ }+ if (state === 'done') {+ return <Check size={15} className="recommendation-item__status--done" />;+ }+ if (state === 'error') {+ return <AlertTriangle size={15} className="recommendation-item__status--error" />;+ }+ return null;+ }+return (<div className="wizard-step"><h2 className="wizard-step-title">You're all set</h2>@@ -102,24 +167,66 @@ const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {</div></div>- <div className="summary-section">- <div className="summary-section-title">- <Sparkles size={14} style={{ display: 'inline', verticalAlign: 'middle', marginRight: 6 }} />- Recommended for you- </div>- <div className="recommendation-chips">- {recommendations.map((name) => (- <span key={name} className="recommendation-chip">- {name}- </span>- ))}+ {(recsLoading || recommendations.length > 0) && (+ <div className="summary-section">+ <div className="summary-section-title">+ <Sparkles size={14} style={{ display: 'inline', verticalAlign: 'middle', marginRight: 6 }} />+ Recommended for you+ </div>+ {recsLoading ? (+ <div className="summary-row">+ <span className="summary-label">Loading recommendations...</span>+ </div>+ ) : (+ <>+ <p className="recommendation-hint">+ We'll install what you check. Uncheck anything you don't+ need — you can add it later from Extensions.+ </p>+ <div className="recommendation-list">+ {recommendations.map((rec) => (+ <label key={rec.slug} className="recommendation-item">+ <input+ type="checkbox"+ className="recommendation-item__check"+ checked={rec.installed || checked.has(rec.slug)}+ disabled={rec.installed || installing}+ onChange={() => toggle(rec.slug)}+ />+ <span className="recommendation-item__body">+ <span className="recommendation-item__name">+ {rec.display_name}+ </span>+ {rec.description && (+ <span className="recommendation-item__desc">+ {rec.description}+ </span>+ )}+ </span>+ {renderRecStatus(rec)}+ </label>+ ))}+ </div>+ {anyError && (+ <p className="recommendation-error">+ Some extensions couldn't be installed. You can retry+ from the <a href="/extensions">Extensions</a> page.+ </p>+ )}+ </>+ )}</div>- </div>+ )}</div><div className="wizard-nav" style={{ borderTop: 'none', marginTop: 0, paddingTop: 0 }}>- <button type="button" className="btn-wizard-next" onClick={onFinish}>- Go to Dashboard+ <button+ type="button"+ className="btn-wizard-next"+ onClick={handleFinish}+ disabled={installing}+ >+ {installing ? 'Setting up...' : 'Go to Dashboard'}</button></div></div>diff --git a/frontend/src/contexts/AuthContext.jsx b/frontend/src/contexts/AuthContext.jsxindex 4048b1ee..fce09a10 100644--- a/frontend/src/contexts/AuthContext.jsx+++ b/frontend/src/contexts/AuthContext.jsx@@ -105,8 +105,8 @@ export function AuthProvider({ children }) {return data;}- async function completeOnboarding(useCases) {- await api.completeOnboarding(useCases);+ async function completeOnboarding(useCases, installedExtensions = []) {+ await api.completeOnboarding(useCases, installedExtensions);// Tailor the initial sidebar to the use cases picked during setup, so a// fresh install opens focused instead of showing every item. Best-effort:// if it fails, the sidebar just falls back to the "Recommended" default.diff --git a/frontend/src/pages/Setup.jsx b/frontend/src/pages/Setup.jsxindex 42cb70b6..f8c20a29 100644--- a/frontend/src/pages/Setup.jsx+++ b/frontend/src/pages/Setup.jsx@@ -47,8 +47,8 @@ const Setup = () => {setCurrentStep(4);}- async function handleFinish() {- await completeOnboarding(useCases);+ async function handleFinish(installedExtensions = []) {+ await completeOnboarding(useCases, installedExtensions);navigate('/');}diff --git a/frontend/src/services/api/auth.js b/frontend/src/services/api/auth.jsindex bfb6a42f..4941c7cd 100644--- a/frontend/src/services/api/auth.js+++ b/frontend/src/services/api/auth.js@@ -25,10 +25,10 @@ export async function register(email, username, password, inviteToken) {return data;}-export async function completeOnboarding(useCases) {+export async function completeOnboarding(useCases, installedExtensions = []) {return this.request('/auth/complete-onboarding', {method: 'POST',- body: { use_cases: useCases },+ body: { use_cases: useCases, installed_extensions: installedExtensions },});}diff --git a/frontend/src/services/api/plugins.js b/frontend/src/services/api/plugins.jsindex 57579b67..3f01d545 100644--- a/frontend/src/services/api/plugins.js+++ b/frontend/src/services/api/plugins.js@@ -103,6 +103,15 @@ export async function getBuiltinExtensions() {return this.request('/plugins/builtin');}+// Setup wizard: extensions recommended for the selected onboarding use cases.+// Returns { recommendations: [{ slug, display_name, description, category,+// source: 'builtin'|'registry', installed, status }] }.+export async function getRecommendedExtensions(useCases = []) {+ const list = (useCases || []).filter(Boolean);+ const q = list.length ? `?use_cases=${encodeURIComponent(list.join(','))}` : '';+ return this.request(`/plugins/recommendations${q}`);+}+// One-click install for a bundled extension by slug.export async function installBuiltinExtension(slug) {return this.request(`/plugins/builtin/${encodeURIComponent(slug)}/install`, {diff --git a/frontend/src/styles/pages/_setup-wizard.scss b/frontend/src/styles/pages/_setup-wizard.scssindex b5b0f70a..d0e9523a 100644--- a/frontend/src/styles/pages/_setup-wizard.scss+++ b/frontend/src/styles/pages/_setup-wizard.scss@@ -385,6 +385,97 @@color: $text-primary;}+// --------------------------------------------+// Recommended extensions — install checkboxes (plan 47)+// --------------------------------------------+.recommendation-hint {+ margin: 0 0 $space-3;+ font-size: $font-size-sm;+ color: $text-secondary;+}++.recommendation-list {+ display: flex;+ flex-direction: column;+ gap: $space-2;+}++.recommendation-item {+ display: flex;+ align-items: flex-start;+ gap: $space-3;+ padding: $space-3 $space-4;+ background: $bg-secondary;+ border: 1px solid $border-default;+ border-radius: $radius-lg;+ cursor: pointer;++ &:hover {+ border-color: $primary-color;+ }++ &__check {+ margin-top: 3px;+ flex-shrink: 0;+ cursor: pointer;+ }++ &__body {+ display: flex;+ flex-direction: column;+ gap: 2px;+ flex: 1;+ min-width: 0;+ }++ &__name {+ font-size: $font-size-sm;+ font-weight: $font-weight-medium;+ color: $text-primary;+ }++ &__desc {+ font-size: $font-size-xs;+ color: $text-secondary;+ }++ &__spinner {+ color: $text-secondary;+ animation: spin 1s linear infinite;+ flex-shrink: 0;+ }++ &__status {+ font-size: $font-size-xs;+ flex-shrink: 0;++ &--installed {+ color: $text-secondary;+ }++ &--done {+ color: $success-color;+ flex-shrink: 0;+ }++ &--error {+ color: $danger-color;+ flex-shrink: 0;+ }+ }+}++.recommendation-error {+ margin: $space-3 0 0;+ font-size: $font-size-sm;+ color: $danger-color;++ a {+ color: $primary-color;+ text-decoration: underline;+ }+}+// --------------------------------------------// Navigation buttons// --------------------------------------------