@parallelworks/tandem-web 0.171.0 → 0.171.2
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/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +23 -23
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +12 -12
- package/components/IssueFilters.js +103 -99
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +4 -4
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +4 -4
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assigneeOrder.js +6 -0
- package/lib/assignees.js +24 -20
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +109 -109
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
package/pages/triage.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { AddIcon as
|
|
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 { AddIcon as c, PriorityIcon as l, StatusIcon as u, TriageIcon as d, usePriorityNames as f } from "../components/icons.js";
|
|
7
|
+
import { actorAvatar as p } from "../lib/avatar.js";
|
|
8
|
+
import { usePageTitle as m } from "../lib/pageTitle.js";
|
|
7
9
|
import { usePeople as h } from "../lib/people.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { useShortcuts as b } from "../lib/shortcuts.js";
|
|
14
|
-
import { ActorAvatar as x } from "../components/ActorAvatar.js";
|
|
10
|
+
import { useCanTriage as g } from "../lib/roles.js";
|
|
11
|
+
import { Link as _, useNavigate as v } from "../lib/router.js";
|
|
12
|
+
import { useShortcuts as ee } from "../lib/shortcuts.js";
|
|
13
|
+
import { useTime as y } from "../lib/time.js";
|
|
14
|
+
import { triageQuery as b, useVisitTriage as x } from "../lib/triage.js";
|
|
15
15
|
import { unseen as S } from "../lib/triageSeen.js";
|
|
16
16
|
import { Avatar as C, Button as w, EmptyState as T, RelativeTime as E, buttonClasses as D, toast as O } from "@parallelworks/ui";
|
|
17
17
|
import { useParams as te, useSearch as k } from "@tanstack/react-router";
|
|
@@ -22,14 +22,14 @@ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
|
22
22
|
import { useMutation as z, useQuery as B, useQueryClient as V, useSuspenseQuery as H } from "@tanstack/react-query";
|
|
23
23
|
// src/pages/triage.tsx
|
|
24
24
|
function U() {
|
|
25
|
-
let
|
|
26
|
-
n(
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
}, []),
|
|
25
|
+
let n = F("triage"), { workspace: r, key: a } = te({ strict: !1 }), { issue: o } = k({ strict: !1 }), { data: s } = H(b(r, a));
|
|
26
|
+
m(n("title"));
|
|
27
|
+
let c = s.issues, l = P(), u = V(), [f, p] = N(/* @__PURE__ */ new Set()), [h, g] = N(/* @__PURE__ */ new Set()), _ = A((e, t) => {
|
|
28
|
+
p((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : G(n, e));
|
|
29
|
+
}, []), y = c.filter((e) => f.has(e.id)), C = y.filter((e) => h.has(e.id)), E = v(), D = c.findIndex((e) => e.identifier === o?.toUpperCase()), I = M(null), U = c[D], { data: K, isError: ie } = B(i(r)), ae = {
|
|
30
30
|
data: K,
|
|
31
31
|
failed: ie
|
|
32
|
-
}, { mutate: q } =
|
|
32
|
+
}, { mutate: q } = x(r), J = M(/* @__PURE__ */ new Set());
|
|
33
33
|
j(() => {
|
|
34
34
|
U && K && !K.includes(U.id) && !J.current.has(U.id) && (J.current.add(U.id), q({
|
|
35
35
|
id: U.id,
|
|
@@ -45,22 +45,22 @@ function U() {
|
|
|
45
45
|
search: e ? { issue: e.identifier.toLowerCase() } : {},
|
|
46
46
|
replace: !0
|
|
47
47
|
}), X = (e) => {
|
|
48
|
-
|
|
48
|
+
f.has(e.id) && g((t) => t.has(e.id) ? G(t, e.id) : new Set(t).add(e.id));
|
|
49
49
|
}, Z = (e, t) => {
|
|
50
50
|
let [n, r] = e < t ? [e, t] : [t, e];
|
|
51
|
-
|
|
51
|
+
g(new Set(c.slice(n, r + 1).filter((e) => f.has(e.id)).map((e) => e.id)));
|
|
52
52
|
}, oe = (e, t) => {
|
|
53
|
-
let n =
|
|
53
|
+
let n = c[t];
|
|
54
54
|
n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), X(n), I.current = t) : e.shiftKey && (e.preventDefault(), Z(I.current ?? (D >= 0 ? D : t), t)));
|
|
55
55
|
}, Q = (e, t) => {
|
|
56
|
-
if (
|
|
57
|
-
let n = D < 0 ? 0 : Math.min(Math.max(D + e, 0),
|
|
58
|
-
t && ((I.current === null ||
|
|
56
|
+
if (c.length === 0) return;
|
|
57
|
+
let n = D < 0 ? 0 : Math.min(Math.max(D + e, 0), c.length - 1);
|
|
58
|
+
t && ((I.current === null || h.size === 0) && (I.current = Math.max(D, 0)), Z(I.current, n)), Y(c[n]);
|
|
59
59
|
}, se = (e) => {
|
|
60
|
-
let t =
|
|
61
|
-
e.id === U?.id && Y(
|
|
60
|
+
let t = c.findIndex((t) => t.id === e.id);
|
|
61
|
+
e.id === U?.id && Y(c[t + 1] ?? c[t - 1]);
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
ee({
|
|
64
64
|
j: () => Q(1, !1),
|
|
65
65
|
k: () => Q(-1, !1),
|
|
66
66
|
J: () => Q(1, !0),
|
|
@@ -73,40 +73,40 @@ function U() {
|
|
|
73
73
|
Enter: () => U && E({
|
|
74
74
|
to: "/$workspace/issues/$identifier",
|
|
75
75
|
params: {
|
|
76
|
-
workspace:
|
|
76
|
+
workspace: r,
|
|
77
77
|
identifier: U.identifier
|
|
78
78
|
}
|
|
79
79
|
}),
|
|
80
|
-
"Mod+a": () =>
|
|
81
|
-
"Shift+Mod+a": () =>
|
|
82
|
-
Escape: () =>
|
|
80
|
+
"Mod+a": () => g(new Set(c.map((e) => e.id))),
|
|
81
|
+
"Shift+Mod+a": () => g(/* @__PURE__ */ new Set()),
|
|
82
|
+
Escape: () => h.size > 0 ? g(/* @__PURE__ */ new Set()) : Y(void 0)
|
|
83
83
|
}), j(() => {
|
|
84
84
|
let e = U && document.getElementById(`triage-${U.id}`);
|
|
85
85
|
e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
|
|
86
86
|
}, [U]);
|
|
87
87
|
let $ = z({
|
|
88
|
-
mutationFn: async (n) => (await Promise.allSettled(C.map(async (
|
|
88
|
+
mutationFn: async (n) => (await Promise.allSettled(C.map(async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
89
89
|
params: { path: {
|
|
90
|
-
workspace:
|
|
91
|
-
identifier:
|
|
90
|
+
workspace: r,
|
|
91
|
+
identifier: i.identifier
|
|
92
92
|
} },
|
|
93
93
|
body: { decision: n }
|
|
94
94
|
}))))).filter((e) => e.status === "rejected"),
|
|
95
95
|
onSuccess: (e) => {
|
|
96
|
-
if (U &&
|
|
97
|
-
let e = (e) => !
|
|
98
|
-
Y(
|
|
96
|
+
if (U && h.has(U.id)) {
|
|
97
|
+
let e = (e) => !h.has(e.id);
|
|
98
|
+
Y(c.slice(D + 1).find(e) ?? c.slice(0, D).findLast(e));
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
g(/* @__PURE__ */ new Set());
|
|
101
101
|
let t = e[0];
|
|
102
|
-
t && O.error(
|
|
102
|
+
t && O.error(n("bulkFailed", {
|
|
103
103
|
count: e.length,
|
|
104
|
-
reason:
|
|
104
|
+
reason: l(t.reason)
|
|
105
105
|
}));
|
|
106
106
|
},
|
|
107
|
-
onSettled: () =>
|
|
107
|
+
onSettled: () => u.invalidateQueries({ queryKey: [
|
|
108
108
|
"workspace",
|
|
109
|
-
|
|
109
|
+
r,
|
|
110
110
|
"issues"
|
|
111
111
|
] })
|
|
112
112
|
});
|
|
@@ -117,69 +117,69 @@ function U() {
|
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ L("h1", {
|
|
119
119
|
className: "text-sm font-semibold",
|
|
120
|
-
children:
|
|
120
|
+
children: n("title")
|
|
121
121
|
}),
|
|
122
122
|
/* @__PURE__ */ L("span", {
|
|
123
123
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
124
|
-
children:
|
|
124
|
+
children: c.length
|
|
125
125
|
}),
|
|
126
126
|
C.length > 0 && /* @__PURE__ */ R("div", {
|
|
127
127
|
className: "ml-auto flex items-center gap-2",
|
|
128
128
|
children: [
|
|
129
129
|
/* @__PURE__ */ L("span", {
|
|
130
130
|
className: "text-xs font-medium text-human",
|
|
131
|
-
children:
|
|
131
|
+
children: n("selected", { count: C.length })
|
|
132
132
|
}),
|
|
133
|
-
C.length <
|
|
133
|
+
C.length < y.length && /* @__PURE__ */ L("button", {
|
|
134
134
|
type: "button",
|
|
135
|
-
onClick: () =>
|
|
135
|
+
onClick: () => g(new Set(y.map((e) => e.id))),
|
|
136
136
|
className: "text-xs hover:underline",
|
|
137
|
-
children:
|
|
137
|
+
children: n("selectAll")
|
|
138
138
|
}),
|
|
139
139
|
/* @__PURE__ */ L("button", {
|
|
140
140
|
type: "button",
|
|
141
|
-
onClick: () =>
|
|
141
|
+
onClick: () => g(/* @__PURE__ */ new Set()),
|
|
142
142
|
className: "text-xs hover:underline",
|
|
143
|
-
children:
|
|
143
|
+
children: n("clear")
|
|
144
144
|
}),
|
|
145
145
|
/* @__PURE__ */ L(w, {
|
|
146
146
|
variant: "outline",
|
|
147
147
|
size: "sm",
|
|
148
|
-
title:
|
|
148
|
+
title: n("declineHelp"),
|
|
149
149
|
loading: $.isPending && $.variables === "decline",
|
|
150
150
|
disabled: $.isPending,
|
|
151
151
|
onClick: () => $.mutate("decline"),
|
|
152
|
-
children:
|
|
152
|
+
children: n("declineCount", { count: C.length })
|
|
153
153
|
}),
|
|
154
154
|
/* @__PURE__ */ L(w, {
|
|
155
155
|
variant: "primary",
|
|
156
156
|
size: "sm",
|
|
157
|
-
title:
|
|
157
|
+
title: n("acceptHelp"),
|
|
158
158
|
loading: $.isPending && $.variables === "accept",
|
|
159
159
|
disabled: $.isPending,
|
|
160
160
|
onClick: () => $.mutate("accept"),
|
|
161
|
-
children:
|
|
161
|
+
children: n("acceptCount", { count: C.length })
|
|
162
162
|
})
|
|
163
163
|
]
|
|
164
164
|
})
|
|
165
165
|
]
|
|
166
|
-
}),
|
|
166
|
+
}), c.length === 0 ? /* @__PURE__ */ L("div", {
|
|
167
167
|
className: "min-h-0 flex-1 overflow-y-auto p-6",
|
|
168
168
|
children: /* @__PURE__ */ L(T, {
|
|
169
|
-
icon: /* @__PURE__ */ L(
|
|
170
|
-
title:
|
|
171
|
-
description:
|
|
169
|
+
icon: /* @__PURE__ */ L(d, {}),
|
|
170
|
+
title: n("empty"),
|
|
171
|
+
description: n("emptyDescription")
|
|
172
172
|
})
|
|
173
173
|
}) : /* @__PURE__ */ R("div", {
|
|
174
174
|
className: "flex min-h-0 flex-1",
|
|
175
175
|
children: [/* @__PURE__ */ L("ul", {
|
|
176
|
-
"aria-label":
|
|
176
|
+
"aria-label": n("title"),
|
|
177
177
|
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"),
|
|
178
|
-
children:
|
|
179
|
-
workspace:
|
|
178
|
+
children: c.map((e, t) => /* @__PURE__ */ L(ne, {
|
|
179
|
+
workspace: r,
|
|
180
180
|
issue: e,
|
|
181
|
-
onEligible:
|
|
182
|
-
picked:
|
|
181
|
+
onEligible: _,
|
|
182
|
+
picked: h.has(e.id) && f.has(e.id),
|
|
183
183
|
current: t === D,
|
|
184
184
|
unread: S(e.id, ae),
|
|
185
185
|
onClick: (e) => oe(e, t)
|
|
@@ -187,15 +187,15 @@ function U() {
|
|
|
187
187
|
}), /* @__PURE__ */ L("div", {
|
|
188
188
|
className: W("min-w-0 flex-1 overflow-y-auto md:block", U ? "block" : "hidden"),
|
|
189
189
|
children: U ? /* @__PURE__ */ L(re, {
|
|
190
|
-
workspace:
|
|
190
|
+
workspace: r,
|
|
191
191
|
issue: U,
|
|
192
192
|
onBack: () => Y(void 0),
|
|
193
193
|
onDecided: se
|
|
194
194
|
}, U.id) : /* @__PURE__ */ L("div", {
|
|
195
195
|
className: "px-6 py-24",
|
|
196
196
|
children: /* @__PURE__ */ L(T, {
|
|
197
|
-
title:
|
|
198
|
-
description:
|
|
197
|
+
title: n("noneSelected"),
|
|
198
|
+
description: n("shortcuts")
|
|
199
199
|
})
|
|
200
200
|
})
|
|
201
201
|
})]
|
|
@@ -207,8 +207,8 @@ function G(e, t) {
|
|
|
207
207
|
let n = new Set(e);
|
|
208
208
|
return n.delete(t), n;
|
|
209
209
|
}
|
|
210
|
-
function ne({ workspace: e, issue: t, onEligible: n, picked:
|
|
211
|
-
let
|
|
210
|
+
function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, unread: o, onClick: s }) {
|
|
211
|
+
let l = F("triage"), { actorName: d, avatarOf: f } = h(e), p = g(e, t.teamId);
|
|
212
212
|
j(() => n(t.id, p), [
|
|
213
213
|
n,
|
|
214
214
|
t.id,
|
|
@@ -217,30 +217,30 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: i, current: a, unre
|
|
|
217
217
|
let m = t.creator;
|
|
218
218
|
return /* @__PURE__ */ L("li", {
|
|
219
219
|
id: `triage-${t.id}`,
|
|
220
|
-
"data-picked":
|
|
221
|
-
children: /* @__PURE__ */ R(
|
|
220
|
+
"data-picked": r || void 0,
|
|
221
|
+
children: /* @__PURE__ */ R(_, {
|
|
222
222
|
to: ".",
|
|
223
223
|
search: { issue: t.identifier.toLowerCase() },
|
|
224
224
|
replace: !0,
|
|
225
225
|
onClick: s,
|
|
226
|
-
"aria-current":
|
|
227
|
-
className: W("flex gap-3 px-2 py-2.5 select-none",
|
|
226
|
+
"aria-current": i || void 0,
|
|
227
|
+
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")),
|
|
228
228
|
children: [
|
|
229
229
|
/* @__PURE__ */ L("span", {
|
|
230
230
|
className: "flex w-2 shrink-0 justify-center pt-2.5",
|
|
231
231
|
children: o && /* @__PURE__ */ L("span", {
|
|
232
232
|
role: "img",
|
|
233
|
-
"aria-label":
|
|
233
|
+
"aria-label": l("unseen"),
|
|
234
234
|
className: "size-2 rounded-full bg-primary"
|
|
235
235
|
})
|
|
236
236
|
}),
|
|
237
237
|
/* @__PURE__ */ L("span", {
|
|
238
|
-
className: W("h-fit shrink-0 rounded-full",
|
|
239
|
-
children: /* @__PURE__ */ L(
|
|
238
|
+
className: W("h-fit shrink-0 rounded-full", r && "ring-1 ring-human/40"),
|
|
239
|
+
children: /* @__PURE__ */ L(a, {
|
|
240
240
|
actor: m,
|
|
241
|
-
name:
|
|
242
|
-
src:
|
|
243
|
-
badge: /* @__PURE__ */ L(
|
|
241
|
+
name: d(m),
|
|
242
|
+
src: f(m.kind, m.handle),
|
|
243
|
+
badge: /* @__PURE__ */ L(c, {})
|
|
244
244
|
})
|
|
245
245
|
}),
|
|
246
246
|
/* @__PURE__ */ R("span", {
|
|
@@ -256,14 +256,14 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: i, current: a, unre
|
|
|
256
256
|
})]
|
|
257
257
|
}), /* @__PURE__ */ L("span", {
|
|
258
258
|
className: "mt-0.5 block truncate text-xs text-muted-foreground",
|
|
259
|
-
children:
|
|
259
|
+
children: l("from", { name: d(m) })
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
262
|
/* @__PURE__ */ R("span", {
|
|
263
263
|
className: "flex shrink-0 flex-col items-end gap-1 pt-0.5",
|
|
264
264
|
children: [/* @__PURE__ */ R("span", {
|
|
265
265
|
className: "flex h-4 items-center",
|
|
266
|
-
children: [/* @__PURE__ */ L(
|
|
266
|
+
children: [/* @__PURE__ */ L(u, {
|
|
267
267
|
category: t.status.category,
|
|
268
268
|
step: t.status.step
|
|
269
269
|
}), /* @__PURE__ */ L("span", {
|
|
@@ -281,19 +281,19 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: i, current: a, unre
|
|
|
281
281
|
})
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
|
-
function re({ workspace:
|
|
285
|
-
let
|
|
286
|
-
mutationFn: async (
|
|
284
|
+
function re({ workspace: i, issue: a, onBack: c, onDecided: d }) {
|
|
285
|
+
let m = F("triage"), v = y(), ee = P(), b = V(), x = f(), { data: S } = H(r(i)), { data: T } = B(n(i, a.identifier)), E = T ?? a, { actorName: O, avatarOf: te } = h(i), k = S.find((e) => e.id === E.teamId), A = g(i, E.teamId), j = z({
|
|
286
|
+
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
287
287
|
params: { path: {
|
|
288
|
-
workspace:
|
|
288
|
+
workspace: i,
|
|
289
289
|
identifier: E.identifier
|
|
290
290
|
} },
|
|
291
|
-
body: { decision:
|
|
291
|
+
body: { decision: n }
|
|
292
292
|
})),
|
|
293
293
|
onSuccess: () => {
|
|
294
|
-
|
|
294
|
+
d(a), b.invalidateQueries({ queryKey: [
|
|
295
295
|
"workspace",
|
|
296
|
-
|
|
296
|
+
i,
|
|
297
297
|
"issues"
|
|
298
298
|
] });
|
|
299
299
|
}
|
|
@@ -303,14 +303,14 @@ function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
|
|
|
303
303
|
children: [
|
|
304
304
|
/* @__PURE__ */ L("button", {
|
|
305
305
|
type: "button",
|
|
306
|
-
onClick:
|
|
306
|
+
onClick: c,
|
|
307
307
|
className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
308
|
-
children:
|
|
308
|
+
children: m("back")
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ R("p", {
|
|
311
311
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
312
312
|
children: [
|
|
313
|
-
k && /* @__PURE__ */ L(
|
|
313
|
+
k && /* @__PURE__ */ L(s, {
|
|
314
314
|
icon: k.icon,
|
|
315
315
|
name: k.name,
|
|
316
316
|
className: "size-3.5"
|
|
@@ -324,14 +324,14 @@ function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
|
|
|
324
324
|
children: "·"
|
|
325
325
|
}),
|
|
326
326
|
/* @__PURE__ */ L(C, {
|
|
327
|
-
...
|
|
327
|
+
...p(M.kind),
|
|
328
328
|
name: O(M),
|
|
329
329
|
src: te(M.kind, M.handle),
|
|
330
330
|
size: "xs"
|
|
331
331
|
}),
|
|
332
332
|
/* @__PURE__ */ L("span", {
|
|
333
333
|
className: "truncate",
|
|
334
|
-
children:
|
|
334
|
+
children: m("from", { name: O(M) })
|
|
335
335
|
}),
|
|
336
336
|
/* @__PURE__ */ L("span", {
|
|
337
337
|
"aria-hidden": "true",
|
|
@@ -339,17 +339,17 @@ function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
|
|
|
339
339
|
}),
|
|
340
340
|
/* @__PURE__ */ L("time", {
|
|
341
341
|
dateTime: E.createdAt,
|
|
342
|
-
title:
|
|
343
|
-
children:
|
|
342
|
+
title: v.full(E.createdAt),
|
|
343
|
+
children: v.relative(E.createdAt)
|
|
344
344
|
})
|
|
345
345
|
]
|
|
346
346
|
}),
|
|
347
347
|
/* @__PURE__ */ L("h2", {
|
|
348
348
|
className: "mt-1 text-xl font-semibold text-balance",
|
|
349
|
-
children: /* @__PURE__ */ L(
|
|
349
|
+
children: /* @__PURE__ */ L(_, {
|
|
350
350
|
to: "/$workspace/issues/$identifier",
|
|
351
351
|
params: {
|
|
352
|
-
workspace:
|
|
352
|
+
workspace: i,
|
|
353
353
|
identifier: E.identifier
|
|
354
354
|
},
|
|
355
355
|
className: "hover:underline",
|
|
@@ -361,53 +361,53 @@ function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
|
|
|
361
361
|
children: [A && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(w, {
|
|
362
362
|
variant: "primary",
|
|
363
363
|
size: "sm",
|
|
364
|
-
title:
|
|
364
|
+
title: m("acceptHelp"),
|
|
365
365
|
loading: j.isPending && j.variables === "accept",
|
|
366
366
|
disabled: j.isPending,
|
|
367
367
|
onClick: () => j.mutate("accept"),
|
|
368
|
-
children:
|
|
368
|
+
children: m("accept")
|
|
369
369
|
}), /* @__PURE__ */ L(w, {
|
|
370
370
|
variant: "outline",
|
|
371
371
|
size: "sm",
|
|
372
|
-
title:
|
|
372
|
+
title: m("declineHelp"),
|
|
373
373
|
loading: j.isPending && j.variables === "decline",
|
|
374
374
|
disabled: j.isPending,
|
|
375
375
|
onClick: () => j.mutate("decline"),
|
|
376
|
-
children:
|
|
377
|
-
})] }), /* @__PURE__ */ L(
|
|
376
|
+
children: m("decline")
|
|
377
|
+
})] }), /* @__PURE__ */ L(_, {
|
|
378
378
|
to: "/$workspace/issues/$identifier",
|
|
379
379
|
params: {
|
|
380
|
-
workspace:
|
|
380
|
+
workspace: i,
|
|
381
381
|
identifier: E.identifier
|
|
382
382
|
},
|
|
383
383
|
className: D({
|
|
384
384
|
size: "sm",
|
|
385
385
|
variant: "ghost"
|
|
386
386
|
}),
|
|
387
|
-
children:
|
|
387
|
+
children: m("openIssue")
|
|
388
388
|
})]
|
|
389
389
|
}),
|
|
390
390
|
j.error && /* @__PURE__ */ L("p", {
|
|
391
391
|
className: "mt-2 text-xs text-danger",
|
|
392
|
-
children:
|
|
392
|
+
children: ee(j.error)
|
|
393
393
|
}),
|
|
394
394
|
/* @__PURE__ */ L("p", {
|
|
395
395
|
className: "mt-3 text-xs text-muted-foreground",
|
|
396
|
-
children:
|
|
396
|
+
children: m("duplicateHint")
|
|
397
397
|
}),
|
|
398
398
|
/* @__PURE__ */ R("div", {
|
|
399
399
|
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",
|
|
400
400
|
children: [
|
|
401
401
|
/* @__PURE__ */ R("span", {
|
|
402
402
|
className: "inline-flex items-center gap-1.5",
|
|
403
|
-
children: [/* @__PURE__ */ L(
|
|
403
|
+
children: [/* @__PURE__ */ L(u, {
|
|
404
404
|
category: E.status.category,
|
|
405
405
|
step: E.status.step
|
|
406
406
|
}), E.status.name]
|
|
407
407
|
}),
|
|
408
408
|
/* @__PURE__ */ R("span", {
|
|
409
409
|
className: "inline-flex items-center gap-1.5",
|
|
410
|
-
children: [/* @__PURE__ */ L(
|
|
410
|
+
children: [/* @__PURE__ */ L(l, { priority: E.priority }), x[E.priority]]
|
|
411
411
|
}),
|
|
412
412
|
E.labels.map((e) => /* @__PURE__ */ R("span", {
|
|
413
413
|
className: "inline-flex items-center gap-1.5",
|
|
@@ -420,13 +420,13 @@ function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
|
|
|
420
420
|
}),
|
|
421
421
|
E.body.trim() ? /* @__PURE__ */ L("div", {
|
|
422
422
|
className: "mt-5 text-sm",
|
|
423
|
-
children: /* @__PURE__ */ L(
|
|
423
|
+
children: /* @__PURE__ */ L(o, {
|
|
424
424
|
value: E.body,
|
|
425
425
|
editable: !1
|
|
426
426
|
})
|
|
427
427
|
}) : /* @__PURE__ */ L("p", {
|
|
428
428
|
className: "mt-5 text-sm text-muted-foreground",
|
|
429
|
-
children:
|
|
429
|
+
children: m("noDescription")
|
|
430
430
|
})
|
|
431
431
|
]
|
|
432
432
|
});
|