@parallelworks/tandem-web 0.191.0 → 0.192.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 +3 -2
- package/_virtual/_virtual_i18n/es/common.js +3 -2
- package/_virtual/_virtual_i18n/ja/common.js +3 -2
- package/_virtual/_virtual_i18n/ko/common.js +3 -2
- package/_virtual/_virtual_i18n/zh/common.js +3 -2
- package/api/queries.js +13 -5
- package/components/Editor.js +101 -99
- package/components/HoverCards.js +121 -121
- package/components/IssueEvent.js +1 -0
- package/components/StatusRules.js +1 -1
- package/components/docLink.js +18 -0
- package/lib/base.js +10 -1
- package/lib/listSearch.js +13 -10
- package/package.json +2 -1
- package/pages/issues.js +466 -414
- package/pages/triage.js +165 -167
- package/routes/_workspace/docs/_doc2.js +2 -2
- package/routes/_workspace/settings/audit-log3.js +1 -0
- package/routes/_workspace2.js +357 -383
package/pages/triage.js
CHANGED
|
@@ -1,150 +1,148 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import { meQuery as n,
|
|
3
|
-
import { ListFavoriteStar as
|
|
4
|
-
import { IssueView as
|
|
5
|
-
import { TriageIcon as
|
|
6
|
-
import { useDecisionFailure as
|
|
2
|
+
import { meQuery as n, teamsQuery as r, triageVisitsQuery as i } from "../api/queries.js";
|
|
3
|
+
import { ListFavoriteStar as a } from "../components/FavoriteStar.js";
|
|
4
|
+
import { IssueView as o } from "../components/IssueView.js";
|
|
5
|
+
import { TriageIcon as s } from "../components/icons.js";
|
|
6
|
+
import { useDecisionFailure as c } from "../components/TriageDecisions.js";
|
|
7
7
|
import { actorAvatar as l } from "../lib/avatar.js";
|
|
8
|
-
import { usePageTitle as
|
|
9
|
-
import { usePeople as
|
|
10
|
-
import { useCanTriage as
|
|
11
|
-
import { Link as
|
|
12
|
-
import { useShortcuts as
|
|
13
|
-
import { teamPath as
|
|
14
|
-
import { triageQuery as
|
|
15
|
-
import { hasOpened as
|
|
16
|
-
import { Avatar as h, Button as
|
|
8
|
+
import { usePageTitle as ee } from "../lib/pageTitle.js";
|
|
9
|
+
import { usePeople as u } from "../lib/people.js";
|
|
10
|
+
import { useCanTriage as d } from "../lib/roles.js";
|
|
11
|
+
import { Link as f, useNavigate as p } from "../lib/router.js";
|
|
12
|
+
import { useShortcuts as m } from "../lib/shortcuts.js";
|
|
13
|
+
import { teamPath as te } from "../lib/teamPaths.js";
|
|
14
|
+
import { triageQuery as ne, useVisitTriage as re } from "../lib/triage.js";
|
|
15
|
+
import { hasOpened as ie } from "../lib/triageSeen.js";
|
|
16
|
+
import { Avatar as h, Button as ae, EmptyState as g, RelativeTime as _, toast as v } from "@parallelworks/ui";
|
|
17
17
|
import { CatchBoundary as oe, useParams as se, useSearch as ce } from "@tanstack/react-router";
|
|
18
|
-
import { Suspense as le, useCallback as ue, useEffect as
|
|
18
|
+
import { Suspense as le, useCallback as ue, useEffect as y, useMemo as de, useRef as b, useState as x } from "react";
|
|
19
19
|
import { useErrorMessage as fe } from "@parallelworks/problem/react";
|
|
20
|
-
import { useTranslations as
|
|
21
|
-
import { jsx as
|
|
22
|
-
import { useMutation as
|
|
20
|
+
import { useTranslations as S } from "use-intl";
|
|
21
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
22
|
+
import { useMutation as pe, useQuery as T, useQueryClient as me, useSuspenseQuery as E } from "@tanstack/react-query";
|
|
23
23
|
// src/pages/triage.tsx
|
|
24
|
-
function
|
|
25
|
-
let l =
|
|
26
|
-
|
|
27
|
-
let [
|
|
28
|
-
let e =
|
|
29
|
-
for (let { at: t, issue: n } of [...
|
|
24
|
+
function D() {
|
|
25
|
+
let l = S("triage"), { workspace: u, key: d } = se({ strict: !1 }), { issue: h } = ce({ strict: !1 }), { data: _ } = E(ne(u, d)), { data: D } = E(r(u)), A = d ? D.find((e) => e.key === d) : void 0, ge = S("favorites");
|
|
26
|
+
ee(l("title"));
|
|
27
|
+
let [j, M] = x(() => /* @__PURE__ */ new Map()), N = de(() => {
|
|
28
|
+
let e = _.issues.toSorted((e, t) => t.createdAt.localeCompare(e.createdAt));
|
|
29
|
+
for (let { at: t, issue: n } of [...j.values()].sort((e, t) => e.at - t.at)) e.some((e) => e.id === n.id) || e.splice(Math.min(t, e.length), 0, n);
|
|
30
30
|
return e;
|
|
31
|
-
}, [
|
|
32
|
-
ye((n) => n.has(e) === t ? n : t ? new Set(n).add(e) :
|
|
33
|
-
}, []),
|
|
34
|
-
|
|
35
|
-
let { data: K } =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id:
|
|
39
|
-
identifier:
|
|
31
|
+
}, [_.issues, j]), P = (e) => _.issues.some((t) => t.id === e.id), _e = fe(), F = me(), ve = c(u), [I, ye] = x(/* @__PURE__ */ new Set()), [L, R] = x(/* @__PURE__ */ new Set()), be = ue((e, t) => {
|
|
32
|
+
ye((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : k(n, e));
|
|
33
|
+
}, []), z = N.filter((e) => I.has(e.id) && P(e)), B = z.filter((e) => L.has(e.id)), V = p(), H = N.findIndex((e) => e.identifier === h?.toUpperCase()), U = b(null), W = N[H], G = b(-1);
|
|
34
|
+
H >= 0 && (G.current = H);
|
|
35
|
+
let { data: K } = T(i(u)), { mutate: xe } = re(u), Se = b(/* @__PURE__ */ new Set());
|
|
36
|
+
y(() => {
|
|
37
|
+
W && K && !K.includes(W.id) && !Se.current.has(W.id) && (Se.current.add(W.id), xe({
|
|
38
|
+
id: W.id,
|
|
39
|
+
identifier: W.identifier
|
|
40
40
|
}));
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
W,
|
|
43
43
|
K,
|
|
44
|
-
|
|
44
|
+
xe
|
|
45
45
|
]);
|
|
46
|
-
let q = (e) =>
|
|
46
|
+
let q = (e) => V({
|
|
47
47
|
to: ".",
|
|
48
48
|
search: e ? { issue: e.identifier.toLowerCase() } : {},
|
|
49
49
|
replace: !0
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
},
|
|
50
|
+
}), Ce = (e) => {
|
|
51
|
+
I.has(e.id) && R((t) => t.has(e.id) ? k(t, e.id) : new Set(t).add(e.id));
|
|
52
|
+
}, we = (e, t) => {
|
|
53
53
|
let [n, r] = e < t ? [e, t] : [t, e];
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
let n =
|
|
57
|
-
n && (e.metaKey || e.ctrlKey ? (e.preventDefault(),
|
|
54
|
+
R(new Set(N.slice(n, r + 1).filter((e) => I.has(e.id)).map((e) => e.id)));
|
|
55
|
+
}, Te = (e, t) => {
|
|
56
|
+
let n = N[t];
|
|
57
|
+
n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), Ce(n), U.current = t) : e.shiftKey && (e.preventDefault(), we(U.current ?? (H >= 0 ? H : t), t)));
|
|
58
58
|
}, J = (e, t) => {
|
|
59
|
-
if (
|
|
60
|
-
let n =
|
|
61
|
-
t && ((
|
|
62
|
-
}, Y =
|
|
63
|
-
|
|
64
|
-
let X =
|
|
65
|
-
|
|
66
|
-
if (!h ||
|
|
59
|
+
if (N.length === 0) return;
|
|
60
|
+
let n = H < 0 ? 0 : Math.min(Math.max(H + e, 0), N.length - 1);
|
|
61
|
+
t && ((U.current === null || L.size === 0) && (U.current = Math.max(H, 0)), we(U.current, n)), q(N[n]);
|
|
62
|
+
}, Y = b(void 0);
|
|
63
|
+
W && (Y.current = W);
|
|
64
|
+
let X = b(/* @__PURE__ */ new Set()), Z = W ?? (Y.current && Y.current.identifier.toLowerCase() === h?.toLowerCase() && !X.current.has(Y.current.id) ? Y.current : void 0);
|
|
65
|
+
y(() => {
|
|
66
|
+
if (!h || H >= 0) return;
|
|
67
67
|
let e = Y.current;
|
|
68
68
|
if (e && e.identifier.toLowerCase() === h.toLowerCase()) {
|
|
69
69
|
if (X.current.has(e.id)) return;
|
|
70
|
-
|
|
71
|
-
at:
|
|
70
|
+
M((t) => new Map(t).set(e.id, {
|
|
71
|
+
at: G.current,
|
|
72
72
|
issue: e
|
|
73
73
|
}));
|
|
74
74
|
} else q(void 0);
|
|
75
75
|
});
|
|
76
|
-
let { data:
|
|
77
|
-
mutationFn: async ({ is: n, before:
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
let s = i ? n.assignees.filter((e) => !i.assignees.some((t) => t.kind === e.kind && t.handle === e.handle)) : [];
|
|
81
|
-
t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
76
|
+
let { data: Ee } = T(n), De = pe({
|
|
77
|
+
mutationFn: async ({ is: n, before: r }) => {
|
|
78
|
+
let i = r ? n.assignees.filter((e) => !r.assignees.some((t) => t.kind === e.kind && t.handle === e.handle)) : [];
|
|
79
|
+
t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
82
80
|
params: { path: {
|
|
83
|
-
workspace:
|
|
81
|
+
workspace: u,
|
|
84
82
|
identifier: n.identifier
|
|
85
83
|
} },
|
|
86
84
|
body: {
|
|
87
|
-
|
|
88
|
-
...
|
|
85
|
+
decision: "undo",
|
|
86
|
+
...i.length > 0 && { removeAssignees: i.map((e) => ({
|
|
89
87
|
kind: e.kind,
|
|
90
88
|
handle: e.handle
|
|
91
89
|
})) },
|
|
92
|
-
...
|
|
90
|
+
...r && !r.cycle && n.cycle && { clearCycle: !0 }
|
|
93
91
|
}
|
|
94
92
|
}));
|
|
95
93
|
},
|
|
96
|
-
onSuccess: (e, { is: t }) => (Q.current.delete(t.identifier),
|
|
94
|
+
onSuccess: (e, { is: t }) => (Q.current.delete(t.identifier), F.invalidateQueries({ queryKey: [
|
|
97
95
|
"workspace",
|
|
98
|
-
|
|
96
|
+
u,
|
|
99
97
|
"issues"
|
|
100
98
|
] })),
|
|
101
99
|
onError: async (e, { is: t }) => {
|
|
102
100
|
let { message: n } = await ve(e, t.identifier);
|
|
103
|
-
|
|
101
|
+
v.error(n);
|
|
104
102
|
}
|
|
105
|
-
}),
|
|
106
|
-
X.current.add(e.id),
|
|
103
|
+
}), Oe = (e) => {
|
|
104
|
+
X.current.add(e.id), M((t) => {
|
|
107
105
|
if (!t.has(e.id)) return t;
|
|
108
106
|
let n = new Map(t);
|
|
109
107
|
return n.delete(e.id), n;
|
|
110
108
|
});
|
|
111
|
-
let t =
|
|
112
|
-
e.id ===
|
|
113
|
-
}, Q =
|
|
109
|
+
let t = N.findIndex((t) => t.id === e.id);
|
|
110
|
+
e.id === W?.id && q(N[t + 1] ?? N[t - 1]), ke(e.identifier);
|
|
111
|
+
}, Q = b(/* @__PURE__ */ new Set()), ke = (t) => {
|
|
114
112
|
if (Q.current.has(t)) return;
|
|
115
113
|
Q.current.add(t);
|
|
116
|
-
let n =
|
|
114
|
+
let n = N.find((e) => e.identifier === t) ?? (Y.current?.identifier === t ? Y.current : void 0);
|
|
117
115
|
e.GET("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
118
|
-
workspace:
|
|
116
|
+
workspace: u,
|
|
119
117
|
identifier: t
|
|
120
118
|
} } }).then(({ data: e }) => {
|
|
121
|
-
!e || e.triage ? Q.current.delete(t) :
|
|
119
|
+
!e || e.triage ? Q.current.delete(t) : Ae(e, n);
|
|
122
120
|
});
|
|
123
|
-
},
|
|
124
|
-
let n =
|
|
121
|
+
}, Ae = (e, t) => {
|
|
122
|
+
let n = Ee && e.assignees.some((e) => e.kind === "user" && e.handle === Ee.user.username), r = [
|
|
125
123
|
e.status.name,
|
|
126
124
|
e.cycle?.name,
|
|
127
125
|
n ? l("assignedToYou") : e.assignees.length > 0 && l("assignedTo", { name: e.assignees.map((e) => e.handle).join(", ") })
|
|
128
126
|
].filter(Boolean);
|
|
129
|
-
|
|
130
|
-
title: /* @__PURE__ */
|
|
127
|
+
v.success(r.join(" · "), {
|
|
128
|
+
title: /* @__PURE__ */ C(f, {
|
|
131
129
|
to: "/$workspace/issues/$identifier",
|
|
132
130
|
params: {
|
|
133
|
-
workspace:
|
|
131
|
+
workspace: u,
|
|
134
132
|
identifier: e.identifier
|
|
135
133
|
},
|
|
136
134
|
children: l(e.status.category === "canceled" ? "declinedToast" : "acceptedToast", { key: e.identifier })
|
|
137
135
|
}),
|
|
138
136
|
action: {
|
|
139
137
|
label: l("undo"),
|
|
140
|
-
onClick: () =>
|
|
138
|
+
onClick: () => De.mutate({
|
|
141
139
|
is: e,
|
|
142
140
|
before: t
|
|
143
141
|
})
|
|
144
142
|
}
|
|
145
143
|
});
|
|
146
144
|
};
|
|
147
|
-
|
|
145
|
+
m({
|
|
148
146
|
j: () => J(1, !1),
|
|
149
147
|
k: () => J(-1, !1),
|
|
150
148
|
J: () => J(1, !0),
|
|
@@ -152,162 +150,162 @@ function k() {
|
|
|
152
150
|
ArrowDown: (e) => J(1, e.shiftKey),
|
|
153
151
|
ArrowUp: (e) => J(-1, e.shiftKey),
|
|
154
152
|
x: () => {
|
|
155
|
-
|
|
153
|
+
W && (Ce(W), U.current = H);
|
|
156
154
|
},
|
|
157
|
-
Enter: () =>
|
|
155
|
+
Enter: () => W && V({
|
|
158
156
|
to: "/$workspace/issues/$identifier",
|
|
159
157
|
params: {
|
|
160
|
-
workspace:
|
|
161
|
-
identifier:
|
|
158
|
+
workspace: u,
|
|
159
|
+
identifier: W.identifier
|
|
162
160
|
}
|
|
163
161
|
}),
|
|
164
|
-
"Mod+a": () =>
|
|
165
|
-
"Shift+Mod+a": () =>
|
|
166
|
-
Escape: () =>
|
|
167
|
-
}),
|
|
168
|
-
let e =
|
|
162
|
+
"Mod+a": () => R(new Set(N.map((e) => e.id))),
|
|
163
|
+
"Shift+Mod+a": () => R(/* @__PURE__ */ new Set()),
|
|
164
|
+
Escape: () => L.size > 0 ? R(/* @__PURE__ */ new Set()) : q(void 0)
|
|
165
|
+
}), y(() => {
|
|
166
|
+
let e = W && document.getElementById(`triage-${W.id}`);
|
|
169
167
|
e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
|
|
170
|
-
}, [
|
|
171
|
-
let $ =
|
|
172
|
-
mutationFn: async (n) => (await Promise.allSettled(
|
|
168
|
+
}, [W]);
|
|
169
|
+
let $ = pe({
|
|
170
|
+
mutationFn: async (n) => (await Promise.allSettled(B.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
173
171
|
params: { path: {
|
|
174
|
-
workspace:
|
|
172
|
+
workspace: u,
|
|
175
173
|
identifier: r.identifier
|
|
176
174
|
} },
|
|
177
175
|
body: { decision: n }
|
|
178
176
|
}))))).filter((e) => e.status === "rejected"),
|
|
179
177
|
onSuccess: (e) => {
|
|
180
|
-
if (
|
|
181
|
-
let e = (e) => !
|
|
182
|
-
q(
|
|
178
|
+
if (W && L.has(W.id)) {
|
|
179
|
+
let e = (e) => !L.has(e.id);
|
|
180
|
+
q(N.slice(H + 1).find(e) ?? N.slice(0, H).findLast(e));
|
|
183
181
|
}
|
|
184
|
-
|
|
182
|
+
R(/* @__PURE__ */ new Set());
|
|
185
183
|
let t = e[0];
|
|
186
|
-
t &&
|
|
184
|
+
t && v.error(l("bulkFailed", {
|
|
187
185
|
count: e.length,
|
|
188
186
|
reason: _e(t.reason)
|
|
189
187
|
}));
|
|
190
188
|
},
|
|
191
|
-
onSettled: () =>
|
|
189
|
+
onSettled: () => F.invalidateQueries({ queryKey: [
|
|
192
190
|
"workspace",
|
|
193
|
-
|
|
191
|
+
u,
|
|
194
192
|
"issues"
|
|
195
193
|
] })
|
|
196
194
|
});
|
|
197
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ w("div", {
|
|
198
196
|
className: "flex h-full flex-col",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ w("header", {
|
|
200
198
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
201
199
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ C("h1", {
|
|
203
201
|
className: "text-sm font-semibold",
|
|
204
202
|
children: l("title")
|
|
205
203
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
workspace:
|
|
204
|
+
/* @__PURE__ */ C(a, {
|
|
205
|
+
workspace: u,
|
|
208
206
|
page: "triage",
|
|
209
|
-
team:
|
|
210
|
-
href:
|
|
207
|
+
team: A && {
|
|
208
|
+
href: te(u, A.key, "triage"),
|
|
211
209
|
label: ge("teamPage", {
|
|
212
|
-
team:
|
|
210
|
+
team: A.name,
|
|
213
211
|
page: l("title")
|
|
214
212
|
})
|
|
215
213
|
}
|
|
216
214
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ C("span", {
|
|
218
216
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
219
|
-
children:
|
|
217
|
+
children: _.issues.length
|
|
220
218
|
}),
|
|
221
|
-
|
|
219
|
+
B.length > 0 && /* @__PURE__ */ w("div", {
|
|
222
220
|
className: "ml-auto flex items-center gap-2",
|
|
223
221
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ C("span", {
|
|
225
223
|
className: "text-xs font-medium text-human",
|
|
226
|
-
children: l("selected", { count:
|
|
224
|
+
children: l("selected", { count: B.length })
|
|
227
225
|
}),
|
|
228
|
-
|
|
226
|
+
B.length < z.length && /* @__PURE__ */ C("button", {
|
|
229
227
|
type: "button",
|
|
230
|
-
onClick: () =>
|
|
228
|
+
onClick: () => R(new Set(z.map((e) => e.id))),
|
|
231
229
|
className: "text-xs hover:underline",
|
|
232
230
|
children: l("selectAll")
|
|
233
231
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ C("button", {
|
|
235
233
|
type: "button",
|
|
236
|
-
onClick: () =>
|
|
234
|
+
onClick: () => R(/* @__PURE__ */ new Set()),
|
|
237
235
|
className: "text-xs hover:underline",
|
|
238
236
|
children: l("clear")
|
|
239
237
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ C(ae, {
|
|
241
239
|
variant: "outline",
|
|
242
240
|
size: "sm",
|
|
243
241
|
title: l("declineHelp"),
|
|
244
242
|
loading: $.isPending && $.variables === "decline",
|
|
245
243
|
disabled: $.isPending,
|
|
246
244
|
onClick: () => $.mutate("decline"),
|
|
247
|
-
children: l("declineCount", { count:
|
|
245
|
+
children: l("declineCount", { count: B.length })
|
|
248
246
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ C(ae, {
|
|
250
248
|
variant: "primary",
|
|
251
249
|
size: "sm",
|
|
252
250
|
title: l("acceptHelp"),
|
|
253
251
|
loading: $.isPending && $.variables === "accept",
|
|
254
252
|
disabled: $.isPending,
|
|
255
253
|
onClick: () => $.mutate("accept"),
|
|
256
|
-
children: l("acceptCount", { count:
|
|
254
|
+
children: l("acceptCount", { count: B.length })
|
|
257
255
|
})
|
|
258
256
|
]
|
|
259
257
|
})
|
|
260
258
|
]
|
|
261
|
-
}),
|
|
259
|
+
}), N.length === 0 && !Z ? /* @__PURE__ */ C("div", {
|
|
262
260
|
className: "min-h-0 flex-1 overflow-y-auto p-6",
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
icon: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ C(g, {
|
|
262
|
+
icon: /* @__PURE__ */ C(s, {}),
|
|
265
263
|
title: l("empty"),
|
|
266
264
|
description: l("emptyDescription")
|
|
267
265
|
})
|
|
268
|
-
}) : /* @__PURE__ */
|
|
266
|
+
}) : /* @__PURE__ */ w("div", {
|
|
269
267
|
className: "flex min-h-0 flex-1",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ C("ul", {
|
|
271
269
|
"aria-label": l("title"),
|
|
272
|
-
className:
|
|
273
|
-
children:
|
|
274
|
-
workspace:
|
|
270
|
+
className: O("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", W ? "hidden" : "flex"),
|
|
271
|
+
children: N.map((e, t) => /* @__PURE__ */ C(he, {
|
|
272
|
+
workspace: u,
|
|
275
273
|
issue: e,
|
|
276
274
|
onEligible: be,
|
|
277
|
-
picked:
|
|
278
|
-
current: t ===
|
|
279
|
-
moved: !
|
|
280
|
-
opened:
|
|
281
|
-
onClick: (e) =>
|
|
275
|
+
picked: L.has(e.id) && I.has(e.id),
|
|
276
|
+
current: t === H,
|
|
277
|
+
moved: !P(e),
|
|
278
|
+
opened: ie(e.id, { data: K }),
|
|
279
|
+
onClick: (e) => Te(e, t)
|
|
282
280
|
}, e.id))
|
|
283
|
-
}), /* @__PURE__ */
|
|
284
|
-
className:
|
|
285
|
-
children: Z ? /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ C("div", {
|
|
282
|
+
className: O("min-w-0 flex-1 overflow-y-auto md:block", Z ? "block" : "hidden"),
|
|
283
|
+
children: Z ? /* @__PURE__ */ w("div", {
|
|
286
284
|
className: "flex h-full flex-col",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ C("button", {
|
|
288
286
|
type: "button",
|
|
289
287
|
onClick: () => q(void 0),
|
|
290
288
|
className: "px-4 pt-3 text-left text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
291
289
|
children: l("back")
|
|
292
|
-
}), /* @__PURE__ */
|
|
290
|
+
}), /* @__PURE__ */ C(oe, {
|
|
293
291
|
getResetKey: () => Z.id,
|
|
294
|
-
errorComponent: () => /* @__PURE__ */
|
|
292
|
+
errorComponent: () => /* @__PURE__ */ C("div", {
|
|
295
293
|
className: "px-6 py-24",
|
|
296
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ C(g, {
|
|
297
295
|
title: l("paneFailed"),
|
|
298
296
|
description: l("paneFailedHelp")
|
|
299
297
|
})
|
|
300
298
|
}),
|
|
301
|
-
children: /* @__PURE__ */
|
|
302
|
-
workspace:
|
|
299
|
+
children: /* @__PURE__ */ C(le, { children: /* @__PURE__ */ C(o, {
|
|
300
|
+
workspace: u,
|
|
303
301
|
identifier: Z.identifier,
|
|
304
302
|
inPane: !0,
|
|
305
|
-
onDecided:
|
|
303
|
+
onDecided: Oe
|
|
306
304
|
}) })
|
|
307
305
|
})]
|
|
308
|
-
}, Z.id) : /* @__PURE__ */
|
|
306
|
+
}, Z.id) : /* @__PURE__ */ C("div", {
|
|
309
307
|
className: "px-6 py-24",
|
|
310
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ C(g, {
|
|
311
309
|
title: l("noneSelected"),
|
|
312
310
|
description: l("shortcuts")
|
|
313
311
|
})
|
|
@@ -316,57 +314,57 @@ function k() {
|
|
|
316
314
|
})]
|
|
317
315
|
});
|
|
318
316
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
317
|
+
var O = (...e) => e.filter(Boolean).join(" ");
|
|
318
|
+
function k(e, t) {
|
|
321
319
|
let n = new Set(e);
|
|
322
320
|
return n.delete(t), n;
|
|
323
321
|
}
|
|
324
322
|
function he({ workspace: e, issue: t, onEligible: n, picked: r, current: i, moved: a, opened: o, onClick: s }) {
|
|
325
|
-
let { actorName: c, avatarOf: ee } =
|
|
326
|
-
|
|
323
|
+
let { actorName: c, avatarOf: ee } = u(e), p = d(e, t.teamId);
|
|
324
|
+
y(() => n(t.id, p), [
|
|
327
325
|
n,
|
|
328
326
|
t.id,
|
|
329
|
-
|
|
327
|
+
p
|
|
330
328
|
]);
|
|
331
329
|
let m = t.creator;
|
|
332
|
-
return /* @__PURE__ */
|
|
330
|
+
return /* @__PURE__ */ C("li", {
|
|
333
331
|
id: `triage-${t.id}`,
|
|
334
332
|
"data-picked": r || void 0,
|
|
335
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ C(f, {
|
|
336
334
|
to: ".",
|
|
337
335
|
search: { issue: t.identifier.toLowerCase() },
|
|
338
336
|
replace: !0,
|
|
339
337
|
onClick: s,
|
|
340
338
|
"aria-current": i || void 0,
|
|
341
|
-
className:
|
|
342
|
-
children: /* @__PURE__ */
|
|
339
|
+
className: O("flex gap-3 px-2 py-2.5 select-none", a && "opacity-50", r ? "bg-human-soft" : O("rounded-md", i ? "bg-muted" : "hover:bg-muted")),
|
|
340
|
+
children: /* @__PURE__ */ w("span", {
|
|
343
341
|
className: "min-w-0 flex-1",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ w("span", {
|
|
345
343
|
className: "flex items-baseline gap-2 text-sm",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
347
|
-
className:
|
|
344
|
+
children: [/* @__PURE__ */ C("span", {
|
|
345
|
+
className: O("min-w-0 flex-1 truncate", o ? "text-muted-foreground" : "font-medium text-foreground"),
|
|
348
346
|
children: t.title
|
|
349
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ C("span", {
|
|
350
348
|
className: "shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
351
349
|
children: t.identifier
|
|
352
350
|
})]
|
|
353
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ w("span", {
|
|
354
352
|
className: "mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
355
353
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
className:
|
|
358
|
-
children: /* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ C("span", {
|
|
355
|
+
className: O("shrink-0 rounded-full", r && "ring-1 ring-human/40"),
|
|
356
|
+
children: /* @__PURE__ */ C(h, {
|
|
359
357
|
...l(m.kind),
|
|
360
358
|
name: c(m),
|
|
361
359
|
src: ee(m.kind, m.handle),
|
|
362
360
|
size: "xs"
|
|
363
361
|
})
|
|
364
362
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ C("span", {
|
|
366
364
|
className: "min-w-0 flex-1 truncate",
|
|
367
365
|
children: c(m)
|
|
368
366
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ C(_, {
|
|
370
368
|
value: t.createdAt,
|
|
371
369
|
format: "long",
|
|
372
370
|
exact: "medium",
|
|
@@ -378,4 +376,4 @@ function he({ workspace: e, issue: t, onEligible: n, picked: r, current: i, move
|
|
|
378
376
|
})
|
|
379
377
|
});
|
|
380
378
|
}
|
|
381
|
-
export {
|
|
379
|
+
export { D as TriagePage };
|
|
@@ -263,9 +263,9 @@ function z() {
|
|
|
263
263
|
doc: u,
|
|
264
264
|
editable: !$
|
|
265
265
|
}), /* @__PURE__ */ F("div", {
|
|
266
|
-
className:
|
|
266
|
+
className: `flex w-full gap-10 px-4 pt-6 md:px-8 md:pt-8 ${u.fullWidth ? "xl:px-24" : ""}`,
|
|
267
267
|
children: [/* @__PURE__ */ F("article", {
|
|
268
|
-
className: `group/doc min-w-0 flex-1 pb-24 ${u.fullWidth ? "" : "mx-auto max-w-
|
|
268
|
+
className: `group/doc min-w-0 flex-1 pb-24 ${u.fullWidth ? "" : "mx-auto max-w-doc"}`,
|
|
269
269
|
children: [
|
|
270
270
|
$ && /* @__PURE__ */ F("div", {
|
|
271
271
|
className: "mb-6 flex items-center gap-3 rounded-md border border-border bg-muted px-3 py-2 text-sm",
|
|
@@ -314,6 +314,7 @@ function U(e) {
|
|
|
314
314
|
case "issue.reaction_removed": return [e.type === "issue.reaction_added" ? "issueReactionAdded" : "issueReactionRemoved", { emoji: u[d("emoji")] ?? d("emoji") }];
|
|
315
315
|
case "issue.triage_accepted": return ["issueTriageAccepted", {}];
|
|
316
316
|
case "issue.triage_declined": return ["issueTriageDeclined", {}];
|
|
317
|
+
case "issue.triage_undone": return ["issueTriageUndone", {}];
|
|
317
318
|
case "comment.created": return ["commentCreated", {}];
|
|
318
319
|
case "comment.edited": return ["commentEdited", {}];
|
|
319
320
|
case "comment.deleted": return ["commentDeleted", {}];
|