@parallelworks/tandem-web 0.189.8 → 0.189.9

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