@parallelworks/tandem-web 0.178.0 → 0.179.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.
@@ -1,236 +1,231 @@
1
1
  import { areasQuery as e, knowledgeQuery as t } from "../../../api/queries.js";
2
2
  import { FavoriteStar as n } from "../../../components/FavoriteStar.js";
3
- import { KnowledgeStatus as r } from "../../../components/HoverCards.js";
4
- import { AddIcon as i, LibraryIcon as a } from "../../../components/icons.js";
5
- import { EntryDialog as o, useKnowledgeMenu as s } from "../../../lib/knowledge.js";
6
- import { kinds as c, termRef as l } from "../../../lib/knowledgeKinds.js";
7
- import { usePageTitle as u } from "../../../lib/pageTitle.js";
8
- import { Link as d, useNavigate as f } from "../../../lib/router.js";
9
- import { useTime as p } from "../../../lib/time.js";
10
- import { Route as m } from "./index.js";
11
- import { Button as h, EmptyState as g, SearchInput as _, SegmentedControl as v, Tooltip as y, buttonClasses as b, useOpenMenu as x } from "@parallelworks/ui";
12
- import { Suspense as S, useCallback as C, useEffect as w, useMemo as T, useState as E } from "react";
13
- import { useLocale as D, useTranslations as O } from "use-intl";
14
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
15
- import { useQuery as M, useSuspenseQuery as N } from "@tanstack/react-query";
3
+ import { AddIcon as r, LibraryIcon as i } from "../../../components/icons.js";
4
+ import { EntryDialog as a, useKnowledgeMenu as o } from "../../../lib/knowledge.js";
5
+ import { kinds as s, termRef as c } from "../../../lib/knowledgeKinds.js";
6
+ import { usePageTitle as l } from "../../../lib/pageTitle.js";
7
+ import { Link as u, useNavigate as d } from "../../../lib/router.js";
8
+ import { useTime as f } from "../../../lib/time.js";
9
+ import { Route as p } from "./index.js";
10
+ import { Button as m, EmptyState as h, SearchInput as g, SegmentedControl as _, Tooltip as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
11
+ import { Suspense as x, useCallback as S, useEffect as C, useMemo as w, useState as T } from "react";
12
+ import { useLocale as E, useTranslations as D } from "use-intl";
13
+ import { Fragment as ee, jsx as O, jsxs as k } from "react/jsx-runtime";
14
+ import { useQuery as A, useSuspenseQuery as j } from "@tanstack/react-query";
16
15
  // src/routes/$workspace/knowledge/index.tsx?tsr-split=component
17
- var P = 5, F = 8;
18
- function I() {
19
- let { workspace: r } = m.useParams(), { archived: s, kind: p = "all" } = m.useSearch(), y = O("knowledge"), x = D();
20
- u(y("title"));
21
- let I = f(), [R, z] = E(""), [B, V] = E(""), [H, U] = E(null);
22
- w(() => {
23
- let e = setTimeout(() => V(R.trim()), 200);
16
+ var M = 5, N = 8;
17
+ function P() {
18
+ let { workspace: o } = p.useParams(), { archived: f, kind: v = "all" } = p.useSearch(), b = D("knowledge"), P = E();
19
+ l(b("title"));
20
+ let I = d(), [L, R] = T(""), [z, B] = T(""), [V, H] = T(null);
21
+ C(() => {
22
+ let e = setTimeout(() => B(L.trim()), 200);
24
23
  return () => clearTimeout(e);
25
- }, [R]);
26
- let { data: W } = N(t(r)), { data: G = [] } = M(e(r)), K = {
27
- ...B && { q: B },
28
- ...s && { archived: !0 }
29
- }, { data: q } = M({
30
- ...t(r, K),
31
- enabled: !!B || !!s
32
- }), J = !!B || !!s, Y = J ? q ?? [] : W, X = p === "all" ? Y : Y.filter((e) => e.kind === p), Z = C((e) => U(e), []), Q = T(() => {
24
+ }, [L]);
25
+ let { data: U } = j(t(o)), { data: W = [] } = A(e(o)), G = {
26
+ ...z && { q: z },
27
+ ...f && { archived: !0 }
28
+ }, { data: K } = A({
29
+ ...t(o, G),
30
+ enabled: !!z || !!f
31
+ }), q = !!z || !!f, J = q ? K ?? [] : U, Y = v === "all" ? J : J.filter((e) => e.kind === v), X = S((e) => H(e), []), Z = w(() => {
33
32
  let e = /* @__PURE__ */ new Map();
34
- for (let t of Y) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
33
+ for (let t of J) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
35
34
  return e;
36
- }, [Y]), ee = T(() => [...X].sort((e, t) => t.updatedAt.localeCompare(e.updatedAt)).slice(0, P), [X]), te = T(() => {
37
- let e = new Intl.Collator(x, { sensitivity: "base" }), t = /* @__PURE__ */ new Map();
38
- for (let e of X) {
39
- let n = G.some((t) => t.id === e.areaId) ? e.areaId : "";
35
+ }, [J]), Q = w(() => [...Y].sort((e, t) => t.updatedAt.localeCompare(e.updatedAt)).slice(0, M), [Y]), te = w(() => {
36
+ let e = new Intl.Collator(P, { sensitivity: "base" }), t = /* @__PURE__ */ new Map();
37
+ for (let e of Y) {
38
+ let n = W.some((t) => t.id === e.areaId) ? e.areaId : "";
40
39
  t.set(n, [...t.get(n) ?? [], e]);
41
40
  }
42
41
  return [...t].map(([t, n]) => ({
43
42
  id: t,
44
- title: G.find((e) => e.id === t)?.title ?? y("general"),
43
+ title: W.find((e) => e.id === t)?.title ?? b("general"),
45
44
  entries: n.sort((t, n) => e.compare(t.name, n.name))
46
45
  })).sort((t, n) => t.id ? n.id ? e.compare(t.title, n.title) : -1 : 1);
47
46
  }, [
48
- X,
49
- G,
50
- x,
51
- y
47
+ Y,
48
+ W,
49
+ P,
50
+ b
52
51
  ]), ne = (e) => I({
53
52
  to: "/$workspace/knowledge",
54
- params: { workspace: r },
53
+ params: { workspace: o },
55
54
  search: {
56
- ...s && { archived: s },
55
+ ...f && { archived: f },
57
56
  ...e !== "all" && { kind: e }
58
57
  },
59
58
  replace: !0
60
- }), $ = c.filter((e) => Q.has(e) || e === p);
61
- return /* @__PURE__ */ j("div", {
59
+ }), $ = s.filter((e) => Z.has(e) || e === v);
60
+ return /* @__PURE__ */ k("div", {
62
61
  className: "flex h-full flex-col",
63
62
  children: [
64
- /* @__PURE__ */ j("header", {
63
+ /* @__PURE__ */ k("header", {
65
64
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
66
65
  children: [
67
- /* @__PURE__ */ A("h1", {
66
+ /* @__PURE__ */ O("h1", {
68
67
  className: "min-w-0 truncate text-sm font-semibold",
69
- children: y("title")
68
+ children: b("title")
70
69
  }),
71
- /* @__PURE__ */ A(n, {
72
- workspace: r,
70
+ /* @__PURE__ */ O(n, {
71
+ workspace: o,
73
72
  kind: "page",
74
73
  target: "knowledge"
75
74
  }),
76
- /* @__PURE__ */ A("span", {
75
+ /* @__PURE__ */ O("span", {
77
76
  className: "whitespace-nowrap text-xs text-muted-foreground tabular-nums",
78
- children: y("count", { count: W.length })
77
+ children: b("count", { count: U.length })
79
78
  }),
80
- /* @__PURE__ */ A(d, {
79
+ /* @__PURE__ */ O(u, {
81
80
  to: "/$workspace/graph",
82
- params: { workspace: r },
83
- className: `${b({ size: "sm" })} ml-auto`,
84
- children: y("graph")
81
+ params: { workspace: o },
82
+ className: `${y({ size: "sm" })} ml-auto`,
83
+ children: b("graph")
85
84
  }),
86
- /* @__PURE__ */ j(h, {
85
+ /* @__PURE__ */ k(m, {
87
86
  type: "button",
88
87
  variant: "primary",
89
88
  size: "sm",
90
- onClick: () => Z({ kind: "create" }),
91
- children: [/* @__PURE__ */ A(i, { className: "size-3.5" }), /* @__PURE__ */ A("span", {
89
+ onClick: () => X({ kind: "create" }),
90
+ children: [/* @__PURE__ */ O(r, { className: "size-3.5" }), /* @__PURE__ */ O("span", {
92
91
  className: "max-md:sr-only",
93
- children: y("new")
92
+ children: b("new")
94
93
  })]
95
94
  })
96
95
  ]
97
96
  }),
98
- /* @__PURE__ */ A("div", {
97
+ /* @__PURE__ */ O("div", {
99
98
  className: "min-h-0 flex-1 overflow-y-auto",
100
- children: /* @__PURE__ */ j("div", {
99
+ children: /* @__PURE__ */ k("div", {
101
100
  className: "mx-auto w-full max-w-3xl px-4 pt-8 pb-16 md:px-8",
102
101
  children: [
103
- /* @__PURE__ */ A(_, {
104
- value: R,
105
- onValueChange: z,
106
- label: y("search"),
102
+ /* @__PURE__ */ O(g, {
103
+ value: L,
104
+ onValueChange: R,
105
+ label: b("search"),
107
106
  size: "lg",
108
107
  className: "w-full"
109
108
  }),
110
- /* @__PURE__ */ j("div", {
109
+ /* @__PURE__ */ k("div", {
111
110
  className: "mt-4 flex flex-wrap items-center gap-2",
112
- children: [$.length > 1 && /* @__PURE__ */ A(v, {
113
- label: y("kindLabel"),
111
+ children: [$.length > 1 && /* @__PURE__ */ O(_, {
112
+ label: b("kindLabel"),
114
113
  size: "sm",
115
- value: p,
114
+ value: v,
116
115
  onValueChange: ne,
117
116
  options: [{
118
117
  value: "all",
119
- label: y("allKinds"),
120
- count: Y.length
118
+ label: b("allKinds"),
119
+ count: J.length
121
120
  }, ...$.map((e) => ({
122
121
  value: e,
123
- label: y(`kinds.${e}`),
124
- count: Q.get(e) ?? 0
122
+ label: b(`kinds.${e}`),
123
+ count: Z.get(e) ?? 0
125
124
  }))]
126
- }), /* @__PURE__ */ A(d, {
125
+ }), /* @__PURE__ */ O(u, {
127
126
  to: "/$workspace/knowledge",
128
- params: { workspace: r },
127
+ params: { workspace: o },
129
128
  search: {
130
- ...!s && { archived: !0 },
131
- ...p !== "all" && { kind: p }
129
+ ...!f && { archived: !0 },
130
+ ...v !== "all" && { kind: v }
132
131
  },
133
- "aria-current": s || void 0,
134
- className: `${b({
132
+ "aria-current": f || void 0,
133
+ className: `${y({
135
134
  size: "sm",
136
- variant: s ? "secondary" : "ghost"
135
+ variant: f ? "secondary" : "ghost"
137
136
  })} ml-auto`,
138
- children: y("archived")
137
+ children: b("archived")
139
138
  })]
140
139
  }),
141
- X.length === 0 ? /* @__PURE__ */ A(g, {
142
- icon: /* @__PURE__ */ A(a, {}),
143
- title: y(J || p !== "all" ? "noMatches" : "emptyTitle"),
144
- description: J || p !== "all" ? void 0 : y("empty"),
145
- action: !J && p === "all" ? /* @__PURE__ */ A(h, {
140
+ Y.length === 0 ? /* @__PURE__ */ O(h, {
141
+ icon: /* @__PURE__ */ O(i, {}),
142
+ title: b(q || v !== "all" ? "noMatches" : "emptyTitle"),
143
+ description: q || v !== "all" ? void 0 : b("empty"),
144
+ action: !q && v === "all" ? /* @__PURE__ */ O(m, {
146
145
  type: "button",
147
146
  variant: "primary",
148
- onClick: () => Z({ kind: "create" }),
149
- children: y("new")
147
+ onClick: () => X({ kind: "create" }),
148
+ children: b("new")
150
149
  }) : void 0,
151
150
  className: "mt-16"
152
- }) : J ? /* @__PURE__ */ A(L, {
153
- workspace: r,
154
- title: y("results"),
155
- entries: X,
156
- onOpen: Z
157
- }) : /* @__PURE__ */ j(k, { children: [X.length >= F && /* @__PURE__ */ A(L, {
158
- workspace: r,
159
- title: y("recent"),
160
- entries: ee,
161
- onOpen: Z,
151
+ }) : q ? /* @__PURE__ */ O(F, {
152
+ workspace: o,
153
+ title: b("results"),
154
+ entries: Y,
155
+ onOpen: X
156
+ }) : /* @__PURE__ */ k(ee, { children: [Y.length >= N && /* @__PURE__ */ O(F, {
157
+ workspace: o,
158
+ title: b("recent"),
159
+ entries: Q,
160
+ onOpen: X,
162
161
  showTime: !0
163
- }), te.map((e) => /* @__PURE__ */ A(L, {
164
- workspace: r,
162
+ }), te.map((e) => /* @__PURE__ */ O(F, {
163
+ workspace: o,
165
164
  title: e.title,
166
165
  entries: e.entries,
167
- onOpen: Z
166
+ onOpen: X
168
167
  }, e.id || "general"))] })
169
168
  ]
170
169
  })
171
170
  }),
172
- H && /* @__PURE__ */ A(S, { children: /* @__PURE__ */ A(o, {
173
- workspace: r,
174
- mode: H,
175
- onClose: () => U(null),
171
+ V && /* @__PURE__ */ O(x, { children: /* @__PURE__ */ O(a, {
172
+ workspace: o,
173
+ mode: V,
174
+ onClose: () => H(null),
176
175
  onSaved: (e) => I({
177
176
  to: "/$workspace/knowledge/$term",
178
177
  params: {
179
- workspace: r,
180
- term: l(e)
178
+ workspace: o,
179
+ term: c(e)
181
180
  }
182
181
  })
183
182
  }) })
184
183
  ]
185
184
  });
186
185
  }
187
- function L({ workspace: e, title: t, entries: n, onOpen: i, showTime: a = !1 }) {
188
- let o = O("knowledge"), c = x(), u = s(e, i), f = p();
189
- return /* @__PURE__ */ j("section", {
186
+ function F({ workspace: e, title: t, entries: n, onOpen: r, showTime: i = !1 }) {
187
+ let a = D("knowledge"), s = b(), l = o(e, r), d = f();
188
+ return /* @__PURE__ */ k("section", {
190
189
  "aria-label": t,
191
190
  className: "mt-10",
192
- children: [/* @__PURE__ */ j("h2", {
191
+ children: [/* @__PURE__ */ k("h2", {
193
192
  className: "flex items-baseline gap-2 text-base font-semibold",
194
- children: [t, /* @__PURE__ */ A("span", {
193
+ children: [t, /* @__PURE__ */ O("span", {
195
194
  className: "text-xs font-normal text-muted-foreground tabular-nums",
196
195
  children: n.length
197
196
  })]
198
- }), /* @__PURE__ */ A("ul", {
197
+ }), /* @__PURE__ */ O("ul", {
199
198
  className: "mt-3 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
200
- children: n.map((t) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j(d, {
199
+ children: n.map((t) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k(u, {
201
200
  to: "/$workspace/knowledge/$term",
202
201
  params: {
203
202
  workspace: e,
204
- term: l(t)
203
+ term: c(t)
205
204
  },
206
- onContextMenu: (e) => c(e, u(t)),
205
+ onContextMenu: (e) => s(e, l(t)),
207
206
  className: "group flex flex-col gap-1 px-4 py-3 sm:flex-row sm:items-start sm:gap-3 transition-colors duration-150 hover:bg-muted focus-visible:outline-offset-[-2px]",
208
- children: [/* @__PURE__ */ j("span", {
207
+ children: [/* @__PURE__ */ k("span", {
209
208
  className: "min-w-0 flex-1",
210
- children: [/* @__PURE__ */ A("span", {
209
+ children: [/* @__PURE__ */ O("span", {
211
210
  className: `block truncate text-sm font-medium ${t.status === "superseded" ? "text-muted-foreground line-through" : ""}`,
212
211
  children: t.name
213
- }), /* @__PURE__ */ A("span", {
212
+ }), /* @__PURE__ */ O("span", {
214
213
  className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground",
215
214
  children: t.definition
216
215
  })]
217
- }), (t.kind !== "term" || t.status === "added" || a) && /* @__PURE__ */ j("span", {
216
+ }), (t.kind !== "term" || i) && /* @__PURE__ */ k("span", {
218
217
  className: "flex items-center gap-2 text-xs text-muted-foreground sm:shrink-0 sm:pt-0.5",
219
- children: [
220
- t.kind !== "term" && /* @__PURE__ */ A("span", { children: o(`kind.${t.kind}`) }),
221
- t.status === "added" && /* @__PURE__ */ A(r, { status: t.status }),
222
- a && /* @__PURE__ */ A(y, {
223
- content: f.full(t.updatedAt),
224
- children: /* @__PURE__ */ A("time", {
225
- dateTime: t.updatedAt,
226
- className: "tabular-nums",
227
- children: f.relative(t.updatedAt)
228
- })
218
+ children: [t.kind !== "term" && /* @__PURE__ */ O("span", { children: a(`kind.${t.kind}`) }), i && /* @__PURE__ */ O(v, {
219
+ content: d.full(t.updatedAt),
220
+ children: /* @__PURE__ */ O("time", {
221
+ dateTime: t.updatedAt,
222
+ className: "tabular-nums",
223
+ children: d.relative(t.updatedAt)
229
224
  })
230
- ]
225
+ })]
231
226
  })]
232
227
  }) }, t.id))
233
228
  })]
234
229
  });
235
230
  }
236
- export { I as component };
231
+ export { P as component };
@@ -21,7 +21,7 @@ import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
21
21
  import { useQuery as H, useQueryClient as U, useSuspenseQuery as le } from "@tanstack/react-query";
22
22
  import { ListFilterMenu as ue, useListView as W } from "@parallelworks/ui/list";
23
23
  // src/routes/$workspace/notifications.tsx?tsr-split=component
24
- var G = (...e) => e.filter(Boolean).join(" ");
24
+ var G = (...e) => e.filter(Boolean).join(" "), K = (e) => e.runnerName && e.reason === "run_finished" ? "run_finished_on" : e.runnerName && e.reason === "run_stopped" ? "run_stopped_on" : e.reason;
25
25
  function de(e, t) {
26
26
  let n = /* @__PURE__ */ new Map();
27
27
  for (let r of t) {
@@ -42,7 +42,7 @@ function de(e, t) {
42
42
  }
43
43
  return [...n.values()];
44
44
  }
45
- var K = {
45
+ var q = {
46
46
  decisions: ["decision_requested"],
47
47
  assigned: ["assigned"],
48
48
  comments: ["commented"],
@@ -51,7 +51,7 @@ var K = {
51
51
  updates: ["update_posted"],
52
52
  reminders: ["reminder"],
53
53
  mentions: ["mentioned"]
54
- }, q = (e) => e.reason === "reminder" && e.excerpt ? /* @__PURE__ */ new Date(`${e.excerpt}T00:00:00`) : /* @__PURE__ */ new Date(0), J = (e) => e.slice(0, e.lastIndexOf("-"));
54
+ }, J = (e) => e.reason === "reminder" && e.excerpt ? /* @__PURE__ */ new Date(`${e.excerpt}T00:00:00`) : /* @__PURE__ */ new Date(0), Y = (e) => e.slice(0, e.lastIndexOf("-"));
55
55
  function fe(e, t) {
56
56
  let n = R("notifications"), r = L(() => {
57
57
  let e = [{
@@ -65,11 +65,11 @@ function fe(e, t) {
65
65
  }, {
66
66
  key: "kind",
67
67
  label: n("kind"),
68
- options: Object.keys(K).map((e) => ({
68
+ options: Object.keys(q).map((e) => ({
69
69
  value: e,
70
70
  label: n(`kinds.${e}`)
71
71
  })),
72
- matches: (e, t) => t.some((t) => K[t].includes(e.reason))
72
+ matches: (e, t) => t.some((t) => q[t].includes(e.reason))
73
73
  }], r = t.filter((e) => !e.archivedAt);
74
74
  return r.length > 1 && e.push({
75
75
  key: "team",
@@ -78,7 +78,7 @@ function fe(e, t) {
78
78
  value: e.key,
79
79
  label: e.name
80
80
  })),
81
- matches: (e, t) => !!e.identifier && t.includes(J(e.identifier))
81
+ matches: (e, t) => !!e.identifier && t.includes(Y(e.identifier))
82
82
  }), e;
83
83
  }, [n, t]);
84
84
  return W({
@@ -87,11 +87,11 @@ function fe(e, t) {
87
87
  facets: r
88
88
  });
89
89
  }
90
- function Y() {
90
+ function pe() {
91
91
  let { workspace: e } = D.useParams(), { issue: t } = D.useSearch(), i = R("notifications"), a = ie(), { data: { notifications: o, unread: c } } = le(n(e));
92
92
  re(c > 0 ? `${i("title")} (${c})` : i("title"));
93
93
  let u = te(e), d = ne(e), p = ee(e), { data: m = [] } = H(r(e)), h = fe(e, m), g = h.activeFilterCount > 0, _ = (h.filters.state ?? []).includes("unread"), v = h.filters.kind ?? [], y = h.filters.team ?? [], b = L(() => {
94
- let n = o.filter((e) => (v.length === 0 || v.some((t) => K[t]?.includes(e.reason))) && (y.length === 0 || !!e.identifier && y.includes(J(e.identifier))));
94
+ let n = o.filter((e) => (v.length === 0 || v.some((t) => q[t]?.includes(e.reason))) && (y.length === 0 || !!e.identifier && y.includes(Y(e.identifier))));
95
95
  return de(e, n).filter((e) => !_ || e.unread.length > 0 || e.key === t);
96
96
  }, [
97
97
  e,
@@ -124,17 +124,17 @@ function Y() {
124
124
  }, W = (e, t) => {
125
125
  let n = b.indexOf(t);
126
126
  e.metaKey || e.ctrlKey ? (I(t), T.current = n) : e.shiftKey ? U(T.current ?? (x >= 0 ? x : n), n) : (w(/* @__PURE__ */ new Set()), T.current = n, O(t));
127
- }, q = (e, t) => {
127
+ }, K = (e, t) => {
128
128
  let n = Math.min(Math.max(x + e, 0), b.length - 1);
129
129
  t && ((T.current === null || C.size === 0) && (T.current = Math.max(x, 0)), U(T.current, n)), O(b[n]);
130
130
  };
131
131
  ae({
132
- j: () => q(1, !1),
133
- k: () => q(-1, !1),
134
- J: () => q(1, !0),
135
- K: () => q(-1, !0),
136
- ArrowDown: (e) => q(1, e.shiftKey),
137
- ArrowUp: (e) => q(-1, e.shiftKey),
132
+ j: () => K(1, !1),
133
+ k: () => K(-1, !1),
134
+ J: () => K(1, !0),
135
+ K: () => K(-1, !0),
136
+ ArrowDown: (e) => K(1, e.shiftKey),
137
+ ArrowUp: (e) => K(-1, e.shiftKey),
138
138
  x: () => {
139
139
  S && (I(S), T.current = x);
140
140
  },
@@ -145,7 +145,7 @@ function Y() {
145
145
  }), oe(() => {
146
146
  document.getElementById(`inbox-${S?.key}`)?.scrollIntoView({ block: "nearest" });
147
147
  }, [S]);
148
- let Y = {
148
+ let J = {
149
149
  select: O,
150
150
  toggleRead: A,
151
151
  archiveGroups: N,
@@ -271,14 +271,14 @@ function Y() {
271
271
  group: t,
272
272
  selected: t === S,
273
273
  picked: C.has(t.key),
274
- actions: Y
274
+ actions: J
275
275
  }, t.key))
276
276
  }), /* @__PURE__ */ B("div", {
277
277
  className: G("min-w-0 flex-1 overflow-y-auto md:block", S ? "block" : "hidden"),
278
- children: S ? /* @__PURE__ */ B(ge, {
278
+ children: S ? /* @__PURE__ */ B(_e, {
279
279
  workspace: e,
280
280
  group: S,
281
- actions: Y
281
+ actions: J
282
282
  }) : /* @__PURE__ */ B("div", {
283
283
  className: "px-6 py-24",
284
284
  children: /* @__PURE__ */ B(j, {
@@ -355,7 +355,7 @@ function Q({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
355
355
  actor: d.actor,
356
356
  name: f,
357
357
  src: s(d.actor.kind, d.actor.handle),
358
- badge: pe(d)
358
+ badge: me(d)
359
359
  })
360
360
  }),
361
361
  /* @__PURE__ */ V("span", {
@@ -373,11 +373,12 @@ function Q({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
373
373
  className: "mt-0.5 flex gap-2 text-xs text-muted-foreground",
374
374
  children: [/* @__PURE__ */ V("span", {
375
375
  className: "flex-1 truncate",
376
- children: [o(d.reason, {
376
+ children: [o(K(d), {
377
377
  actor: f,
378
378
  agent: d.agentName ?? f,
379
- date: q(d)
380
- }), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(ve, { text: d.excerpt })] })]
379
+ runner: d.runnerName ?? "",
380
+ date: J(d)
381
+ }), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(ye, { text: d.excerpt })] })]
381
382
  }), t.items.length > 1 && /* @__PURE__ */ B("span", {
382
383
  className: "shrink-0",
383
384
  children: o("more", { count: t.items.length - 1 })
@@ -407,7 +408,7 @@ function Q({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
407
408
  })
408
409
  });
409
410
  }
410
- function pe(e) {
411
+ function me(e) {
411
412
  switch (e.reason) {
412
413
  case "assigned": return /* @__PURE__ */ B(g, {});
413
414
  case "commented":
@@ -416,7 +417,7 @@ function pe(e) {
416
417
  default: return null;
417
418
  }
418
419
  }
419
- function me({ workspace: e, identifier: n }) {
420
+ function he({ workspace: e, identifier: n }) {
420
421
  let { data: r } = H(t(e, n)), i = _(), { nameOf: a, avatarOf: s } = w(e);
421
422
  return r ? /* @__PURE__ */ V("section", {
422
423
  className: "mt-5 rounded-lg border border-border px-4 py-3",
@@ -454,7 +455,7 @@ function me({ workspace: e, identifier: n }) {
454
455
  })]
455
456
  }) : null;
456
457
  }
457
- function he({ workspace: e, identifier: r }) {
458
+ function ge({ workspace: e, identifier: r }) {
458
459
  let i = U(), { data: a } = H(t(e, r));
459
460
  return a ? /* @__PURE__ */ B(y, {
460
461
  workspace: e,
@@ -462,7 +463,7 @@ function he({ workspace: e, identifier: r }) {
462
463
  onDecided: () => i.invalidateQueries({ queryKey: n(e).queryKey })
463
464
  }) : null;
464
465
  }
465
- function ge({ workspace: e, group: n, actions: r }) {
466
+ function _e({ workspace: e, group: n, actions: r }) {
466
467
  let i = R("notifications"), { avatarOf: a } = w(e), o = Z(e), s = I(), c = X(r), { data: l } = H({
467
468
  ...t(e, n.identifier ?? ""),
468
469
  enabled: !!n.identifier
@@ -512,16 +513,16 @@ function ge({ workspace: e, group: n, actions: r }) {
512
513
  onClick: () => r.archiveGroups([n]),
513
514
  children: i("archive")
514
515
  }),
515
- n.identifier && /* @__PURE__ */ B(he, {
516
+ n.identifier && /* @__PURE__ */ B(ge, {
516
517
  workspace: e,
517
518
  identifier: n.identifier
518
519
  })
519
520
  ]
520
521
  }),
521
- n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(me, {
522
+ n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(he, {
522
523
  workspace: e,
523
524
  identifier: n.identifier
524
- }), /* @__PURE__ */ B(ye, {
525
+ }), /* @__PURE__ */ B(be, {
525
526
  workspace: e,
526
527
  identifier: n.identifier
527
528
  })] }),
@@ -552,10 +553,11 @@ function ge({ workspace: e, group: n, actions: r }) {
552
553
  className: "flex items-baseline gap-2 text-sm",
553
554
  children: [/* @__PURE__ */ B("span", {
554
555
  className: G("flex-1", !t.readAt && "font-medium"),
555
- children: i(t.reason, {
556
+ children: i(K(t), {
556
557
  actor: n,
557
558
  agent: t.agentName ?? n,
558
- date: q(t)
559
+ runner: t.runnerName ?? "",
560
+ date: J(t)
559
561
  })
560
562
  }), /* @__PURE__ */ B(N, {
561
563
  value: t.createdAt,
@@ -563,7 +565,7 @@ function ge({ workspace: e, group: n, actions: r }) {
563
565
  exact: "medium",
564
566
  className: "text-xs text-muted-foreground"
565
567
  })]
566
- }), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(_e, { text: t.excerpt })]
568
+ }), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(ve, { text: t.excerpt })]
567
569
  })]
568
570
  }, t.id);
569
571
  })
@@ -571,7 +573,7 @@ function ge({ workspace: e, group: n, actions: r }) {
571
573
  ]
572
574
  });
573
575
  }
574
- function _e({ text: e }) {
576
+ function ve({ text: e }) {
575
577
  let t = R("agentWork"), n = x(e);
576
578
  return n ? /* @__PURE__ */ V("div", {
577
579
  className: "mt-1 min-w-0 text-sm text-muted-foreground",
@@ -594,14 +596,14 @@ function _e({ text: e }) {
594
596
  })
595
597
  });
596
598
  }
597
- function ve({ text: e }) {
599
+ function ye({ text: e }) {
598
600
  let t = x(e);
599
601
  return t ? /* @__PURE__ */ B("code", {
600
602
  className: "font-mono",
601
603
  children: t.command
602
604
  }) : T(e);
603
605
  }
604
- function ye({ workspace: t, identifier: n }) {
606
+ function be({ workspace: t, identifier: n }) {
605
607
  let r = R("notifications"), { data: i = [] } = H(e(t, n)), o = i.filter((e) => !e.answer && !e.canceled);
606
608
  return o.length === 0 ? null : /* @__PURE__ */ V("section", {
607
609
  "aria-label": r("waitingOnYou"),
@@ -625,4 +627,4 @@ function $({ group: e, strong: t = !1 }) {
625
627
  children: [e.kind === "doc" ? /* @__PURE__ */ B(d, { className: "size-3" }) : /* @__PURE__ */ B(m, { className: "size-3" }), n(e.kind === "doc" ? "aboutDoc" : "aboutProject")]
626
628
  });
627
629
  }
628
- export { Y as component };
630
+ export { pe as component };