@parallelworks/tandem-web 0.138.2 → 0.139.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.
Files changed (81) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +8 -7
  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 +31 -31
  24. package/hostedApp.js +41 -39
  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/pageTitle.js +22 -10
  33. package/lib/projectList.js +1 -1
  34. package/lib/projectStates.js +15 -0
  35. package/lib/router.js +20 -34
  36. package/package.json +2 -2
  37. package/pages/areas.js +223 -223
  38. package/pages/decisions.js +69 -69
  39. package/pages/issues.js +38 -38
  40. package/pages/projects.js +268 -267
  41. package/pages/triage.js +133 -133
  42. package/pages.js +21 -0
  43. package/routes/__root.js +6 -6
  44. package/routes/_workspace/agents/_slug2.js +21 -21
  45. package/routes/_workspace/agents/index2.js +16 -16
  46. package/routes/_workspace/areas/_area2.js +105 -105
  47. package/routes/_workspace/docs/_doc2.js +189 -189
  48. package/routes/_workspace/docs2.js +8 -8
  49. package/routes/_workspace/graph2.js +9 -9
  50. package/routes/_workspace/graph3.js +8 -8
  51. package/routes/_workspace/issues/_identifier2.js +249 -249
  52. package/routes/_workspace/issues/index.js +6 -6
  53. package/routes/_workspace/knowledge/_term2.js +119 -118
  54. package/routes/_workspace/knowledge/index.js +8 -8
  55. package/routes/_workspace/knowledge/index2.js +41 -40
  56. package/routes/_workspace/measures2.js +4 -4
  57. package/routes/_workspace/measures3.js +18 -18
  58. package/routes/_workspace/notifications2.js +112 -112
  59. package/routes/_workspace/people/_username.js +4 -4
  60. package/routes/_workspace/people/_username2.js +36 -36
  61. package/routes/_workspace/projects/_projectId3.js +369 -368
  62. package/routes/_workspace/projects/index.js +7 -7
  63. package/routes/_workspace/settings/account2.js +3 -3
  64. package/routes/_workspace/settings/audit-log2.js +4 -4
  65. package/routes/_workspace/settings/audit-log3.js +51 -51
  66. package/routes/_workspace/settings/labels2.js +14 -14
  67. package/routes/_workspace/settings/members2.js +9 -9
  68. package/routes/_workspace/settings/runners2.js +11 -11
  69. package/routes/_workspace/settings/teams2.js +15 -15
  70. package/routes/_workspace/settings/tokens2.js +5 -5
  71. package/routes/_workspace/settings/webhooks2.js +7 -7
  72. package/routes/_workspace/settings2.js +3 -3
  73. package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
  74. package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
  75. package/routes/_workspace/teams/_key/issues.js +4 -4
  76. package/routes/_workspace/teams/_key/projects.js +4 -4
  77. package/routes/_workspace/teams/_key/settings2.js +133 -133
  78. package/routes/_workspace2.js +319 -319
  79. package/routes/docs/route2.js +19 -19
  80. package/routes/new2.js +8 -8
  81. package/routes/request2._token.js +4 -4
@@ -1,5 +1,5 @@
1
- import { redirect as e } from "../../../lib/router.js";
2
- import { rememberSearch as t } from "../../../lib/listSearch.js";
1
+ import { rememberSearch as e } from "../../../lib/listSearch.js";
2
+ import { redirect as t } from "../../../lib/router.js";
3
3
  import { teamsQuery as n } from "../../../api/queries.js";
4
4
  import { issueSearch as r } from "../../../lib/issueList.js";
5
5
  import { lastTeam as i } from "../../../lib/teamPaths.js";
