@parallelworks/tandem-web 0.138.2 → 0.139.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.
Files changed (71) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +4 -4
  3. package/components/AreaWork.js +1 -1
  4. package/components/BlockHandle.js +3 -3
  5. package/components/CommandPalette.js +27 -27
  6. package/components/DateChip.js +27 -27
  7. package/components/DocLinkPicker.js +17 -17
  8. package/components/Graph.js +6 -6
  9. package/components/HoverCards.js +30 -29
  10. package/components/IssueListBlock.js +83 -83
  11. package/components/LinkCard.js +20 -20
  12. package/components/MentionPicker.js +12 -12
  13. package/components/NewIssueDialog.js +116 -116
  14. package/components/NewProjectDialog.js +5 -4
  15. package/components/Planning.js +31 -43
  16. package/components/RouterLink.js +4 -4
  17. package/components/ShareDialog.js +12 -12
  18. package/components/SharedUI.js +19 -19
  19. package/components/SlashMenu.js +11 -11
  20. package/components/SubPages.js +10 -10
  21. package/components/UnlinkedMentions.js +10 -10
  22. package/components/WorkCounts.js +8 -8
  23. package/components/settings.js +26 -26
  24. package/hostedApp.js +36 -36
  25. package/hosting.d.ts +24 -11
  26. package/index.js +58 -27
  27. package/lib/base.js +1 -14
  28. package/lib/docs.js +6 -6
  29. package/lib/issueMenu.js +33 -33
  30. package/lib/knowledge.js +90 -101
  31. package/lib/knowledgeKinds.js +14 -0
  32. package/lib/projectList.js +1 -1
  33. package/lib/projectStates.js +15 -0
  34. package/lib/router.js +20 -34
  35. package/package.json +2 -2
  36. package/pages/areas.js +147 -147
  37. package/pages/decisions.js +40 -40
  38. package/pages/issues.js +4 -4
  39. package/pages/projects.js +232 -231
  40. package/pages/triage.js +86 -86
  41. package/pages.js +21 -0
  42. package/routes/__root.js +6 -6
  43. package/routes/_workspace/docs/_doc2.js +12 -12
  44. package/routes/_workspace/docs2.js +8 -8
  45. package/routes/_workspace/graph2.js +9 -9
  46. package/routes/_workspace/issues/_identifier2.js +327 -327
  47. package/routes/_workspace/issues/index.js +6 -6
  48. package/routes/_workspace/knowledge/_term2.js +125 -124
  49. package/routes/_workspace/knowledge/index.js +8 -8
  50. package/routes/_workspace/knowledge/index2.js +22 -21
  51. package/routes/_workspace/measures2.js +4 -4
  52. package/routes/_workspace/people/_username.js +4 -4
  53. package/routes/_workspace/projects/_projectId3.js +264 -263
  54. package/routes/_workspace/projects/index.js +7 -7
  55. package/routes/_workspace/settings/account2.js +3 -3
  56. package/routes/_workspace/settings/audit-log2.js +4 -4
  57. package/routes/_workspace/settings/audit-log3.js +51 -51
  58. package/routes/_workspace/settings/labels2.js +14 -14
  59. package/routes/_workspace/settings/members2.js +9 -9
  60. package/routes/_workspace/settings/runners2.js +11 -11
  61. package/routes/_workspace/settings/teams2.js +15 -15
  62. package/routes/_workspace/settings/tokens2.js +5 -5
  63. package/routes/_workspace/settings/webhooks2.js +7 -7
  64. package/routes/_workspace/settings2.js +3 -3
  65. package/routes/_workspace/teams/_key/cycles/_number2.js +8 -8
  66. package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
  67. package/routes/_workspace/teams/_key/issues.js +4 -4
  68. package/routes/_workspace/teams/_key/projects.js +4 -4
  69. package/routes/_workspace/teams/_key/settings2.js +8 -8
  70. package/routes/_workspace2.js +319 -319
  71. package/routes/docs/route2.js +15 -15
@@ -8,10 +8,10 @@ import { AnsweredDecision as p, DecisionCard as m } from "../components/AgentWor
8
8
  import { FavoriteStar as h } from "../components/FavoriteStar.js";
9
9
  import { recentlyAnswered as g, saveScope as _, savedScope as v } from "../lib/decisionScope.js";
10
10
  import { SegmentedControl as y, Tooltip as b, useOpenMenu as x } from "@parallelworks/ui";
11
- import { useState as S } from "react";
12
- import { useTranslations as C } from "use-intl";
13
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
14
- import { useParams as E, useSearch as D } from "@tanstack/react-router";
11
+ import { useParams as S, useSearch as C } from "@tanstack/react-router";
12
+ import { useState as w } from "react";
13
+ import { useTranslations as T } from "use-intl";
14
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
15
15
  import { useSuspenseQuery as O } from "@tanstack/react-query";
