@parallelworks/tandem-web 0.191.0 → 0.191.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.
@@ -1021,6 +1021,7 @@ var e = {
1021
1021
  runMoved: "<actor>{name}</actor> moved the run to {state}",
1022
1022
  triageAccepted: "<actor>{name}</actor> accepted it from triage",
1023
1023
  triageDeclined: "<actor>{name}</actor> declined it in triage",
1024
+ triageUndone: "<actor>{name}</actor> undid the triage decision and put it back in triage",
1024
1025
  decisionRequested: "<actor>{name}</actor> asked for a decision",
1025
1026
  decisionAnswered: "<actor>{name}</actor> answered a decision",
1026
1027
  other: "<actor>{name}</actor> {type}",
@@ -2310,6 +2311,7 @@ var e = {
2310
2311
  issueReactionRemoved: "<actor>{name}</actor> removed a {emoji} reaction from <link>{target}</link>",
2311
2312
  issueTriageAccepted: "<actor>{name}</actor> accepted <link>{target}</link> from triage",
2312
2313
  issueTriageDeclined: "<actor>{name}</actor> declined <link>{target}</link> in triage",
2314
+ issueTriageUndone: "<actor>{name}</actor> undid the triage decision on <link>{target}</link>",
2313
2315
  commentCreated: "<actor>{name}</actor> commented on <link>{target}</link>",
2314
2316
  commentEdited: "<actor>{name}</actor> edited a comment on <link>{target}</link>",
2315
2317
  commentDeleted: "<actor>{name}</actor> deleted a comment on <link>{target}</link>",
@@ -1021,6 +1021,7 @@ var e = {
1021
1021
  runMoved: "<actor>{name}</actor> movió la ejecución a {state}",
1022
1022
  triageAccepted: "<actor>{name}</actor> la aceptó desde clasificación",
1023
1023
  triageDeclined: "<actor>{name}</actor> la rechazó en clasificación",
1024
+ triageUndone: "<actor>{name}</actor> deshizo la decisión de clasificación y la devolvió a clasificación",
1024
1025
  decisionRequested: "<actor>{name}</actor> pidió una decisión",
1025
1026
  decisionAnswered: "<actor>{name}</actor> respondió una decisión",
1026
1027
  other: "<actor>{name}</actor> {type}",
@@ -2310,6 +2311,7 @@ var e = {
2310
2311
  issueReactionRemoved: "<actor>{name}</actor> quitó una reacción {emoji} de <link>{target}</link>",
2311
2312
  issueTriageAccepted: "<actor>{name}</actor> aceptó <link>{target}</link> desde clasificación",
2312
2313
  issueTriageDeclined: "<actor>{name}</actor> rechazó <link>{target}</link> en clasificación",
2314
+ issueTriageUndone: "<actor>{name}</actor> deshizo la decisión de clasificación de <link>{target}</link>",
2313
2315
  commentCreated: "<actor>{name}</actor> comentó en <link>{target}</link>",
2314
2316
  commentEdited: "<actor>{name}</actor> editó un comentario en <link>{target}</link>",
2315
2317
  commentDeleted: "<actor>{name}</actor> eliminó un comentario en <link>{target}</link>",
@@ -1021,6 +1021,7 @@ var e = {
1021
1021
  runMoved: "<actor>{name}</actor> が実行を {state} に移動しました",
1022
1022
  triageAccepted: "<actor>{name}</actor> がトリアージから受け入れました",
1023
1023
  triageDeclined: "<actor>{name}</actor> がトリアージで却下しました",
1024
+ triageUndone: "<actor>{name}</actor> がトリアージの判断を取り消し、トリアージに戻しました",
1024
1025
  decisionRequested: "<actor>{name}</actor> が判断を求めました",
1025
1026
  decisionAnswered: "<actor>{name}</actor> が判断に回答しました",
1026
1027
  other: "<actor>{name}</actor> {type}",
@@ -2310,6 +2311,7 @@ var e = {
2310
2311
  issueReactionRemoved: "<actor>{name}</actor> が <link>{target}</link> から {emoji} のリアクションを外しました",
2311
2312
  issueTriageAccepted: "<actor>{name}</actor> が <link>{target}</link> をトリアージから受け入れました",
2312
2313
  issueTriageDeclined: "<actor>{name}</actor> が <link>{target}</link> をトリアージで却下しました",
2314
+ issueTriageUndone: "<actor>{name}</actor> が <link>{target}</link> のトリアージの判断を取り消しました",
2313
2315
  commentCreated: "<actor>{name}</actor> が <link>{target}</link> にコメントしました",
2314
2316
  commentEdited: "<actor>{name}</actor> が <link>{target}</link> のコメントを編集しました",
2315
2317
  commentDeleted: "<actor>{name}</actor> が <link>{target}</link> のコメントを削除しました",
@@ -1021,6 +1021,7 @@ var e = {
1021
1021
  runMoved: "<actor>{name}</actor>이(가) 실행을 {state}(으)로 옮김",
1022
1022
  triageAccepted: "<actor>{name}</actor>이(가) 분류에서 수락함",
1023
1023
  triageDeclined: "<actor>{name}</actor>이(가) 분류에서 거절함",
1024
+ triageUndone: "<actor>{name}</actor>이(가) 분류 결정을 취소하고 분류로 되돌림",
1024
1025
  decisionRequested: "<actor>{name}</actor>이(가) 결정을 요청함",
1025
1026
  decisionAnswered: "<actor>{name}</actor>이(가) 결정에 답변함",
1026
1027
  other: "<actor>{name}</actor> {type}",
@@ -2310,6 +2311,7 @@ var e = {
2310
2311
  issueReactionRemoved: "<actor>{name}</actor>님이 <link>{target}</link>에서 {emoji} 반응을 취소했습니다",
2311
2312
  issueTriageAccepted: "<actor>{name}</actor>님이 분류에서 <link>{target}</link>을(를) 수락했습니다",
2312
2313
  issueTriageDeclined: "<actor>{name}</actor>님이 분류에서 <link>{target}</link>을(를) 거절했습니다",
2314
+ issueTriageUndone: "<actor>{name}</actor>이(가) <link>{target}</link>의 분류 결정을 취소함",
2313
2315
  commentCreated: "<actor>{name}</actor>님이 <link>{target}</link>에 댓글을 남겼습니다",
2314
2316
  commentEdited: "<actor>{name}</actor>님이 <link>{target}</link>의 댓글을 편집했습니다",
2315
2317
  commentDeleted: "<actor>{name}</actor>님이 <link>{target}</link>의 댓글을 삭제했습니다",
@@ -1021,6 +1021,7 @@ var e = {
1021
1021
  runMoved: "<actor>{name}</actor> 将运行移到了 {state}",
1022
1022
  triageAccepted: "<actor>{name}</actor> 在分拣中接受了此议题",
1023
1023
  triageDeclined: "<actor>{name}</actor> 在分拣中拒绝了此议题",
1024
+ triageUndone: "<actor>{name}</actor> 撤销了分拣决定,并将其放回分拣",
1024
1025
  decisionRequested: "<actor>{name}</actor> 请求做出决策",
1025
1026
  decisionAnswered: "<actor>{name}</actor> 回答了一项决策",
1026
1027
  other: "<actor>{name}</actor> {type}",
@@ -2310,6 +2311,7 @@ var e = {
2310
2311
  issueReactionRemoved: "<actor>{name}</actor> 撤回了对 <link>{target}</link> 的 {emoji} 回应",
2311
2312
  issueTriageAccepted: "<actor>{name}</actor> 在分拣中接受了 <link>{target}</link>",
2312
2313
  issueTriageDeclined: "<actor>{name}</actor> 在分拣中拒绝了 <link>{target}</link>",
2314
+ issueTriageUndone: "<actor>{name}</actor> 撤销了 <link>{target}</link> 的分拣决定",
2313
2315
  commentCreated: "<actor>{name}</actor> 评论了 <link>{target}</link>",
2314
2316
  commentEdited: "<actor>{name}</actor> 编辑了 <link>{target}</link> 上的一条评论",
2315
2317
  commentDeleted: "<actor>{name}</actor> 删除了 <link>{target}</link> 上的一条评论",
@@ -139,6 +139,7 @@ function p({ workspace: p, event: m }) {
139
139
  });
140
140
  case "issue.triage_accepted": return E("triageAccepted");
141
141
  case "issue.triage_declined": return E("triageDeclined");
142
+ case "issue.triage_undone": return E("triageUndone");
142
143
  case "decision.requested": return E("decisionRequested");
143
144
  case "decision.answered": return E("decisionAnswered");
144
145
  default: return E("other", { type: m.type });
@@ -91,7 +91,7 @@ function w({ workspace: i, team: w, isAdmin: T }) {
91
91
  children: [E(`fields.${e}`), /* @__PURE__ */ g(s, { text: E(`fieldHelp.${e}`) })]
92
92
  })
93
93
  }, e)),
94
- k.map((e) => /* @__PURE__ */ _("tr", { children: [/* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(C, { status: e }) }), S.map((t) => /* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(a, {
94
+ k.filter((e) => e.category !== "triage").map((e) => /* @__PURE__ */ _("tr", { children: [/* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(C, { status: e }) }), S.map((t) => /* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(a, {
95
95
  className: "mx-auto",
96
96
  "aria-label": E("need", {
97
97
  field: E(`fields.${t}`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.191.0",
3
+ "version": "0.191.1",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
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, 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 { useDecisionFailure as ee } from "../components/TriageDecisions.js";
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 u } from "../lib/pageTitle.js";
9
- import { usePeople as d } from "../lib/people.js";
10
- import { useCanTriage as f } from "../lib/roles.js";
11
- import { Link as p, useNavigate as m } from "../lib/router.js";
12
- import { useShortcuts as te } from "../lib/shortcuts.js";
13
- import { teamPath as ne } from "../lib/teamPaths.js";
14
- import { triageQuery as re, useVisitTriage as ie } from "../lib/triage.js";
15
- import { hasOpened as ae } from "../lib/triageSeen.js";
16
- import { Avatar as h, Button as g, EmptyState as _, RelativeTime as v, toast as y } from "@parallelworks/ui";
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 b, useMemo as de, useRef as x, useState as S } from "react";
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 C } from "use-intl";
21
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
22
- import { useMutation as E, useQuery as D, useQueryClient as pe, useSuspenseQuery as O } from "@tanstack/react-query";
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 k() {
25
- let l = C("triage"), { workspace: d, key: f } = se({ strict: !1 }), { issue: h } = ce({ strict: !1 }), { data: v } = O(re(d, f)), { data: k } = O(i(d)), j = f ? k.find((e) => e.key === f) : void 0, ge = C("favorites");
26
- u(l("title"));
27
- let [M, N] = S(() => /* @__PURE__ */ new Map()), P = de(() => {
28
- let e = v.issues.toSorted((e, t) => t.createdAt.localeCompare(e.createdAt));
29
- for (let { at: t, issue: n } of [...M.values()].sort((e, t) => e.at - t.at)) e.some((e) => e.id === n.id) || e.splice(Math.min(t, e.length), 0, n);
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
- }, [v.issues, M]), F = (e) => v.issues.some((t) => t.id === e.id), _e = fe(), I = pe(), ve = ee(d), [L, ye] = S(/* @__PURE__ */ new Set()), [R, z] = S(/* @__PURE__ */ new Set()), be = ue((e, t) => {
32
- ye((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : me(n, e));
33
- }, []), B = P.filter((e) => L.has(e.id) && F(e)), V = B.filter((e) => R.has(e.id)), H = m(), U = P.findIndex((e) => e.identifier === h?.toUpperCase()), W = x(null), G = P[U], xe = x(-1);
34
- U >= 0 && (xe.current = U);
35
- let { data: K } = D(a(d)), { mutate: Se } = ie(d), Ce = x(/* @__PURE__ */ new Set());
36
- b(() => {
37
- G && K && !K.includes(G.id) && !Ce.current.has(G.id) && (Ce.current.add(G.id), Se({
38
- id: G.id,
39
- identifier: G.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
- G,
42
+ W,
43
43
  K,
44
- Se
44
+ xe
45
45
  ]);
46
- let q = (e) => H({
46
+ let q = (e) => V({
47
47
  to: ".",
48
48
  search: e ? { issue: e.identifier.toLowerCase() } : {},
49
49
  replace: !0
50
- }), we = (e) => {
51
- L.has(e.id) && z((t) => t.has(e.id) ? me(t, e.id) : new Set(t).add(e.id));
52
- }, Te = (e, t) => {
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
- z(new Set(P.slice(n, r + 1).filter((e) => L.has(e.id)).map((e) => e.id)));
55
- }, Ee = (e, t) => {
56
- let n = P[t];
57
- n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), we(n), W.current = t) : e.shiftKey && (e.preventDefault(), Te(W.current ?? (U >= 0 ? U : t), t)));
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 (P.length === 0) return;
60
- let n = U < 0 ? 0 : Math.min(Math.max(U + e, 0), P.length - 1);
61
- t && ((W.current === null || R.size === 0) && (W.current = Math.max(U, 0)), Te(W.current, n)), q(P[n]);
62
- }, Y = x(void 0);
63
- G && (Y.current = G);
64
- let X = x(/* @__PURE__ */ new Set()), Z = G ?? (Y.current && Y.current.identifier.toLowerCase() === h?.toLowerCase() && !X.current.has(Y.current.id) ? Y.current : void 0);
65
- b(() => {
66
- if (!h || U >= 0) return;
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
- N((t) => new Map(t).set(e.id, {
71
- at: xe.current,
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: De } = D(n), Oe = E({
77
- mutationFn: async ({ is: n, before: i }) => {
78
- let a = k.find((e) => e.id === n.teamId)?.key ?? "", o = (await I.fetchQuery(r(d, a))).find((e) => e.category === "triage");
79
- if (!o) return;
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: d,
81
+ workspace: u,
84
82
  identifier: n.identifier
85
83
  } },
86
84
  body: {
87
- statusId: o.id,
88
- ...s.length > 0 && { removeAssignees: s.map((e) => ({
85
+ decision: "undo",
86
+ ...i.length > 0 && { removeAssignees: i.map((e) => ({
89
87
  kind: e.kind,
90
88
  handle: e.handle
91
89
  })) },
92
- ...i && !i.cycle && n.cycle && { cycleId: "" }
90
+ ...r && !r.cycle && n.cycle && { clearCycle: !0 }
93
91
  }
94
92
  }));
95
93
  },
96
- onSuccess: (e, { is: t }) => (Q.current.delete(t.identifier), I.invalidateQueries({ queryKey: [
94
+ onSuccess: (e, { is: t }) => (Q.current.delete(t.identifier), F.invalidateQueries({ queryKey: [
97
95
  "workspace",
98
- d,
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
- y.error(n);
101
+ v.error(n);
104
102
  }
105
- }), ke = (e) => {
106
- X.current.add(e.id), N((t) => {
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 = P.findIndex((t) => t.id === e.id);
112
- e.id === G?.id && q(P[t + 1] ?? P[t - 1]), Ae(e.identifier);
113
- }, Q = x(/* @__PURE__ */ new Set()), Ae = (t) => {
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 = P.find((e) => e.identifier === t) ?? (Y.current?.identifier === t ? Y.current : void 0);
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: d,
116
+ workspace: u,
119
117
  identifier: t
120
118
  } } }).then(({ data: e }) => {
121
- !e || e.triage ? Q.current.delete(t) : je(e, n);
119
+ !e || e.triage ? Q.current.delete(t) : Ae(e, n);
122
120
  });
123
- }, je = (e, t) => {
124
- let n = De && e.assignees.some((e) => e.kind === "user" && e.handle === De.user.username), r = [
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
- y.success(r.join(" · "), {
130
- title: /* @__PURE__ */ w(p, {
127
+ v.success(r.join(" · "), {
128
+ title: /* @__PURE__ */ C(f, {
131
129
  to: "/$workspace/issues/$identifier",
132
130
  params: {
133
- workspace: d,
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: () => Oe.mutate({
138
+ onClick: () => De.mutate({
141
139
  is: e,
142
140
  before: t
143
141
  })
144
142
  }
145
143
  });
146
144
  };
147
- te({
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
- G && (we(G), W.current = U);
153
+ W && (Ce(W), U.current = H);
156
154
  },
157
- Enter: () => G && H({
155
+ Enter: () => W && V({
158
156
  to: "/$workspace/issues/$identifier",
159
157
  params: {
160
- workspace: d,
161
- identifier: G.identifier
158
+ workspace: u,
159
+ identifier: W.identifier
162
160
  }
163
161
  }),
164
- "Mod+a": () => z(new Set(P.map((e) => e.id))),
165
- "Shift+Mod+a": () => z(/* @__PURE__ */ new Set()),
166
- Escape: () => R.size > 0 ? z(/* @__PURE__ */ new Set()) : q(void 0)
167
- }), b(() => {
168
- let e = G && document.getElementById(`triage-${G.id}`);
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
- }, [G]);
171
- let $ = E({
172
- mutationFn: async (n) => (await Promise.allSettled(V.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
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: d,
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 (G && R.has(G.id)) {
181
- let e = (e) => !R.has(e.id);
182
- q(P.slice(U + 1).find(e) ?? P.slice(0, U).findLast(e));
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
- z(/* @__PURE__ */ new Set());
182
+ R(/* @__PURE__ */ new Set());
185
183
  let t = e[0];
186
- t && y.error(l("bulkFailed", {
184
+ t && v.error(l("bulkFailed", {
187
185
  count: e.length,
188
186
  reason: _e(t.reason)
189
187
  }));
190
188
  },
191
- onSettled: () => I.invalidateQueries({ queryKey: [
189
+ onSettled: () => F.invalidateQueries({ queryKey: [
192
190
  "workspace",
193
- d,
191
+ u,
194
192
  "issues"
195
193
  ] })
196
194
  });
197
- return /* @__PURE__ */ T("div", {
195
+ return /* @__PURE__ */ w("div", {
198
196
  className: "flex h-full flex-col",
199
- children: [/* @__PURE__ */ T("header", {
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__ */ w("h1", {
200
+ /* @__PURE__ */ C("h1", {
203
201
  className: "text-sm font-semibold",
204
202
  children: l("title")
205
203
  }),
206
- /* @__PURE__ */ w(o, {
207
- workspace: d,
204
+ /* @__PURE__ */ C(a, {
205
+ workspace: u,
208
206
  page: "triage",
209
- team: j && {
210
- href: ne(d, j.key, "triage"),
207
+ team: A && {
208
+ href: te(u, A.key, "triage"),
211
209
  label: ge("teamPage", {
212
- team: j.name,
210
+ team: A.name,
213
211
  page: l("title")
214
212
  })
215
213
  }
216
214
  }),
217
- /* @__PURE__ */ w("span", {
215
+ /* @__PURE__ */ C("span", {
218
216
  className: "text-xs text-muted-foreground tabular-nums",
219
- children: v.issues.length
217
+ children: _.issues.length
220
218
  }),
221
- V.length > 0 && /* @__PURE__ */ T("div", {
219
+ B.length > 0 && /* @__PURE__ */ w("div", {
222
220
  className: "ml-auto flex items-center gap-2",
223
221
  children: [
224
- /* @__PURE__ */ w("span", {
222
+ /* @__PURE__ */ C("span", {
225
223
  className: "text-xs font-medium text-human",
226
- children: l("selected", { count: V.length })
224
+ children: l("selected", { count: B.length })
227
225
  }),
228
- V.length < B.length && /* @__PURE__ */ w("button", {
226
+ B.length < z.length && /* @__PURE__ */ C("button", {
229
227
  type: "button",
230
- onClick: () => z(new Set(B.map((e) => e.id))),
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__ */ w("button", {
232
+ /* @__PURE__ */ C("button", {
235
233
  type: "button",
236
- onClick: () => z(/* @__PURE__ */ new Set()),
234
+ onClick: () => R(/* @__PURE__ */ new Set()),
237
235
  className: "text-xs hover:underline",
238
236
  children: l("clear")
239
237
  }),
240
- /* @__PURE__ */ w(g, {
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: V.length })
245
+ children: l("declineCount", { count: B.length })
248
246
  }),
249
- /* @__PURE__ */ w(g, {
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: V.length })
254
+ children: l("acceptCount", { count: B.length })
257
255
  })
258
256
  ]
259
257
  })
260
258
  ]
261
- }), P.length === 0 && !Z ? /* @__PURE__ */ w("div", {
259
+ }), N.length === 0 && !Z ? /* @__PURE__ */ C("div", {
262
260
  className: "min-h-0 flex-1 overflow-y-auto p-6",
263
- children: /* @__PURE__ */ w(_, {
264
- icon: /* @__PURE__ */ w(c, {}),
261
+ children: /* @__PURE__ */ C(g, {
262
+ icon: /* @__PURE__ */ C(s, {}),
265
263
  title: l("empty"),
266
264
  description: l("emptyDescription")
267
265
  })
268
- }) : /* @__PURE__ */ T("div", {
266
+ }) : /* @__PURE__ */ w("div", {
269
267
  className: "flex min-h-0 flex-1",
270
- children: [/* @__PURE__ */ w("ul", {
268
+ children: [/* @__PURE__ */ C("ul", {
271
269
  "aria-label": l("title"),
272
- className: A("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", G ? "hidden" : "flex"),
273
- children: P.map((e, t) => /* @__PURE__ */ w(he, {
274
- workspace: d,
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: R.has(e.id) && L.has(e.id),
278
- current: t === U,
279
- moved: !F(e),
280
- opened: ae(e.id, { data: K }),
281
- onClick: (e) => Ee(e, t)
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__ */ w("div", {
284
- className: A("min-w-0 flex-1 overflow-y-auto md:block", Z ? "block" : "hidden"),
285
- children: Z ? /* @__PURE__ */ T("div", {
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__ */ w("button", {
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__ */ w(oe, {
290
+ }), /* @__PURE__ */ C(oe, {
293
291
  getResetKey: () => Z.id,
294
- errorComponent: () => /* @__PURE__ */ w("div", {
292
+ errorComponent: () => /* @__PURE__ */ C("div", {
295
293
  className: "px-6 py-24",
296
- children: /* @__PURE__ */ w(_, {
294
+ children: /* @__PURE__ */ C(g, {
297
295
  title: l("paneFailed"),
298
296
  description: l("paneFailedHelp")
299
297
  })
300
298
  }),
301
- children: /* @__PURE__ */ w(le, { children: /* @__PURE__ */ w(s, {
302
- workspace: d,
299
+ children: /* @__PURE__ */ C(le, { children: /* @__PURE__ */ C(o, {
300
+ workspace: u,
303
301
  identifier: Z.identifier,
304
302
  inPane: !0,
305
- onDecided: ke
303
+ onDecided: Oe
306
304
  }) })
307
305
  })]
308
- }, Z.id) : /* @__PURE__ */ w("div", {
306
+ }, Z.id) : /* @__PURE__ */ C("div", {
309
307
  className: "px-6 py-24",
310
- children: /* @__PURE__ */ w(_, {
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 A = (...e) => e.filter(Boolean).join(" ");
320
- function me(e, t) {
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 } = d(e), u = f(e, t.teamId);
326
- b(() => n(t.id, u), [
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
- u
327
+ p
330
328
  ]);
331
329
  let m = t.creator;
332
- return /* @__PURE__ */ w("li", {
330
+ return /* @__PURE__ */ C("li", {
333
331
  id: `triage-${t.id}`,
334
332
  "data-picked": r || void 0,
335
- children: /* @__PURE__ */ w(p, {
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: A("flex gap-3 px-2 py-2.5 select-none", a && "opacity-50", r ? "bg-human-soft" : A("rounded-md", i ? "bg-muted" : "hover:bg-muted")),
342
- children: /* @__PURE__ */ T("span", {
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__ */ T("span", {
342
+ children: [/* @__PURE__ */ w("span", {
345
343
  className: "flex items-baseline gap-2 text-sm",
346
- children: [/* @__PURE__ */ w("span", {
347
- className: A("min-w-0 flex-1 truncate", o ? "text-muted-foreground" : "font-medium text-foreground"),
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__ */ w("span", {
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__ */ T("span", {
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__ */ w("span", {
357
- className: A("shrink-0 rounded-full", r && "ring-1 ring-human/40"),
358
- children: /* @__PURE__ */ w(h, {
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__ */ w("span", {
363
+ /* @__PURE__ */ C("span", {
366
364
  className: "min-w-0 flex-1 truncate",
367
365
  children: c(m)
368
366
  }),
369
- /* @__PURE__ */ w(v, {
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 { k as TriagePage };
379
+ export { D as TriagePage };
@@ -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", {}];