@burdenoff/microfe-vibecontrols 2026.1117.2 → 2026.1123.2
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/components/agents/OpenInBrowserEditorButton.js +94 -95
- package/dist/components/agents/PluginUIPanel.js +122 -116
- package/dist/components/gitops/VibeGitOpsTab.js +150 -147
- package/dist/components/scorecard/ScorecardPanel.js +79 -69
- package/dist/components/sessions/TerminalIframe.js +37 -17
- package/dist/components/sessions/TerminalPanel.js +2 -2
- package/dist/pages/SessionDetailsPage.js +495 -492
- package/dist/pages/SessionsPage.js +962 -961
- package/dist/pages/SharedSessionPage.js +27 -25
- package/dist/utils/iframeUrl.d.ts +26 -0
- package/dist/utils/iframeUrl.js +63 -0
- package/package.json +1 -1
|
@@ -9,117 +9,118 @@ import { useVibeControls as a } from "../../providers/VibeControlsProvider.js";
|
|
|
9
9
|
import { useGitopsContributors as ee, useGitopsIssues as te, useGitopsLanguages as ne, useGitopsPipelineAnalytics as re, useGitopsProviders as ie, useGitopsPullRequests as ae, useGitopsRepos as o, useGitopsRuns as oe, useGitopsSecurityAlerts as se } from "../../hooks/useGitops.js";
|
|
10
10
|
import { composeCiStatus as ce, composeRepoStats as le } from "./types.js";
|
|
11
11
|
import { appendIframeTokenQuery as s, mintIframeToken as c, scheduleIframeTokenRefresh as l } from "../../services/iframeToken.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { getSafeTunnelIframeUrl as ue } from "../../utils/iframeUrl.js";
|
|
13
|
+
import { useCallback as de, useEffect as u, useMemo as d, useState as f } from "react";
|
|
14
|
+
import { BarChart3 as fe, GitBranch as pe, GitMerge as p, Play as m, RefreshCw as h } from "lucide-react";
|
|
15
|
+
import { useQueryClient as me } from "@tanstack/react-query";
|
|
16
|
+
import { motion as he } from "framer-motion";
|
|
17
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
17
18
|
// src/components/gitops/VibeGitOpsTab.tsx
|
|
18
|
-
var
|
|
19
|
-
let [
|
|
20
|
-
profile:
|
|
21
|
-
workspaceId:
|
|
22
|
-
agentId:
|
|
19
|
+
var y = ({ vibeId: y, agentId: S, profile: C, tunnelUrl: w, tr: T }) => {
|
|
20
|
+
let [E, ge] = f("repo-stats"), [D, O] = f(!1), [k, A] = f(null), [j, _e] = f(null), { workspaceId: M } = a(), N = me(), P = d(() => ({
|
|
21
|
+
profile: C,
|
|
22
|
+
workspaceId: M ?? "",
|
|
23
|
+
agentId: S
|
|
23
24
|
}), [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
]),
|
|
28
|
-
|
|
29
|
-
if (!
|
|
30
|
-
let e =
|
|
31
|
-
e &&
|
|
25
|
+
C,
|
|
26
|
+
M,
|
|
27
|
+
S
|
|
28
|
+
]), F = ie(P), I = d(() => F.data?.filter((e) => e.registered && e.authenticated) ?? [], [F.data]), L = I.length > 0;
|
|
29
|
+
u(() => {
|
|
30
|
+
if (!k && I.length > 0) {
|
|
31
|
+
let e = I[0];
|
|
32
|
+
e && A(e.name);
|
|
32
33
|
}
|
|
33
|
-
}, [
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
if (!
|
|
37
|
-
let e =
|
|
38
|
-
e &&
|
|
34
|
+
}, [I, k]);
|
|
35
|
+
let R = o(P, k, { limit: 30 });
|
|
36
|
+
u(() => {
|
|
37
|
+
if (!j && R.data?.items.length) {
|
|
38
|
+
let e = R.data.items[0];
|
|
39
|
+
e && _e(e.fqn);
|
|
39
40
|
}
|
|
40
|
-
}, [
|
|
41
|
-
let
|
|
41
|
+
}, [R.data, j]);
|
|
42
|
+
let z = o(P, k, { limit: 1 });
|
|
42
43
|
o.length;
|
|
43
|
-
let
|
|
44
|
+
let B = ae(P, k, j, {
|
|
44
45
|
state: "open",
|
|
45
46
|
limit: 100
|
|
46
|
-
}),
|
|
47
|
+
}), V = te(P, k, j, {
|
|
47
48
|
state: "open",
|
|
48
49
|
limit: 100
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]),
|
|
54
|
-
repo:
|
|
55
|
-
pulls:
|
|
56
|
-
issues:
|
|
57
|
-
languages:
|
|
58
|
-
contributors:
|
|
59
|
-
securityAlerts:
|
|
50
|
+
}), H = ne(P, k, j), U = ee(P, k, j, 20), W = se(P, k, j), G = d(() => j ? z.data?.items.find((e) => e.fqn === j) ?? R.data?.items.find((e) => e.fqn === j) ?? null : z.data?.items[0] ?? null, [
|
|
51
|
+
z.data,
|
|
52
|
+
R.data,
|
|
53
|
+
j
|
|
54
|
+
]), ve = d(() => le({
|
|
55
|
+
repo: G,
|
|
56
|
+
pulls: B.data,
|
|
57
|
+
issues: V.data,
|
|
58
|
+
languages: H.data,
|
|
59
|
+
contributors: U.data,
|
|
60
|
+
securityAlerts: W.data
|
|
60
61
|
}), [
|
|
61
|
-
|
|
62
|
+
G,
|
|
63
|
+
B.data,
|
|
64
|
+
V.data,
|
|
62
65
|
H.data,
|
|
63
66
|
U.data,
|
|
64
|
-
W.data
|
|
65
|
-
|
|
66
|
-
K.data
|
|
67
|
-
]), J = oe(I, j, N, { limit: 30 }), Y = re(I, j, N), ge = f(() => ce({
|
|
67
|
+
W.data
|
|
68
|
+
]), K = oe(P, k, j, { limit: 30 }), q = re(P, k, j), ye = d(() => ce({
|
|
68
69
|
pipelines: void 0,
|
|
69
|
-
runs:
|
|
70
|
-
analytics:
|
|
71
|
-
}), [
|
|
72
|
-
|
|
70
|
+
runs: K.data,
|
|
71
|
+
analytics: q.data
|
|
72
|
+
}), [K.data, q.data]), be = B.isLoading || V.isLoading || H.isLoading, xe = K.isLoading || q.isLoading, J = (B.error || V.error || H.error)?.message, Se = (K.error || q.error)?.message, Ce = de(() => {
|
|
73
|
+
N.invalidateQueries({ queryKey: [
|
|
73
74
|
"gitops",
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
M ?? "",
|
|
76
|
+
S,
|
|
77
|
+
C
|
|
77
78
|
] });
|
|
78
79
|
}, [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]),
|
|
80
|
+
N,
|
|
81
|
+
M,
|
|
82
|
+
S,
|
|
83
|
+
C
|
|
84
|
+
]), Y = B.isFetching || K.isFetching, we = [
|
|
84
85
|
{
|
|
85
86
|
id: "repo-stats",
|
|
86
|
-
label:
|
|
87
|
-
icon:
|
|
87
|
+
label: T("gitops.repoStats", "Repo Stats"),
|
|
88
|
+
icon: fe
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
91
|
id: "ci",
|
|
91
|
-
label:
|
|
92
|
-
icon:
|
|
92
|
+
label: T("gitops.ci", "CI Pipelines"),
|
|
93
|
+
icon: m
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
96
|
id: "git-ui",
|
|
96
|
-
label:
|
|
97
|
-
icon:
|
|
97
|
+
label: T("gitops.gitUI", "Git UI"),
|
|
98
|
+
icon: pe
|
|
98
99
|
}
|
|
99
|
-
], [
|
|
100
|
-
return
|
|
100
|
+
], [X, Z] = f(null), [Q, Te] = f(null), $ = d(() => ue(X), [X]);
|
|
101
|
+
return u(() => {
|
|
101
102
|
let e = !1, t = null;
|
|
102
103
|
return (async () => {
|
|
103
|
-
if (!
|
|
104
|
+
if (!S || !w || E !== "git-ui") Z(null);
|
|
104
105
|
else try {
|
|
105
|
-
let n = await c(
|
|
106
|
+
let n = await c(S, C, "/git");
|
|
106
107
|
if (e) return;
|
|
107
|
-
let r = `${
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
let r = `${w.replace(/\/$/, "")}/git/`;
|
|
109
|
+
Z(s(r, n.token)), t = l(S, C, "/git", n, (e) => {
|
|
110
|
+
Z(s(r, e.token));
|
|
110
111
|
});
|
|
111
112
|
} catch (t) {
|
|
112
|
-
e ||
|
|
113
|
+
e || Te(t instanceof Error ? t.message : "Failed to fetch iframe token");
|
|
113
114
|
}
|
|
114
115
|
})(), () => {
|
|
115
116
|
e = !0, t?.cancel();
|
|
116
117
|
};
|
|
117
118
|
}, [
|
|
119
|
+
S,
|
|
120
|
+
C,
|
|
118
121
|
w,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
O
|
|
122
|
-
]), /* @__PURE__ */ b(fe.div, {
|
|
122
|
+
E
|
|
123
|
+
]), /* @__PURE__ */ v(he.div, {
|
|
123
124
|
initial: {
|
|
124
125
|
opacity: 0,
|
|
125
126
|
y: 8
|
|
@@ -134,124 +135,126 @@ var x = ({ vibeId: x, agentId: w, profile: T, tunnelUrl: E, tr: D }) => {
|
|
|
134
135
|
},
|
|
135
136
|
transition: { duration: .2 },
|
|
136
137
|
className: "space-y-4",
|
|
137
|
-
"data-vibe-id":
|
|
138
|
-
children: [/* @__PURE__ */
|
|
138
|
+
"data-vibe-id": y,
|
|
139
|
+
children: [/* @__PURE__ */ v("div", {
|
|
139
140
|
className: "flex items-center justify-between",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ v("div", {
|
|
141
142
|
className: "flex items-center gap-2",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ _(p, { className: "size-5 text-text-secondary" }), /* @__PURE__ */ _("h3", {
|
|
143
144
|
className: "font-semibold text-text-primary",
|
|
144
|
-
children:
|
|
145
|
+
children: T("vibeDetails.gitopsTitle", "GitOps")
|
|
145
146
|
})]
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ v("div", {
|
|
147
148
|
className: "flex items-center gap-2",
|
|
148
149
|
children: [
|
|
149
|
-
|
|
150
|
-
providers:
|
|
151
|
-
selected:
|
|
152
|
-
onChange:
|
|
150
|
+
L && /* @__PURE__ */ _(i, {
|
|
151
|
+
providers: I.map((e) => e.name),
|
|
152
|
+
selected: k,
|
|
153
|
+
onChange: A
|
|
153
154
|
}),
|
|
154
|
-
|
|
155
|
+
L && (E === "repo-stats" || E === "ci") && /* @__PURE__ */ v("button", {
|
|
155
156
|
type: "button",
|
|
156
|
-
onClick:
|
|
157
|
-
disabled:
|
|
157
|
+
onClick: Ce,
|
|
158
|
+
disabled: Y,
|
|
158
159
|
className: "flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md border border-border-default text-text-secondary hover:text-text-primary hover:border-border-strong disabled:opacity-50 transition-colors",
|
|
159
160
|
"data-testid": "gitops-refresh",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ _(h, { className: `size-3 ${Y ? "animate-spin" : ""}` }), T("gitops.refresh", "Refresh")]
|
|
161
162
|
}),
|
|
162
|
-
!
|
|
163
|
+
!D && /* @__PURE__ */ _("button", {
|
|
163
164
|
type: "button",
|
|
164
|
-
onClick: () =>
|
|
165
|
+
onClick: () => O(!0),
|
|
165
166
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
166
167
|
"data-testid": "gitops-add-provider",
|
|
167
|
-
children:
|
|
168
|
+
children: T(L ? "gitops.addAnotherProvider" : "gitops.addProvider", "Add Provider")
|
|
168
169
|
})
|
|
169
170
|
]
|
|
170
171
|
})]
|
|
171
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ v("div", {
|
|
172
173
|
className: "flex flex-col gap-4 lg:flex-row lg:gap-6",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ _("nav", {
|
|
174
175
|
className: "w-full flex-shrink-0 rounded-lg border border-border-default bg-bg-surface p-2 lg:w-56",
|
|
175
176
|
role: "tablist",
|
|
176
|
-
"aria-label":
|
|
177
|
-
children:
|
|
178
|
-
let t = e.icon, n =
|
|
179
|
-
return /* @__PURE__ */
|
|
177
|
+
"aria-label": T("gitops.navigation", "GitOps navigation"),
|
|
178
|
+
children: we.map((e) => {
|
|
179
|
+
let t = e.icon, n = E === e.id;
|
|
180
|
+
return /* @__PURE__ */ v("button", {
|
|
180
181
|
type: "button",
|
|
181
182
|
role: "tab",
|
|
182
183
|
"aria-selected": n,
|
|
183
|
-
onClick: () =>
|
|
184
|
+
onClick: () => ge(e.id),
|
|
184
185
|
className: `flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm font-medium transition-colors ${n ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-secondary hover:bg-action-ghost-bg-hover hover:text-text-primary"}`,
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ _(t, { className: "size-4 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
186
187
|
className: "truncate",
|
|
187
188
|
children: e.label
|
|
188
189
|
})]
|
|
189
190
|
}, e.id);
|
|
190
191
|
})
|
|
191
|
-
}), /* @__PURE__ */
|
|
192
|
+
}), /* @__PURE__ */ v("div", {
|
|
192
193
|
className: "min-w-0 flex-1 space-y-4",
|
|
193
194
|
children: [
|
|
194
|
-
|
|
195
|
-
ctx:
|
|
195
|
+
D && /* @__PURE__ */ _(r, {
|
|
196
|
+
ctx: P,
|
|
196
197
|
onCreated: () => {
|
|
197
|
-
|
|
198
|
+
O(!1), F.refetch();
|
|
198
199
|
},
|
|
199
|
-
onCancel: () =>
|
|
200
|
+
onCancel: () => O(!1)
|
|
200
201
|
}),
|
|
201
|
-
|
|
202
|
-
stats:
|
|
203
|
-
loading:
|
|
204
|
-
error:
|
|
205
|
-
}) : /* @__PURE__ */
|
|
206
|
-
tr:
|
|
202
|
+
E === "repo-stats" && !D && /* @__PURE__ */ _(g, { children: L ? S ? /* @__PURE__ */ _(e, {
|
|
203
|
+
stats: ve,
|
|
204
|
+
loading: be || F.isLoading,
|
|
205
|
+
error: J
|
|
206
|
+
}) : /* @__PURE__ */ _(x, {
|
|
207
|
+
tr: T,
|
|
207
208
|
message: "gitops.noTunnel",
|
|
208
209
|
fallback: "Waiting for agent tunnel. Make sure the agent is running and a tunnel is active."
|
|
209
|
-
}) : /* @__PURE__ */
|
|
210
|
-
tr:
|
|
211
|
-
icon:
|
|
210
|
+
}) : /* @__PURE__ */ _(b, {
|
|
211
|
+
tr: T,
|
|
212
|
+
icon: p,
|
|
212
213
|
message: "gitops.noProvidersVibe",
|
|
213
214
|
fallback: "No GitOps provider configured. Add a PAT to see repository stats.",
|
|
214
|
-
ctaLabel:
|
|
215
|
-
onCta: () =>
|
|
215
|
+
ctaLabel: T("gitops.addProvider", "Add Provider"),
|
|
216
|
+
onCta: () => O(!0)
|
|
216
217
|
}) }),
|
|
217
|
-
|
|
218
|
-
status:
|
|
219
|
-
loading:
|
|
220
|
-
error:
|
|
221
|
-
}) : /* @__PURE__ */
|
|
222
|
-
tr:
|
|
218
|
+
E === "ci" && !D && /* @__PURE__ */ _(g, { children: L ? S ? /* @__PURE__ */ _(t, {
|
|
219
|
+
status: ye,
|
|
220
|
+
loading: xe || F.isLoading,
|
|
221
|
+
error: Se
|
|
222
|
+
}) : /* @__PURE__ */ _(x, {
|
|
223
|
+
tr: T,
|
|
223
224
|
message: "gitops.noTunnelCi",
|
|
224
225
|
fallback: "Waiting for agent tunnel."
|
|
225
|
-
}) : /* @__PURE__ */
|
|
226
|
-
tr:
|
|
227
|
-
icon:
|
|
226
|
+
}) : /* @__PURE__ */ _(b, {
|
|
227
|
+
tr: T,
|
|
228
|
+
icon: m,
|
|
228
229
|
message: "gitops.noProvidersCi",
|
|
229
230
|
fallback: "No GitOps provider configured. Add a PAT to see CI pipeline status.",
|
|
230
|
-
ctaLabel:
|
|
231
|
-
onCta: () =>
|
|
231
|
+
ctaLabel: T("gitops.addProvider", "Add Provider"),
|
|
232
|
+
onCta: () => O(!0)
|
|
232
233
|
}) }),
|
|
233
|
-
|
|
234
|
-
agentId:
|
|
234
|
+
E === "git-ui" && /* @__PURE__ */ _(n, {
|
|
235
|
+
agentId: S || null,
|
|
235
236
|
required: ["@vibecontrols/vibe-plugin-tool-git"],
|
|
236
237
|
mode: "all",
|
|
237
|
-
eyebrow:
|
|
238
|
-
title:
|
|
239
|
-
description:
|
|
240
|
-
children:
|
|
238
|
+
eyebrow: T("gitops.ungitEyebrow", "Ungit plugin required"),
|
|
239
|
+
title: T("gitops.ungitTitle", "Install the visual git client"),
|
|
240
|
+
description: T("gitops.ungitDescription", "The Git UI embeds the Ungit visual git client served by your agent. Install the plugin to continue."),
|
|
241
|
+
children: Q ? /* @__PURE__ */ _("div", {
|
|
241
242
|
className: "rounded-lg border border-border-default bg-status-error-bg-subtle p-4",
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ _("p", {
|
|
243
244
|
className: "text-sm text-status-error-text",
|
|
244
|
-
children:
|
|
245
|
+
children: Q
|
|
245
246
|
})
|
|
246
|
-
}) :
|
|
247
|
-
src:
|
|
247
|
+
}) : $ ? /* @__PURE__ */ _("iframe", {
|
|
248
|
+
src: $,
|
|
248
249
|
title: "Ungit",
|
|
249
|
-
className: "w-full min-h-[600px] rounded-lg border border-border-default"
|
|
250
|
-
|
|
250
|
+
className: "w-full min-h-[600px] rounded-lg border border-border-default",
|
|
251
|
+
sandbox: "allow-scripts allow-same-origin allow-forms",
|
|
252
|
+
referrerPolicy: "no-referrer"
|
|
253
|
+
}) : /* @__PURE__ */ _("div", {
|
|
251
254
|
className: "rounded-lg border border-border-default bg-bg-sunken p-4",
|
|
252
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ _("p", {
|
|
253
256
|
className: "text-sm text-text-secondary",
|
|
254
|
-
children:
|
|
257
|
+
children: T("gitops.ungitLoading", "Loading Ungit…")
|
|
255
258
|
})
|
|
256
259
|
})
|
|
257
260
|
})
|
|
@@ -259,26 +262,26 @@ var x = ({ vibeId: x, agentId: w, profile: T, tunnelUrl: E, tr: D }) => {
|
|
|
259
262
|
})]
|
|
260
263
|
})]
|
|
261
264
|
}, "gitops");
|
|
262
|
-
},
|
|
265
|
+
}, b = ({ tr: e, icon: t, message: n, fallback: r, ctaLabel: i, onCta: a }) => /* @__PURE__ */ v("div", {
|
|
263
266
|
className: "rounded-lg border border-border-default bg-bg-surface p-6 text-center",
|
|
264
267
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ _(t, { className: "size-8 text-text-secondary mx-auto mb-3" }),
|
|
269
|
+
/* @__PURE__ */ _("p", {
|
|
267
270
|
className: "text-sm text-text-secondary",
|
|
268
271
|
children: e(n, r)
|
|
269
272
|
}),
|
|
270
|
-
i && a && /* @__PURE__ */
|
|
273
|
+
i && a && /* @__PURE__ */ _("button", {
|
|
271
274
|
type: "button",
|
|
272
275
|
onClick: a,
|
|
273
276
|
className: "mt-3 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
274
277
|
children: i
|
|
275
278
|
})
|
|
276
279
|
]
|
|
277
|
-
}),
|
|
280
|
+
}), x = ({ tr: e, message: t, fallback: n }) => /* @__PURE__ */ _("div", {
|
|
278
281
|
className: "rounded-lg border border-border-default bg-bg-sunken p-4",
|
|
279
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ _("p", {
|
|
280
283
|
className: "text-sm text-text-secondary",
|
|
281
284
|
children: e(t, n)
|
|
282
285
|
})
|
|
283
286
|
});
|
|
284
|
-
export {
|
|
287
|
+
export { y as VibeGitOpsTab };
|