@parallelworks/tandem-web 0.174.0 → 0.175.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/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/components/IssueEvent.js +1 -1
- package/components/TriageButtons.js +10 -6
- package/package.json +1 -1
- package/routes/_workspace/issues/_identifier2.js +1 -1
- package/routes/_workspace/notifications2.js +105 -102
|
@@ -946,6 +946,7 @@ var e = {
|
|
|
946
946
|
bodyChanged: "<actor>{name}</actor> edited the description",
|
|
947
947
|
statusChanged: "<actor>{name}</actor> moved to <icon></icon> {status}",
|
|
948
948
|
statusChangedByPullRequest: "Moved to <icon></icon> {status} by PR {ref}",
|
|
949
|
+
acceptedByPullRequest: "Accepted from triage and moved to <icon></icon> {status} by PR {ref}",
|
|
949
950
|
autoClosed: "Closed after {days} days with no activity",
|
|
950
951
|
archived: "Archived after it closed",
|
|
951
952
|
priorityRemoved: "<actor>{name}</actor> removed the priority",
|
|
@@ -946,6 +946,7 @@ var e = {
|
|
|
946
946
|
bodyChanged: "<actor>{name}</actor> editó la descripción",
|
|
947
947
|
statusChanged: "<actor>{name}</actor> la movió a <icon></icon> {status}",
|
|
948
948
|
statusChangedByPullRequest: "Movida a <icon></icon> {status} por el PR {ref}",
|
|
949
|
+
acceptedByPullRequest: "Aceptada desde triaje y movida a <icon></icon> {status} por el PR {ref}",
|
|
949
950
|
autoClosed: "Cerrada tras {days} días sin actividad",
|
|
950
951
|
archived: "Archivada después de cerrarse",
|
|
951
952
|
priorityRemoved: "<actor>{name}</actor> quitó la prioridad",
|
|
@@ -946,6 +946,7 @@ var e = {
|
|
|
946
946
|
bodyChanged: "<actor>{name}</actor> が説明を編集しました",
|
|
947
947
|
statusChanged: "<actor>{name}</actor> が <icon></icon> {status} に移動しました",
|
|
948
948
|
statusChangedByPullRequest: "PR {ref} により <icon></icon> {status} に移動しました",
|
|
949
|
+
acceptedByPullRequest: "PR {ref} によりトリアージから受け入れられ、<icon></icon> {status} に移動しました",
|
|
949
950
|
autoClosed: "{days} 日間アクティビティがなかったためクローズされました",
|
|
950
951
|
archived: "クローズ後にアーカイブされました",
|
|
951
952
|
priorityRemoved: "<actor>{name}</actor> が優先度を削除しました",
|
|
@@ -946,6 +946,7 @@ var e = {
|
|
|
946
946
|
bodyChanged: "<actor>{name}</actor>이(가) 설명을 편집함",
|
|
947
947
|
statusChanged: "<actor>{name}</actor>이(가) <icon></icon> {status}(으)로 옮김",
|
|
948
948
|
statusChangedByPullRequest: "PR {ref}에 의해 <icon></icon> {status}(으)로 옮겨짐",
|
|
949
|
+
acceptedByPullRequest: "PR {ref}에 의해 분류에서 수락되어 <icon></icon> {status}(으)로 옮겨짐",
|
|
949
950
|
autoClosed: "{days}일 동안 활동이 없어 종료됨",
|
|
950
951
|
archived: "종료 후 보관됨",
|
|
951
952
|
priorityRemoved: "<actor>{name}</actor>이(가) 우선순위를 제거함",
|
|
@@ -946,6 +946,7 @@ var e = {
|
|
|
946
946
|
bodyChanged: "<actor>{name}</actor> 编辑了描述",
|
|
947
947
|
statusChanged: "<actor>{name}</actor> 移到了 <icon></icon> {status}",
|
|
948
948
|
statusChangedByPullRequest: "由 PR {ref} 移到了 <icon></icon> {status}",
|
|
949
|
+
acceptedByPullRequest: "由 PR {ref} 从分诊中接受并移到了 <icon></icon> {status}",
|
|
949
950
|
autoClosed: "{days} 天无活动后自动关闭",
|
|
950
951
|
archived: "关闭后已归档",
|
|
951
952
|
priorityRemoved: "<actor>{name}</actor> 移除了优先级",
|
package/components/IssueEvent.js
CHANGED
|
@@ -71,7 +71,7 @@ function p({ workspace: p, event: m }) {
|
|
|
71
71
|
if (w.reason === "inactive") return E("autoClosed", { days: String(w.days) });
|
|
72
72
|
if (w.pullRequest) {
|
|
73
73
|
let e = w.pullRequest;
|
|
74
|
-
return E("statusChangedByPullRequest", {
|
|
74
|
+
return E(w.acceptedFromTriage ? "acceptedByPullRequest" : "statusChangedByPullRequest", {
|
|
75
75
|
status: w.to.name,
|
|
76
76
|
ref: `${e.provider === "gitlab" ? "!" : "#"}${e.number}`
|
|
77
77
|
});
|
|
@@ -5,9 +5,9 @@ import { useErrorMessage as r } from "@parallelworks/problem/react";
|
|
|
5
5
|
import { useTranslations as i } from "use-intl";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
// src/components/TriageButtons.tsx
|
|
8
|
-
function c({ workspace:
|
|
9
|
-
let d = i("triage"), f = e
|
|
10
|
-
if (!f
|
|
8
|
+
function c({ workspace: e, issue: r, onDecided: c }) {
|
|
9
|
+
let d = i("triage"), f = l(e, r), p = t(e, r, c);
|
|
10
|
+
if (!f) return null;
|
|
11
11
|
let m = (e) => /* @__PURE__ */ o(n, {
|
|
12
12
|
variant: e === "accept" ? "primary" : "outline",
|
|
13
13
|
size: "sm",
|
|
@@ -20,14 +20,18 @@ function c({ workspace: r, issue: c, onDecided: u }) {
|
|
|
20
20
|
return /* @__PURE__ */ s(a, { children: [
|
|
21
21
|
m("accept"),
|
|
22
22
|
m("decline"),
|
|
23
|
-
p.error && /* @__PURE__ */ o(
|
|
23
|
+
p.error && /* @__PURE__ */ o(u, { error: p.error })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
26
|
-
function l(
|
|
26
|
+
function l(t, n) {
|
|
27
|
+
let r = e(t, n?.teamId ?? "");
|
|
28
|
+
return !!n?.triage && r;
|
|
29
|
+
}
|
|
30
|
+
function u({ error: e }) {
|
|
27
31
|
let t = r();
|
|
28
32
|
return /* @__PURE__ */ o("p", {
|
|
29
33
|
className: "basis-full text-xs text-danger",
|
|
30
34
|
children: t(e)
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
|
-
export { c as TriageButtons };
|
|
37
|
+
export { c as TriageButtons, l as useCanDecideTriage };
|
package/package.json
CHANGED
|
@@ -1070,7 +1070,7 @@ function Gt({ workspace: e, identifier: t }) {
|
|
|
1070
1070
|
let n = G("issue.activity"), { data: r } = Q(c(e, t)), [i, a] = W(!1), o = At(() => {
|
|
1071
1071
|
let e = [];
|
|
1072
1072
|
for (let t of r) {
|
|
1073
|
-
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
|
|
1073
|
+
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_") || t.type === "issue.triage_accepted" && t.data.pullRequest) continue;
|
|
1074
1074
|
let n = e.at(-1);
|
|
1075
1075
|
t.type === "issue.body_changed" && n?.type === "issue.body_changed" && n.actor.handle === t.actor.handle ? e[e.length - 1] = t : e.push(t);
|
|
1076
1076
|
}
|
|
@@ -4,25 +4,25 @@ import { DecisionCard as a } from "../../components/AgentWork.js";
|
|
|
4
4
|
import { Editor as o } from "../../components/Editor.js";
|
|
5
5
|
import { ArchiveIcon as s, ArrowRightIcon as c, CheckIcon as l, CommentIcon as u, FileTextIcon as d, InboxIcon as f, PriorityIcon as p, ProjectIcon as m, StatusIcon as h, UserIcon as g, usePriorityNames as _ } from "../../components/icons.js";
|
|
6
6
|
import { PersonHoverCard as v } from "../../components/PersonHoverCard.js";
|
|
7
|
-
import { TriageButtons as y } from "../../components/TriageButtons.js";
|
|
8
|
-
import { parseApproval as
|
|
9
|
-
import { copyItem as
|
|
10
|
-
import { useArchiveNotifications as ee, useReadNotifications as te, useUnreadNotifications as
|
|
11
|
-
import { usePageTitle as
|
|
7
|
+
import { TriageButtons as y, useCanDecideTriage as b } from "../../components/TriageButtons.js";
|
|
8
|
+
import { parseApproval as x } from "../../lib/approval.js";
|
|
9
|
+
import { copyItem as S, useLinkItems as C } from "../../lib/menus.js";
|
|
10
|
+
import { useArchiveNotifications as ee, useReadNotifications as te, useUnreadNotifications as ne } from "../../lib/notifications.js";
|
|
11
|
+
import { usePageTitle as re } from "../../lib/pageTitle.js";
|
|
12
12
|
import { usePeople as w } from "../../lib/people.js";
|
|
13
13
|
import { plainText as T } from "../../lib/plainText.js";
|
|
14
|
-
import { Link as E, useNavigate as
|
|
15
|
-
import { useShortcuts as
|
|
14
|
+
import { Link as E, useNavigate as ie } from "../../lib/router.js";
|
|
15
|
+
import { useShortcuts as ae } from "../../lib/shortcuts.js";
|
|
16
16
|
import { Route as D } from "./notifications.js";
|
|
17
17
|
import { Avatar as O, Button as k, Card as A, EmptyState as j, IconButton as M, RelativeTime as N, buttonClasses as P, menuDivider as F, useOpenMenu as I } from "@parallelworks/ui";
|
|
18
|
-
import { useEffect as
|
|
18
|
+
import { useEffect as oe, useMemo as L, useRef as se, useState as ce } from "react";
|
|
19
19
|
import { useTranslations as R } from "use-intl";
|
|
20
20
|
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
21
|
-
import { useQuery as H, useQueryClient as U, useSuspenseQuery as
|
|
22
|
-
import { ListFilterMenu as
|
|
21
|
+
import { useQuery as H, useQueryClient as U, useSuspenseQuery as le } from "@tanstack/react-query";
|
|
22
|
+
import { ListFilterMenu as ue, useListView as W } from "@parallelworks/ui/list";
|
|
23
23
|
// src/routes/$workspace/notifications.tsx?tsr-split=component
|
|
24
24
|
var G = (...e) => e.filter(Boolean).join(" ");
|
|
25
|
-
function
|
|
25
|
+
function de(e, t) {
|
|
26
26
|
let n = /* @__PURE__ */ new Map();
|
|
27
27
|
for (let r of t) {
|
|
28
28
|
let t = r.projectId ? "project" : r.documentId ? "doc" : "issue", i = r.projectId ? `project:${r.projectId}` : r.documentId ? `doc:${r.documentId}` : r.identifier, a = n.get(i);
|
|
@@ -52,7 +52,7 @@ var K = {
|
|
|
52
52
|
reminders: ["reminder"],
|
|
53
53
|
mentions: ["mentioned"]
|
|
54
54
|
}, q = (e) => e.reason === "reminder" && e.excerpt ? /* @__PURE__ */ new Date(`${e.excerpt}T00:00:00`) : /* @__PURE__ */ new Date(0), J = (e) => e.slice(0, e.lastIndexOf("-"));
|
|
55
|
-
function
|
|
55
|
+
function fe(e, t) {
|
|
56
56
|
let n = R("notifications"), r = L(() => {
|
|
57
57
|
let e = [{
|
|
58
58
|
key: "state",
|
|
@@ -88,11 +88,11 @@ function de(e, t) {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
function Y() {
|
|
91
|
-
let { workspace: e } = D.useParams(), { issue: t } = D.useSearch(), i = R("notifications"), a =
|
|
92
|
-
|
|
93
|
-
let u = te(e), d =
|
|
91
|
+
let { workspace: e } = D.useParams(), { issue: t } = D.useSearch(), i = R("notifications"), a = ie(), { data: { notifications: o, unread: c } } = le(n(e));
|
|
92
|
+
re(c > 0 ? `${i("title")} (${c})` : i("title"));
|
|
93
|
+
let u = te(e), d = ne(e), p = ee(e), { data: m = [] } = H(r(e)), h = fe(e, m), g = h.activeFilterCount > 0, _ = (h.filters.state ?? []).includes("unread"), v = h.filters.kind ?? [], y = h.filters.team ?? [], b = L(() => {
|
|
94
94
|
let n = o.filter((e) => (v.length === 0 || v.some((t) => K[t]?.includes(e.reason))) && (y.length === 0 || !!e.identifier && y.includes(J(e.identifier))));
|
|
95
|
-
return
|
|
95
|
+
return de(e, n).filter((e) => !_ || e.unread.length > 0 || e.key === t);
|
|
96
96
|
}, [
|
|
97
97
|
e,
|
|
98
98
|
o,
|
|
@@ -100,58 +100,58 @@ function Y() {
|
|
|
100
100
|
v,
|
|
101
101
|
y,
|
|
102
102
|
t
|
|
103
|
-
]), x = b.findIndex((e) => e.key === t), S = x >= 0 ? b[x] : void 0, [
|
|
103
|
+
]), x = b.findIndex((e) => e.key === t), S = x >= 0 ? b[x] : void 0, [C, w] = ce(/* @__PURE__ */ new Set()), T = se(null), E = L(() => b.filter((e) => C.has(e.key)), [b, C]), O = (t) => {
|
|
104
104
|
a({
|
|
105
105
|
to: "/$workspace/notifications",
|
|
106
106
|
params: { workspace: e },
|
|
107
107
|
search: t ? { issue: t.key } : {},
|
|
108
108
|
replace: !0
|
|
109
109
|
}), t && t.unread.length > 0 && u.mutate(t.unread);
|
|
110
|
-
},
|
|
110
|
+
}, A = (e) => {
|
|
111
111
|
let t = e.flatMap((e) => e.unread);
|
|
112
112
|
t.length > 0 ? u.mutate(t) : d.mutate(e.flatMap((e) => e.items.map((e) => e.id)));
|
|
113
|
-
},
|
|
114
|
-
if (p.mutate(e.flatMap((e) => e.items.map((e) => e.id))),
|
|
113
|
+
}, N = (e) => {
|
|
114
|
+
if (p.mutate(e.flatMap((e) => e.items.map((e) => e.id))), w(/* @__PURE__ */ new Set()), S && e.includes(S)) {
|
|
115
115
|
let t = b.filter((t) => !e.includes(t));
|
|
116
|
-
|
|
116
|
+
O(t[t.findIndex((e) => b.indexOf(e) > x)] ?? t.at(-1));
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, P = (e) => a({ to: e.href }), F = E.length > 0 ? E : S ? [S] : [], I = (e) => w((t) => {
|
|
119
119
|
let n = new Set(t);
|
|
120
120
|
return n.has(e.key) ? n.delete(e.key) : n.add(e.key), n;
|
|
121
|
-
}),
|
|
121
|
+
}), U = (e, t) => {
|
|
122
122
|
let [n, r] = e < t ? [e, t] : [t, e];
|
|
123
|
-
|
|
124
|
-
},
|
|
123
|
+
w(new Set(b.slice(n, r + 1).map((e) => e.key)));
|
|
124
|
+
}, W = (e, t) => {
|
|
125
125
|
let n = b.indexOf(t);
|
|
126
|
-
e.metaKey || e.ctrlKey ? (
|
|
127
|
-
},
|
|
126
|
+
e.metaKey || e.ctrlKey ? (I(t), T.current = n) : e.shiftKey ? U(T.current ?? (x >= 0 ? x : n), n) : (w(/* @__PURE__ */ new Set()), T.current = n, O(t));
|
|
127
|
+
}, q = (e, t) => {
|
|
128
128
|
let n = Math.min(Math.max(x + e, 0), b.length - 1);
|
|
129
|
-
t && ((
|
|
129
|
+
t && ((T.current === null || C.size === 0) && (T.current = Math.max(x, 0)), U(T.current, n)), O(b[n]);
|
|
130
130
|
};
|
|
131
|
-
|
|
132
|
-
j: () =>
|
|
133
|
-
k: () =>
|
|
134
|
-
J: () =>
|
|
135
|
-
K: () =>
|
|
136
|
-
ArrowDown: (e) =>
|
|
137
|
-
ArrowUp: (e) =>
|
|
131
|
+
ae({
|
|
132
|
+
j: () => q(1, !1),
|
|
133
|
+
k: () => q(-1, !1),
|
|
134
|
+
J: () => q(1, !0),
|
|
135
|
+
K: () => q(-1, !0),
|
|
136
|
+
ArrowDown: (e) => q(1, e.shiftKey),
|
|
137
|
+
ArrowUp: (e) => q(-1, e.shiftKey),
|
|
138
138
|
x: () => {
|
|
139
|
-
S && (
|
|
139
|
+
S && (I(S), T.current = x);
|
|
140
140
|
},
|
|
141
|
-
Enter: () => S &&
|
|
142
|
-
e: () =>
|
|
143
|
-
u: () =>
|
|
144
|
-
Escape: () =>
|
|
145
|
-
}),
|
|
141
|
+
Enter: () => S && P(S),
|
|
142
|
+
e: () => F.length > 0 && N(F),
|
|
143
|
+
u: () => F.length > 0 && A(F),
|
|
144
|
+
Escape: () => C.size > 0 ? w(/* @__PURE__ */ new Set()) : O(void 0)
|
|
145
|
+
}), oe(() => {
|
|
146
146
|
document.getElementById(`inbox-${S?.key}`)?.scrollIntoView({ block: "nearest" });
|
|
147
147
|
}, [S]);
|
|
148
|
-
let
|
|
149
|
-
select:
|
|
150
|
-
toggleRead:
|
|
151
|
-
archiveGroups:
|
|
152
|
-
openIssue:
|
|
153
|
-
clickRow:
|
|
154
|
-
targetsOf: (e) =>
|
|
148
|
+
let Y = {
|
|
149
|
+
select: O,
|
|
150
|
+
toggleRead: A,
|
|
151
|
+
archiveGroups: N,
|
|
152
|
+
openIssue: P,
|
|
153
|
+
clickRow: W,
|
|
154
|
+
targetsOf: (e) => C.has(e.key) ? E : (w(/* @__PURE__ */ new Set()), [e])
|
|
155
155
|
};
|
|
156
156
|
return /* @__PURE__ */ V("div", {
|
|
157
157
|
className: "flex h-full flex-col",
|
|
@@ -167,7 +167,7 @@ function Y() {
|
|
|
167
167
|
className: "min-w-0 flex-1 truncate text-xs text-muted-foreground",
|
|
168
168
|
children: i("unreadCount", { count: c })
|
|
169
169
|
}),
|
|
170
|
-
/* @__PURE__ */ B(
|
|
170
|
+
/* @__PURE__ */ B(ue, { view: h }),
|
|
171
171
|
c > 0 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
|
|
172
172
|
type: "button",
|
|
173
173
|
size: "sm",
|
|
@@ -200,16 +200,16 @@ function Y() {
|
|
|
200
200
|
})] })
|
|
201
201
|
]
|
|
202
202
|
}),
|
|
203
|
-
|
|
203
|
+
E.length > 0 && /* @__PURE__ */ V("div", {
|
|
204
204
|
className: "flex min-h-9 shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border bg-human-soft px-4 py-1 text-xs md:px-5",
|
|
205
205
|
children: [
|
|
206
206
|
/* @__PURE__ */ B("span", {
|
|
207
207
|
className: "font-medium text-human",
|
|
208
|
-
children: i("selected", { count:
|
|
208
|
+
children: i("selected", { count: E.length })
|
|
209
209
|
}),
|
|
210
|
-
|
|
210
|
+
E.length < b.length && /* @__PURE__ */ B("button", {
|
|
211
211
|
type: "button",
|
|
212
|
-
onClick: () =>
|
|
212
|
+
onClick: () => w(new Set(b.map((e) => e.key))),
|
|
213
213
|
className: "hover:underline",
|
|
214
214
|
children: i("selectAll", { count: b.length })
|
|
215
215
|
}),
|
|
@@ -219,25 +219,25 @@ function Y() {
|
|
|
219
219
|
/* @__PURE__ */ B(k, {
|
|
220
220
|
type: "button",
|
|
221
221
|
size: "sm",
|
|
222
|
-
onClick: () => u.mutate(
|
|
223
|
-
disabled:
|
|
222
|
+
onClick: () => u.mutate(E.flatMap((e) => e.unread)),
|
|
223
|
+
disabled: E.every((e) => e.unread.length === 0),
|
|
224
224
|
children: i("markRead")
|
|
225
225
|
}),
|
|
226
226
|
/* @__PURE__ */ B(k, {
|
|
227
227
|
type: "button",
|
|
228
228
|
size: "sm",
|
|
229
|
-
onClick: () => d.mutate(
|
|
229
|
+
onClick: () => d.mutate(E.flatMap((e) => e.items.map((e) => e.id))),
|
|
230
230
|
children: i("markUnread")
|
|
231
231
|
}),
|
|
232
232
|
/* @__PURE__ */ B(k, {
|
|
233
233
|
type: "button",
|
|
234
234
|
size: "sm",
|
|
235
|
-
onClick: () =>
|
|
235
|
+
onClick: () => N(E),
|
|
236
236
|
children: i("archive")
|
|
237
237
|
}),
|
|
238
238
|
/* @__PURE__ */ B("button", {
|
|
239
239
|
type: "button",
|
|
240
|
-
onClick: () =>
|
|
240
|
+
onClick: () => w(/* @__PURE__ */ new Set()),
|
|
241
241
|
className: "shrink-0 px-1 hover:underline",
|
|
242
242
|
children: i("clear")
|
|
243
243
|
})
|
|
@@ -266,19 +266,19 @@ function Y() {
|
|
|
266
266
|
children: [/* @__PURE__ */ B("ul", {
|
|
267
267
|
"aria-label": i("title"),
|
|
268
268
|
className: G("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", S ? "hidden" : "flex"),
|
|
269
|
-
children: b.map((t) => /* @__PURE__ */ B(
|
|
269
|
+
children: b.map((t) => /* @__PURE__ */ B(Q, {
|
|
270
270
|
workspace: e,
|
|
271
271
|
group: t,
|
|
272
272
|
selected: t === S,
|
|
273
|
-
picked:
|
|
274
|
-
actions:
|
|
273
|
+
picked: C.has(t.key),
|
|
274
|
+
actions: Y
|
|
275
275
|
}, t.key))
|
|
276
276
|
}), /* @__PURE__ */ B("div", {
|
|
277
277
|
className: G("min-w-0 flex-1 overflow-y-auto md:block", S ? "block" : "hidden"),
|
|
278
|
-
children: S ? /* @__PURE__ */ B(
|
|
278
|
+
children: S ? /* @__PURE__ */ B(ge, {
|
|
279
279
|
workspace: e,
|
|
280
280
|
group: S,
|
|
281
|
-
actions:
|
|
281
|
+
actions: Y
|
|
282
282
|
}) : /* @__PURE__ */ B("div", {
|
|
283
283
|
className: "px-6 py-24",
|
|
284
284
|
children: /* @__PURE__ */ B(j, {
|
|
@@ -292,7 +292,7 @@ function Y() {
|
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
function X(e) {
|
|
295
|
-
let t = R("notifications"), n =
|
|
295
|
+
let t = R("notifications"), n = C();
|
|
296
296
|
return (r) => {
|
|
297
297
|
let [i] = r;
|
|
298
298
|
return [
|
|
@@ -309,7 +309,7 @@ function X(e) {
|
|
|
309
309
|
...r.length === 1 && i ? [
|
|
310
310
|
F,
|
|
311
311
|
...n(i.href),
|
|
312
|
-
...i.identifier ? [
|
|
312
|
+
...i.identifier ? [S(t("copyId"), i.identifier)] : []
|
|
313
313
|
] : []
|
|
314
314
|
];
|
|
315
315
|
};
|
|
@@ -318,7 +318,7 @@ function Z(e) {
|
|
|
318
318
|
let { actorName: t } = w(e);
|
|
319
319
|
return (e) => e.actor.kind === "agent" && e.agentName ? e.agentName : t(e.actor);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Q({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
|
|
322
322
|
let o = R("notifications"), { avatarOf: s } = w(e), c = Z(e), l = I(), u = X(a), d = t.items[0], f = c(d), p = t.unread.length > 0;
|
|
323
323
|
return /* @__PURE__ */ B("li", {
|
|
324
324
|
id: `inbox-${t.key}`,
|
|
@@ -355,7 +355,7 @@ function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
|
|
|
355
355
|
actor: d.actor,
|
|
356
356
|
name: f,
|
|
357
357
|
src: s(d.actor.kind, d.actor.handle),
|
|
358
|
-
badge:
|
|
358
|
+
badge: pe(d)
|
|
359
359
|
})
|
|
360
360
|
}),
|
|
361
361
|
/* @__PURE__ */ V("span", {
|
|
@@ -377,7 +377,7 @@ function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
|
|
|
377
377
|
actor: f,
|
|
378
378
|
agent: d.agentName ?? f,
|
|
379
379
|
date: q(d)
|
|
380
|
-
}), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(
|
|
380
|
+
}), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(ve, { text: d.excerpt })] })]
|
|
381
381
|
}), t.items.length > 1 && /* @__PURE__ */ B("span", {
|
|
382
382
|
className: "shrink-0",
|
|
383
383
|
children: o("more", { count: t.items.length - 1 })
|
|
@@ -407,7 +407,7 @@ function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
|
|
|
407
407
|
})
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function pe(e) {
|
|
411
411
|
switch (e.reason) {
|
|
412
412
|
case "assigned": return /* @__PURE__ */ B(g, {});
|
|
413
413
|
case "commented":
|
|
@@ -416,7 +416,7 @@ function Q(e) {
|
|
|
416
416
|
default: return null;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function me({ workspace: e, identifier: n }) {
|
|
420
420
|
let { data: r } = H(t(e, n)), i = _(), { nameOf: a, avatarOf: s } = w(e);
|
|
421
421
|
return r ? /* @__PURE__ */ V("section", {
|
|
422
422
|
className: "mt-5 rounded-lg border border-border px-4 py-3",
|
|
@@ -454,7 +454,7 @@ function pe({ workspace: e, identifier: n }) {
|
|
|
454
454
|
})]
|
|
455
455
|
}) : null;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function he({ workspace: e, identifier: r }) {
|
|
458
458
|
let i = U(), { data: a } = H(t(e, r));
|
|
459
459
|
return a ? /* @__PURE__ */ B(y, {
|
|
460
460
|
workspace: e,
|
|
@@ -462,65 +462,68 @@ function me({ workspace: e, identifier: r }) {
|
|
|
462
462
|
onDecided: () => i.invalidateQueries({ queryKey: n(e).queryKey })
|
|
463
463
|
}) : null;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
let
|
|
465
|
+
function ge({ workspace: e, group: n, actions: r }) {
|
|
466
|
+
let i = R("notifications"), { avatarOf: a } = w(e), o = Z(e), s = I(), c = X(r), { data: l } = H({
|
|
467
|
+
...t(e, n.identifier ?? ""),
|
|
468
|
+
enabled: !!n.identifier
|
|
469
|
+
}), u = b(e, n.identifier ? l : void 0);
|
|
467
470
|
return /* @__PURE__ */ V("article", {
|
|
468
471
|
className: "w-full px-4 py-5 md:px-8",
|
|
469
|
-
onContextMenu: (e) =>
|
|
472
|
+
onContextMenu: (e) => s(e, c([n])),
|
|
470
473
|
children: [
|
|
471
474
|
/* @__PURE__ */ B("button", {
|
|
472
475
|
type: "button",
|
|
473
|
-
onClick: () =>
|
|
476
|
+
onClick: () => r.select(void 0),
|
|
474
477
|
className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
475
|
-
children:
|
|
478
|
+
children: i("back")
|
|
476
479
|
}),
|
|
477
480
|
/* @__PURE__ */ B("p", {
|
|
478
481
|
className: "text-xs text-muted-foreground",
|
|
479
|
-
children: /* @__PURE__ */ B($, { group:
|
|
482
|
+
children: /* @__PURE__ */ B($, { group: n })
|
|
480
483
|
}),
|
|
481
484
|
/* @__PURE__ */ B("h2", {
|
|
482
485
|
className: "mt-0.5 text-sm font-semibold",
|
|
483
486
|
children: /* @__PURE__ */ B(E, {
|
|
484
|
-
to:
|
|
487
|
+
to: n.href,
|
|
485
488
|
className: "hover:underline",
|
|
486
|
-
children:
|
|
489
|
+
children: n.issueTitle
|
|
487
490
|
})
|
|
488
491
|
}),
|
|
489
492
|
/* @__PURE__ */ V("div", {
|
|
490
493
|
className: "mt-3 flex flex-wrap gap-2",
|
|
491
494
|
children: [
|
|
492
495
|
/* @__PURE__ */ B(E, {
|
|
493
|
-
to:
|
|
496
|
+
to: n.href,
|
|
494
497
|
className: P({
|
|
495
|
-
variant: "primary",
|
|
498
|
+
variant: u ? "secondary" : "primary",
|
|
496
499
|
size: "sm"
|
|
497
500
|
}),
|
|
498
|
-
children:
|
|
501
|
+
children: i(n.kind === "project" ? "openProject" : n.kind === "doc" ? "openDoc" : "openIssue")
|
|
499
502
|
}),
|
|
500
503
|
/* @__PURE__ */ B(k, {
|
|
501
504
|
type: "button",
|
|
502
505
|
size: "sm",
|
|
503
|
-
onClick: () =>
|
|
504
|
-
children:
|
|
506
|
+
onClick: () => r.toggleRead([n]),
|
|
507
|
+
children: n.unread.length > 0 ? i("markRead") : i("markUnread")
|
|
505
508
|
}),
|
|
506
509
|
/* @__PURE__ */ B(k, {
|
|
507
510
|
type: "button",
|
|
508
511
|
size: "sm",
|
|
509
|
-
onClick: () =>
|
|
510
|
-
children:
|
|
512
|
+
onClick: () => r.archiveGroups([n]),
|
|
513
|
+
children: i("archive")
|
|
511
514
|
}),
|
|
512
|
-
|
|
515
|
+
n.identifier && /* @__PURE__ */ B(he, {
|
|
513
516
|
workspace: e,
|
|
514
|
-
identifier:
|
|
517
|
+
identifier: n.identifier
|
|
515
518
|
})
|
|
516
519
|
]
|
|
517
520
|
}),
|
|
518
|
-
|
|
521
|
+
n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(me, {
|
|
519
522
|
workspace: e,
|
|
520
|
-
identifier:
|
|
521
|
-
}), /* @__PURE__ */ B(
|
|
523
|
+
identifier: n.identifier
|
|
524
|
+
}), /* @__PURE__ */ B(ye, {
|
|
522
525
|
workspace: e,
|
|
523
|
-
identifier:
|
|
526
|
+
identifier: n.identifier
|
|
524
527
|
})] }),
|
|
525
528
|
/* @__PURE__ */ B(A, {
|
|
526
529
|
size: "fill",
|
|
@@ -529,8 +532,8 @@ function he({ workspace: e, group: t, actions: n }) {
|
|
|
529
532
|
interactive: !1,
|
|
530
533
|
render: /* @__PURE__ */ B("ol", {}),
|
|
531
534
|
className: "mt-5 overflow-hidden",
|
|
532
|
-
children:
|
|
533
|
-
let n =
|
|
535
|
+
children: n.items.map((t) => {
|
|
536
|
+
let n = o(t);
|
|
534
537
|
return /* @__PURE__ */ V("li", {
|
|
535
538
|
className: "flex gap-3 px-3 py-3",
|
|
536
539
|
children: [/* @__PURE__ */ B(v, {
|
|
@@ -540,7 +543,7 @@ function he({ workspace: e, group: t, actions: n }) {
|
|
|
540
543
|
className: "inline-flex shrink-0 self-start",
|
|
541
544
|
children: /* @__PURE__ */ B(O, {
|
|
542
545
|
name: n,
|
|
543
|
-
src:
|
|
546
|
+
src: a(t.actor.kind, t.actor.handle),
|
|
544
547
|
size: "sm"
|
|
545
548
|
})
|
|
546
549
|
}), /* @__PURE__ */ V("div", {
|
|
@@ -549,7 +552,7 @@ function he({ workspace: e, group: t, actions: n }) {
|
|
|
549
552
|
className: "flex items-baseline gap-2 text-sm",
|
|
550
553
|
children: [/* @__PURE__ */ B("span", {
|
|
551
554
|
className: G("flex-1", !t.readAt && "font-medium"),
|
|
552
|
-
children:
|
|
555
|
+
children: i(t.reason, {
|
|
553
556
|
actor: n,
|
|
554
557
|
agent: t.agentName ?? n,
|
|
555
558
|
date: q(t)
|
|
@@ -560,7 +563,7 @@ function he({ workspace: e, group: t, actions: n }) {
|
|
|
560
563
|
exact: "medium",
|
|
561
564
|
className: "text-xs text-muted-foreground"
|
|
562
565
|
})]
|
|
563
|
-
}), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(
|
|
566
|
+
}), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(_e, { text: t.excerpt })]
|
|
564
567
|
})]
|
|
565
568
|
}, t.id);
|
|
566
569
|
})
|
|
@@ -568,8 +571,8 @@ function he({ workspace: e, group: t, actions: n }) {
|
|
|
568
571
|
]
|
|
569
572
|
});
|
|
570
573
|
}
|
|
571
|
-
function
|
|
572
|
-
let t = R("agentWork"), n =
|
|
574
|
+
function _e({ text: e }) {
|
|
575
|
+
let t = R("agentWork"), n = x(e);
|
|
573
576
|
return n ? /* @__PURE__ */ V("div", {
|
|
574
577
|
className: "mt-1 min-w-0 text-sm text-muted-foreground",
|
|
575
578
|
children: [
|
|
@@ -591,14 +594,14 @@ function ge({ text: e }) {
|
|
|
591
594
|
})
|
|
592
595
|
});
|
|
593
596
|
}
|
|
594
|
-
function
|
|
595
|
-
let t =
|
|
597
|
+
function ve({ text: e }) {
|
|
598
|
+
let t = x(e);
|
|
596
599
|
return t ? /* @__PURE__ */ B("code", {
|
|
597
600
|
className: "font-mono",
|
|
598
601
|
children: t.command
|
|
599
602
|
}) : T(e);
|
|
600
603
|
}
|
|
601
|
-
function
|
|
604
|
+
function ye({ workspace: t, identifier: n }) {
|
|
602
605
|
let r = R("notifications"), { data: i = [] } = H(e(t, n)), o = i.filter((e) => !e.answer && !e.canceled);
|
|
603
606
|
return o.length === 0 ? null : /* @__PURE__ */ V("section", {
|
|
604
607
|
"aria-label": r("waitingOnYou"),
|