@parallelworks/tandem-web 0.189.5 → 0.189.7

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