@parallelworks/tandem-web 0.150.3 → 0.152.0
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 +36 -4
- package/_virtual/_virtual_i18n/es/common.js +36 -4
- package/_virtual/_virtual_i18n/ja/common.js +36 -4
- package/_virtual/_virtual_i18n/ko/common.js +36 -4
- package/_virtual/_virtual_i18n/zh/common.js +36 -4
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +1 -1
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +414 -151
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
package/pages/area.js
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
+
import { usePageTitle as n } from "../lib/pageTitle.js";
|
|
3
|
+
import { Link as r, useNavigate as ee } from "../lib/router.js";
|
|
4
|
+
import { areaThreadQuery as i, areasQuery as te, countsQuery as a, inboxQuery as ne, teamsQuery as re } from "../api/queries.js";
|
|
5
|
+
import { docRef as ie } from "../lib/docs.js";
|
|
6
|
+
import { AddIcon as ae, AreaIcon as o, CheckIcon as s, ChevronRightIcon as c, FileTextIcon as l, InboxIcon as oe, LibraryIcon as se } from "../components/icons.js";
|
|
7
|
+
import { useNewIssue as ce } from "../lib/newIssue.js";
|
|
8
|
+
import { Editor as le } from "../components/Editor.js";
|
|
9
|
+
import { DecisionCard as ue } from "../components/AgentWork.js";
|
|
10
|
+
import { AreaLink as de } from "../components/AreaLink.js";
|
|
11
|
+
import { AreaTile as fe, AreaTiles as pe } from "../components/AreaTiles.js";
|
|
12
|
+
import { AreaGroup as u, FoldedAnswer as me, KnowledgeRow as he } from "../components/AreaWork.js";
|
|
13
|
+
import { WorkCounts as d } from "../components/WorkCounts.js";
|
|
14
|
+
import { useShortcuts as ge } from "../lib/shortcuts.js";
|
|
15
|
+
import { Button as f, EmptyState as _e, Kbd as p } from "@parallelworks/ui";
|
|
16
|
+
import { useParams as m, useSearch as h } from "@tanstack/react-router";
|
|
17
|
+
import { useEffect as g, useState as _ } from "react";
|
|
18
|
+
import { useTranslations as v } from "use-intl";
|
|
19
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
20
|
+
import { useMutation as ve, useQuery as x, useQueryClient as ye, useSuspenseQuery as S } from "@tanstack/react-query";
|
|
21
|
+
// src/pages/area.tsx
|
|
22
|
+
var C = (e) => ({ ...typeof e.decision == "string" && { decision: e.decision } });
|
|
23
|
+
function w() {
|
|
24
|
+
let { workspace: e, area: t } = m({ strict: !1 });
|
|
25
|
+
return S(i(e, t)).data;
|
|
26
|
+
}
|
|
27
|
+
function T() {
|
|
28
|
+
let e = w();
|
|
29
|
+
return /* @__PURE__ */ y(D, { thread: e }, e.area.id);
|
|
30
|
+
}
|
|
31
|
+
var E = (...e) => e.filter(Boolean).join(" ");
|
|
32
|
+
function D({ thread: i }) {
|
|
33
|
+
let p = v("areaPage"), { workspace: C, area: w, key: T } = m({ strict: !1 }), { decision: D } = h({ strict: !1 }), A = ee(), j = ye(), { data: M } = S(a(C)), { data: N = [] } = x(te(C)), { data: P = [] } = x(re(C)), { data: be = [] } = x(ne(C)), xe = ce(), { area: F, open: I, answered: L, knowledge: R, siblings: z, summary: B } = i;
|
|
34
|
+
n(F.title);
|
|
35
|
+
let [V] = _(() => i.lastVisitedAt ? Date.parse(i.lastVisitedAt) : null), H = (e) => !!e && V !== null && Date.parse(e) > V, U = P.find((e) => e.id === F.teamId), W = (e, t) => {
|
|
36
|
+
let n = P.find((t) => t.id === e.teamId), r = t ? { decision: t } : {};
|
|
37
|
+
A(n ? {
|
|
38
|
+
to: "/$workspace/teams/$key/areas/$area",
|
|
39
|
+
params: {
|
|
40
|
+
workspace: C,
|
|
41
|
+
key: n.key,
|
|
42
|
+
area: e.key
|
|
43
|
+
},
|
|
44
|
+
search: r,
|
|
45
|
+
replace: !0
|
|
46
|
+
} : {
|
|
47
|
+
to: "/$workspace/areas/$area",
|
|
48
|
+
params: {
|
|
49
|
+
workspace: C,
|
|
50
|
+
area: e.key
|
|
51
|
+
},
|
|
52
|
+
search: r,
|
|
53
|
+
replace: !0
|
|
54
|
+
});
|
|
55
|
+
}, Se = P.length > 0 || !F.teamId;
|
|
56
|
+
g(() => {
|
|
57
|
+
Se && (w.toLowerCase() !== F.key || T !== U?.key) && W(F, D);
|
|
58
|
+
}), g(() => {
|
|
59
|
+
e.POST("/api/v1/workspaces/{workspace}/areas/{area}/visit", { params: { path: {
|
|
60
|
+
workspace: C,
|
|
61
|
+
area: F.key
|
|
62
|
+
} } });
|
|
63
|
+
}, [C, F.key]);
|
|
64
|
+
let G = I.find((e) => e.identifier.toLowerCase() === D?.toLowerCase() || e.id === D), K = G?.id;
|
|
65
|
+
g(() => {
|
|
66
|
+
K && document.getElementById(`decision-${K}`)?.scrollIntoView({ block: "center" });
|
|
67
|
+
}, [K]);
|
|
68
|
+
let q = ve({
|
|
69
|
+
mutationFn: async ({ decision: n, optionId: r }) => t(await e.POST("/api/v1/workspaces/{workspace}/decisions/{decisionId}/answer", {
|
|
70
|
+
params: { path: {
|
|
71
|
+
workspace: C,
|
|
72
|
+
decisionId: n.id
|
|
73
|
+
} },
|
|
74
|
+
body: { optionId: r }
|
|
75
|
+
})),
|
|
76
|
+
onSettled: () => j.invalidateQueries({ queryKey: [
|
|
77
|
+
"workspace",
|
|
78
|
+
C,
|
|
79
|
+
"decisions"
|
|
80
|
+
] })
|
|
81
|
+
}), Ce = z.findIndex((e) => e.id === F.id), J = (e) => {
|
|
82
|
+
let t = z[Ce + e];
|
|
83
|
+
t && W({
|
|
84
|
+
key: t.key,
|
|
85
|
+
teamId: F.teamId
|
|
86
|
+
});
|
|
87
|
+
}, Y = {
|
|
88
|
+
"[": () => J(-1),
|
|
89
|
+
"]": () => J(1),
|
|
90
|
+
n: () => {
|
|
91
|
+
let e = G ? I.indexOf(G) : -1, t = I[(e + 1) % I.length];
|
|
92
|
+
W(F, t?.identifier.toLowerCase());
|
|
93
|
+
},
|
|
94
|
+
e: () => {
|
|
95
|
+
(document.getElementById(`decision-${G?.id}`)?.querySelector(".ProseMirror"))?.focus();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
for (let e = 1; e <= 9; e++) Y[String(e)] = () => {
|
|
99
|
+
let t = G?.options[e - 1];
|
|
100
|
+
G && t && !q.isPending && q.mutate({
|
|
101
|
+
decision: G,
|
|
102
|
+
optionId: t.id
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
ge(Y);
|
|
106
|
+
let X = [];
|
|
107
|
+
for (let e = N.find((e) => e.id === F.parentId); e; e = N.find((t) => t.id === e?.parentId)) X.unshift(e);
|
|
108
|
+
let Z = N.filter((e) => e.parentId === F.id), Q = (e) => be.filter((t) => t.area?.id === e).length + N.filter((t) => t.parentId === e).reduce((e, t) => e + Q(t.id), 0), we = !F.homeDoc && Z.length === 0 && I.length === 0 && R.length === 0 && L.length === 0, $ = () => xe({
|
|
109
|
+
...U && { team: U.key },
|
|
110
|
+
area: F.key,
|
|
111
|
+
origin: { area: F.key }
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ b("div", {
|
|
114
|
+
className: "flex h-full flex-col",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ b("header", {
|
|
117
|
+
className: "flex h-12 shrink-0 items-center gap-1.5 border-b border-border px-4 text-sm md:px-5",
|
|
118
|
+
children: [
|
|
119
|
+
U ? /* @__PURE__ */ y(r, {
|
|
120
|
+
to: "/$workspace/teams/$key/areas",
|
|
121
|
+
params: {
|
|
122
|
+
workspace: C,
|
|
123
|
+
key: U.key
|
|
124
|
+
},
|
|
125
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground",
|
|
126
|
+
children: p("areas")
|
|
127
|
+
}) : /* @__PURE__ */ y(r, {
|
|
128
|
+
to: "/$workspace/areas",
|
|
129
|
+
params: { workspace: C },
|
|
130
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground",
|
|
131
|
+
children: p("areas")
|
|
132
|
+
}),
|
|
133
|
+
X.map((e) => /* @__PURE__ */ b("span", {
|
|
134
|
+
className: "flex min-w-0 items-center gap-1.5 max-sm:hidden",
|
|
135
|
+
children: [/* @__PURE__ */ y(c, { className: "size-3 shrink-0 text-muted-foreground" }), /* @__PURE__ */ y(de, {
|
|
136
|
+
workspace: C,
|
|
137
|
+
area: e,
|
|
138
|
+
className: "truncate text-muted-foreground hover:text-foreground",
|
|
139
|
+
children: e.title
|
|
140
|
+
})]
|
|
141
|
+
}, e.key)),
|
|
142
|
+
/* @__PURE__ */ y(c, { className: "size-3 shrink-0 text-muted-foreground" }),
|
|
143
|
+
/* @__PURE__ */ y("h1", {
|
|
144
|
+
className: "truncate font-semibold",
|
|
145
|
+
children: F.title
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ y("span", {
|
|
148
|
+
className: "shrink-0 font-mono text-xs text-muted-foreground",
|
|
149
|
+
children: F.key
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ y(d, {
|
|
152
|
+
counts: M.areas[F.id],
|
|
153
|
+
teamId: F.teamId,
|
|
154
|
+
className: "max-sm:hidden"
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ y(f, {
|
|
157
|
+
variant: "primary",
|
|
158
|
+
size: "sm",
|
|
159
|
+
icon: /* @__PURE__ */ y(ae, { className: "size-3.5" }),
|
|
160
|
+
onClick: $,
|
|
161
|
+
className: "ml-auto",
|
|
162
|
+
children: p("newIssue")
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ b("div", {
|
|
167
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
168
|
+
children: [
|
|
169
|
+
F.homeDoc && /* @__PURE__ */ b("section", {
|
|
170
|
+
"aria-label": p("about"),
|
|
171
|
+
className: "border-b border-border px-4 py-3 md:px-5",
|
|
172
|
+
children: [
|
|
173
|
+
F.redirectedFrom && /* @__PURE__ */ y("p", {
|
|
174
|
+
className: "mb-2 text-xs text-muted-foreground",
|
|
175
|
+
children: p("mergedFrom", { key: F.redirectedFrom })
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ y("div", {
|
|
178
|
+
className: "max-w-3xl",
|
|
179
|
+
children: B && /* @__PURE__ */ y(le, {
|
|
180
|
+
value: B,
|
|
181
|
+
editable: !1
|
|
182
|
+
})
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ b(r, {
|
|
185
|
+
to: "/$workspace/docs/$doc",
|
|
186
|
+
params: {
|
|
187
|
+
workspace: C,
|
|
188
|
+
doc: ie(F.homeDoc)
|
|
189
|
+
},
|
|
190
|
+
className: "mt-1 inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",
|
|
191
|
+
children: [/* @__PURE__ */ y(l, { className: "size-3.5" }), p("readDoc", { title: F.homeDoc.title })]
|
|
192
|
+
})
|
|
193
|
+
]
|
|
194
|
+
}),
|
|
195
|
+
Z.length > 0 && /* @__PURE__ */ y(u, {
|
|
196
|
+
title: p("inside"),
|
|
197
|
+
count: Z.length,
|
|
198
|
+
icon: /* @__PURE__ */ y(o, { className: "size-4 text-muted-foreground" }),
|
|
199
|
+
bare: !0,
|
|
200
|
+
children: /* @__PURE__ */ y(pe, {
|
|
201
|
+
label: p("inside"),
|
|
202
|
+
children: Z.map((e) => /* @__PURE__ */ y(fe, {
|
|
203
|
+
workspace: C,
|
|
204
|
+
area: e,
|
|
205
|
+
inside: 0,
|
|
206
|
+
decisions: Q(e.id),
|
|
207
|
+
onOpen: (e) => W(e)
|
|
208
|
+
}, e.id))
|
|
209
|
+
})
|
|
210
|
+
}),
|
|
211
|
+
I.length > 0 && /* @__PURE__ */ y(u, {
|
|
212
|
+
title: p("toDecide"),
|
|
213
|
+
count: I.length,
|
|
214
|
+
icon: /* @__PURE__ */ y(oe, { className: "size-4 text-warning" }),
|
|
215
|
+
bare: !0,
|
|
216
|
+
children: /* @__PURE__ */ y("div", {
|
|
217
|
+
className: "space-y-3 px-4 py-3 md:px-5",
|
|
218
|
+
children: I.map((e) => /* @__PURE__ */ b("div", {
|
|
219
|
+
id: `decision-${e.id}`,
|
|
220
|
+
className: E("relative max-w-3xl scroll-mt-12 rounded-lg", e.id === G?.id && "ring-2 ring-primary/50"),
|
|
221
|
+
children: [H(e.createdAt) && /* @__PURE__ */ y(O, {}), /* @__PURE__ */ y(ue, {
|
|
222
|
+
workspace: C,
|
|
223
|
+
decision: e,
|
|
224
|
+
showIssue: !0
|
|
225
|
+
})]
|
|
226
|
+
}, e.id))
|
|
227
|
+
})
|
|
228
|
+
}),
|
|
229
|
+
R.length > 0 && /* @__PURE__ */ y(u, {
|
|
230
|
+
title: p("knowledge"),
|
|
231
|
+
count: R.length,
|
|
232
|
+
icon: /* @__PURE__ */ y(se, { className: "size-4 text-muted-foreground" }),
|
|
233
|
+
children: R.map((e) => /* @__PURE__ */ y(he, {
|
|
234
|
+
workspace: C,
|
|
235
|
+
entry: e,
|
|
236
|
+
isNew: H(e.createdAt)
|
|
237
|
+
}, e.id))
|
|
238
|
+
}),
|
|
239
|
+
L.length > 0 && /* @__PURE__ */ y(u, {
|
|
240
|
+
title: p("decided"),
|
|
241
|
+
count: L.length,
|
|
242
|
+
icon: /* @__PURE__ */ y(s, { className: "size-4 text-muted-foreground" }),
|
|
243
|
+
children: L.map((e) => /* @__PURE__ */ y(me, {
|
|
244
|
+
workspace: C,
|
|
245
|
+
decision: e,
|
|
246
|
+
isNew: H(e.answer?.at),
|
|
247
|
+
notInDocs: i.notInDocs.includes(e.id)
|
|
248
|
+
}, e.id))
|
|
249
|
+
}),
|
|
250
|
+
we && /* @__PURE__ */ y("div", {
|
|
251
|
+
className: "p-6",
|
|
252
|
+
children: /* @__PURE__ */ y(_e, {
|
|
253
|
+
icon: /* @__PURE__ */ y(o, {}),
|
|
254
|
+
title: p("empty"),
|
|
255
|
+
description: p("emptyDescription"),
|
|
256
|
+
action: /* @__PURE__ */ y(f, {
|
|
257
|
+
variant: "primary",
|
|
258
|
+
size: "sm",
|
|
259
|
+
onClick: $,
|
|
260
|
+
children: p("newIssue")
|
|
261
|
+
})
|
|
262
|
+
})
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ y(k, { deciding: I.length > 0 })
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function O() {
|
|
271
|
+
let e = v("areaPage");
|
|
272
|
+
return /* @__PURE__ */ y("span", {
|
|
273
|
+
className: "absolute -top-2 right-3 z-10 rounded bg-primary px-1.5 py-0.5 text-[10px] font-medium text-primary-foreground",
|
|
274
|
+
children: e("new")
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function k({ deciding: e }) {
|
|
278
|
+
let t = v("areaPage"), n = [[["[", "]"], t("keys.move")], ...e ? [
|
|
279
|
+
[["N"], t("keys.next")],
|
|
280
|
+
[["1–9"], t("keys.choose")],
|
|
281
|
+
[["E"], t("keys.note")]
|
|
282
|
+
] : []];
|
|
283
|
+
return /* @__PURE__ */ y("footer", {
|
|
284
|
+
className: "flex shrink-0 items-center gap-4 border-t border-border px-4 py-1.5 text-xs text-muted-foreground max-md:hidden md:px-5",
|
|
285
|
+
children: n.map(([e, t]) => /* @__PURE__ */ b("span", {
|
|
286
|
+
className: "flex items-center gap-1.5",
|
|
287
|
+
children: [/* @__PURE__ */ y(p, { keys: e }), t]
|
|
288
|
+
}, t))
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
export { T as AreaPage, C as validateAreaSearch };
|