@@ -13,8 +13,8 @@ var c = a("/$workspace/issues/")({
13
13
  l = (e.find((e) => e.key === t) ?? e[0])?.key;
14
14
  }
15
15
  if (l) {
16
- let { team: t, ...n } = o;
17
- throw e({
16
+ let { team: e, ...n } = o;
17
+ throw t({
18
18
  to: "/$workspace/teams/$key/issues",
19
19
  params: {
20
20
  ...a,
@@ -24,8 +24,8 @@ var c = a("/$workspace/issues/")({
24
24
  replace: !0
25
25
  });
26
26
  }
27
- let u = t(s.pathname, o, c);
28
- if (u) throw e({
27
+ let u = e(s.pathname, o, c);
28
+ if (u) throw t({
29
29
  to: "/$workspace/issues",
30
30
  params: a,
31
31
  search: u,
@@ -1,18 +1,19 @@
1
- import { Link as e, useNavigate as t } from "../../../lib/router.js";
2
- import { areasQuery as n, knowledgeEntryQuery as r, knowledgeEventsQuery as i, knowledgeMentionsQuery as a, knowledgeQuery as o } from "../../../api/queries.js";
3
- import { FileTextIcon as s, LibraryIcon as c, StatusIcon as l } from "../../../components/icons.js";
4
- import { headingAnchor as u } from "../../../lib/glossary.js";
5
- import { EntryDialog as d, termRef as f, useKnowledgeActions as ee, useKnowledgeMenu as p } from "../../../lib/knowledge.js";
6
- import { Route as m } from "./_term.js";
1
+ import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
+ import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
+ import { areasQuery as r, knowledgeEntryQuery as i, knowledgeEventsQuery as a, knowledgeMentionsQuery as o, knowledgeQuery as s } from "../../../api/queries.js";
4
+ import { FileTextIcon as c, LibraryIcon as l, StatusIcon as u } from "../../../components/icons.js";
5
+ import { termRef as d } from "../../../lib/knowledgeKinds.js";
6
+ import { Route as f } from "./_term.js";
7
+ import { docRef as p } from "../../../lib/docs.js";
8
+ import { headingAnchor as m } from "../../../lib/glossary.js";
7
9
  import { useTime as h } from "../../../lib/time.js";
8
- import { docRef as g } from "../../../lib/docs.js";
9
- import { usePeople as _ } from "../../../lib/people.js";
10
- import { usePageTitle as v } from "../../../lib/pageTitle.js";
11
- import { useCan as y } from "../../../lib/roles.js";
12
- import { uploadKnowledgeAttachment as b } from "../../../lib/attachments.js";
13
- import { KnowledgeStatus as x } from "../../../components/HoverCards.js";
14
- import { AttachButton as S, UploadStatus as C, useFileUpload as w } from "../../../components/Attachments.js";
15
- import { Editor as te } from "../../../components/Editor.js";
10
+ import { usePeople as g } from "../../../lib/people.js";
11
+ import { useCan as ee } from "../../../lib/roles.js";
12
+ import { EntryDialog as te, useKnowledgeActions as _, useKnowledgeMenu as v } from "../../../lib/knowledge.js";
13
+ import { uploadKnowledgeAttachment as y } from "../../../lib/attachments.js";
14
+ import { KnowledgeStatus as b } from "../../../components/HoverCards.js";
15
+ import { AttachButton as x, UploadStatus as S, useFileUpload as C } from "../../../components/Attachments.js";
16
+ import { Editor as w } from "../../../components/Editor.js";
16
17
  import { Timeline as T, TimelineItem as E, activityIcon as D } from "../../../components/ActivityTimeline.js";
17
18
  import { Button as O, ErrorText as k, PageHeader as A, Section as j, TitleInput as M, useOpenMenu as N } from "@parallelworks/ui";
18
19
  import { Suspense as P, useCallback as F, useMemo as I, useRef as L, useState as R } from "react";
@@ -23,42 +24,42 @@ import { useQuery as W, useSuspenseQuery as G } from "@tanstack/react-query";
23
24
  import { MoreButton as K } from "@parallelworks/ui/list";
24
25
  // src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
25
26
  function q() {
26
- let { workspace: n, term: i } = m.useParams(), a = B("knowledge"), s = B("common"), l = t(), u = N(), h = z(), { data: g } = G(r(n, i)), { data: _ } = G(o(n)), x = ee(n), T = y(n, "edit_docs"), E = T && !g.archivedAt, [D, j] = R(null), W = F((e) => j(e), []), q = p(n, W), X = L(null), Z = w((e) => b(n, g.id, e));
27
- v(g.name);
28
- let Q = I(() => _.filter((e) => e.supersededBy === g.id), [_, g.id]), $ = (e) => x.update.mutate({
29
- id: g.id,
27
+ let { workspace: r, term: a } = f.useParams(), o = B("knowledge"), c = B("common"), u = n(), p = N(), m = z(), { data: h } = G(i(r, a)), { data: g } = G(s(r)), b = _(r), T = ee(r, "edit_docs"), E = T && !h.archivedAt, [D, j] = R(null), W = F((e) => j(e), []), q = v(r, W), X = L(null), Z = C((e) => y(r, h.id, e));
28
+ e(h.name);
29
+ let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) => b.update.mutate({
30
+ id: h.id,
30
31
  ...e,
31
- ifVersion: g.version
32
- }), re = g.status === "superseded";
32
+ ifVersion: h.version
33
+ }), re = h.status === "superseded";
33
34
  return /* @__PURE__ */ U("div", {
34
35
  className: "flex h-full min-h-0 flex-col",
35
36
  children: [
36
37
  /* @__PURE__ */ H(A, {
37
38
  heading: !1,
38
39
  breadcrumbs: [{
39
- label: a("title"),
40
- href: `/${n}/knowledge`
40
+ label: o("title"),
41
+ href: `/${r}/knowledge`
41
42
  }, {
42
- label: g.name,
43
- icon: /* @__PURE__ */ H(c, { className: "size-4 text-muted-foreground" })
43
+ label: h.name,
44
+ icon: /* @__PURE__ */ H(l, { className: "size-4 text-muted-foreground" })
44
45
  }],
45
46
  titleActions: /* @__PURE__ */ H(K, {
46
- items: () => q(g),
47
- label: s("moreActionsFor", { name: g.name }),
47
+ items: () => q(h),
48
+ label: c("moreActionsFor", { name: h.name }),
48
49
  visible: !0
49
50
  }),
50
- actions: /* @__PURE__ */ U(V, { children: [x.update.isPending && /* @__PURE__ */ H("span", {
51
+ actions: /* @__PURE__ */ U(V, { children: [b.update.isPending && /* @__PURE__ */ H("span", {
51
52
  className: "text-xs text-muted-foreground",
52
53
  role: "status",
53
- children: s("saving")
54
+ children: c("saving")
54
55
  }), E && /* @__PURE__ */ H(O, {
55
56
  type: "button",
56
57
  size: "sm",
57
58
  onClick: () => W({
58
59
  kind: "edit",
59
- entry: g
60
+ entry: h
60
61
  }),
61
- children: a("editDetails")
62
+ children: o("editDetails")
62
63
  })] })
63
64
  }),
64
65
  /* @__PURE__ */ H("div", {
@@ -66,81 +67,81 @@ function q() {
66
67
  children: /* @__PURE__ */ U("article", {
67
68
  className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
68
69
  onContextMenu: (e) => {
69
- e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || u(e, q(g));
70
+ e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || p(e, q(h));
70
71
  },
71
72
  children: [
72
- g.archivedAt && /* @__PURE__ */ U("div", {
73
+ h.archivedAt && /* @__PURE__ */ U("div", {
73
74
  className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
74
75
  children: [/* @__PURE__ */ H("span", {
75
76
  className: "min-w-0 flex-1",
76
- children: a("archivedNotice")
77
+ children: o("archivedNotice")
77
78
  }), T && /* @__PURE__ */ H(O, {
78
79
  type: "button",
79
80
  size: "sm",
80
- onClick: () => x.restore.mutate(g.id),
81
- children: a("restore")
81
+ onClick: () => b.restore.mutate(h.id),
82
+ children: o("restore")
82
83
  })]
83
84
  }),
84
85
  /* @__PURE__ */ H(J, {
85
- workspace: n,
86
- entry: g
86
+ workspace: r,
87
+ entry: h
87
88
  }),
88
89
  /* @__PURE__ */ H("h1", {
89
90
  className: "sr-only",
90
- children: g.name
91
+ children: h.name
91
92
  }),
92
93
  /* @__PURE__ */ H(M, {
93
- value: g.name,
94
+ value: h.name,
94
95
  onCommit: (e) => $({ name: e }),
95
96
  readOnly: !E,
96
- "aria-label": a("name"),
97
+ "aria-label": o("name"),
97
98
  maxLength: 100,
98
99
  className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
99
100
  }),
100
- g.aliases.length > 0 && /* @__PURE__ */ H("p", {
101
+ h.aliases.length > 0 && /* @__PURE__ */ H("p", {
101
102
  className: "mt-1 text-sm text-muted-foreground",
102
- children: a("alsoCalled", { names: g.aliases.join(", ") })
103
+ children: o("alsoCalled", { names: h.aliases.join(", ") })
103
104
  }),
104
105
  /* @__PURE__ */ H(M, {
105
- value: g.definition,
106
+ value: h.definition,
106
107
  onCommit: (e) => $({ definition: e }),
107
108
  readOnly: !E,
108
- "aria-label": a("definition"),
109
- placeholder: a("definitionPlaceholder"),
109
+ "aria-label": o("definition"),
110
+ placeholder: o("definitionPlaceholder"),
110
111
  maxLength: 1e3,
111
112
  size: "lg",
112
113
  className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
113
114
  }),
114
- (g.supersededBy || Q.length > 0) && /* @__PURE__ */ U("div", {
115
+ (h.supersededBy || Q.length > 0) && /* @__PURE__ */ U("div", {
115
116
  className: "mt-3 space-y-1 text-sm",
116
- children: [g.supersededBy && /* @__PURE__ */ H(e, {
117
+ children: [h.supersededBy && /* @__PURE__ */ H(t, {
117
118
  to: "/$workspace/knowledge/$term",
118
119
  params: {
119
- workspace: n,
120
- term: f(_.find((e) => e.id === g.supersededBy) ?? { id: g.supersededBy })
120
+ workspace: r,
121
+ term: d(g.find((e) => e.id === h.supersededBy) ?? { id: h.supersededBy })
121
122
  },
122
123
  className: "block text-primary hover:underline",
123
- children: a("supersededBy", { name: g.supersededByName ?? "" })
124
- }), Q.map((t) => /* @__PURE__ */ H(e, {
124
+ children: o("supersededBy", { name: h.supersededByName ?? "" })
125
+ }), Q.map((e) => /* @__PURE__ */ H(t, {
125
126
  to: "/$workspace/knowledge/$term",
126
127
  params: {
127
- workspace: n,
128
- term: f(t)
128
+ workspace: r,
129
+ term: d(e)
129
130
  },
130
131
  className: "block text-muted-foreground hover:text-foreground",
131
- children: a("replaces", { name: t.name })
132
- }, t.id))]
132
+ children: o("replaces", { name: e.name })
133
+ }, e.id))]
133
134
  }),
134
135
  /* @__PURE__ */ U("section", {
135
- "aria-label": a("page"),
136
+ "aria-label": o("page"),
136
137
  className: "mt-8 border-t border-border pt-6",
137
138
  children: [
138
- E || g.body ? /* @__PURE__ */ H(te, {
139
- value: g.body ?? "",
139
+ E || h.body ? /* @__PURE__ */ H(w, {
140
+ value: h.body ?? "",
140
141
  editable: E,
141
- placeholder: a("pagePlaceholder"),
142
- label: a("page"),
143
- onBlur: (e) => e !== (g.body ?? "") && $({ body: e }),
142
+ placeholder: o("pagePlaceholder"),
143
+ label: o("page"),
144
+ onBlur: (e) => e !== (h.body ?? "") && $({ body: e }),
144
145
  onFiles: (e, t) => Z.upload(X.current, e, t),
145
146
  onEditor: (e) => {
146
147
  X.current = e;
@@ -148,144 +149,144 @@ function q() {
148
149
  className: "min-h-32 [&>:first-child]:mt-0"
149
150
  }) : /* @__PURE__ */ H("p", {
150
151
  className: "text-sm text-muted-foreground",
151
- children: a("noPage")
152
+ children: o("noPage")
152
153
  }),
153
154
  E && /* @__PURE__ */ U("div", {
154
155
  className: "mt-3 flex items-center gap-2",
155
156
  children: [
156
- /* @__PURE__ */ H(S, { onFiles: (e) => Z.upload(X.current, e) }),
157
+ /* @__PURE__ */ H(x, { onFiles: (e) => Z.upload(X.current, e) }),
157
158
  /* @__PURE__ */ H("span", {
158
159
  className: "text-xs text-muted-foreground",
159
- children: a("attachHint")
160
+ children: o("attachHint")
160
161
  }),
161
162
  /* @__PURE__ */ H("span", {
162
163
  className: "ml-auto",
163
- children: /* @__PURE__ */ H(C, {
164
+ children: /* @__PURE__ */ H(S, {
164
165
  pending: Z.pending,
165
166
  error: Z.error
166
167
  })
167
168
  })
168
169
  ]
169
170
  }),
170
- x.update.isError && /* @__PURE__ */ H(k, {
171
+ b.update.isError && /* @__PURE__ */ H(k, {
171
172
  className: "mt-2",
172
- children: h(x.update.error)
173
+ children: m(b.update.error)
173
174
  })
174
175
  ]
175
176
  }),
176
177
  /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(Y, {
177
- workspace: n,
178
- entryId: g.id
178
+ workspace: r,
179
+ entryId: h.id
179
180
  }) }),
180
181
  /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(ne, {
181
- workspace: n,
182
- entryId: g.id
182
+ workspace: r,
183
+ entryId: h.id
183
184
  }) })
184
185
  ]
185
186
  })
186
187
  }),
187
- D && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(d, {
188
- workspace: n,
188
+ D && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(te, {
189
+ workspace: r,
189
190
  mode: D,
190
191
  onClose: () => j(null),
191
- onSaved: (e) => l({
192
+ onSaved: (e) => u({
192
193
  to: "/$workspace/knowledge/$term",
193
194
  params: {
194
- workspace: n,
195
- term: f(e)
195
+ workspace: r,
196
+ term: d(e)
196
197
  },
197
- replace: e.id === g.id
198
+ replace: e.id === h.id
198
199
  })
199
200
  }) })
200
201
  ]
201
202
  });
202
203
  }
203
- function J({ workspace: t, entry: r }) {
204
- let i = B("knowledge"), { actorName: a } = _(t), o = h(), { data: c = [] } = W(n(t)), l = c.find((e) => e.id === r.areaId), d = r.source.doc, f = [
205
- ...r.kind === "term" ? [] : [i(`kind.${r.kind}`)],
204
+ function J({ workspace: e, entry: n }) {
205
+ let i = B("knowledge"), { actorName: a } = g(e), o = h(), { data: s = [] } = W(r(e)), l = s.find((e) => e.id === n.areaId), u = n.source.doc, d = [
206
+ ...n.kind === "term" ? [] : [i(`kind.${n.kind}`)],
206
207
  ...l ? [l.title] : [],
207
- i("writtenBy", { name: a(r.creator) }),
208
+ i("writtenBy", { name: a(n.creator) }),
208
209
  /* @__PURE__ */ H("time", {
209
- dateTime: r.updatedAt,
210
- title: o.full(r.updatedAt),
211
- children: i("updated", { when: o.relative(r.updatedAt) })
210
+ dateTime: n.updatedAt,
211
+ title: o.full(n.updatedAt),
212
+ children: i("updated", { when: o.relative(n.updatedAt) })
212
213
  }, "updated")
213
214
  ];
214
215
  return /* @__PURE__ */ U("div", {
215
216
  className: "space-y-1 text-xs text-muted-foreground",
216
217
  children: [/* @__PURE__ */ U("p", {
217
218
  className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
218
- children: [(r.kind !== "term" || r.status === "superseded") && /* @__PURE__ */ H(x, { status: r.status }), f.map((e, t) => /* @__PURE__ */ U("span", {
219
+ children: [(n.kind !== "term" || n.status === "superseded") && /* @__PURE__ */ H(b, { status: n.status }), d.map((e, t) => /* @__PURE__ */ U("span", {
219
220
  className: "inline-flex items-center gap-1.5",
220
221
  children: [t > 0 && /* @__PURE__ */ H("span", {
221
222
  "aria-hidden": "true",
222
223
  children: "·"
223
224
  }), e]
224
225
  }, t))]
225
- }), (d || r.source.identifier) && /* @__PURE__ */ U("p", {
226
+ }), (u || n.source.identifier) && /* @__PURE__ */ U("p", {
226
227
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
227
228
  children: [
228
- d && /* @__PURE__ */ U(e, {
229
+ u && /* @__PURE__ */ U(t, {
229
230
  to: "/$workspace/docs/$doc",
230
231
  params: {
231
- workspace: t,
232
- doc: g(d)
232
+ workspace: e,
233
+ doc: p(u)
233
234
  },
234
- ...r.source.section && { hash: u(r.source.section) },
235
+ ...n.source.section && { hash: m(n.source.section) },
235
236
  className: "inline-flex items-center gap-1 hover:text-foreground",
236
- children: [/* @__PURE__ */ H(s, { className: "size-3" }), r.source.section ? i("sourceSection", {
237
- doc: d.title,
238
- section: r.source.section
239
- }) : d.title]
237
+ children: [/* @__PURE__ */ H(c, { className: "size-3" }), n.source.section ? i("sourceSection", {
238
+ doc: u.title,
239
+ section: n.source.section
240
+ }) : u.title]
240
241
  }),
241
- r.source.missing && /* @__PURE__ */ H("span", {
242
+ n.source.missing && /* @__PURE__ */ H("span", {
242
243
  className: "text-warning",
243
- children: i("sourceMissing", { section: r.source.section ?? "" })
244
+ children: i("sourceMissing", { section: n.source.section ?? "" })
244
245
  }),
245
- r.source.identifier && /* @__PURE__ */ U(e, {
246
+ n.source.identifier && /* @__PURE__ */ U(t, {
246
247
  to: "/$workspace/issues/$identifier",
247
248
  params: {
248
- workspace: t,
249
- identifier: r.source.identifier
249
+ workspace: e,
250
+ identifier: n.source.identifier
250
251
  },
251
252
  className: "hover:text-foreground",
252
253
  children: [
253
- r.source.identifier,
254
+ n.source.identifier,
254
255
  " ",
255
- r.source.issueTitle
256
+ n.source.issueTitle
256
257
  ]
257
258
  })
258
259
  ]
259
260
  })]
260
261
  });
261
262
  }
262
- function Y({ workspace: t, entryId: n }) {
263
- let r = B("knowledge"), { data: i } = W(a(t, n));
263
+ function Y({ workspace: e, entryId: n }) {
264
+ let r = B("knowledge"), { data: i } = W(o(e, n));
264
265
  if (!i) return null;
265
- let o = i.issues.length + i.docs.length, c = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
266
+ let a = i.issues.length + i.docs.length, s = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
266
267
  return /* @__PURE__ */ U("section", {
267
268
  "aria-label": r("mentionedIn"),
268
269
  className: "mt-12",
269
270
  children: [/* @__PURE__ */ U("h2", {
270
271
  className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
271
- children: [r("mentionedIn"), o > 0 && /* @__PURE__ */ H("span", {
272
+ children: [r("mentionedIn"), a > 0 && /* @__PURE__ */ H("span", {
272
273
  className: "text-xs font-normal text-muted-foreground tabular-nums",
273
- children: o
274
+ children: a
274
275
  })]
275
- }), o === 0 ? /* @__PURE__ */ H("p", {
276
+ }), a === 0 ? /* @__PURE__ */ H("p", {
276
277
  className: "text-sm text-muted-foreground",
277
278
  children: r("mentionedNone")
278
279
  }) : /* @__PURE__ */ U("ul", {
279
280
  className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
280
- children: [i.issues.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(e, {
281
+ children: [i.issues.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(t, {
281
282
  to: "/$workspace/issues/$identifier",
282
283
  params: {
283
- workspace: t,
284
+ workspace: e,
284
285
  identifier: n.identifier
285
286
  },
286
- className: c,
287
+ className: s,
287
288
  children: [
288
- /* @__PURE__ */ H(l, {
289
+ /* @__PURE__ */ H(u, {
289
290
  category: n.statusCategory,
290
291
  className: "size-3.5 shrink-0"
291
292
  }),
@@ -298,15 +299,15 @@ function Y({ workspace: t, entryId: n }) {
298
299
  children: n.title
299
300
  })
300
301
  ]
301
- }) }, n.identifier)), i.docs.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(e, {
302
+ }) }, n.identifier)), i.docs.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(t, {
302
303
  to: "/$workspace/docs/$doc",
303
304
  params: {
304
- workspace: t,
305
- doc: g(n)
305
+ workspace: e,
306
+ doc: p(n)
306
307
  },
307
- className: c,
308
+ className: s,
308
309
  children: [
309
- /* @__PURE__ */ H(s, { className: "size-3.5 shrink-0 text-muted-foreground" }),
310
+ /* @__PURE__ */ H(c, { className: "size-3.5 shrink-0 text-muted-foreground" }),
310
311
  /* @__PURE__ */ H("span", {
311
312
  className: "w-16 shrink-0 text-xs text-muted-foreground",
312
313
  children: r("doc")
@@ -321,7 +322,7 @@ function Y({ workspace: t, entryId: n }) {
321
322
  });
322
323
  }
323
324
  function ne({ workspace: e, entryId: t }) {
324
- let n = B("knowledge.history"), { data: r = [] } = W(i(e, t)), { actorName: a } = _(e);
325
+ let n = B("knowledge.history"), { data: r = [] } = W(a(e, t)), { actorName: i } = g(e);
325
326
  return r.length === 0 ? null : /* @__PURE__ */ H(j, {
326
327
  title: n("title"),
327
328
  variant: "bare",
@@ -333,7 +334,7 @@ function ne({ workspace: e, entryId: t }) {
333
334
  icon: D(t.type, t.data),
334
335
  actor: t.actor,
335
336
  at: t.createdAt,
336
- children: X(n, t, a(t.actor))
337
+ children: X(n, t, i(t.actor))
337
338
  }, t.id)) })
338
339
  });
339
340
  }
@@ -1,8 +1,8 @@
1
- import { redirect as e } from "../../../lib/router.js";
2
- import { rememberSearch as t } from "../../../lib/listSearch.js";
1
+ import { rememberSearch as e } from "../../../lib/listSearch.js";
2
+ import { redirect as t } from "../../../lib/router.js";
3
3
  import { knowledgeQuery as n } from "../../../api/queries.js";
4
4
  import { isEntryAt as r } from "../../../lib/refs.js";
5
- import { kinds as i, termRef as a } from "../../../lib/knowledge.js";
5
+ import { kinds as i, termRef as a } from "../../../lib/knowledgeKinds.js";
6
6
  import { createFileRoute as o, lazyFn as s, lazyRouteComponent as c } from "@tanstack/react-router";
7
7
  var l = o("/$workspace/knowledge/")({
8
8
  validateSearch: (e) => ({
@@ -12,18 +12,18 @@ var l = o("/$workspace/knowledge/")({
12
12
  }),
13
13
  beforeLoad: async ({ context: { queryClient: i }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
14
14
  if (s) {
15
- let t = (await i.ensureQueryData(n(o.workspace))).find((e) => r(e, s));
16
- throw e({
15
+ let e = (await i.ensureQueryData(n(o.workspace))).find((e) => r(e, s));
16
+ throw t({
17
17
  to: "/$workspace/knowledge/$term",
18
18
  params: {
19
19
  workspace: o.workspace,
20
- term: t ? a(t) : s
20
+ term: e ? a(e) : s
21
21
  },
22
22
  replace: !0
23
23
  });
24
24
  }
25
- let d = t(l.pathname, c, u);
26
- if (d) throw e({
25
+ let d = e(l.pathname, c, u);
26
+ if (d) throw t({
27
27
  to: "/$workspace/knowledge",
28
28
  params: o,
29
29
  search: d,