@parallelworks/tandem-web 0.184.0 → 0.186.0
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/_virtual/_virtual_i18n/en/common.js +10 -1
- package/_virtual/_virtual_i18n/es/common.js +10 -1
- package/_virtual/_virtual_i18n/ja/common.js +10 -1
- package/_virtual/_virtual_i18n/ko/common.js +10 -1
- package/_virtual/_virtual_i18n/zh/common.js +10 -1
- package/components/DocsTree.js +149 -139
- package/components/FavoriteStar.js +13 -1
- package/components/FavoritesNav.js +168 -112
- package/components/NewProjectDialog.js +170 -163
- package/components/ParentProjectSelect.js +35 -0
- package/lib/projects.js +9 -1
- package/package.json +1 -1
- package/pages/areas.js +183 -173
- package/pages/decisions.js +61 -57
- package/pages/projects.js +43 -34
- package/pages/triage.js +197 -184
- package/routes/_workspace/agents/index2.js +95 -87
- package/routes/_workspace/dashboards/index2.js +61 -53
- package/routes/_workspace/docs/space2._space.js +105 -94
- package/routes/_workspace/graph3.js +69 -60
- package/routes/_workspace/measures3.js +82 -74
- package/routes/_workspace/notifications2.js +236 -230
- package/routes/_workspace/projects/_projectId3.js +286 -287
- package/routes/_workspace/teams/_key/cycles/index2.js +98 -88
- package/routes/_workspace2.js +3 -2
|
@@ -2,33 +2,41 @@ import { windows as e } from "./measures.js";
|
|
|
2
2
|
import { measuresQuery as t } from "../../api/queries.js";
|
|
3
3
|
import { useMoney as n } from "../../components/AgentWork.js";
|
|
4
4
|
import { AreaLink as r } from "../../components/AreaLink.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { FavoriteStar as i } from "../../components/FavoriteStar.js";
|
|
6
|
+
import { usePageTitle as a } from "../../lib/pageTitle.js";
|
|
7
|
+
import { Link as o } from "../../lib/router.js";
|
|
8
|
+
import { Route as s } from "./measures2.js";
|
|
9
|
+
import { SegmentedControl as c } from "@parallelworks/ui";
|
|
10
|
+
import { useFormatter as l, useTranslations as u } from "use-intl";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { useSuspenseQuery as p } from "@tanstack/react-query";
|
|
12
13
|
// src/routes/$workspace/measures.tsx?tsr-split=component
|
|
13
|
-
function
|
|
14
|
-
let n =
|
|
15
|
-
|
|
16
|
-
let { workspace:
|
|
17
|
-
return /* @__PURE__ */
|
|
14
|
+
function m() {
|
|
15
|
+
let n = u("measures");
|
|
16
|
+
a(n("title"));
|
|
17
|
+
let { workspace: l } = s.useParams(), { days: m = "30" } = s.useSearch(), g = s.useNavigate(), { data: y } = p(t(l, Number(m)));
|
|
18
|
+
return /* @__PURE__ */ f("div", {
|
|
18
19
|
className: "w-full space-y-10 px-4 py-6 md:px-8 md:py-8",
|
|
19
20
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ f("div", {
|
|
21
22
|
className: "flex flex-wrap items-end justify-between gap-4",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
-
className: "
|
|
24
|
-
children:
|
|
25
|
-
|
|
23
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
|
|
24
|
+
className: "flex items-center gap-2",
|
|
25
|
+
children: [/* @__PURE__ */ d("h1", {
|
|
26
|
+
className: "text-xl font-semibold tracking-tight",
|
|
27
|
+
children: n("title")
|
|
28
|
+
}), /* @__PURE__ */ d(i, {
|
|
29
|
+
workspace: l,
|
|
30
|
+
kind: "page",
|
|
31
|
+
target: "measures"
|
|
32
|
+
})]
|
|
33
|
+
}), /* @__PURE__ */ d("p", {
|
|
26
34
|
className: "mt-1 text-sm text-muted-foreground",
|
|
27
35
|
children: n("description")
|
|
28
|
-
})] }), /* @__PURE__ */
|
|
36
|
+
})] }), /* @__PURE__ */ d(c, {
|
|
29
37
|
label: n("window"),
|
|
30
|
-
value:
|
|
31
|
-
onValueChange: (e) =>
|
|
38
|
+
value: m,
|
|
39
|
+
onValueChange: (e) => g({
|
|
32
40
|
search: { days: e },
|
|
33
41
|
replace: !0
|
|
34
42
|
}),
|
|
@@ -38,28 +46,28 @@ function p() {
|
|
|
38
46
|
}))
|
|
39
47
|
})]
|
|
40
48
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ d(h, { queue: y.queue }),
|
|
50
|
+
/* @__PURE__ */ d(_, { states: y.states }),
|
|
51
|
+
/* @__PURE__ */ f("section", {
|
|
44
52
|
"aria-label": n("cost"),
|
|
45
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
46
54
|
className: "text-sm font-semibold",
|
|
47
55
|
children: n("cost")
|
|
48
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ f("div", {
|
|
49
57
|
className: "mt-3 grid gap-6 lg:grid-cols-3",
|
|
50
58
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ d(v, {
|
|
52
60
|
title: n("byIssue"),
|
|
53
|
-
rows:
|
|
54
|
-
link: (e) => /* @__PURE__ */
|
|
61
|
+
rows: y.issues,
|
|
62
|
+
link: (e) => /* @__PURE__ */ f(o, {
|
|
55
63
|
to: "/$workspace/issues/$identifier",
|
|
56
64
|
params: {
|
|
57
|
-
workspace:
|
|
65
|
+
workspace: l,
|
|
58
66
|
identifier: e.key
|
|
59
67
|
},
|
|
60
68
|
className: "hover:underline",
|
|
61
69
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ d("span", {
|
|
63
71
|
className: "text-muted-foreground",
|
|
64
72
|
children: e.key
|
|
65
73
|
}),
|
|
@@ -68,23 +76,23 @@ function p() {
|
|
|
68
76
|
]
|
|
69
77
|
})
|
|
70
78
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ d(v, {
|
|
72
80
|
title: n("byArea"),
|
|
73
|
-
rows:
|
|
74
|
-
link: (e) => /* @__PURE__ */
|
|
75
|
-
workspace:
|
|
81
|
+
rows: y.areas,
|
|
82
|
+
link: (e) => /* @__PURE__ */ d(r, {
|
|
83
|
+
workspace: l,
|
|
76
84
|
area: e,
|
|
77
85
|
className: "hover:underline",
|
|
78
86
|
children: e.title
|
|
79
87
|
})
|
|
80
88
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ d(v, {
|
|
82
90
|
title: n("byTeam"),
|
|
83
|
-
rows:
|
|
84
|
-
link: (e) => /* @__PURE__ */
|
|
91
|
+
rows: y.teams,
|
|
92
|
+
link: (e) => /* @__PURE__ */ d(o, {
|
|
85
93
|
to: "/$workspace/teams/$key/settings",
|
|
86
94
|
params: {
|
|
87
|
-
workspace:
|
|
95
|
+
workspace: l,
|
|
88
96
|
key: e.key
|
|
89
97
|
},
|
|
90
98
|
className: "hover:underline",
|
|
@@ -97,32 +105,32 @@ function p() {
|
|
|
97
105
|
]
|
|
98
106
|
});
|
|
99
107
|
}
|
|
100
|
-
function
|
|
101
|
-
let t =
|
|
102
|
-
return /* @__PURE__ */
|
|
108
|
+
function h({ queue: e }) {
|
|
109
|
+
let t = u("measures"), n = l();
|
|
110
|
+
return /* @__PURE__ */ f("section", {
|
|
103
111
|
"aria-label": t("queue"),
|
|
104
112
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ d("h2", {
|
|
106
114
|
className: "text-sm font-semibold",
|
|
107
115
|
children: t("queue")
|
|
108
116
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ d("p", {
|
|
110
118
|
className: "mt-0.5 text-xs text-muted-foreground",
|
|
111
119
|
children: t("queueHelp")
|
|
112
120
|
}),
|
|
113
|
-
e.length === 0 ? /* @__PURE__ */
|
|
121
|
+
e.length === 0 ? /* @__PURE__ */ d("p", {
|
|
114
122
|
className: "mt-3 text-sm text-muted-foreground",
|
|
115
123
|
children: t("noQueue")
|
|
116
|
-
}) : /* @__PURE__ */
|
|
124
|
+
}) : /* @__PURE__ */ d("ul", {
|
|
117
125
|
className: "mt-3 flex flex-wrap gap-2",
|
|
118
|
-
children: e.map((e) => /* @__PURE__ */
|
|
126
|
+
children: e.map((e) => /* @__PURE__ */ f("li", {
|
|
119
127
|
className: "flex items-baseline gap-2 rounded-md border border-border px-3 py-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ d("span", {
|
|
121
129
|
className: "text-lg font-semibold tabular-nums",
|
|
122
130
|
children: n.number(e.queued)
|
|
123
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ d("span", {
|
|
124
132
|
className: "text-sm text-muted-foreground",
|
|
125
|
-
children: e.label ? /* @__PURE__ */
|
|
133
|
+
children: e.label ? /* @__PURE__ */ d("code", {
|
|
126
134
|
className: "font-mono text-xs",
|
|
127
135
|
children: e.label
|
|
128
136
|
}) : t("anyRunner")
|
|
@@ -132,8 +140,8 @@ function m({ queue: e }) {
|
|
|
132
140
|
]
|
|
133
141
|
});
|
|
134
142
|
}
|
|
135
|
-
function
|
|
136
|
-
let e =
|
|
143
|
+
function g() {
|
|
144
|
+
let e = l();
|
|
137
145
|
return (t) => {
|
|
138
146
|
for (let [n, r] of [
|
|
139
147
|
["day", 86400],
|
|
@@ -152,30 +160,30 @@ function h() {
|
|
|
152
160
|
});
|
|
153
161
|
};
|
|
154
162
|
}
|
|
155
|
-
function
|
|
156
|
-
let t =
|
|
157
|
-
return /* @__PURE__ */
|
|
163
|
+
function _({ states: e }) {
|
|
164
|
+
let t = u("measures"), n = u("agentWork.state"), r = g(), i = Math.max(1, ...e.map((e) => e.totalSeconds));
|
|
165
|
+
return /* @__PURE__ */ f("section", {
|
|
158
166
|
"aria-label": t("states"),
|
|
159
167
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ d("h2", {
|
|
161
169
|
className: "text-sm font-semibold",
|
|
162
170
|
children: t("states")
|
|
163
171
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ d("p", {
|
|
165
173
|
className: "mt-0.5 text-xs text-muted-foreground",
|
|
166
174
|
children: t("statesHelp")
|
|
167
175
|
}),
|
|
168
|
-
e.length === 0 ? /* @__PURE__ */
|
|
176
|
+
e.length === 0 ? /* @__PURE__ */ d("p", {
|
|
169
177
|
className: "mt-3 text-sm text-muted-foreground",
|
|
170
178
|
children: t("noRuns")
|
|
171
|
-
}) : /* @__PURE__ */
|
|
179
|
+
}) : /* @__PURE__ */ d("ul", {
|
|
172
180
|
className: "mt-3 max-w-3xl space-y-3",
|
|
173
|
-
children: e.map((e) => /* @__PURE__ */
|
|
181
|
+
children: e.map((e) => /* @__PURE__ */ f("li", { children: [/* @__PURE__ */ f("div", {
|
|
174
182
|
className: "flex items-baseline justify-between gap-3 text-sm",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ d("span", {
|
|
176
184
|
className: "font-medium",
|
|
177
185
|
children: n(e.state)
|
|
178
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ f("span", {
|
|
179
187
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
180
188
|
children: [
|
|
181
189
|
r(e.totalSeconds),
|
|
@@ -187,9 +195,9 @@ function g({ states: e }) {
|
|
|
187
195
|
})
|
|
188
196
|
]
|
|
189
197
|
})]
|
|
190
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ d("div", {
|
|
191
199
|
className: "mt-1 h-2 overflow-hidden rounded-full bg-muted",
|
|
192
|
-
children: /* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ d("div", {
|
|
193
201
|
className: "h-full rounded-full bg-agent",
|
|
194
202
|
style: { width: `${e.totalSeconds / i * 100}%` }
|
|
195
203
|
})
|
|
@@ -198,30 +206,30 @@ function g({ states: e }) {
|
|
|
198
206
|
]
|
|
199
207
|
});
|
|
200
208
|
}
|
|
201
|
-
function
|
|
202
|
-
let i =
|
|
203
|
-
return /* @__PURE__ */
|
|
209
|
+
function v({ title: e, rows: t, link: r }) {
|
|
210
|
+
let i = u("measures"), a = n();
|
|
211
|
+
return /* @__PURE__ */ f("div", {
|
|
204
212
|
className: "min-w-0",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
206
214
|
className: "mb-2 text-xs font-medium text-muted-foreground",
|
|
207
215
|
children: e
|
|
208
|
-
}), t.length === 0 ? /* @__PURE__ */
|
|
216
|
+
}), t.length === 0 ? /* @__PURE__ */ d("p", {
|
|
209
217
|
className: "text-sm text-muted-foreground",
|
|
210
218
|
children: i("noCost")
|
|
211
|
-
}) : /* @__PURE__ */
|
|
219
|
+
}) : /* @__PURE__ */ d("ol", {
|
|
212
220
|
className: "divide-y divide-border rounded-md border border-border text-sm",
|
|
213
|
-
children: t.map((e) => /* @__PURE__ */
|
|
221
|
+
children: t.map((e) => /* @__PURE__ */ f("li", {
|
|
214
222
|
className: "flex items-baseline gap-3 px-3 py-2",
|
|
215
223
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ d("span", {
|
|
217
225
|
className: "min-w-0 flex-1 truncate",
|
|
218
226
|
children: r(e)
|
|
219
227
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ d("span", {
|
|
221
229
|
className: "shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
222
230
|
children: i("runCount", { count: e.runs })
|
|
223
231
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ d("span", {
|
|
225
233
|
className: "w-20 shrink-0 text-right tabular-nums",
|
|
226
234
|
children: a(e.costMicros)
|
|
227
235
|
})
|
|
@@ -230,4 +238,4 @@ function _({ title: e, rows: t, link: r }) {
|
|
|
230
238
|
})]
|
|
231
239
|
});
|
|
232
240
|
}
|
|
233
|
-
export {
|
|
241
|
+
export { m as component };
|