@burdenoff/microfe-vibecontrols 2026.515.6 → 2026.516.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VibeControlsRoot.js +82 -74
- package/dist/VibeControlsRoot.js.map +1 -1
- package/dist/components/actions/ActionSchedulesList.js +153 -0
- package/dist/components/actions/ActionSchedulesList.js.map +1 -0
- package/dist/components/actions/index.js +1 -0
- package/dist/pages/ActionsPage.js +290 -280
- package/dist/pages/ActionsPage.js.map +1 -1
- package/package.json +1 -1
package/dist/VibeControlsRoot.js
CHANGED
|
@@ -4,192 +4,200 @@ import n from "./components/shared/AgentEventsConnector.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { useEffect as r } from "react";
|
|
6
6
|
import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
-
import { Activity as a, BarChart2 as o, BookOpen as s, Bot as c, Box as l, Brain as u, CalendarClock as d, FileCode as f, GitBranch as p, Globe as m, LayoutDashboard as h, LayoutGrid as g, PlayCircle as _,
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { FeatureFlagProvider as
|
|
7
|
+
import { Activity as a, BarChart2 as o, BookOpen as s, Bot as c, Box as l, Brain as u, CalendarClock as d, FileCode as f, GitBranch as p, Globe as m, LayoutDashboard as h, LayoutGrid as g, PlayCircle as _, Plug as v, Rocket as y, Server as b, Settings as x, Shield as S, Terminal as C, Zap as w } from "lucide-react";
|
|
8
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
9
|
+
import { FeatureFlagProvider as D } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
10
10
|
//#region src/VibeControlsRoot.tsx
|
|
11
|
-
var
|
|
12
|
-
let { registerNavItems:
|
|
11
|
+
var O = (O) => {
|
|
12
|
+
let { registerNavItems: k, registerFooterItems: A, basePath: j = "/", workspaceId: M } = O, { t: N, locale: P } = i(), F = typeof window < "u" && /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname), I = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
13
13
|
return r(() => {
|
|
14
|
-
if (!(!
|
|
14
|
+
if (!(!k || F)) return k([
|
|
15
15
|
{
|
|
16
16
|
id: "vibecontrols-overview",
|
|
17
|
-
label:
|
|
18
|
-
path:
|
|
19
|
-
icon: /* @__PURE__ */
|
|
17
|
+
label: N("nav.overview"),
|
|
18
|
+
path: j === "/" ? "/" : j,
|
|
19
|
+
icon: /* @__PURE__ */ T(h, { size: 20 }),
|
|
20
20
|
order: 10,
|
|
21
21
|
group: "vibecontrols"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
id: "vibecontrols-targets",
|
|
25
|
-
label:
|
|
26
|
-
path:
|
|
27
|
-
icon: /* @__PURE__ */
|
|
25
|
+
label: N("nav.targets"),
|
|
26
|
+
path: I(j, "targets"),
|
|
27
|
+
icon: /* @__PURE__ */ T(b, { size: 20 }),
|
|
28
28
|
order: 12,
|
|
29
29
|
group: "vibecontrols"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: "vibecontrols-agents",
|
|
33
|
-
label:
|
|
34
|
-
path:
|
|
35
|
-
icon: /* @__PURE__ */
|
|
33
|
+
label: N("nav.agents"),
|
|
34
|
+
path: I(j, "agents"),
|
|
35
|
+
icon: /* @__PURE__ */ T(c, { size: 20 }),
|
|
36
36
|
order: 14,
|
|
37
37
|
group: "vibecontrols"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: "vibecontrols-agent-graph",
|
|
41
|
-
label:
|
|
42
|
-
path:
|
|
43
|
-
icon: /* @__PURE__ */
|
|
41
|
+
label: N("nav.agentGraph"),
|
|
42
|
+
path: I(j, "agent-graph"),
|
|
43
|
+
icon: /* @__PURE__ */ T(p, { size: 20 }),
|
|
44
44
|
order: 16,
|
|
45
45
|
group: "vibecontrols"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
id: "vibecontrols-vibes",
|
|
49
|
-
label:
|
|
50
|
-
path:
|
|
51
|
-
icon: /* @__PURE__ */ w
|
|
49
|
+
label: N("nav.vibes"),
|
|
50
|
+
path: I(j, "vibes"),
|
|
51
|
+
icon: /* @__PURE__ */ T(w, { size: 20 }),
|
|
52
52
|
order: 20,
|
|
53
53
|
group: "vibecontrols"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
id: "vibecontrols-catalogs",
|
|
57
|
-
label:
|
|
58
|
-
path:
|
|
59
|
-
icon: /* @__PURE__ */
|
|
57
|
+
label: N("nav.catalogs") === "nav.catalogs" ? "Catalogs" : N("nav.catalogs"),
|
|
58
|
+
path: I(j, "catalogs"),
|
|
59
|
+
icon: /* @__PURE__ */ T(s, { size: 20 }),
|
|
60
60
|
order: 21,
|
|
61
61
|
group: "vibecontrols"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: "vibecontrols-components",
|
|
65
|
-
label:
|
|
66
|
-
path:
|
|
67
|
-
icon: /* @__PURE__ */
|
|
65
|
+
label: N("nav.components") === "nav.components" ? "Components" : N("nav.components"),
|
|
66
|
+
path: I(j, "components"),
|
|
67
|
+
icon: /* @__PURE__ */ T(l, { size: 20 }),
|
|
68
68
|
order: 22,
|
|
69
69
|
group: "vibecontrols"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "vibecontrols-templates",
|
|
73
|
-
label:
|
|
74
|
-
path:
|
|
75
|
-
icon: /* @__PURE__ */
|
|
73
|
+
label: N("nav.templates") === "nav.templates" ? "Templates" : N("nav.templates"),
|
|
74
|
+
path: I(j, "templates"),
|
|
75
|
+
icon: /* @__PURE__ */ T(f, { size: 20 }),
|
|
76
76
|
order: 23,
|
|
77
77
|
group: "vibecontrols"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: "vibecontrols-vibedeck",
|
|
81
|
-
label:
|
|
82
|
-
path:
|
|
83
|
-
icon: /* @__PURE__ */
|
|
81
|
+
label: N("nav.vibeDeck"),
|
|
82
|
+
path: I(j, "vibedeck"),
|
|
83
|
+
icon: /* @__PURE__ */ T(g, { size: 20 }),
|
|
84
84
|
order: 25,
|
|
85
85
|
group: "vibecontrols"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
id: "vibecontrols-sessions",
|
|
89
|
-
label:
|
|
90
|
-
path:
|
|
91
|
-
icon: /* @__PURE__ */
|
|
89
|
+
label: N("nav.sessions"),
|
|
90
|
+
path: I(j, "sessions"),
|
|
91
|
+
icon: /* @__PURE__ */ T(C, { size: 20 }),
|
|
92
92
|
order: 30,
|
|
93
93
|
group: "vibecontrols"
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
id: "vibecontrols-vibecalendar",
|
|
97
|
-
label:
|
|
98
|
-
path:
|
|
99
|
-
icon: /* @__PURE__ */
|
|
97
|
+
label: N("nav.vibeCalendar"),
|
|
98
|
+
path: I(j, "calendar"),
|
|
99
|
+
icon: /* @__PURE__ */ T(d, { size: 20 }),
|
|
100
100
|
order: 35,
|
|
101
101
|
group: "vibecontrols"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
id: "vibecontrols-ai",
|
|
105
|
-
label:
|
|
106
|
-
path:
|
|
107
|
-
icon: /* @__PURE__ */
|
|
105
|
+
label: N("nav.ai"),
|
|
106
|
+
path: I(j, "ai"),
|
|
107
|
+
icon: /* @__PURE__ */ T(u, { size: 20 }),
|
|
108
108
|
order: 38,
|
|
109
109
|
group: "vibecontrols"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
id: "vibecontrols-actions",
|
|
113
|
-
label:
|
|
114
|
-
path:
|
|
115
|
-
icon: /* @__PURE__ */
|
|
113
|
+
label: N("nav.actions"),
|
|
114
|
+
path: I(j, "actions"),
|
|
115
|
+
icon: /* @__PURE__ */ T(_, { size: 20 }),
|
|
116
116
|
order: 40,
|
|
117
117
|
group: "vibecontrols"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
id: "vibecontrols-getting-started",
|
|
121
|
-
label:
|
|
122
|
-
path:
|
|
123
|
-
icon: /* @__PURE__ */
|
|
121
|
+
label: N("nav.gettingStarted"),
|
|
122
|
+
path: I(j, "getting-started"),
|
|
123
|
+
icon: /* @__PURE__ */ T(y, { size: 20 }),
|
|
124
124
|
order: 50,
|
|
125
125
|
group: "vibecontrols"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
id: "vibecontrols-tunnels",
|
|
129
|
-
label:
|
|
130
|
-
path:
|
|
131
|
-
icon: /* @__PURE__ */
|
|
129
|
+
label: N("nav.tunnels"),
|
|
130
|
+
path: I(j, "tunnels"),
|
|
131
|
+
icon: /* @__PURE__ */ T(m, { size: 20 }),
|
|
132
132
|
order: 47,
|
|
133
133
|
group: "vibecontrols"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
id: "vibecontrols-analytics",
|
|
137
|
-
label:
|
|
138
|
-
path:
|
|
139
|
-
icon: /* @__PURE__ */
|
|
137
|
+
label: N("nav.analytics"),
|
|
138
|
+
path: I(j, "analytics"),
|
|
139
|
+
icon: /* @__PURE__ */ T(o, { size: 20 }),
|
|
140
140
|
order: 55.5,
|
|
141
141
|
group: "vibecontrols-system"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
id: "vibecontrols-audit",
|
|
145
|
-
label:
|
|
146
|
-
path:
|
|
147
|
-
icon: /* @__PURE__ */
|
|
145
|
+
label: N("nav.vibeAudit"),
|
|
146
|
+
path: I(j, "audit"),
|
|
147
|
+
icon: /* @__PURE__ */ T(S, { size: 20 }),
|
|
148
148
|
order: 56,
|
|
149
149
|
group: "vibecontrols-system"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
id: "vibecontrols-health",
|
|
153
|
-
label:
|
|
154
|
-
path:
|
|
155
|
-
icon: /* @__PURE__ */
|
|
153
|
+
label: N("nav.health"),
|
|
154
|
+
path: I(j, "health"),
|
|
155
|
+
icon: /* @__PURE__ */ T(a, { size: 20 }),
|
|
156
156
|
order: 110,
|
|
157
157
|
group: "vibecontrols-system"
|
|
158
158
|
},
|
|
159
|
+
{
|
|
160
|
+
id: "vibecontrols-integrations",
|
|
161
|
+
label: N("nav.integrations") === "nav.integrations" ? "Integrations" : N("nav.integrations"),
|
|
162
|
+
path: "/integrations",
|
|
163
|
+
icon: /* @__PURE__ */ T(v, { size: 20 }),
|
|
164
|
+
order: 115,
|
|
165
|
+
group: "vibecontrols-system"
|
|
166
|
+
},
|
|
159
167
|
{
|
|
160
168
|
id: "vibecontrols-settings",
|
|
161
|
-
label:
|
|
162
|
-
path:
|
|
163
|
-
icon: /* @__PURE__ */
|
|
169
|
+
label: N("nav.settings"),
|
|
170
|
+
path: I(j, "settings"),
|
|
171
|
+
icon: /* @__PURE__ */ T(x, { size: 20 }),
|
|
164
172
|
order: 120,
|
|
165
173
|
group: "vibecontrols-system"
|
|
166
174
|
}
|
|
167
175
|
]);
|
|
168
176
|
}, [
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
M,
|
|
177
|
+
k,
|
|
178
|
+
j,
|
|
172
179
|
N,
|
|
173
|
-
P
|
|
180
|
+
P,
|
|
181
|
+
F
|
|
174
182
|
]), r(() => {
|
|
175
|
-
if (!(!
|
|
183
|
+
if (!(!A || F)) return A([{
|
|
176
184
|
id: "vibecontrols-status",
|
|
177
185
|
label: "VibeControls Ready",
|
|
178
186
|
type: "status",
|
|
179
187
|
order: 10,
|
|
180
188
|
section: "left"
|
|
181
189
|
}]);
|
|
182
|
-
}, [
|
|
183
|
-
workspaceId:
|
|
190
|
+
}, [A, F]), /* @__PURE__ */ T(D, {
|
|
191
|
+
workspaceId: M ?? null,
|
|
184
192
|
gateway: "global",
|
|
185
193
|
defaultEnabled: !0,
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
-
...
|
|
188
|
-
children: [
|
|
194
|
+
children: /* @__PURE__ */ E(e, {
|
|
195
|
+
...O,
|
|
196
|
+
children: [F ? null : /* @__PURE__ */ T(n, {}), /* @__PURE__ */ T(t, {})]
|
|
189
197
|
})
|
|
190
198
|
});
|
|
191
199
|
};
|
|
192
200
|
//#endregion
|
|
193
|
-
export {
|
|
201
|
+
export { O as VibeControlsRoot };
|
|
194
202
|
|
|
195
203
|
//# sourceMappingURL=VibeControlsRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VibeControlsRoot.js","names":[],"sources":["../src/VibeControlsRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n LayoutDashboard,\n Bot,\n Terminal,\n Zap,\n Globe,\n Settings,\n Activity,\n Rocket,\n LayoutGrid,\n CalendarClock,\n Shield,\n Server,\n GitBranch,\n Brain,\n PlayCircle,\n BarChart2,\n BookOpen,\n Box,\n FileCode,\n} from 'lucide-react';\nimport { VibeControlsProvider } from './providers/VibeControlsProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { NavItem, VibeControlsRootProps } from './types';\nimport { VibeControlsRoutes } from './VibeControlsRoutes';\nimport { AgentEventsConnector } from './components/shared/AgentEventsConnector';\nimport './styles/vibecontrols.css';\n\n/**\n * Root component for the VibeControls microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { VibeControlsRoot, type VibeControlsRootProps } from '@burdenoff/microfe-vibecontrols';\n *\n * function App() {\n * const props: VibeControlsRootProps = {\n * basePath: '/vibecontrols',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * defaultView: 'agents',\n * onAgentSelect: (agent) => console.log('Agent selected:', agent),\n * onSessionStart: (session) => console.log('Session started:', session),\n * onVibeActivate: (vibe) => console.log('Vibe activated:', vibe),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <VibeControlsRoot {...props} />;\n * }\n * ```\n */\nexport const VibeControlsRoot: FC<VibeControlsRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/', workspaceId } = props;\n const { t, locale } = useI18n();\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems || isPublicLinkRoute) return;\n\n const navItems: NavItem[] = [\n // Main navigation\n {\n id: 'vibecontrols-overview',\n label: t('nav.overview'),\n path: basePath === '/' ? '/' : basePath,\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'vibecontrols',\n },\n\n // Targets first — the primary entity\n {\n id: 'vibecontrols-targets',\n label: t('nav.targets'),\n path: joinPath(basePath, 'targets'),\n icon: <Server size={20} />,\n order: 12,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agents',\n label: t('nav.agents'),\n path: joinPath(basePath, 'agents'),\n icon: <Bot size={20} />,\n order: 14,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agent-graph',\n label: t('nav.agentGraph'),\n path: joinPath(basePath, 'agent-graph'),\n icon: <GitBranch size={20} />,\n order: 16,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibes',\n label: t('nav.vibes'),\n path: joinPath(basePath, 'vibes'),\n icon: <Zap size={20} />,\n order: 20,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-catalogs',\n label: t('nav.catalogs') === 'nav.catalogs' ? 'Catalogs' : t('nav.catalogs'),\n path: joinPath(basePath, 'catalogs'),\n icon: <BookOpen size={20} />,\n order: 21,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-components',\n label: t('nav.components') === 'nav.components' ? 'Components' : t('nav.components'),\n path: joinPath(basePath, 'components'),\n icon: <Box size={20} />,\n order: 22,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-templates',\n label: t('nav.templates') === 'nav.templates' ? 'Templates' : t('nav.templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileCode size={20} />,\n order: 23,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibedeck',\n label: t('nav.vibeDeck'),\n path: joinPath(basePath, 'vibedeck'),\n icon: <LayoutGrid size={20} />,\n order: 25,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-sessions',\n label: t('nav.sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <Terminal size={20} />,\n order: 30,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibecalendar',\n label: t('nav.vibeCalendar'),\n path: joinPath(basePath, 'calendar'),\n icon: <CalendarClock size={20} />,\n order: 35,\n group: 'vibecontrols',\n },\n // AI Vibecoding\n {\n id: 'vibecontrols-ai',\n label: t('nav.ai'),\n path: joinPath(basePath, 'ai'),\n icon: <Brain size={20} />,\n order: 38,\n group: 'vibecontrols',\n },\n\n // Actions\n {\n id: 'vibecontrols-actions',\n label: t('nav.actions'),\n path: joinPath(basePath, 'actions'),\n icon: <PlayCircle size={20} />,\n order: 40,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-getting-started',\n label: t('nav.gettingStarted'),\n path: joinPath(basePath, 'getting-started'),\n icon: <Rocket size={20} />,\n order: 50,\n group: 'vibecontrols',\n },\n\n // Connection management\n {\n id: 'vibecontrols-tunnels',\n label: t('nav.tunnels'),\n path: joinPath(basePath, 'tunnels'),\n icon: <Globe size={20} />,\n order: 47,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-analytics',\n label: t('nav.analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart2 size={20} />,\n order: 55.5,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-audit',\n label: t('nav.vibeAudit'),\n path: joinPath(basePath, 'audit'),\n icon: <Shield size={20} />,\n order: 56,\n group: 'vibecontrols-system',\n },\n\n // Settings & System\n {\n id: 'vibecontrols-health',\n label: t('nav.health'),\n path: joinPath(basePath, 'health'),\n icon: <Activity size={20} />,\n order: 110,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-settings',\n label: t('nav.settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 120,\n group: 'vibecontrols-system',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t, locale, isPublicLinkRoute]);\n\n // Register footer items (example: status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems || isPublicLinkRoute) return;\n\n const footerItems = [\n {\n id: 'vibecontrols-status',\n label: 'VibeControls Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, isPublicLinkRoute]);\n\n return (\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <VibeControlsProvider {...props}>\n {!isPublicLinkRoute ? (\n /* Agent events connector - syncs active agent to WebSocket */\n <AgentEventsConnector />\n ) : null}\n <VibeControlsRoutes />\n </VibeControlsProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AA8DA,IAAa,KAA+C,MAAU;CACpE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,mBAAgB,GACzE,EAAE,MAAG,cAAW,GAAS,EACzB,IACJ,OAAO,SAAW,OAClB,kCAAkC,KAAK,OAAO,SAAS,SAAS,EAG5D,KAAY,GAAc,OACZ,E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,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GAED;IACE,IAAI;IACJ,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAS,GAAU,QAAQ;IACjC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,aAAa;IACtB,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,eAAe;IACxB,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACF,CAGyC;IAKzC;EAAC;EAAkB;EAAU;EAAG;EAAQ;EAAkB,CAAC,EAG9D,QAAgB;AACV,SAAC,KAAuB,GAa5B,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAkB,CAAC,EAG1C,kBAAC,GAAD;EAAqB,aAAa,KAAe;EAAM,SAAQ;EAAS,gBAAgB;YACtF,kBAAC,GAAD;GAAsB,GAAI;aAA1B,CACI,IAGE,OADF,kBAAC,GAAD,EAAwB,CAAA,EAE1B,kBAAC,GAAD,EAAsB,CAAA,CACD;;EACH,CAAA"}
|
|
1
|
+
{"version":3,"file":"VibeControlsRoot.js","names":[],"sources":["../src/VibeControlsRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n LayoutDashboard,\n Bot,\n Terminal,\n Zap,\n Globe,\n Settings,\n Activity,\n Rocket,\n LayoutGrid,\n CalendarClock,\n Shield,\n Server,\n GitBranch,\n Brain,\n PlayCircle,\n BarChart2,\n BookOpen,\n Box,\n FileCode,\n Plug,\n} from 'lucide-react';\nimport { VibeControlsProvider } from './providers/VibeControlsProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { NavItem, VibeControlsRootProps } from './types';\nimport { VibeControlsRoutes } from './VibeControlsRoutes';\nimport { AgentEventsConnector } from './components/shared/AgentEventsConnector';\nimport './styles/vibecontrols.css';\n\n/**\n * Root component for the VibeControls microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { VibeControlsRoot, type VibeControlsRootProps } from '@burdenoff/microfe-vibecontrols';\n *\n * function App() {\n * const props: VibeControlsRootProps = {\n * basePath: '/vibecontrols',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * tenantId: 'tenant-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * defaultView: 'agents',\n * onAgentSelect: (agent) => console.log('Agent selected:', agent),\n * onSessionStart: (session) => console.log('Session started:', session),\n * onVibeActivate: (vibe) => console.log('Vibe activated:', vibe),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <VibeControlsRoot {...props} />;\n * }\n * ```\n */\nexport const VibeControlsRoot: FC<VibeControlsRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/', workspaceId } = props;\n const { t, locale } = useI18n();\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems || isPublicLinkRoute) return;\n\n const navItems: NavItem[] = [\n // Main navigation\n {\n id: 'vibecontrols-overview',\n label: t('nav.overview'),\n path: basePath === '/' ? '/' : basePath,\n icon: <LayoutDashboard size={20} />,\n order: 10,\n group: 'vibecontrols',\n },\n\n // Targets first — the primary entity\n {\n id: 'vibecontrols-targets',\n label: t('nav.targets'),\n path: joinPath(basePath, 'targets'),\n icon: <Server size={20} />,\n order: 12,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agents',\n label: t('nav.agents'),\n path: joinPath(basePath, 'agents'),\n icon: <Bot size={20} />,\n order: 14,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-agent-graph',\n label: t('nav.agentGraph'),\n path: joinPath(basePath, 'agent-graph'),\n icon: <GitBranch size={20} />,\n order: 16,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibes',\n label: t('nav.vibes'),\n path: joinPath(basePath, 'vibes'),\n icon: <Zap size={20} />,\n order: 20,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-catalogs',\n label: t('nav.catalogs') === 'nav.catalogs' ? 'Catalogs' : t('nav.catalogs'),\n path: joinPath(basePath, 'catalogs'),\n icon: <BookOpen size={20} />,\n order: 21,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-components',\n label: t('nav.components') === 'nav.components' ? 'Components' : t('nav.components'),\n path: joinPath(basePath, 'components'),\n icon: <Box size={20} />,\n order: 22,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-templates',\n label: t('nav.templates') === 'nav.templates' ? 'Templates' : t('nav.templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileCode size={20} />,\n order: 23,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibedeck',\n label: t('nav.vibeDeck'),\n path: joinPath(basePath, 'vibedeck'),\n icon: <LayoutGrid size={20} />,\n order: 25,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-sessions',\n label: t('nav.sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <Terminal size={20} />,\n order: 30,\n group: 'vibecontrols',\n },\n {\n id: 'vibecontrols-vibecalendar',\n label: t('nav.vibeCalendar'),\n path: joinPath(basePath, 'calendar'),\n icon: <CalendarClock size={20} />,\n order: 35,\n group: 'vibecontrols',\n },\n // AI Vibecoding\n {\n id: 'vibecontrols-ai',\n label: t('nav.ai'),\n path: joinPath(basePath, 'ai'),\n icon: <Brain size={20} />,\n order: 38,\n group: 'vibecontrols',\n },\n\n // Actions\n {\n id: 'vibecontrols-actions',\n label: t('nav.actions'),\n path: joinPath(basePath, 'actions'),\n icon: <PlayCircle size={20} />,\n order: 40,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-getting-started',\n label: t('nav.gettingStarted'),\n path: joinPath(basePath, 'getting-started'),\n icon: <Rocket size={20} />,\n order: 50,\n group: 'vibecontrols',\n },\n\n // Connection management\n {\n id: 'vibecontrols-tunnels',\n label: t('nav.tunnels'),\n path: joinPath(basePath, 'tunnels'),\n icon: <Globe size={20} />,\n order: 47,\n group: 'vibecontrols',\n },\n\n {\n id: 'vibecontrols-analytics',\n label: t('nav.analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart2 size={20} />,\n order: 55.5,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-audit',\n label: t('nav.vibeAudit'),\n path: joinPath(basePath, 'audit'),\n icon: <Shield size={20} />,\n order: 56,\n group: 'vibecontrols-system',\n },\n\n // Settings & System\n {\n id: 'vibecontrols-health',\n label: t('nav.health'),\n path: joinPath(basePath, 'health'),\n icon: <Activity size={20} />,\n order: 110,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-integrations',\n label:\n t('nav.integrations') === 'nav.integrations' ? 'Integrations' : t('nav.integrations'),\n // Absolute path — links out to the host shell's /integrations route\n // (microfe-integrations, mounted by vibecontrols-app). Keeps the\n // VibeControls MFE compliant with the no-cross-MFE-import rule.\n path: '/integrations',\n icon: <Plug size={20} />,\n order: 115,\n group: 'vibecontrols-system',\n },\n {\n id: 'vibecontrols-settings',\n label: t('nav.settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 120,\n group: 'vibecontrols-system',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t, locale, isPublicLinkRoute]);\n\n // Register footer items (example: status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems || isPublicLinkRoute) return;\n\n const footerItems = [\n {\n id: 'vibecontrols-status',\n label: 'VibeControls Ready',\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, isPublicLinkRoute]);\n\n return (\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <VibeControlsProvider {...props}>\n {!isPublicLinkRoute ? (\n /* Agent events connector - syncs active agent to WebSocket */\n <AgentEventsConnector />\n ) : null}\n <VibeControlsRoutes />\n </VibeControlsProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AA+DA,IAAa,KAA+C,MAAU;CACpE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,mBAAgB,GACzE,EAAE,MAAG,cAAW,GAAS,EACzB,IACJ,OAAO,SAAW,OAClB,kCAAkC,KAAK,OAAO,SAAS,SAAS,EAG5D,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAqNtD,QAhNA,QAAgB;AACV,SAAC,KAAoB,GAyL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AW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAS,GAAU,QAAQ;IACjC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,aAAa;IACtB,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OACE,EAAE,mBAAmB,KAAK,qBAAqB,iBAAiB,EAAE,mBAAmB;IAIvF,MAAM;IACN,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,eAAe;IACxB,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACF,CAGyC;IAKzC;EAAC;EAAkB;EAAU;EAAG;EAAQ;EAAkB,CAAC,EAG9D,QAAgB;AACV,SAAC,KAAuB,GAa5B,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAkB,CAAC,EAG1C,kBAAC,GAAD;EAAqB,aAAa,KAAe;EAAM,SAAQ;EAAS,gBAAgB;YACtF,kBAAC,GAAD;GAAsB,GAAI;aAA1B,CACI,IAGE,OADF,kBAAC,GAAD,EAAwB,CAAA,EAE1B,kBAAC,GAAD,EAAsB,CAAA,CACD;;EACH,CAAA"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
|
+
import { useGetScheduledJobsForCalendarQuery as t } from "../../generated/wspace-operations.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { useI18n as r } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
|
+
import { AlarmClock as i, ArrowUpRight as a, Plus as o } from "lucide-react";
|
|
6
|
+
import { useNavigate as s } from "react-router-dom";
|
|
7
|
+
import { motion as c } from "framer-motion";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/actions/ActionSchedulesList.tsx
|
|
10
|
+
var d = {
|
|
11
|
+
ACTIVE: "active",
|
|
12
|
+
PENDING: "pending",
|
|
13
|
+
PAUSED: "paused",
|
|
14
|
+
COMPLETED: "completed",
|
|
15
|
+
FAILED: "failed",
|
|
16
|
+
CANCELLED: "cancelled",
|
|
17
|
+
DISABLED: "disabled",
|
|
18
|
+
ARCHIVED: "archived",
|
|
19
|
+
DRAFT: "draft"
|
|
20
|
+
}, f = {
|
|
21
|
+
ACTIVE: "text-status-success-text",
|
|
22
|
+
PENDING: "text-status-info-text",
|
|
23
|
+
PAUSED: "text-text-secondary",
|
|
24
|
+
COMPLETED: "text-status-success-text",
|
|
25
|
+
FAILED: "text-status-error-text",
|
|
26
|
+
CANCELLED: "text-text-placeholder",
|
|
27
|
+
DISABLED: "text-text-placeholder",
|
|
28
|
+
ARCHIVED: "text-text-placeholder",
|
|
29
|
+
DRAFT: "text-text-secondary"
|
|
30
|
+
}, p = {
|
|
31
|
+
CRON: "Cron",
|
|
32
|
+
RRULE: "Recurrence",
|
|
33
|
+
ONE_TIME: "One-time",
|
|
34
|
+
FIXED_INTERVAL: "Interval",
|
|
35
|
+
WINDOWED: "Windowed"
|
|
36
|
+
};
|
|
37
|
+
function m(e) {
|
|
38
|
+
return (t) => t ? new Date(t).toLocaleString(e || void 0) : "—";
|
|
39
|
+
}
|
|
40
|
+
function h(e) {
|
|
41
|
+
return (t) => t.scheduleType === "CRON" && t.cronExpression ? t.cronExpression : t.scheduleType === "ONE_TIME" && t.scheduledAt ? e(t.scheduledAt) : p[t.scheduleType] ?? t.scheduleType;
|
|
42
|
+
}
|
|
43
|
+
function g({ actionId: p, workspaceId: g, actionName: _, onClose: v }) {
|
|
44
|
+
let y = e(), { locale: b } = r(), x = s(), S = n(() => m(b), [b]), C = n(() => h(S), [S]), { data: w, loading: T, error: E } = t({
|
|
45
|
+
variables: {
|
|
46
|
+
workspaceId: g,
|
|
47
|
+
pagination: { first: 100 }
|
|
48
|
+
},
|
|
49
|
+
fetchPolicy: "cache-and-network"
|
|
50
|
+
}), D = w?.scheduledJobs?.jobs?.length ?? 0, O = w?.scheduledJobs?.total ?? D, k = D >= 100 && O > D, A = n(() => (w?.scheduledJobs?.jobs ?? []).filter((e) => e.actionId === p).filter((e) => e.status !== "ARCHIVED"), [w, p]);
|
|
51
|
+
return /* @__PURE__ */ u(c.div, {
|
|
52
|
+
className: "bg-bg-surface border border-border-default rounded-lg overflow-hidden",
|
|
53
|
+
initial: {
|
|
54
|
+
opacity: 0,
|
|
55
|
+
height: 0
|
|
56
|
+
},
|
|
57
|
+
animate: {
|
|
58
|
+
opacity: 1,
|
|
59
|
+
height: "auto"
|
|
60
|
+
},
|
|
61
|
+
exit: {
|
|
62
|
+
opacity: 0,
|
|
63
|
+
height: 0
|
|
64
|
+
},
|
|
65
|
+
transition: { duration: .2 },
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ u("div", {
|
|
68
|
+
className: "flex items-center justify-between px-4 py-3 border-b border-border-default bg-bg-sunken/50",
|
|
69
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
70
|
+
className: "text-sm font-semibold text-text-primary inline-flex items-center gap-2",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ l(i, {
|
|
73
|
+
size: 14,
|
|
74
|
+
className: "text-text-secondary"
|
|
75
|
+
}),
|
|
76
|
+
y("vibecontrols.actions.schedules.title", "Schedules"),
|
|
77
|
+
" — ",
|
|
78
|
+
_,
|
|
79
|
+
A.length > 0 && /* @__PURE__ */ u("span", {
|
|
80
|
+
className: "text-xs font-normal text-text-placeholder",
|
|
81
|
+
children: [
|
|
82
|
+
"(",
|
|
83
|
+
A.length,
|
|
84
|
+
")"
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}), /* @__PURE__ */ u("div", {
|
|
89
|
+
className: "flex items-center gap-3",
|
|
90
|
+
children: [/* @__PURE__ */ u("button", {
|
|
91
|
+
onClick: () => x(`/scheduler?actionId=${encodeURIComponent(p)}`),
|
|
92
|
+
className: "text-xs text-text-secondary hover:text-text-primary transition-colors inline-flex items-center gap-1",
|
|
93
|
+
children: [/* @__PURE__ */ l(o, { size: 12 }), y("vibecontrols.actions.schedules.add", "New schedule")]
|
|
94
|
+
}), /* @__PURE__ */ l("button", {
|
|
95
|
+
onClick: v,
|
|
96
|
+
className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
97
|
+
children: y("vibecontrols.actions.schedules.close", "Close")
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
}),
|
|
101
|
+
k && /* @__PURE__ */ l("div", {
|
|
102
|
+
className: "px-4 py-2 text-xs text-status-warning-text bg-status-warning-surface/40 border-b border-border-default",
|
|
103
|
+
children: y("vibecontrols.actions.schedules.truncated", "Showing the first 100 schedules across this workspace; some schedules for this action may not appear here.")
|
|
104
|
+
}),
|
|
105
|
+
T && A.length === 0 ? /* @__PURE__ */ l("div", {
|
|
106
|
+
className: "px-4 py-6 text-center text-sm text-text-secondary",
|
|
107
|
+
children: y("vibecontrols.actions.schedules.loading", "Loading schedules…")
|
|
108
|
+
}) : E ? /* @__PURE__ */ l("div", {
|
|
109
|
+
className: "px-4 py-6 text-center text-sm text-status-error-text",
|
|
110
|
+
children: y("vibecontrols.actions.schedules.error", "Failed to load schedules")
|
|
111
|
+
}) : A.length === 0 ? /* @__PURE__ */ l("div", {
|
|
112
|
+
className: "px-4 py-6 text-center text-sm text-text-secondary",
|
|
113
|
+
children: y("vibecontrols.actions.schedules.empty", "No schedules attached to this action")
|
|
114
|
+
}) : /* @__PURE__ */ l("div", {
|
|
115
|
+
className: "divide-y divide-border-default",
|
|
116
|
+
children: A.map((e) => {
|
|
117
|
+
let t = f[e.status] ?? "text-text-secondary", n = d[e.status] ?? e.status.toLowerCase();
|
|
118
|
+
return /* @__PURE__ */ u("button", {
|
|
119
|
+
onClick: () => x(`/scheduler/${encodeURIComponent(e.id)}`),
|
|
120
|
+
className: "w-full text-left px-4 py-3 hover:bg-bg-sunken/30 transition-colors flex items-center justify-between gap-3",
|
|
121
|
+
children: [/* @__PURE__ */ u("div", {
|
|
122
|
+
className: "min-w-0 flex-1",
|
|
123
|
+
children: [/* @__PURE__ */ u("div", {
|
|
124
|
+
className: "flex items-center gap-2",
|
|
125
|
+
children: [/* @__PURE__ */ l("span", {
|
|
126
|
+
className: "text-sm font-medium text-text-primary truncate",
|
|
127
|
+
children: e.name || e.id
|
|
128
|
+
}), /* @__PURE__ */ l("span", {
|
|
129
|
+
className: `text-xs capitalize ${t}`,
|
|
130
|
+
children: n
|
|
131
|
+
})]
|
|
132
|
+
}), /* @__PURE__ */ u("div", {
|
|
133
|
+
className: "text-xs text-text-placeholder mt-0.5 truncate",
|
|
134
|
+
children: [
|
|
135
|
+
C(e),
|
|
136
|
+
" · next ",
|
|
137
|
+
S(e.nextExecutionAt)
|
|
138
|
+
]
|
|
139
|
+
})]
|
|
140
|
+
}), /* @__PURE__ */ l(a, {
|
|
141
|
+
size: 14,
|
|
142
|
+
className: "text-text-placeholder flex-shrink-0"
|
|
143
|
+
})]
|
|
144
|
+
}, e.id);
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
export { g as ActionSchedulesList };
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=ActionSchedulesList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionSchedulesList.js","names":[],"sources":["../../../src/components/actions/ActionSchedulesList.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { AlarmClock, ArrowUpRight, Plus } from 'lucide-react';\nimport { motion } from 'framer-motion';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useGetScheduledJobsForCalendarQuery } from '@/generated/wspace-operations';\nimport type { GetScheduledJobsForCalendarQuery } from '@/generated/wspace-operations';\nimport type { JobStatus, ScheduleType } from '@/generated/wspace-types';\nimport { useTr } from '@/shared/hooks/useTr';\n\ntype ScheduledJobItem = NonNullable<\n GetScheduledJobsForCalendarQuery['scheduledJobs']['jobs']\n>[number];\n\ninterface ActionSchedulesListProps {\n actionId: string;\n workspaceId: string;\n actionName: string;\n onClose: () => void;\n}\n\nconst STATUS_LABEL: Record<string, string> = {\n ACTIVE: 'active',\n PENDING: 'pending',\n PAUSED: 'paused',\n COMPLETED: 'completed',\n FAILED: 'failed',\n CANCELLED: 'cancelled',\n DISABLED: 'disabled',\n ARCHIVED: 'archived',\n DRAFT: 'draft',\n};\n\nconst STATUS_TONE: Record<string, string> = {\n ACTIVE: 'text-status-success-text',\n PENDING: 'text-status-info-text',\n PAUSED: 'text-text-secondary',\n COMPLETED: 'text-status-success-text',\n FAILED: 'text-status-error-text',\n CANCELLED: 'text-text-placeholder',\n DISABLED: 'text-text-placeholder',\n ARCHIVED: 'text-text-placeholder',\n DRAFT: 'text-text-secondary',\n};\n\nconst SCHEDULE_LABEL: Record<ScheduleType | string, string> = {\n CRON: 'Cron',\n RRULE: 'Recurrence',\n ONE_TIME: 'One-time',\n FIXED_INTERVAL: 'Interval',\n WINDOWED: 'Windowed',\n};\n\nfunction makeFormatTime(locale: string | undefined) {\n return (dateStr: string | null | undefined): string => {\n if (!dateStr) return '—';\n // Pass the app locale through so the displayed format matches\n // whatever the user picked in the shell, not the browser default.\n return new Date(dateStr).toLocaleString(locale || undefined);\n };\n}\n\nfunction makeDescribeSchedule(formatTime: (d: string | null | undefined) => string) {\n return (job: {\n scheduleType: ScheduleType;\n cronExpression?: string | null;\n scheduledAt?: string | null;\n }): string => {\n if (job.scheduleType === 'CRON' && job.cronExpression) return job.cronExpression;\n if (job.scheduleType === 'ONE_TIME' && job.scheduledAt) return formatTime(job.scheduledAt);\n return SCHEDULE_LABEL[job.scheduleType] ?? job.scheduleType;\n };\n}\n\nexport function ActionSchedulesList({\n actionId,\n workspaceId,\n actionName,\n onClose,\n}: ActionSchedulesListProps) {\n const tr = useTr();\n const { locale } = useI18n();\n const navigate = useNavigate();\n const formatTime = useMemo(() => makeFormatTime(locale), [locale]);\n const describeSchedule = useMemo(() => makeDescribeSchedule(formatTime), [formatTime]);\n\n // The scheduler's `JobFilterInput` doesn't support `actionId` today, so we\n // page through up to `pageSize` jobs and filter client-side. The action page\n // is unlikely to need more than a handful of schedules per action; if a\n // workspace ever scales past this, push `actionId` into JobFilterInput.\n const pageSize = 100;\n const { data, loading, error } = useGetScheduledJobsForCalendarQuery({\n variables: { workspaceId, pagination: { first: pageSize } },\n fetchPolicy: 'cache-and-network',\n });\n\n const totalFetched = data?.scheduledJobs?.jobs?.length ?? 0;\n // The query returns at most `pageSize` jobs and we filter client-side,\n // so if the result set hits the page boundary AND the workspace's\n // overall total exceeds it, schedules for this action could be on a\n // later page we never fetched. Surface a warning rather than silently\n // showing an incomplete list. (Long-term fix: add `actionId` to\n // `JobFilterInput` so the server can return the full result set.)\n const totalAvailable = data?.scheduledJobs?.total ?? totalFetched;\n const mayBeTruncated = totalFetched >= pageSize && totalAvailable > totalFetched;\n\n const schedules = useMemo<ScheduledJobItem[]>(() => {\n const jobs: ScheduledJobItem[] = data?.scheduledJobs?.jobs ?? [];\n return jobs\n .filter((j: ScheduledJobItem) => j.actionId === actionId)\n .filter((j: ScheduledJobItem) => (j.status as JobStatus) !== 'ARCHIVED');\n }, [data, actionId]);\n\n return (\n <motion.div\n className=\"bg-bg-surface border border-border-default rounded-lg overflow-hidden\"\n initial={{ opacity: 0, height: 0 }}\n animate={{ opacity: 1, height: 'auto' }}\n exit={{ opacity: 0, height: 0 }}\n transition={{ duration: 0.2 }}\n >\n <div className=\"flex items-center justify-between px-4 py-3 border-b border-border-default bg-bg-sunken/50\">\n <h3 className=\"text-sm font-semibold text-text-primary inline-flex items-center gap-2\">\n <AlarmClock size={14} className=\"text-text-secondary\" />\n {tr('vibecontrols.actions.schedules.title', 'Schedules')} — {actionName}\n {schedules.length > 0 && (\n <span className=\"text-xs font-normal text-text-placeholder\">({schedules.length})</span>\n )}\n </h3>\n <div className=\"flex items-center gap-3\">\n <button\n onClick={() => navigate(`/scheduler?actionId=${encodeURIComponent(actionId)}`)}\n className=\"text-xs text-text-secondary hover:text-text-primary transition-colors inline-flex items-center gap-1\"\n >\n <Plus size={12} />\n {tr('vibecontrols.actions.schedules.add', 'New schedule')}\n </button>\n <button\n onClick={onClose}\n className=\"text-xs text-text-secondary hover:text-text-primary transition-colors\"\n >\n {tr('vibecontrols.actions.schedules.close', 'Close')}\n </button>\n </div>\n </div>\n\n {mayBeTruncated && (\n <div className=\"px-4 py-2 text-xs text-status-warning-text bg-status-warning-surface/40 border-b border-border-default\">\n {tr(\n 'vibecontrols.actions.schedules.truncated',\n `Showing the first ${pageSize} schedules across this workspace; some schedules for this action may not appear here.`\n )}\n </div>\n )}\n\n {loading && schedules.length === 0 ? (\n <div className=\"px-4 py-6 text-center text-sm text-text-secondary\">\n {tr('vibecontrols.actions.schedules.loading', 'Loading schedules…')}\n </div>\n ) : error ? (\n <div className=\"px-4 py-6 text-center text-sm text-status-error-text\">\n {tr('vibecontrols.actions.schedules.error', 'Failed to load schedules')}\n </div>\n ) : schedules.length === 0 ? (\n <div className=\"px-4 py-6 text-center text-sm text-text-secondary\">\n {tr('vibecontrols.actions.schedules.empty', 'No schedules attached to this action')}\n </div>\n ) : (\n <div className=\"divide-y divide-border-default\">\n {schedules.map((job: ScheduledJobItem) => {\n const tone = STATUS_TONE[job.status] ?? 'text-text-secondary';\n const statusKey = STATUS_LABEL[job.status] ?? job.status.toLowerCase();\n return (\n <button\n key={job.id}\n onClick={() => navigate(`/scheduler/${encodeURIComponent(job.id)}`)}\n className=\"w-full text-left px-4 py-3 hover:bg-bg-sunken/30 transition-colors flex items-center justify-between gap-3\"\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-text-primary truncate\">\n {job.name || job.id}\n </span>\n <span className={`text-xs capitalize ${tone}`}>{statusKey}</span>\n </div>\n <div className=\"text-xs text-text-placeholder mt-0.5 truncate\">\n {describeSchedule(job)} · next {formatTime(job.nextExecutionAt)}\n </div>\n </div>\n <ArrowUpRight size={14} className=\"text-text-placeholder flex-shrink-0\" />\n </button>\n );\n })}\n </div>\n )}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,IAAM,IAAuC;CAC3C,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACR,EAEK,IAAsC;CAC1C,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACR,EAEK,IAAwD;CAC5D,MAAM;CACN,OAAO;CACP,UAAU;CACV,gBAAgB;CAChB,UAAU;CACX;AAED,SAAS,EAAe,GAA4B;AAClD,SAAQ,MACD,IAGE,IAAI,KAAK,EAAQ,CAAC,eAAe,KAAU,KAAA,EAAU,GAHvC;;AAOzB,SAAS,EAAqB,GAAsD;AAClF,SAAQ,MAKF,EAAI,iBAAiB,UAAU,EAAI,iBAAuB,EAAI,iBAC9D,EAAI,iBAAiB,cAAc,EAAI,cAAoB,EAAW,EAAI,YAAY,GACnF,EAAe,EAAI,iBAAiB,EAAI;;AAInD,SAAgB,EAAoB,EAClC,aACA,gBACA,eACA,cAC2B;CAC3B,IAAM,IAAK,GAAO,EACZ,EAAE,cAAW,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