16
16
  // src/pages/decisions.tsx
17
17
  var k = ["workspace", "all"];
@@ -24,19 +24,19 @@ function A(e) {
24
24
  return [...t.values()];
25
25
  }
26
26
  function j({ first: n, count: r, open: i, onToggle: a, showWorkspace: o, children: f }) {
27
- let p = C("decisions"), m = d(), h = x(), g = l();
28
- return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
27
+ let p = T("decisions"), m = d(), h = x(), g = l();
28
+ return /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
29
29
  className: "mb-1.5 flex min-w-0 items-center gap-1 text-xs text-muted-foreground",
30
30
  children: [
31
- /* @__PURE__ */ w("button", {
31
+ /* @__PURE__ */ E("button", {
32
32
  type: "button",
33
33
  onClick: a,
34
34
  "aria-expanded": i,
35
35
  "aria-label": p(i ? "hideDecisions" : "showDecisions", { issue: n.identifier }),
36
36
  className: "-ml-1 shrink-0 rounded p-0.5 hover:bg-muted hover:text-foreground",
37
- children: /* @__PURE__ */ w(s, { className: i ? "size-3.5 rotate-90" : "size-3.5" })
37
+ children: /* @__PURE__ */ E(s, { className: i ? "size-3.5 rotate-90" : "size-3.5" })
38
38
  }),
39
- /* @__PURE__ */ T(t, {
39
+ /* @__PURE__ */ D(t, {
40
40
  to: "/$workspace/issues/$identifier",
41
41
  params: {
42
42
  workspace: n.workspace,
@@ -45,46 +45,46 @@ function j({ first: n, count: r, open: i, onToggle: a, showWorkspace: o, childre
45
45
  onContextMenu: (t) => h(t, [...m(e(n.workspace, n.identifier)), u(p("copyId"), n.identifier)]),
46
46
  className: "flex min-w-0 items-center gap-2 hover:text-foreground",
47
47
  children: [
48
- o && /* @__PURE__ */ w("span", {
48
+ o && /* @__PURE__ */ E("span", {
49
49
  className: "max-w-[40%] shrink-0 truncate rounded bg-muted px-1.5 py-0.5 font-medium text-foreground",
50
50
  children: n.workspaceName
51
51
  }),
52
- /* @__PURE__ */ w(b, {
52
+ /* @__PURE__ */ E(b, {
53
53
  content: g[n.issuePriority],
54
- children: /* @__PURE__ */ T("span", {
54
+ children: /* @__PURE__ */ D("span", {
55
55
  className: "flex",
56
- children: [/* @__PURE__ */ w(c, { priority: n.issuePriority }), /* @__PURE__ */ w("span", {
56
+ children: [/* @__PURE__ */ E(c, { priority: n.issuePriority }), /* @__PURE__ */ E("span", {
57
57
  className: "sr-only",
58
58
  children: g[n.issuePriority]
59
59
  })]
60
60
  })
61
61
  }),
62
- /* @__PURE__ */ w("span", {
62
+ /* @__PURE__ */ E("span", {
63
63
  className: "shrink-0 font-medium",
64
64
  children: n.identifier
65
65
  }),
66
- /* @__PURE__ */ w("span", {
66
+ /* @__PURE__ */ E("span", {
67
67
  className: "truncate",
68
68
  children: n.issueTitle
69
69
  })
70
70
  ]
71
71
  }),
72
- /* @__PURE__ */ w("span", {
72
+ /* @__PURE__ */ E("span", {
73
73
  className: "ml-1 shrink-0",
74
74
  children: r
75
75
  })
76
76
  ]
77
- }), i && /* @__PURE__ */ w("div", {
77
+ }), i && /* @__PURE__ */ E("div", {
78
78
  className: "space-y-3",
79
79
  children: f
80
80
  })] });
81
81
  }
82
82
  function M() {
83
- let { workspace: e, key: t } = E({ strict: !1 }), c = C("decisions"), l = x(), { team: u = t } = D({ strict: !1 }), { data: d } = O(o(e)), b = d.find((e) => e.key === u);
83
+ let { workspace: e, key: t } = S({ strict: !1 }), c = T("decisions"), l = x(), { team: u = t } = C({ strict: !1 }), { data: d } = O(o(e)), b = d.find((e) => e.key === u);
84
84
  f(c("title"), b?.name);
85
- let [M, N] = S(v), P = b ? "workspace" : M, F = P === "all", I = (e) => b ? e.filter((e) => e.identifier.startsWith(`${b.key}-`)) : e, L = (e) => {
85
+ let [M, N] = w(v), P = b ? "workspace" : M, F = P === "all", I = (e) => b ? e.filter((e) => e.identifier.startsWith(`${b.key}-`)) : e, L = (e) => {
86
86
  N(e), _(e);
87
- }, { data: R } = O(F ? a : r(e)), { data: z } = O(F ? i : n(e)), B = I(R), V = g(I(z)), [H, U] = S(/* @__PURE__ */ new Set()), [W, G] = S(!1), K = (e) => U((t) => {
87
+ }, { data: R } = O(F ? a : r(e)), { data: z } = O(F ? i : n(e)), B = I(R), V = g(I(z)), [H, U] = w(/* @__PURE__ */ new Set()), [W, G] = w(!1), K = (e) => U((t) => {
88
88
  let n = new Set(t);
89
89
  return n.delete(e) || n.add(e), n;
90
90
  }), q = () => k.map((e) => ({
@@ -92,27 +92,27 @@ function M() {
92
92
  checked: e === P,
93
93
  onClick: () => L(e)
94
94
  }));
95
- return /* @__PURE__ */ T("div", {
95
+ return /* @__PURE__ */ D("div", {
96
96
  className: "flex h-full flex-col",
97
- children: [/* @__PURE__ */ T("header", {
97
+ children: [/* @__PURE__ */ D("header", {
98
98
  className: "flex min-h-12 shrink-0 flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-4 py-2 md:px-5",
99
99
  children: [
100
- /* @__PURE__ */ w("h1", {
100
+ /* @__PURE__ */ E("h1", {
101
101
  className: "text-sm font-semibold",
102
102
  children: b ? c("teamTitle", { team: b.name }) : c("title")
103
103
  }),
104
- !b && /* @__PURE__ */ w(h, {
104
+ !b && /* @__PURE__ */ E(h, {
105
105
  workspace: e,
106
106
  kind: "page",
107
107
  target: "decisions"
108
108
  }),
109
- /* @__PURE__ */ w("span", {
109
+ /* @__PURE__ */ E("span", {
110
110
  className: "text-xs text-muted-foreground",
111
111
  children: c("openCount", { count: B.length })
112
112
  }),
113
- !b && /* @__PURE__ */ w("div", {
113
+ !b && /* @__PURE__ */ E("div", {
114
114
  className: "ml-auto",
115
- children: /* @__PURE__ */ w(y, {
115
+ children: /* @__PURE__ */ E(y, {
116
116
  size: "sm",
117
117
  label: c("scope"),
118
118
  options: k.map((e) => ({
@@ -125,60 +125,60 @@ function M() {
125
125
  })
126
126
  })
127
127
  ]
128
- }), /* @__PURE__ */ w("div", {
128
+ }), /* @__PURE__ */ E("div", {
129
129
  className: "min-h-0 flex-1 overflow-y-auto",
130
- children: /* @__PURE__ */ T("div", {
130
+ children: /* @__PURE__ */ D("div", {
131
131
  className: "w-full space-y-4 px-4 py-6 md:px-8",
132
132
  children: [
133
133
  A(B).map((e) => {
134
134
  let [t] = e, n = `open:${t.workspace}/${t.identifier}`;
135
- return /* @__PURE__ */ w(j, {
135
+ return /* @__PURE__ */ E(j, {
136
136
  first: t,
137
137
  count: c("openCount", { count: e.length }),
138
138
  open: !H.has(n),
139
139
  onToggle: () => K(n),
140
140
  showWorkspace: F,
141
- children: e.map((e) => /* @__PURE__ */ w(m, {
141
+ children: e.map((e) => /* @__PURE__ */ E(m, {
142
142
  workspace: e.workspace,
143
143
  decision: e
144
144
  }, e.id))
145
145
  }, n);
146
146
  }),
147
- B.length === 0 && /* @__PURE__ */ T("div", {
147
+ B.length === 0 && /* @__PURE__ */ D("div", {
148
148
  className: "py-24 text-center",
149
- children: [/* @__PURE__ */ w("p", {
149
+ children: [/* @__PURE__ */ E("p", {
150
150
  className: "text-sm font-medium",
151
151
  children: c("emptyTitle")
152
- }), /* @__PURE__ */ w("p", {
152
+ }), /* @__PURE__ */ E("p", {
153
153
  className: "mt-1 text-sm text-muted-foreground",
154
154
  children: c(F ? "emptyDescriptionAll" : "emptyDescription")
155
155
  })]
156
156
  }),
157
- V.length > 0 && /* @__PURE__ */ T("section", {
157
+ V.length > 0 && /* @__PURE__ */ D("section", {
158
158
  className: "space-y-3 pt-6",
159
159
  "aria-label": c("recentlyAnswered"),
160
- children: [/* @__PURE__ */ w("h2", { children: /* @__PURE__ */ T("button", {
160
+ children: [/* @__PURE__ */ E("h2", { children: /* @__PURE__ */ D("button", {
161
161
  type: "button",
162
162
  onClick: () => G((e) => !e),
163
163
  "aria-expanded": W,
164
164
  className: "-ml-1 flex items-center gap-1 rounded px-1 text-base font-semibold hover:bg-muted",
165
165
  children: [
166
- /* @__PURE__ */ w(s, { className: W ? "size-4 rotate-90" : "size-4" }),
166
+ /* @__PURE__ */ E(s, { className: W ? "size-4 rotate-90" : "size-4" }),
167
167
  c("recentlyAnswered"),
168
- /* @__PURE__ */ w("span", {
168
+ /* @__PURE__ */ E("span", {
169
169
  className: "ml-1 text-xs font-normal text-muted-foreground",
170
170
  children: V.length
171
171
  })
172
172
  ]
173
173
  }) }), W && A(V).map((e) => {
174
174
  let [t] = e, n = `answered:${t.workspace}/${t.identifier}`;
175
- return /* @__PURE__ */ w(j, {
175
+ return /* @__PURE__ */ E(j, {
176
176
  first: t,
177
177
  count: c("answeredCount", { count: e.length }),
178
178
  open: H.has(n),
179
179
  onToggle: () => K(n),
180
180
  showWorkspace: F,
181
- children: e.map((e) => /* @__PURE__ */ w(p, {
181
+ children: e.map((e) => /* @__PURE__ */ E(p, {
182
182
  workspace: e.workspace,
183
183
  decision: e
184
184
  }, e.id))
package/pages/issues.js CHANGED
@@ -29,10 +29,10 @@ import { IssueInsights as Ge } from "../components/IssueInsights.js";
29
29
  import { IssueSection as Ke } from "../components/IssueSection.js";
30
30
  import { insightsKey as qe, listTabs as Je, panelKey as Ye, storeDisplay as s, storedDisplay as Xe, withParam as c } from "../lib/issueDisplay.js";
31
31
  import { ActionMenu as Ze, Button as l, Field as Qe, IconButton as u, SearchInput as $e, Select as et, Tabs as tt, useOpenMenu as nt } from "@parallelworks/ui";
32
+ import { useParams as rt, useSearch as it } from "@tanstack/react-router";
32
33
  import { useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
33
34
  import { useTranslations as h } from "use-intl";
34
- import { Fragment as rt, jsx as g, jsxs as _ } from "react/jsx-runtime";
35
- import { useParams as it, useSearch as at } from "@tanstack/react-router";
35
+ import { Fragment as at, jsx as g, jsxs as _ } from "react/jsx-runtime";
36
36
  import { keepPreviousData as ot, useQuery as v, useSuspenseQuery as st } from "@tanstack/react-query";
37
37
  import { ListFilterBar as ct, ListFilterMenu as lt, ListSkeleton as ut } from "@parallelworks/ui/list";
38
38
  // src/pages/issues.tsx
@@ -44,7 +44,7 @@ function y(e) {
44
44
  } : r;
45
45
  }
46
46
  function b({ person: e } = {}) {
47
- let b = h("issues"), x = h("planning"), { workspace: S, key: C } = it({ strict: !1 }), w = at({ strict: !1 }), T = C ? {
47
+ let b = h("issues"), x = h("planning"), { workspace: S, key: C } = rt({ strict: !1 }), w = it({ strict: !1 }), T = C ? {
48
48
  ...w,
49
49
  team: C
50
50
  } : e ? w.creator ? {
@@ -221,7 +221,7 @@ function b({ person: e } = {}) {
221
221
  ...I && { layout: "board" }
222
222
  }), nn = J ? !Oe(J.filters, Y) : Object.keys(Y).length > 0, rn = Te(S, "create_issues", T.team ? { team: T.team } : void 0), an = Te(S, "save_views"), [on, sn] = m(!1), [cn, ln] = m(null), X = h("savedViews"), Z = D?.user.username, un = !J && !K && (!T.assigneeKind && T.assignee === Z && !T.creator || T.creator === Z && !T.assignee), Q = e ?? (un ? Z : void 0), $ = J?.name ?? K?.name ?? (e && e !== Z ? b("personIssues", { name: wt("user", e) }) : !T.assigneeKind && T.assignee === Z || T.creator === Z ? b("mine") : b("all")), dn = h("workspace");
223
223
  we(...K && !J ? [dn("issues"), K.name] : [$]);
224
- let fn = nn && /* @__PURE__ */ _(rt, { children: [J?.canEdit && /* @__PURE__ */ g(l, {
224
+ let fn = nn && /* @__PURE__ */ _(at, { children: [J?.canEdit && /* @__PURE__ */ g(l, {
225
225
  type: "button",
226
226
  size: "sm",
227
227
  loading: Qt.isPending,