@burdenoff/microfe-vibecontrols 2026.528.6 → 2026.528.8
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 +90 -81
- package/dist/VibeControlsRoot.js.map +1 -1
- package/dist/VibeControlsRoutes.js +144 -140
- package/dist/VibeControlsRoutes.js.map +1 -1
- package/dist/components/audit/AuditLogFilters.js +71 -47
- package/dist/components/audit/AuditLogFilters.js.map +1 -1
- package/dist/components/shared/AgentSetupBanner.js +50 -45
- package/dist/components/shared/AgentSetupBanner.js.map +1 -1
- package/dist/components/shared/LinkToVibePanel.js +97 -0
- package/dist/components/shared/LinkToVibePanel.js.map +1 -0
- package/dist/components/shared/index.js +1 -0
- package/dist/components/templates/TemplateWizard.js +2 -2
- package/dist/components/templates/TemplateWizard.js.map +1 -1
- package/dist/components/vibe/VibeLinkedEntitiesPanel.js +60 -0
- package/dist/components/vibe/VibeLinkedEntitiesPanel.js.map +1 -0
- package/dist/components/vibedeck/VibeDeckButtonTile.js +25 -23
- package/dist/components/vibedeck/VibeDeckButtonTile.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckGrid.js +2 -2
- package/dist/components/vibedeck/VibeDeckGrid.js.map +1 -1
- package/dist/constants/pluginCatalog.js +1 -1
- package/dist/microfe-vibecontrols.css +1 -1
- package/dist/pages/AgentDetailsPage.js +2 -2
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/AnalyticsPage.js +255 -204
- package/dist/pages/AnalyticsPage.js.map +1 -1
- package/dist/pages/OverviewPage.js +1 -11
- package/dist/pages/OverviewPage.js.map +1 -1
- package/dist/pages/PluginsCatalogPage.js +287 -0
- package/dist/pages/PluginsCatalogPage.js.map +1 -0
- package/dist/pages/SessionsPage.js +825 -629
- package/dist/pages/SessionsPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js +184 -153
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeCalendarPage.js +132 -107
- package/dist/pages/VibeCalendarPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +416 -379
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +621 -557
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelsTab.js +115 -90
- package/dist/pages/tunnels/TunnelsTab.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,14 +14,15 @@ import { SandboxAnalyticsSection as p } from "../components/analytics/SandboxAna
|
|
|
14
14
|
import "../components/analytics/index.js";
|
|
15
15
|
import { Suspense as m, lazy as h, useCallback as g, useMemo as _, useState as v } from "react";
|
|
16
16
|
import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
17
|
+
import { Download as b, Printer as x } from "lucide-react";
|
|
18
|
+
import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
20
|
+
import { MotionPage as T } from "@burdenoff/fe-libs/shared/motion";
|
|
20
21
|
//#region src/pages/AnalyticsPage.tsx
|
|
21
|
-
var
|
|
22
|
+
var E = h(() => import("../components/analytics/AnalyticsTimeSeriesChart.js").then((e) => ({ default: e.AnalyticsTimeSeriesChart }))), D = h(() => import("../components/analytics/AnalyticsBreakdownChart.js").then((e) => ({ default: e.AnalyticsBreakdownChart }))), O = () => /* @__PURE__ */ C("div", {
|
|
22
23
|
className: "bg-bg-surface border border-border-default rounded-lg p-4",
|
|
23
|
-
children: /* @__PURE__ */
|
|
24
|
-
}),
|
|
24
|
+
children: /* @__PURE__ */ C(a, { height: "h-40" })
|
|
25
|
+
}), k = [
|
|
25
26
|
"overview",
|
|
26
27
|
"agents",
|
|
27
28
|
"sessions",
|
|
@@ -32,438 +33,463 @@ var w = h(() => import("../components/analytics/AnalyticsTimeSeriesChart.js").th
|
|
|
32
33
|
"aievents",
|
|
33
34
|
"audit",
|
|
34
35
|
"docs"
|
|
35
|
-
],
|
|
36
|
+
], A = {
|
|
36
37
|
primary: "var(--color-text-link)",
|
|
37
38
|
success: "var(--color-status-success-text)",
|
|
38
39
|
accent: "var(--color-accent-purple)",
|
|
39
40
|
warning: "var(--color-status-warning-text)"
|
|
40
41
|
};
|
|
41
|
-
function
|
|
42
|
-
let { workspaceId: a } = t(), { t: h } = y(),
|
|
42
|
+
function j() {
|
|
43
|
+
let { workspaceId: a } = t(), { t: h } = y(), j = n(), { hasPermission: I, isLoading: L } = S(), [R, z] = v("LAST_7D"), [B, V] = v("DAY"), [H, U] = o(k, "overview"), W = g((e, t) => {
|
|
43
44
|
let n = h(e);
|
|
44
45
|
return n === e ? t : n;
|
|
45
|
-
}, [h]), { startDate:
|
|
46
|
+
}, [h]), { startDate: G, endDate: K } = _(() => c(R), [R]), q = _(() => s(H), [H]), { data: J, loading: Y, error: X, refetch: Z } = e({
|
|
46
47
|
variables: { input: {
|
|
47
|
-
startDate:
|
|
48
|
-
endDate:
|
|
49
|
-
granularity:
|
|
50
|
-
entityTypes:
|
|
48
|
+
startDate: G.toISOString(),
|
|
49
|
+
endDate: K.toISOString(),
|
|
50
|
+
granularity: B,
|
|
51
|
+
entityTypes: q.entityTypes
|
|
51
52
|
} },
|
|
52
53
|
fetchPolicy: "cache-first",
|
|
53
54
|
nextFetchPolicy: "cache-first",
|
|
54
55
|
notifyOnNetworkStatusChange: !0,
|
|
55
56
|
skip: !a
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
|
|
57
|
+
}), Q = J?.vibecontrolsAnalytics, $ = g(() => {
|
|
58
|
+
Z();
|
|
59
|
+
}, [Z]), ee = g(() => {
|
|
60
|
+
typeof window < "u" && window.print();
|
|
61
|
+
}, []), te = g(() => {
|
|
62
|
+
if (!Q) return;
|
|
63
|
+
let e = F(H, Q);
|
|
64
|
+
if (e.length === 0) return;
|
|
65
|
+
let t = P(e), n = new Blob([t], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
66
|
+
i.href = r, i.download = `vibecontrols-analytics-${H}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
|
|
67
|
+
}, [Q, H]), ne = g((e) => {
|
|
68
|
+
j(e);
|
|
69
|
+
}, [j]);
|
|
70
|
+
return L ? /* @__PURE__ */ C("div", {
|
|
62
71
|
className: "flex items-center justify-center min-h-[400px]",
|
|
63
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ C("p", {
|
|
64
73
|
className: "text-text-secondary",
|
|
65
74
|
children: "Loading permissions…"
|
|
66
75
|
})
|
|
67
|
-
}) :
|
|
76
|
+
}) : I(i.ANALYTICS_READ) ? a ? X && !Q ? /* @__PURE__ */ w(T, {
|
|
68
77
|
className: "min-h-screen space-y-6 bg-bg-surface p-4 sm:p-6",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ C(r, { title: W("nav.analytics", "Analytics") }), /* @__PURE__ */ w("div", {
|
|
70
79
|
className: "space-y-3 rounded-lg border border-status-error-border bg-status-error-bg/10 p-4 text-sm text-status-error-text",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ w("p", { children: ["Failed to load analytics: ", X.message] }), /* @__PURE__ */ C("button", {
|
|
72
81
|
type: "button",
|
|
73
|
-
onClick:
|
|
82
|
+
onClick: $,
|
|
74
83
|
className: "rounded-md bg-status-error-bg/20 px-3 py-1.5 text-xs font-medium transition-colors hover:bg-status-error-bg/30",
|
|
75
84
|
children: "Retry"
|
|
76
85
|
})]
|
|
77
86
|
})]
|
|
78
|
-
}) : /* @__PURE__ */
|
|
79
|
-
className: "min-h-screen space-y-4 bg-bg-surface p-4 sm:p-6",
|
|
87
|
+
}) : /* @__PURE__ */ w(T, {
|
|
88
|
+
className: "min-h-screen space-y-4 bg-bg-surface p-4 sm:p-6 vc-printable",
|
|
80
89
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
timeRange:
|
|
84
|
-
granularity:
|
|
85
|
-
onTimeRangeChange:
|
|
86
|
-
onGranularityChange:
|
|
87
|
-
onRefresh:
|
|
88
|
-
loading:
|
|
89
|
-
executionTimeMs:
|
|
90
|
-
cached:
|
|
90
|
+
/* @__PURE__ */ C(r, { title: W("nav.analytics", "Analytics") }),
|
|
91
|
+
/* @__PURE__ */ C(l, {
|
|
92
|
+
timeRange: R,
|
|
93
|
+
granularity: B,
|
|
94
|
+
onTimeRangeChange: z,
|
|
95
|
+
onGranularityChange: V,
|
|
96
|
+
onRefresh: $,
|
|
97
|
+
loading: Y,
|
|
98
|
+
executionTimeMs: Q?.executionTimeMs,
|
|
99
|
+
cached: Q?.cached
|
|
91
100
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
activeTab:
|
|
94
|
-
onTabChange:
|
|
101
|
+
/* @__PURE__ */ C(f, {
|
|
102
|
+
activeTab: H,
|
|
103
|
+
onTabChange: U
|
|
95
104
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
|
|
105
|
+
/* @__PURE__ */ w("div", {
|
|
106
|
+
className: "flex flex-wrap items-center justify-end gap-2 vc-print-hide",
|
|
107
|
+
children: [/* @__PURE__ */ w("button", {
|
|
108
|
+
type: "button",
|
|
109
|
+
onClick: te,
|
|
110
|
+
disabled: Y || !Q,
|
|
111
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-default px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
112
|
+
title: W("analytics.exportCsvTitle", "Export current tab as CSV"),
|
|
113
|
+
children: [/* @__PURE__ */ C(b, { size: 14 }), W("analytics.exportCsv", "Export CSV")]
|
|
114
|
+
}), /* @__PURE__ */ w("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick: ee,
|
|
117
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-default px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
118
|
+
title: W("analytics.printTitle", "Print this report"),
|
|
119
|
+
children: [/* @__PURE__ */ C(x, { size: 14 }), W("analytics.print", "Print")]
|
|
120
|
+
})]
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ C(m, {
|
|
123
|
+
fallback: /* @__PURE__ */ C(O, {}),
|
|
124
|
+
children: /* @__PURE__ */ w("section", {
|
|
125
|
+
id: `analytics-panel-${H}`,
|
|
100
126
|
role: "tabpanel",
|
|
101
|
-
"aria-labelledby": `analytics-tab-${
|
|
127
|
+
"aria-labelledby": `analytics-tab-${H}`,
|
|
102
128
|
className: "space-y-4",
|
|
103
129
|
children: [
|
|
104
|
-
|
|
130
|
+
H === "overview" ? /* @__PURE__ */ w("div", {
|
|
105
131
|
className: "space-y-4",
|
|
106
132
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
data:
|
|
109
|
-
loading:
|
|
110
|
-
onCardClick:
|
|
133
|
+
/* @__PURE__ */ C(u, {
|
|
134
|
+
data: Q,
|
|
135
|
+
loading: Y,
|
|
136
|
+
onCardClick: ne
|
|
111
137
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ C(E, {
|
|
113
139
|
title: "Activity Over Time",
|
|
114
140
|
datasets: [
|
|
115
141
|
{
|
|
116
142
|
label: "Sessions",
|
|
117
|
-
data:
|
|
118
|
-
color:
|
|
143
|
+
data: Q?.sessions?.createdOverTime,
|
|
144
|
+
color: A.primary
|
|
119
145
|
},
|
|
120
146
|
{
|
|
121
147
|
label: "Executions",
|
|
122
|
-
data:
|
|
123
|
-
color:
|
|
148
|
+
data: Q?.actions?.executionsOverTime,
|
|
149
|
+
color: A.success
|
|
124
150
|
},
|
|
125
151
|
{
|
|
126
152
|
label: "AI Events",
|
|
127
|
-
data:
|
|
128
|
-
color:
|
|
153
|
+
data: Q?.aiEvents?.eventsOverTime,
|
|
154
|
+
color: A.accent
|
|
129
155
|
},
|
|
130
156
|
{
|
|
131
157
|
label: "Audit Logs",
|
|
132
|
-
data:
|
|
133
|
-
color:
|
|
158
|
+
data: Q?.audit?.eventsOverTime,
|
|
159
|
+
color: A.warning
|
|
134
160
|
}
|
|
135
161
|
]
|
|
136
162
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ w("div", {
|
|
138
164
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ C(D, {
|
|
140
166
|
title: "Sessions by Status",
|
|
141
|
-
data:
|
|
142
|
-
}), /* @__PURE__ */
|
|
167
|
+
data: Q?.sessions?.byStatus
|
|
168
|
+
}), /* @__PURE__ */ C(D, {
|
|
143
169
|
title: "Vibes by Status",
|
|
144
|
-
data:
|
|
170
|
+
data: Q?.vibes?.byStatus
|
|
145
171
|
})]
|
|
146
172
|
})
|
|
147
173
|
]
|
|
148
174
|
}) : null,
|
|
149
|
-
|
|
175
|
+
H === "agents" && Q?.agents ? /* @__PURE__ */ w("div", {
|
|
150
176
|
className: "space-y-4",
|
|
151
177
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ w("div", {
|
|
153
179
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
154
180
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ C(M, {
|
|
156
182
|
label: "Total",
|
|
157
|
-
value:
|
|
183
|
+
value: Q.agents.total
|
|
158
184
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ C(M, {
|
|
160
186
|
label: "Active",
|
|
161
|
-
value:
|
|
187
|
+
value: Q.agents.active,
|
|
162
188
|
variant: "success"
|
|
163
189
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ C(M, {
|
|
165
191
|
label: "Inactive",
|
|
166
|
-
value:
|
|
192
|
+
value: Q.agents.inactive,
|
|
167
193
|
variant: "warning"
|
|
168
194
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ C(M, {
|
|
170
196
|
label: "Stale Heartbeat",
|
|
171
|
-
value:
|
|
197
|
+
value: Q.agents.staleHeartbeatCount,
|
|
172
198
|
variant: "error"
|
|
173
199
|
})
|
|
174
200
|
]
|
|
175
201
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ C(E, {
|
|
177
203
|
title: "Agents Created Over Time",
|
|
178
204
|
datasets: [{
|
|
179
205
|
label: "Agents",
|
|
180
|
-
data:
|
|
181
|
-
color:
|
|
206
|
+
data: Q.agents.createdOverTime,
|
|
207
|
+
color: A.primary
|
|
182
208
|
}],
|
|
183
209
|
height: 250
|
|
184
210
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ w("div", {
|
|
186
212
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ C(d, {
|
|
188
214
|
title: "By Platform",
|
|
189
|
-
data:
|
|
215
|
+
data: Q.agents.byPlatform,
|
|
190
216
|
keyLabel: "Platform"
|
|
191
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ C(d, {
|
|
192
218
|
title: "By Architecture",
|
|
193
|
-
data:
|
|
219
|
+
data: Q.agents.byArchitecture,
|
|
194
220
|
keyLabel: "Architecture"
|
|
195
221
|
})]
|
|
196
222
|
})
|
|
197
223
|
]
|
|
198
224
|
}) : null,
|
|
199
|
-
|
|
225
|
+
H === "sessions" && Q?.sessions ? /* @__PURE__ */ w("div", {
|
|
200
226
|
className: "space-y-4",
|
|
201
227
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ w("div", {
|
|
203
229
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
204
230
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ C(M, {
|
|
206
232
|
label: "Total",
|
|
207
|
-
value:
|
|
233
|
+
value: Q.sessions.total
|
|
208
234
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ C(M, {
|
|
210
236
|
label: "Running",
|
|
211
|
-
value:
|
|
237
|
+
value: Q.sessions.active,
|
|
212
238
|
variant: "success"
|
|
213
239
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ C(M, {
|
|
215
241
|
label: "Collaborators",
|
|
216
|
-
value:
|
|
242
|
+
value: Q.sessions.totalCollaborators
|
|
217
243
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ C(M, {
|
|
219
245
|
label: "Shares",
|
|
220
|
-
value:
|
|
246
|
+
value: Q.sessions.totalShares + Q.sessions.totalShareLinks
|
|
221
247
|
})
|
|
222
248
|
]
|
|
223
249
|
}),
|
|
224
|
-
|
|
250
|
+
Q.sessions.avgDurationMs == null ? null : /* @__PURE__ */ w("div", {
|
|
225
251
|
className: "text-sm text-text-secondary",
|
|
226
252
|
children: [
|
|
227
253
|
"Average duration:",
|
|
228
254
|
" ",
|
|
229
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ C("span", {
|
|
230
256
|
className: "font-medium text-text-primary",
|
|
231
|
-
children:
|
|
257
|
+
children: N(Q.sessions.avgDurationMs)
|
|
232
258
|
})
|
|
233
259
|
]
|
|
234
260
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ C(E, {
|
|
236
262
|
title: "Sessions Created Over Time",
|
|
237
263
|
datasets: [{
|
|
238
264
|
label: "Sessions",
|
|
239
|
-
data:
|
|
240
|
-
color:
|
|
265
|
+
data: Q.sessions.createdOverTime,
|
|
266
|
+
color: A.primary
|
|
241
267
|
}],
|
|
242
268
|
height: 250
|
|
243
269
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ w("div", {
|
|
245
271
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ C(D, {
|
|
247
273
|
title: "Sessions by Type",
|
|
248
|
-
data:
|
|
249
|
-
}), /* @__PURE__ */
|
|
274
|
+
data: Q.sessions.byType
|
|
275
|
+
}), /* @__PURE__ */ C(d, {
|
|
250
276
|
title: "Sessions by Status",
|
|
251
|
-
data:
|
|
277
|
+
data: Q.sessions.byStatus,
|
|
252
278
|
keyLabel: "Status"
|
|
253
279
|
})]
|
|
254
280
|
})
|
|
255
281
|
]
|
|
256
282
|
}) : null,
|
|
257
|
-
|
|
258
|
-
|
|
283
|
+
H === "sandbox" ? /* @__PURE__ */ C(p, {}) : null,
|
|
284
|
+
H === "vibes" && Q?.vibes ? /* @__PURE__ */ w("div", {
|
|
259
285
|
className: "space-y-4",
|
|
260
286
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ w("div", {
|
|
262
288
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
263
289
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ C(M, {
|
|
265
291
|
label: "Total",
|
|
266
|
-
value:
|
|
292
|
+
value: Q.vibes.total
|
|
267
293
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ C(M, {
|
|
269
295
|
label: "With Agent",
|
|
270
|
-
value:
|
|
296
|
+
value: Q.vibes.withAgent,
|
|
271
297
|
variant: "success"
|
|
272
298
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ C(M, {
|
|
274
300
|
label: "Without Agent",
|
|
275
|
-
value:
|
|
301
|
+
value: Q.vibes.withoutAgent
|
|
276
302
|
})
|
|
277
303
|
]
|
|
278
304
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ C(E, {
|
|
280
306
|
title: "Vibes Created Over Time",
|
|
281
307
|
datasets: [{
|
|
282
308
|
label: "Vibes",
|
|
283
|
-
data:
|
|
284
|
-
color:
|
|
309
|
+
data: Q.vibes.createdOverTime,
|
|
310
|
+
color: A.accent
|
|
285
311
|
}],
|
|
286
312
|
height: 250
|
|
287
313
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ w("div", {
|
|
289
315
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ C(D, {
|
|
291
317
|
title: "Vibes by Type",
|
|
292
|
-
data:
|
|
293
|
-
}), /* @__PURE__ */
|
|
318
|
+
data: Q.vibes.byType
|
|
319
|
+
}), /* @__PURE__ */ C(D, {
|
|
294
320
|
title: "Vibes by Status",
|
|
295
|
-
data:
|
|
321
|
+
data: Q.vibes.byStatus
|
|
296
322
|
})]
|
|
297
323
|
})
|
|
298
324
|
]
|
|
299
325
|
}) : null,
|
|
300
|
-
|
|
326
|
+
H === "actions" && Q?.actions ? /* @__PURE__ */ w("div", {
|
|
301
327
|
className: "space-y-4",
|
|
302
328
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ w("div", {
|
|
304
330
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
305
331
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ C(M, {
|
|
307
333
|
label: "Total Actions",
|
|
308
|
-
value:
|
|
334
|
+
value: Q.actions.total
|
|
309
335
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ C(M, {
|
|
311
337
|
label: "Executions",
|
|
312
|
-
value:
|
|
338
|
+
value: Q.actions.totalExecutions
|
|
313
339
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ C(M, {
|
|
315
341
|
label: "Success Rate",
|
|
316
|
-
value:
|
|
317
|
-
variant:
|
|
342
|
+
value: Q.actions.successRate == null ? "N/A" : `${Q.actions.successRate.toFixed(1)}%`,
|
|
343
|
+
variant: Q.actions.successRate != null && Q.actions.successRate >= 90 ? "success" : "warning"
|
|
318
344
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ C(M, {
|
|
320
346
|
label: "Avg Duration",
|
|
321
|
-
value:
|
|
347
|
+
value: Q.actions.avgDurationMs == null ? "N/A" : N(Q.actions.avgDurationMs)
|
|
322
348
|
})
|
|
323
349
|
]
|
|
324
350
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ C(E, {
|
|
326
352
|
title: "Executions Over Time",
|
|
327
353
|
datasets: [{
|
|
328
354
|
label: "Executions",
|
|
329
|
-
data:
|
|
330
|
-
color:
|
|
355
|
+
data: Q.actions.executionsOverTime,
|
|
356
|
+
color: A.success
|
|
331
357
|
}],
|
|
332
358
|
height: 250
|
|
333
359
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ w("div", {
|
|
335
361
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ C(D, {
|
|
337
363
|
title: "By Action Type",
|
|
338
|
-
data:
|
|
339
|
-
}), /* @__PURE__ */
|
|
364
|
+
data: Q.actions.byActionType
|
|
365
|
+
}), /* @__PURE__ */ C(D, {
|
|
340
366
|
title: "Execution Status",
|
|
341
|
-
data:
|
|
367
|
+
data: Q.actions.executionsByStatus
|
|
342
368
|
})]
|
|
343
369
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ w("div", {
|
|
345
371
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ C(d, {
|
|
347
373
|
title: "By Trigger Type",
|
|
348
|
-
data:
|
|
374
|
+
data: Q.actions.byTriggerType,
|
|
349
375
|
keyLabel: "Trigger"
|
|
350
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ C(d, {
|
|
351
377
|
title: "By Source Type",
|
|
352
|
-
data:
|
|
378
|
+
data: Q.actions.bySourceType,
|
|
353
379
|
keyLabel: "Source"
|
|
354
380
|
})]
|
|
355
381
|
})
|
|
356
382
|
]
|
|
357
383
|
}) : null,
|
|
358
|
-
|
|
384
|
+
H === "vibedecks" && Q?.vibeDecks ? /* @__PURE__ */ w("div", {
|
|
359
385
|
className: "space-y-4",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ w("div", {
|
|
361
387
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ C(M, {
|
|
363
389
|
label: "Decks",
|
|
364
|
-
value:
|
|
365
|
-
}), /* @__PURE__ */
|
|
390
|
+
value: Q.vibeDecks.totalDecks
|
|
391
|
+
}), /* @__PURE__ */ C(M, {
|
|
366
392
|
label: "Buttons",
|
|
367
|
-
value:
|
|
393
|
+
value: Q.vibeDecks.totalButtons
|
|
368
394
|
})]
|
|
369
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ C(D, {
|
|
370
396
|
title: "Buttons by Action Type",
|
|
371
|
-
data:
|
|
397
|
+
data: Q.vibeDecks.buttonsByActionType
|
|
372
398
|
})]
|
|
373
399
|
}) : null,
|
|
374
|
-
|
|
400
|
+
H === "aievents" && Q?.aiEvents ? /* @__PURE__ */ w("div", {
|
|
375
401
|
className: "space-y-4",
|
|
376
402
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ C(M, {
|
|
378
404
|
label: "Total AI Events",
|
|
379
|
-
value:
|
|
405
|
+
value: Q.aiEvents.total
|
|
380
406
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ C(E, {
|
|
382
408
|
title: "AI Events Over Time",
|
|
383
409
|
datasets: [{
|
|
384
410
|
label: "Events",
|
|
385
|
-
data:
|
|
386
|
-
color:
|
|
411
|
+
data: Q.aiEvents.eventsOverTime,
|
|
412
|
+
color: A.accent
|
|
387
413
|
}],
|
|
388
414
|
height: 250
|
|
389
415
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ w("div", {
|
|
391
417
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ C(D, {
|
|
393
419
|
title: "By Source",
|
|
394
|
-
data:
|
|
395
|
-
}), /* @__PURE__ */
|
|
420
|
+
data: Q.aiEvents.bySource
|
|
421
|
+
}), /* @__PURE__ */ C(d, {
|
|
396
422
|
title: "By Event Type",
|
|
397
|
-
data:
|
|
423
|
+
data: Q.aiEvents.byEventType,
|
|
398
424
|
keyLabel: "Event Type"
|
|
399
425
|
})]
|
|
400
426
|
})
|
|
401
427
|
]
|
|
402
428
|
}) : null,
|
|
403
|
-
|
|
429
|
+
H === "audit" && Q?.audit ? /* @__PURE__ */ w("div", {
|
|
404
430
|
className: "space-y-4",
|
|
405
431
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ C(M, {
|
|
407
433
|
label: "Total Audit Logs",
|
|
408
|
-
value:
|
|
434
|
+
value: Q.audit.total
|
|
409
435
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ C(E, {
|
|
411
437
|
title: "Audit Events Over Time",
|
|
412
438
|
datasets: [{
|
|
413
439
|
label: "Events",
|
|
414
|
-
data:
|
|
415
|
-
color:
|
|
440
|
+
data: Q.audit.eventsOverTime,
|
|
441
|
+
color: A.warning
|
|
416
442
|
}],
|
|
417
443
|
height: 250
|
|
418
444
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ w("div", {
|
|
420
446
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ C(D, {
|
|
422
448
|
title: "By Action",
|
|
423
|
-
data:
|
|
424
|
-
}), /* @__PURE__ */
|
|
449
|
+
data: Q.audit.byAction
|
|
450
|
+
}), /* @__PURE__ */ C(D, {
|
|
425
451
|
title: "By Status",
|
|
426
|
-
data:
|
|
452
|
+
data: Q.audit.byStatus
|
|
427
453
|
})]
|
|
428
454
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ C(d, {
|
|
430
456
|
title: "By Resource Type",
|
|
431
|
-
data:
|
|
457
|
+
data: Q.audit.byResourceType,
|
|
432
458
|
keyLabel: "Resource"
|
|
433
459
|
})
|
|
434
460
|
]
|
|
435
461
|
}) : null,
|
|
436
|
-
|
|
462
|
+
H === "docs" && Q?.docs ? /* @__PURE__ */ w("div", {
|
|
437
463
|
className: "space-y-4",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ w("div", {
|
|
439
465
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
440
466
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ C(M, {
|
|
442
468
|
label: "Sites",
|
|
443
|
-
value:
|
|
469
|
+
value: Q.docs.totalSites
|
|
444
470
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ C(M, {
|
|
446
472
|
label: "Pages",
|
|
447
|
-
value:
|
|
473
|
+
value: Q.docs.totalPages
|
|
448
474
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ C(M, {
|
|
450
476
|
label: "Revisions",
|
|
451
|
-
value:
|
|
477
|
+
value: Q.docs.totalRevisions
|
|
452
478
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ C(M, {
|
|
454
480
|
label: "Build Success",
|
|
455
|
-
value:
|
|
456
|
-
variant:
|
|
481
|
+
value: Q.docs.buildSuccessRate == null ? "N/A" : `${Q.docs.buildSuccessRate.toFixed(1)}%`,
|
|
482
|
+
variant: Q.docs.buildSuccessRate != null && Q.docs.buildSuccessRate >= 90 ? "success" : "warning"
|
|
457
483
|
})
|
|
458
484
|
]
|
|
459
|
-
}), /* @__PURE__ */
|
|
485
|
+
}), /* @__PURE__ */ w("div", {
|
|
460
486
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ C(D, {
|
|
462
488
|
title: "Pages by Status",
|
|
463
|
-
data:
|
|
464
|
-
}), /* @__PURE__ */
|
|
489
|
+
data: Q.docs.pagesByStatus
|
|
490
|
+
}), /* @__PURE__ */ C(D, {
|
|
465
491
|
title: "Revisions by Status",
|
|
466
|
-
data:
|
|
492
|
+
data: Q.docs.revisionsByStatus
|
|
467
493
|
})]
|
|
468
494
|
})]
|
|
469
495
|
}) : null
|
|
@@ -471,42 +497,67 @@ function k() {
|
|
|
471
497
|
})
|
|
472
498
|
})
|
|
473
499
|
]
|
|
474
|
-
}) : /* @__PURE__ */
|
|
500
|
+
}) : /* @__PURE__ */ w(T, {
|
|
475
501
|
className: "min-h-screen space-y-6 bg-bg-surface p-4 sm:p-6",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ C(r, { title: W("nav.analytics", "Analytics") }), /* @__PURE__ */ C("div", {
|
|
477
503
|
className: "text-sm text-text-secondary",
|
|
478
504
|
children: "Waiting for workspace context…"
|
|
479
505
|
})]
|
|
480
|
-
}) : /* @__PURE__ */
|
|
506
|
+
}) : /* @__PURE__ */ C("div", {
|
|
481
507
|
className: "flex items-center justify-center min-h-[400px]",
|
|
482
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ w("div", {
|
|
483
509
|
className: "text-center space-y-2",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
510
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
485
511
|
className: "text-lg font-semibold text-foreground",
|
|
486
512
|
children: "Access Denied"
|
|
487
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ C("p", {
|
|
488
514
|
className: "text-sm text-text-secondary",
|
|
489
515
|
children: "You don't have permission to access this page."
|
|
490
516
|
})]
|
|
491
517
|
})
|
|
492
518
|
});
|
|
493
519
|
}
|
|
494
|
-
function
|
|
495
|
-
return /* @__PURE__ */
|
|
520
|
+
function M({ label: e, value: t, variant: n }) {
|
|
521
|
+
return /* @__PURE__ */ w("div", {
|
|
496
522
|
className: `${n === "success" ? "bg-status-success-bg/10" : n === "warning" ? "bg-status-warning-bg/10" : n === "error" ? "bg-status-error-bg/10" : "bg-bg-surface"} rounded-lg border border-border-default p-3`,
|
|
497
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ C("p", {
|
|
498
524
|
className: "text-xs text-text-secondary",
|
|
499
525
|
children: e
|
|
500
|
-
}), /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ C("p", {
|
|
501
527
|
className: "mt-1 text-xl font-bold text-text-primary",
|
|
502
528
|
children: typeof t == "number" ? t.toLocaleString() : t
|
|
503
529
|
})]
|
|
504
530
|
});
|
|
505
531
|
}
|
|
506
|
-
function
|
|
532
|
+
function N(e) {
|
|
507
533
|
return e < 1e3 ? `${Math.round(e)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(1)}s` : `${Math.floor(e / 6e4)}m ${Math.round(e % 6e4 / 1e3)}s`;
|
|
508
534
|
}
|
|
535
|
+
function P(e) {
|
|
536
|
+
return e.map((e) => e.map((e) => {
|
|
537
|
+
let t = e == null ? "" : String(e);
|
|
538
|
+
return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
539
|
+
}).join(",")).join("\r\n");
|
|
540
|
+
}
|
|
541
|
+
function F(e, t) {
|
|
542
|
+
let n = [];
|
|
543
|
+
if (e === "overview") return n.push(["metric", "value"]), t.sessions && n.push(["sessions.total", t.sessions.total ?? 0]), t.agents && n.push(["agents.total", t.agents.total ?? 0]), t.vibes && n.push(["vibes.total", t.vibes.total ?? 0]), t.actions && n.push(["actions.total", t.actions.total ?? 0]), n;
|
|
544
|
+
if (e === "agents" && t.agents) {
|
|
545
|
+
if (n.push(["metric", "value"]), n.push(["total", t.agents.total ?? 0]), n.push(["active", t.agents.active ?? 0]), n.push(["inactive", t.agents.inactive ?? 0]), n.push(["staleHeartbeat", t.agents.staleHeartbeatCount ?? 0]), Array.isArray(t.agents.byPlatform)) {
|
|
546
|
+
n.push([], ["platform", "count"]);
|
|
547
|
+
for (let e of t.agents.byPlatform) n.push([e.key ?? e.label ?? "", e.count ?? 0]);
|
|
548
|
+
}
|
|
549
|
+
return n;
|
|
550
|
+
}
|
|
551
|
+
if (e === "sessions" && t.sessions) {
|
|
552
|
+
if (n.push(["metric", "value"]), n.push(["total", t.sessions.total ?? 0]), n.push(["running", t.sessions.active ?? 0]), n.push(["avgDurationMs", t.sessions.avgDurationMs ?? ""]), Array.isArray(t.sessions.byType)) {
|
|
553
|
+
n.push([], ["type", "count"]);
|
|
554
|
+
for (let e of t.sessions.byType) n.push([e.key ?? e.label ?? "", e.count ?? 0]);
|
|
555
|
+
}
|
|
556
|
+
return n;
|
|
557
|
+
}
|
|
558
|
+
return e === "actions" && t.actions ? (n.push(["metric", "value"]), n.push(["total", t.actions.total ?? 0]), n.push(["totalExecutions", t.actions.totalExecutions ?? 0]), n.push(["successRate", t.actions.successRate ?? ""]), n.push(["avgDurationMs", t.actions.avgDurationMs ?? ""]), n) : e === "vibes" && t.vibes ? (n.push(["metric", "value"]), n.push(["total", t.vibes.total ?? 0]), n.push(["withAgent", t.vibes.withAgent ?? 0]), n.push(["withoutAgent", t.vibes.withoutAgent ?? 0]), n) : e === "vibedecks" && t.vibeDecks ? (n.push(["metric", "value"]), n.push(["decks", t.vibeDecks.totalDecks ?? 0]), n.push(["buttons", t.vibeDecks.totalButtons ?? 0]), n) : e === "aievents" && t.aiEvents ? (n.push(["metric", "value"]), n.push(["total", t.aiEvents.total ?? 0]), n) : e === "audit" && t.audit ? (n.push(["metric", "value"]), n.push(["total", t.audit.total ?? 0]), n) : e === "docs" && t.docs ? (n.push(["metric", "value"]), n.push(["sites", t.docs.totalSites ?? 0]), n.push(["pages", t.docs.totalPages ?? 0]), n.push(["revisions", t.docs.totalRevisions ?? 0]), n.push(["buildSuccessRate", t.docs.buildSuccessRate ?? ""]), n) : (n.push(["metric", "value"]), n.push(["note", `No CSV serialiser for ${e} tab yet`]), n);
|
|
559
|
+
}
|
|
509
560
|
//#endregion
|
|
510
|
-
export {
|
|
561
|
+
export { j as AnalyticsPage };
|
|
511
562
|
|
|
512
563
|
//# sourceMappingURL=AnalyticsPage.js.map
|