feat(workflows): add workflows feature flag + Features-tab toggle

New opt-in 'workflows' master flag (default off) across the backend
KNOWN_FLAGS/DEFAULT_FLAGS and the frontend FeatureKey union, context
defaults, and a new Automation section card in the Features tab. Gates
the upcoming Workflows admin area and the engine runtime. en/de i18n
added (DE native).
This commit is contained in:
Luca
2026-06-23 01:53:03 +02:00
parent a1f68bc081
commit ff478619b5
6 changed files with 47 additions and 3 deletions
+6
View File
@@ -88,6 +88,11 @@ const KNOWN_FLAGS = [
// per-event-type presets and global watermark defaults tab. Strictly opt-in;
// gates all slideshow admin UI (per-event card, type preset, settings tab).
'slideshow',
// Workflow / automation engine — admin-configurable visual flows (triggers,
// conditions, branches, loops, approval gates). Strictly opt-in; master
// kill-switch for the Workflows admin area AND the engine's runtime side
// effects (no run is created/resumed while off).
'workflows',
];
// Spec defaults for any flag missing from the DB (e.g. a row added by a
@@ -117,6 +122,7 @@ const DEFAULT_FLAGS = {
projects: false,
whatsapp: false,
slideshow: false,
workflows: false,
};
async function readAllFlags() {
@@ -64,6 +64,9 @@ export const DEFAULT_FLAGS: FeatureFlags = {
whatsapp: false,
// Live Slideshow ("Diashow") — opt-in; gates all slideshow admin UI.
slideshow: false,
// Workflow / automation engine — opt-in; gates the Workflows admin area
// and the engine runtime (triggers/actions/gates).
workflows: false,
};
export const FEATURE_FLAGS_QUERY_KEY = ['feature-flags'] as const;
@@ -23,6 +23,7 @@ import {
Wallet,
FolderKanban,
MonitorPlay,
Workflow,
} from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button, Card } from '../../../components/common';
@@ -134,6 +135,24 @@ export const FeaturesTab: React.FC = () => {
/>
</Section>
{/* Automation — the visual workflow engine. Master kill-switch for the
Workflows admin area and the runtime; off by default. */}
<Section title={t('settings.features.sections.automation', 'Automation')}>
<FeatureCard
icon={Workflow}
title={t('settings.features.workflows.title', 'Workflows')}
description={t(
'settings.features.workflows.description',
'Build visual automations on a canvas — triggers, conditions, branches, loops and admin approval gates. Your reminder ladder and booking steps become editable flows. Strictly opt-in.',
)}
status="new"
statusLabel={statusLabel('new')}
sidebarLabel={t('settings.features.workflows.sidebar', 'Workflows')}
enabled={staged.workflows}
onToggle={(next) => setFlag('workflows', next)}
/>
</Section>
{/* Clients (#354 follow-up). Visual grouping for the CRM-area
sub-features. The "Clients" sidebar section itself is gated
by a derived `clients` flag (computed from whether any
+7 -1
View File
@@ -1663,7 +1663,8 @@
"accounting": "Buchhaltung",
"insights": "Auswertungen & Zugriff",
"customers": "Kunden",
"clients": "CRM"
"clients": "CRM",
"automation": "Automatisierung"
},
"status": {
"stable": "stabil",
@@ -1779,6 +1780,11 @@
"slideshow": {
"title": "Live-Diashow",
"description": "Ein separater Vollbild-„Diashow“-Link pro Event für Beamer bei Live-Events übernimmt neue Uploads automatisch, mit Voreinstellungen je Event-Typ und globalen Wasserzeichen-Vorgaben unter Einstellungen → Diashow."
},
"workflows": {
"title": "Workflows",
"description": "Visuelle Automatisierungen auf einer Canvas erstellen Auslöser, Bedingungen, Verzweigungen, Schleifen und Freigabe-Gates für Admins. Deine Mahnstufen und Buchungsschritte werden zu bearbeitbaren Abläufen. Strikt optional.",
"sidebar": "Workflows"
}
},
"customerSurface": {
+7 -1
View File
@@ -1219,7 +1219,8 @@
"accounting": "Accounting",
"insights": "Insights & Access",
"customers": "Customers",
"clients": "CRM"
"clients": "CRM",
"automation": "Automation"
},
"status": {
"stable": "stable",
@@ -1335,6 +1336,11 @@
"slideshow": {
"title": "Live Slideshow",
"description": "A separate fullscreen \"Diashow\" link per event for projectors at live events — auto-picks-up new uploads, with per-event-type presets and global watermark defaults under Settings → Slideshow."
},
"workflows": {
"title": "Workflows",
"description": "Build visual automations on a canvas — triggers, conditions, branches, loops and admin approval gates. Your reminder ladder and booking steps become editable flows. Strictly opt-in.",
"sidebar": "Workflows"
}
},
"customerSurface": {
@@ -66,7 +66,11 @@ export type FeatureKey =
| 'whatsapp'
// Live Slideshow ("Diashow") — per-event fullscreen kiosk link + presets +
// global watermark settings tab. Strictly opt-in; gates all slideshow UI.
| 'slideshow';
| 'slideshow'
// Workflow / automation engine — admin-configurable visual flows (triggers,
// conditions, branches, loops, approval gates) built on a canvas. Strictly
// opt-in; gates the Workflows admin area and the engine runtime.
| 'workflows';
export type FeatureFlags = Record<FeatureKey, boolean>;