@parallelworks/tandem-web 0.139.0 → 0.139.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/components/AppRoot.js +9 -8
- package/components/SettingsNav.js +6 -6
- package/components/settings.js +10 -10
- package/hostedApp.js +47 -45
- package/lib/pageTitle.js +22 -10
- package/package.json +1 -1
- package/pages/areas.js +112 -112
- package/pages/decisions.js +36 -36
- package/pages/issues.js +34 -34
- package/pages/projects.js +109 -109
- package/pages/triage.js +64 -64
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +185 -185
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +484 -484
- package/routes/_workspace/knowledge/_term2.js +166 -166
- package/routes/_workspace/knowledge/index2.js +33 -33
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +215 -215
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +38 -38
- package/routes/_workspace/teams/_key/settings2.js +131 -131
- package/routes/_workspace2.js +394 -394
- package/routes/docs/route2.js +5 -5
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { usePageTitle as n } from "../../../lib/pageTitle.js";
|
|
3
|
+
import { Link as r, useNavigate as i } from "../../../lib/router.js";
|
|
4
|
+
import { areaThreadQuery as a, areasQuery as ee, countsQuery as o, teamsQuery as s } from "../../../api/queries.js";
|
|
4
5
|
import { Route as c } from "./_area.js";
|
|
5
|
-
import { AddIcon as l, ChevronRightIcon as u, FileTextIcon as
|
|
6
|
-
import { docRef as
|
|
7
|
-
import { useNewIssue as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { useMutation as C, useQuery as w, useQueryClient as T, useSuspenseQuery as E } from "@tanstack/react-query";
|
|
6
|
+
import { AddIcon as l, ChevronRightIcon as u, FileTextIcon as te } from "../../../components/icons.js";
|
|
7
|
+
import { docRef as ne } from "../../../lib/docs.js";
|
|
8
|
+
import { useNewIssue as re } from "../../../lib/newIssue.js";
|
|
9
|
+
import { Editor as ie } from "../../../components/Editor.js";
|
|
10
|
+
import { useShortcuts as ae } from "../../../lib/shortcuts.js";
|
|
11
|
+
import { DecisionCard as d } from "../../../components/AgentWork.js";
|
|
12
|
+
import { FoldedAnswer as f, KnowledgeRow as p } from "../../../components/AreaWork.js";
|
|
13
|
+
import { WorkCounts as m } from "../../../components/WorkCounts.js";
|
|
14
|
+
import { Button as h, CountBadge as g, Kbd as _ } from "@parallelworks/ui";
|
|
15
|
+
import { useEffect as v, useState as y } from "react";
|
|
16
|
+
import { useLocale as b, useTranslations as x } from "use-intl";
|
|
17
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
18
|
+
import { useMutation as oe, useQuery as w, useQueryClient as se, useSuspenseQuery as T } from "@tanstack/react-query";
|
|
19
19
|
// src/routes/$workspace/areas/$area.tsx?tsr-split=component
|
|
20
|
-
function
|
|
20
|
+
function E() {
|
|
21
21
|
let { workspace: e, area: t } = c.useParams();
|
|
22
|
-
return
|
|
22
|
+
return T(a(e, t)).data;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let e =
|
|
26
|
-
return /* @__PURE__ */
|
|
24
|
+
function D() {
|
|
25
|
+
let e = E();
|
|
26
|
+
return /* @__PURE__ */ S(k, { thread: e }, e.area.id);
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function k({ thread:
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
let [G] =
|
|
33
|
-
|
|
28
|
+
var O = (...e) => e.filter(Boolean).join(" ");
|
|
29
|
+
function k({ thread: a }) {
|
|
30
|
+
let _ = x("areaPage"), E = b(), { workspace: D, area: k } = c.useParams(), { decision: M } = c.useSearch(), N = i(), P = se(), { data: F } = T(o(D)), { data: I = [] } = w(ee(D)), { data: L = [] } = w(s(D)), R = re(), { area: z, open: B, answered: V, knowledge: H, siblings: U, summary: W } = a;
|
|
31
|
+
n(z.title);
|
|
32
|
+
let [G] = y(() => a.lastVisitedAt ? Date.parse(a.lastVisitedAt) : null), K = (e) => !!e && G !== null && Date.parse(e) > G;
|
|
33
|
+
v(() => {
|
|
34
34
|
k.toLowerCase() !== z.key && N({
|
|
35
35
|
to: "/$workspace/areas/$area",
|
|
36
36
|
params: {
|
|
37
|
-
workspace:
|
|
37
|
+
workspace: D,
|
|
38
38
|
area: z.key
|
|
39
39
|
},
|
|
40
40
|
search: (e) => e,
|
|
@@ -43,35 +43,35 @@ function k({ thread: i }) {
|
|
|
43
43
|
}, [
|
|
44
44
|
k,
|
|
45
45
|
z.key,
|
|
46
|
-
|
|
46
|
+
D,
|
|
47
47
|
N
|
|
48
|
-
]),
|
|
48
|
+
]), v(() => {
|
|
49
49
|
e.POST("/api/v1/workspaces/{workspace}/areas/{area}/visit", { params: { path: {
|
|
50
|
-
workspace:
|
|
50
|
+
workspace: D,
|
|
51
51
|
area: z.key
|
|
52
52
|
} } });
|
|
53
|
-
}, [
|
|
53
|
+
}, [D, z.key]);
|
|
54
54
|
let q = B.find((e) => e.identifier.toLowerCase() === M?.toLowerCase() || e.id === M), J = q?.id;
|
|
55
|
-
|
|
55
|
+
v(() => {
|
|
56
56
|
J && document.getElementById(`decision-${J}`)?.scrollIntoView({ block: "center" });
|
|
57
57
|
}, [J]);
|
|
58
|
-
let Y =
|
|
58
|
+
let Y = oe({
|
|
59
59
|
mutationFn: async ({ decision: n, optionId: r }) => t(await e.POST("/api/v1/workspaces/{workspace}/decisions/{decisionId}/answer", {
|
|
60
60
|
params: { path: {
|
|
61
|
-
workspace:
|
|
61
|
+
workspace: D,
|
|
62
62
|
decisionId: n.id
|
|
63
63
|
} },
|
|
64
64
|
body: { optionId: r }
|
|
65
65
|
})),
|
|
66
66
|
onSettled: () => P.invalidateQueries({ queryKey: [
|
|
67
67
|
"workspace",
|
|
68
|
-
|
|
68
|
+
D,
|
|
69
69
|
"decisions"
|
|
70
70
|
] })
|
|
71
71
|
}), ce = (e) => N({
|
|
72
72
|
to: "/$workspace/areas/$area",
|
|
73
73
|
params: {
|
|
74
|
-
workspace:
|
|
74
|
+
workspace: D,
|
|
75
75
|
area: z.key
|
|
76
76
|
},
|
|
77
77
|
search: e ? { decision: e.identifier.toLowerCase() } : {},
|
|
@@ -81,7 +81,7 @@ function k({ thread: i }) {
|
|
|
81
81
|
t && N({
|
|
82
82
|
to: "/$workspace/areas/$area",
|
|
83
83
|
params: {
|
|
84
|
-
workspace:
|
|
84
|
+
workspace: D,
|
|
85
85
|
area: t.key
|
|
86
86
|
}
|
|
87
87
|
});
|
|
@@ -103,48 +103,48 @@ function k({ thread: i }) {
|
|
|
103
103
|
optionId: t.id
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
ae(Z);
|
|
107
107
|
let Q = L.find((e) => e.id === z.teamId), $ = [];
|
|
108
108
|
for (let e = I.find((e) => e.id === z.parentId); e; e = I.find((t) => t.id === e?.parentId)) $.unshift(e);
|
|
109
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ C("div", {
|
|
110
110
|
className: "flex h-full flex-col",
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ C("header", {
|
|
113
113
|
className: "flex h-12 shrink-0 items-center gap-1.5 border-b border-border px-4 text-sm md:px-5",
|
|
114
114
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ S(r, {
|
|
116
116
|
to: "/$workspace/areas",
|
|
117
|
-
params: { workspace:
|
|
117
|
+
params: { workspace: D },
|
|
118
118
|
className: "text-muted-foreground hover:text-foreground",
|
|
119
|
-
children:
|
|
119
|
+
children: _("areas")
|
|
120
120
|
}),
|
|
121
|
-
$.map((e) => /* @__PURE__ */
|
|
121
|
+
$.map((e) => /* @__PURE__ */ C("span", {
|
|
122
122
|
className: "flex min-w-0 items-center gap-1.5 max-sm:hidden",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ S(u, { className: "size-3 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S(r, {
|
|
124
124
|
to: "/$workspace/areas/$area",
|
|
125
125
|
params: {
|
|
126
|
-
workspace:
|
|
126
|
+
workspace: D,
|
|
127
127
|
area: e.key
|
|
128
128
|
},
|
|
129
129
|
className: "truncate text-muted-foreground hover:text-foreground",
|
|
130
130
|
children: e.title
|
|
131
131
|
})]
|
|
132
132
|
}, e.key)),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ S(u, { className: "size-3 shrink-0 text-muted-foreground" }),
|
|
134
|
+
/* @__PURE__ */ S("h1", {
|
|
135
135
|
className: "truncate font-medium",
|
|
136
136
|
children: z.title
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ S("span", {
|
|
139
139
|
className: "shrink-0 font-mono text-xs text-muted-foreground",
|
|
140
140
|
children: z.key
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ S(m, {
|
|
143
143
|
counts: F.areas[z.id],
|
|
144
144
|
teamId: z.teamId,
|
|
145
145
|
className: "ml-auto max-sm:hidden"
|
|
146
146
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ C(h, {
|
|
148
148
|
type: "button",
|
|
149
149
|
size: "sm",
|
|
150
150
|
onClick: () => R({
|
|
@@ -153,139 +153,139 @@ function k({ thread: i }) {
|
|
|
153
153
|
origin: { area: z.key }
|
|
154
154
|
}),
|
|
155
155
|
className: "max-sm:ml-auto",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ S(l, { className: "size-3.5" }), _("newIssue")]
|
|
157
157
|
})
|
|
158
158
|
]
|
|
159
159
|
}),
|
|
160
|
-
U.length > 1 && /* @__PURE__ */
|
|
161
|
-
"aria-label":
|
|
160
|
+
U.length > 1 && /* @__PURE__ */ S("nav", {
|
|
161
|
+
"aria-label": _("siblings"),
|
|
162
162
|
className: "flex shrink-0 gap-1 overflow-x-auto border-b border-border px-4 py-1.5 md:px-5",
|
|
163
163
|
children: U.map((e) => {
|
|
164
164
|
let t = F.areas[e.id]?.decisions ?? 0;
|
|
165
|
-
return /* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ C(r, {
|
|
166
166
|
to: "/$workspace/areas/$area",
|
|
167
167
|
params: {
|
|
168
|
-
workspace:
|
|
168
|
+
workspace: D,
|
|
169
169
|
area: e.key
|
|
170
170
|
},
|
|
171
171
|
"aria-current": e.id === z.id ? "page" : void 0,
|
|
172
172
|
className: "flex h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-muted aria-[current=page]:font-medium aria-[current=page]:text-foreground",
|
|
173
|
-
children: [e.title, /* @__PURE__ */
|
|
173
|
+
children: [e.title, /* @__PURE__ */ S(g, {
|
|
174
174
|
count: t,
|
|
175
175
|
emphasis: "soft",
|
|
176
176
|
size: "sm",
|
|
177
|
-
locale:
|
|
178
|
-
label:
|
|
177
|
+
locale: E,
|
|
178
|
+
label: _("waitingCount"),
|
|
179
179
|
className: "border-transparent! bg-agent-soft! text-agent!"
|
|
180
180
|
})]
|
|
181
181
|
}, e.id);
|
|
182
182
|
})
|
|
183
183
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ S("div", {
|
|
185
185
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
186
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ C("div", {
|
|
187
187
|
className: "mx-auto max-w-3xl space-y-8 px-4 py-6 md:px-6",
|
|
188
188
|
children: [
|
|
189
|
-
z.redirectedFrom && /* @__PURE__ */
|
|
189
|
+
z.redirectedFrom && /* @__PURE__ */ S("p", {
|
|
190
190
|
className: "text-xs text-muted-foreground",
|
|
191
|
-
children:
|
|
191
|
+
children: _("mergedFrom", { key: z.redirectedFrom })
|
|
192
192
|
}),
|
|
193
|
-
z.homeDoc && /* @__PURE__ */
|
|
194
|
-
"aria-label":
|
|
195
|
-
children: [W && /* @__PURE__ */
|
|
193
|
+
z.homeDoc && /* @__PURE__ */ C("section", {
|
|
194
|
+
"aria-label": _("about"),
|
|
195
|
+
children: [W && /* @__PURE__ */ S(ie, {
|
|
196
196
|
value: W,
|
|
197
197
|
editable: !1
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ C(r, {
|
|
199
199
|
to: "/$workspace/docs/$doc",
|
|
200
200
|
params: {
|
|
201
|
-
workspace:
|
|
202
|
-
doc:
|
|
201
|
+
workspace: D,
|
|
202
|
+
doc: ne(z.homeDoc)
|
|
203
203
|
},
|
|
204
204
|
className: "mt-1 inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ S(te, { className: "size-3.5" }), _("readDoc", { title: z.homeDoc.title })]
|
|
206
206
|
})]
|
|
207
207
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
"aria-label":
|
|
208
|
+
/* @__PURE__ */ C("section", {
|
|
209
|
+
"aria-label": _("toDecide"),
|
|
210
210
|
className: "space-y-3",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
212
212
|
className: "text-sm font-semibold",
|
|
213
213
|
children: [
|
|
214
|
-
|
|
214
|
+
_("toDecide"),
|
|
215
215
|
" ",
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ S("span", {
|
|
217
217
|
className: "font-normal text-muted-foreground",
|
|
218
218
|
children: B.length
|
|
219
219
|
})
|
|
220
220
|
]
|
|
221
|
-
}), B.length === 0 ? /* @__PURE__ */
|
|
221
|
+
}), B.length === 0 ? /* @__PURE__ */ S("p", {
|
|
222
222
|
className: "text-sm text-muted-foreground",
|
|
223
|
-
children:
|
|
224
|
-
}) : B.map((e) => /* @__PURE__ */
|
|
223
|
+
children: _("nothingToDecide")
|
|
224
|
+
}) : B.map((e) => /* @__PURE__ */ C("div", {
|
|
225
225
|
id: `decision-${e.id}`,
|
|
226
|
-
className:
|
|
227
|
-
children: [K(e.createdAt) && /* @__PURE__ */
|
|
228
|
-
workspace:
|
|
226
|
+
className: O("relative scroll-mt-4 rounded-lg", e.id === q?.id && "ring-2 ring-primary/50"),
|
|
227
|
+
children: [K(e.createdAt) && /* @__PURE__ */ S(A, {}), /* @__PURE__ */ S(d, {
|
|
228
|
+
workspace: D,
|
|
229
229
|
decision: e,
|
|
230
230
|
showIssue: !0
|
|
231
231
|
})]
|
|
232
232
|
}, e.id))]
|
|
233
233
|
}),
|
|
234
|
-
H.length > 0 && /* @__PURE__ */
|
|
235
|
-
"aria-label":
|
|
236
|
-
children: [/* @__PURE__ */
|
|
234
|
+
H.length > 0 && /* @__PURE__ */ C("section", {
|
|
235
|
+
"aria-label": _("knowledge"),
|
|
236
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
237
237
|
className: "text-sm font-semibold",
|
|
238
|
-
children:
|
|
239
|
-
}), /* @__PURE__ */
|
|
238
|
+
children: _("knowledge")
|
|
239
|
+
}), /* @__PURE__ */ S("ul", {
|
|
240
240
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
241
|
-
children: H.map((e) => /* @__PURE__ */
|
|
242
|
-
workspace:
|
|
241
|
+
children: H.map((e) => /* @__PURE__ */ S(p, {
|
|
242
|
+
workspace: D,
|
|
243
243
|
entry: e,
|
|
244
244
|
isNew: K(e.createdAt)
|
|
245
245
|
}, e.id))
|
|
246
246
|
})]
|
|
247
247
|
}),
|
|
248
|
-
V.length > 0 && /* @__PURE__ */
|
|
249
|
-
"aria-label":
|
|
250
|
-
children: [/* @__PURE__ */
|
|
248
|
+
V.length > 0 && /* @__PURE__ */ C("section", {
|
|
249
|
+
"aria-label": _("decided"),
|
|
250
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
251
251
|
className: "text-sm font-semibold",
|
|
252
|
-
children:
|
|
253
|
-
}), /* @__PURE__ */
|
|
252
|
+
children: _("decided")
|
|
253
|
+
}), /* @__PURE__ */ S("ul", {
|
|
254
254
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
255
|
-
children: V.map((e) => /* @__PURE__ */
|
|
256
|
-
workspace:
|
|
255
|
+
children: V.map((e) => /* @__PURE__ */ S(f, {
|
|
256
|
+
workspace: D,
|
|
257
257
|
decision: e,
|
|
258
258
|
isNew: K(e.answer?.at),
|
|
259
|
-
notInDocs:
|
|
259
|
+
notInDocs: a.notInDocs.includes(e.id)
|
|
260
260
|
}, e.id))
|
|
261
261
|
})]
|
|
262
262
|
})
|
|
263
263
|
]
|
|
264
264
|
})
|
|
265
265
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ S(j, { deciding: B.length > 0 })
|
|
267
267
|
]
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
function A() {
|
|
271
|
-
let e =
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
let e = x("areaPage");
|
|
272
|
+
return /* @__PURE__ */ S("span", {
|
|
273
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
274
|
children: e("new")
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
function j({ deciding: e }) {
|
|
278
|
-
let t =
|
|
278
|
+
let t = x("areaPage"), n = [[["[", "]"], t("keys.move")], ...e ? [
|
|
279
279
|
[["N"], t("keys.next")],
|
|
280
280
|
[["1–9"], t("keys.choose")],
|
|
281
281
|
[["E"], t("keys.note")]
|
|
282
282
|
] : []];
|
|
283
|
-
return /* @__PURE__ */
|
|
283
|
+
return /* @__PURE__ */ S("footer", {
|
|
284
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__ */
|
|
285
|
+
children: n.map(([e, t]) => /* @__PURE__ */ C("span", {
|
|
286
286
|
className: "flex items-center gap-1.5",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ S(_, { keys: e }), t]
|
|
288
288
|
}, t))
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
|
-
export {
|
|
291
|
+
export { D as component };
|