@parallelworks/tandem-web 0.185.0 → 0.186.1

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