@parallelworks/tandem-web 0.175.0 → 0.175.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.
@@ -5,9 +5,9 @@ import { useErrorMessage as r } from "@parallelworks/problem/react";
5
5
  import { useTranslations as i } from "use-intl";
6
6
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  // src/components/TriageButtons.tsx
8
- function c({ workspace: r, issue: c, onDecided: u }) {
9
- let d = i("triage"), f = e(r, c.teamId), p = t(r, c, u);
10
- if (!f || !c.triage) return null;
8
+ function c({ workspace: e, issue: r, onDecided: c }) {
9
+ let d = i("triage"), f = l(e, r), p = t(e, r, c);
10
+ if (!f) return null;
11
11
  let m = (e) => /* @__PURE__ */ o(n, {
12
12
  variant: e === "accept" ? "primary" : "outline",
13
13
  size: "sm",
@@ -20,14 +20,18 @@ function c({ workspace: r, issue: c, onDecided: u }) {
20
20
  return /* @__PURE__ */ s(a, { children: [
21
21
  m("accept"),
22
22
  m("decline"),
23
- p.error && /* @__PURE__ */ o(l, { error: p.error })
23
+ p.error && /* @__PURE__ */ o(u, { error: p.error })
24
24
  ] });
25
25
  }
26
- function l({ error: e }) {
26
+ function l(t, n) {
27
+ let r = e(t, n?.teamId ?? "");
28
+ return !!n?.triage && r;
29
+ }
30
+ function u({ error: e }) {
27
31
  let t = r();
28
32
  return /* @__PURE__ */ o("p", {
29
33
  className: "basis-full text-xs text-danger",
30
34
  children: t(e)
31
35
  });
32
36
  }
33
- export { c as TriageButtons };
37
+ export { c as TriageButtons, l as useCanDecideTriage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.175.0",
3
+ "version": "0.175.1",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -4,25 +4,25 @@ import { DecisionCard as a } from "../../components/AgentWork.js";
4
4
  import { Editor as o } from "../../components/Editor.js";
5
5
  import { ArchiveIcon as s, ArrowRightIcon as c, CheckIcon as l, CommentIcon as u, FileTextIcon as d, InboxIcon as f, PriorityIcon as p, ProjectIcon as m, StatusIcon as h, UserIcon as g, usePriorityNames as _ } from "../../components/icons.js";
6
6
  import { PersonHoverCard as v } from "../../components/PersonHoverCard.js";
7
- import { TriageButtons as y } from "../../components/TriageButtons.js";
8
- import { parseApproval as b } from "../../lib/approval.js";
9
- import { copyItem as x, useLinkItems as S } from "../../lib/menus.js";
10
- import { useArchiveNotifications as ee, useReadNotifications as te, useUnreadNotifications as C } from "../../lib/notifications.js";
11
- import { usePageTitle as ne } from "../../lib/pageTitle.js";
7
+ import { TriageButtons as y, useCanDecideTriage as b } from "../../components/TriageButtons.js";
8
+ import { parseApproval as x } from "../../lib/approval.js";
9
+ import { copyItem as S, useLinkItems as C } from "../../lib/menus.js";
10
+ import { useArchiveNotifications as ee, useReadNotifications as te, useUnreadNotifications as ne } from "../../lib/notifications.js";
11
+ import { usePageTitle as re } from "../../lib/pageTitle.js";
12
12
  import { usePeople as w } from "../../lib/people.js";
13
13
  import { plainText as T } from "../../lib/plainText.js";
14
- import { Link as E, useNavigate as re } from "../../lib/router.js";
15
- import { useShortcuts as ie } from "../../lib/shortcuts.js";
14
+ import { Link as E, useNavigate as ie } from "../../lib/router.js";
15
+ import { useShortcuts as ae } from "../../lib/shortcuts.js";
16
16
  import { Route as D } from "./notifications.js";
17
17
  import { Avatar as O, Button as k, Card as A, EmptyState as j, IconButton as M, RelativeTime as N, buttonClasses as P, menuDivider as F, useOpenMenu as I } from "@parallelworks/ui";
18
- import { useEffect as ae, useMemo as L, useRef as oe, useState as se } from "react";
18
+ import { useEffect as oe, useMemo as L, useRef as se, useState as ce } from "react";
19
19
  import { useTranslations as R } from "use-intl";
20
20
  import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
21
- import { useQuery as H, useQueryClient as U, useSuspenseQuery as ce } from "@tanstack/react-query";
22
- import { ListFilterMenu as le, useListView as W } from "@parallelworks/ui/list";
21
+ import { useQuery as H, useQueryClient as U, useSuspenseQuery as le } from "@tanstack/react-query";
22
+ import { ListFilterMenu as ue, useListView as W } from "@parallelworks/ui/list";
23
23
  // src/routes/$workspace/notifications.tsx?tsr-split=component
24
24
  var G = (...e) => e.filter(Boolean).join(" ");
25
- function ue(e, t) {
25
+ function de(e, t) {
26
26
  let n = /* @__PURE__ */ new Map();
27
27
  for (let r of t) {
28
28
  let t = r.projectId ? "project" : r.documentId ? "doc" : "issue", i = r.projectId ? `project:${r.projectId}` : r.documentId ? `doc:${r.documentId}` : r.identifier, a = n.get(i);
@@ -52,7 +52,7 @@ var K = {
52
52
  reminders: ["reminder"],
53
53
  mentions: ["mentioned"]
54
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("-"));
55
- function de(e, t) {
55
+ function fe(e, t) {
56
56
  let n = R("notifications"), r = L(() => {
57
57
  let e = [{
58
58
  key: "state",
@@ -88,11 +88,11 @@ function de(e, t) {
88
88
  });
89
89
  }
90
90
  function Y() {
91
- let { workspace: e } = D.useParams(), { issue: t } = D.useSearch(), i = R("notifications"), a = re(), { data: { notifications: o, unread: c } } = ce(n(e));
92
- ne(c > 0 ? `${i("title")} (${c})` : i("title"));
93
- let u = te(e), d = C(e), p = ee(e), { data: m = [] } = H(r(e)), h = de(e, m), g = h.activeFilterCount > 0, _ = (h.filters.state ?? []).includes("unread"), v = h.filters.kind ?? [], y = h.filters.team ?? [], b = L(() => {
91
+ let { workspace: e } = D.useParams(), { issue: t } = D.useSearch(), i = R("notifications"), a = ie(), { data: { notifications: o, unread: c } } = le(n(e));
92
+ re(c > 0 ? `${i("title")} (${c})` : i("title"));
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
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))));
95
- return ue(e, n).filter((e) => !_ || e.unread.length > 0 || e.key === t);
95
+ return de(e, n).filter((e) => !_ || e.unread.length > 0 || e.key === t);
96
96
  }, [
97
97
  e,
98
98
  o,
@@ -100,58 +100,58 @@ function Y() {
100
100
  v,
101
101
  y,
102
102
  t
103
- ]), x = b.findIndex((e) => e.key === t), S = x >= 0 ? b[x] : void 0, [w, T] = se(/* @__PURE__ */ new Set()), E = oe(null), O = L(() => b.filter((e) => w.has(e.key)), [b, w]), A = (t) => {
103
+ ]), x = b.findIndex((e) => e.key === t), S = x >= 0 ? b[x] : void 0, [C, w] = ce(/* @__PURE__ */ new Set()), T = se(null), E = L(() => b.filter((e) => C.has(e.key)), [b, C]), O = (t) => {
104
104
  a({
105
105
  to: "/$workspace/notifications",
106
106
  params: { workspace: e },
107
107
  search: t ? { issue: t.key } : {},
108
108
  replace: !0
109
109
  }), t && t.unread.length > 0 && u.mutate(t.unread);
110
- }, N = (e) => {
110
+ }, A = (e) => {
111
111
  let t = e.flatMap((e) => e.unread);
112
112
  t.length > 0 ? u.mutate(t) : d.mutate(e.flatMap((e) => e.items.map((e) => e.id)));
113
- }, P = (e) => {
114
- if (p.mutate(e.flatMap((e) => e.items.map((e) => e.id))), T(/* @__PURE__ */ new Set()), S && e.includes(S)) {
113
+ }, N = (e) => {
114
+ if (p.mutate(e.flatMap((e) => e.items.map((e) => e.id))), w(/* @__PURE__ */ new Set()), S && e.includes(S)) {
115
115
  let t = b.filter((t) => !e.includes(t));
116
- A(t[t.findIndex((e) => b.indexOf(e) > x)] ?? t.at(-1));
116
+ O(t[t.findIndex((e) => b.indexOf(e) > x)] ?? t.at(-1));
117
117
  }
118
- }, F = (e) => a({ to: e.href }), I = O.length > 0 ? O : S ? [S] : [], U = (e) => T((t) => {
118
+ }, P = (e) => a({ to: e.href }), F = E.length > 0 ? E : S ? [S] : [], I = (e) => w((t) => {
119
119
  let n = new Set(t);
120
120
  return n.has(e.key) ? n.delete(e.key) : n.add(e.key), n;
121
- }), W = (e, t) => {
121
+ }), U = (e, t) => {
122
122
  let [n, r] = e < t ? [e, t] : [t, e];
123
- T(new Set(b.slice(n, r + 1).map((e) => e.key)));
124
- }, q = (e, t) => {
123
+ w(new Set(b.slice(n, r + 1).map((e) => e.key)));
124
+ }, W = (e, t) => {
125
125
  let n = b.indexOf(t);
126
- e.metaKey || e.ctrlKey ? (U(t), E.current = n) : e.shiftKey ? W(E.current ?? (x >= 0 ? x : n), n) : (T(/* @__PURE__ */ new Set()), E.current = n, A(t));
127
- }, Y = (e, t) => {
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) => {
128
128
  let n = Math.min(Math.max(x + e, 0), b.length - 1);
129
- t && ((E.current === null || w.size === 0) && (E.current = Math.max(x, 0)), W(E.current, n)), A(b[n]);
129
+ t && ((T.current === null || C.size === 0) && (T.current = Math.max(x, 0)), U(T.current, n)), O(b[n]);
130
130
  };
131
- ie({
132
- j: () => Y(1, !1),
133
- k: () => Y(-1, !1),
134
- J: () => Y(1, !0),
135
- K: () => Y(-1, !0),
136
- ArrowDown: (e) => Y(1, e.shiftKey),
137
- ArrowUp: (e) => Y(-1, e.shiftKey),
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),
138
138
  x: () => {
139
- S && (U(S), E.current = x);
139
+ S && (I(S), T.current = x);
140
140
  },
141
- Enter: () => S && F(S),
142
- e: () => I.length > 0 && P(I),
143
- u: () => I.length > 0 && N(I),
144
- Escape: () => w.size > 0 ? T(/* @__PURE__ */ new Set()) : A(void 0)
145
- }), ae(() => {
141
+ Enter: () => S && P(S),
142
+ e: () => F.length > 0 && N(F),
143
+ u: () => F.length > 0 && A(F),
144
+ Escape: () => C.size > 0 ? w(/* @__PURE__ */ new Set()) : O(void 0)
145
+ }), oe(() => {
146
146
  document.getElementById(`inbox-${S?.key}`)?.scrollIntoView({ block: "nearest" });
147
147
  }, [S]);
148
- let X = {
149
- select: A,
150
- toggleRead: N,
151
- archiveGroups: P,
152
- openIssue: F,
153
- clickRow: q,
154
- targetsOf: (e) => w.has(e.key) ? O : (T(/* @__PURE__ */ new Set()), [e])
148
+ let Y = {
149
+ select: O,
150
+ toggleRead: A,
151
+ archiveGroups: N,
152
+ openIssue: P,
153
+ clickRow: W,
154
+ targetsOf: (e) => C.has(e.key) ? E : (w(/* @__PURE__ */ new Set()), [e])
155
155
  };
156
156
  return /* @__PURE__ */ V("div", {
157
157
  className: "flex h-full flex-col",
@@ -167,7 +167,7 @@ function Y() {
167
167
  className: "min-w-0 flex-1 truncate text-xs text-muted-foreground",
168
168
  children: i("unreadCount", { count: c })
169
169
  }),
170
- /* @__PURE__ */ B(le, { view: h }),
170
+ /* @__PURE__ */ B(ue, { view: h }),
171
171
  c > 0 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
172
172
  type: "button",
173
173
  size: "sm",
@@ -200,16 +200,16 @@ function Y() {
200
200
  })] })
201
201
  ]
202
202
  }),
203
- O.length > 0 && /* @__PURE__ */ V("div", {
203
+ E.length > 0 && /* @__PURE__ */ V("div", {
204
204
  className: "flex min-h-9 shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border bg-human-soft px-4 py-1 text-xs md:px-5",
205
205
  children: [
206
206
  /* @__PURE__ */ B("span", {
207
207
  className: "font-medium text-human",
208
- children: i("selected", { count: O.length })
208
+ children: i("selected", { count: E.length })
209
209
  }),
210
- O.length < b.length && /* @__PURE__ */ B("button", {
210
+ E.length < b.length && /* @__PURE__ */ B("button", {
211
211
  type: "button",
212
- onClick: () => T(new Set(b.map((e) => e.key))),
212
+ onClick: () => w(new Set(b.map((e) => e.key))),
213
213
  className: "hover:underline",
214
214
  children: i("selectAll", { count: b.length })
215
215
  }),
@@ -219,25 +219,25 @@ function Y() {
219
219
  /* @__PURE__ */ B(k, {
220
220
  type: "button",
221
221
  size: "sm",
222
- onClick: () => u.mutate(O.flatMap((e) => e.unread)),
223
- disabled: O.every((e) => e.unread.length === 0),
222
+ onClick: () => u.mutate(E.flatMap((e) => e.unread)),
223
+ disabled: E.every((e) => e.unread.length === 0),
224
224
  children: i("markRead")
225
225
  }),
226
226
  /* @__PURE__ */ B(k, {
227
227
  type: "button",
228
228
  size: "sm",
229
- onClick: () => d.mutate(O.flatMap((e) => e.items.map((e) => e.id))),
229
+ onClick: () => d.mutate(E.flatMap((e) => e.items.map((e) => e.id))),
230
230
  children: i("markUnread")
231
231
  }),
232
232
  /* @__PURE__ */ B(k, {
233
233
  type: "button",
234
234
  size: "sm",
235
- onClick: () => P(O),
235
+ onClick: () => N(E),
236
236
  children: i("archive")
237
237
  }),
238
238
  /* @__PURE__ */ B("button", {
239
239
  type: "button",
240
- onClick: () => T(/* @__PURE__ */ new Set()),
240
+ onClick: () => w(/* @__PURE__ */ new Set()),
241
241
  className: "shrink-0 px-1 hover:underline",
242
242
  children: i("clear")
243
243
  })
@@ -266,19 +266,19 @@ function Y() {
266
266
  children: [/* @__PURE__ */ B("ul", {
267
267
  "aria-label": i("title"),
268
268
  className: G("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", S ? "hidden" : "flex"),
269
- children: b.map((t) => /* @__PURE__ */ B(fe, {
269
+ children: b.map((t) => /* @__PURE__ */ B(Q, {
270
270
  workspace: e,
271
271
  group: t,
272
272
  selected: t === S,
273
- picked: w.has(t.key),
274
- actions: X
273
+ picked: C.has(t.key),
274
+ actions: Y
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(he, {
278
+ children: S ? /* @__PURE__ */ B(ge, {
279
279
  workspace: e,
280
280
  group: S,
281
- actions: X
281
+ actions: Y
282
282
  }) : /* @__PURE__ */ B("div", {
283
283
  className: "px-6 py-24",
284
284
  children: /* @__PURE__ */ B(j, {
@@ -292,7 +292,7 @@ function Y() {
292
292
  });
293
293
  }
294
294
  function X(e) {
295
- let t = R("notifications"), n = S();
295
+ let t = R("notifications"), n = C();
296
296
  return (r) => {
297
297
  let [i] = r;
298
298
  return [
@@ -309,7 +309,7 @@ function X(e) {
309
309
  ...r.length === 1 && i ? [
310
310
  F,
311
311
  ...n(i.href),
312
- ...i.identifier ? [x(t("copyId"), i.identifier)] : []
312
+ ...i.identifier ? [S(t("copyId"), i.identifier)] : []
313
313
  ] : []
314
314
  ];
315
315
  };
@@ -318,7 +318,7 @@ function Z(e) {
318
318
  let { actorName: t } = w(e);
319
319
  return (e) => e.actor.kind === "agent" && e.agentName ? e.agentName : t(e.actor);
320
320
  }
321
- function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
321
+ function Q({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
322
322
  let o = R("notifications"), { avatarOf: s } = w(e), c = Z(e), l = I(), u = X(a), d = t.items[0], f = c(d), p = t.unread.length > 0;
323
323
  return /* @__PURE__ */ B("li", {
324
324
  id: `inbox-${t.key}`,
@@ -355,7 +355,7 @@ function fe({ 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: Q(d)
358
+ badge: pe(d)
359
359
  })
360
360
  }),
361
361
  /* @__PURE__ */ V("span", {
@@ -377,7 +377,7 @@ function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
377
377
  actor: f,
378
378
  agent: d.agentName ?? f,
379
379
  date: q(d)
380
- }), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(_e, { text: d.excerpt })] })]
380
+ }), d.excerpt && d.reason !== "reminder" && /* @__PURE__ */ V(z, { children: [": ", /* @__PURE__ */ B(ve, { text: d.excerpt })] })]
381
381
  }), t.items.length > 1 && /* @__PURE__ */ B("span", {
382
382
  className: "shrink-0",
383
383
  children: o("more", { count: t.items.length - 1 })
@@ -407,7 +407,7 @@ function fe({ workspace: e, group: t, selected: n, picked: r, actions: a }) {
407
407
  })
408
408
  });
409
409
  }
410
- function Q(e) {
410
+ function pe(e) {
411
411
  switch (e.reason) {
412
412
  case "assigned": return /* @__PURE__ */ B(g, {});
413
413
  case "commented":
@@ -416,7 +416,7 @@ function Q(e) {
416
416
  default: return null;
417
417
  }
418
418
  }
419
- function pe({ workspace: e, identifier: n }) {
419
+ function me({ workspace: e, identifier: n }) {
420
420
  let { data: r } = H(t(e, n)), i = _(), { nameOf: a, avatarOf: s } = w(e);
421
421
  return r ? /* @__PURE__ */ V("section", {
422
422
  className: "mt-5 rounded-lg border border-border px-4 py-3",
@@ -454,7 +454,7 @@ function pe({ workspace: e, identifier: n }) {
454
454
  })]
455
455
  }) : null;
456
456
  }
457
- function me({ workspace: e, identifier: r }) {
457
+ function he({ workspace: e, identifier: r }) {
458
458
  let i = U(), { data: a } = H(t(e, r));
459
459
  return a ? /* @__PURE__ */ B(y, {
460
460
  workspace: e,
@@ -462,65 +462,68 @@ function me({ workspace: e, identifier: r }) {
462
462
  onDecided: () => i.invalidateQueries({ queryKey: n(e).queryKey })
463
463
  }) : null;
464
464
  }
465
- function he({ workspace: e, group: t, actions: n }) {
466
- let r = R("notifications"), { avatarOf: i } = w(e), a = Z(e), o = I(), s = X(n);
465
+ function ge({ workspace: e, group: n, actions: r }) {
466
+ let i = R("notifications"), { avatarOf: a } = w(e), o = Z(e), s = I(), c = X(r), { data: l } = H({
467
+ ...t(e, n.identifier ?? ""),
468
+ enabled: !!n.identifier
469
+ }), u = b(e, n.identifier ? l : void 0);
467
470
  return /* @__PURE__ */ V("article", {
468
471
  className: "w-full px-4 py-5 md:px-8",
469
- onContextMenu: (e) => o(e, s([t])),
472
+ onContextMenu: (e) => s(e, c([n])),
470
473
  children: [
471
474
  /* @__PURE__ */ B("button", {
472
475
  type: "button",
473
- onClick: () => n.select(void 0),
476
+ onClick: () => r.select(void 0),
474
477
  className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
475
- children: r("back")
478
+ children: i("back")
476
479
  }),
477
480
  /* @__PURE__ */ B("p", {
478
481
  className: "text-xs text-muted-foreground",
479
- children: /* @__PURE__ */ B($, { group: t })
482
+ children: /* @__PURE__ */ B($, { group: n })
480
483
  }),
481
484
  /* @__PURE__ */ B("h2", {
482
485
  className: "mt-0.5 text-sm font-semibold",
483
486
  children: /* @__PURE__ */ B(E, {
484
- to: t.href,
487
+ to: n.href,
485
488
  className: "hover:underline",
486
- children: t.issueTitle
489
+ children: n.issueTitle
487
490
  })
488
491
  }),
489
492
  /* @__PURE__ */ V("div", {
490
493
  className: "mt-3 flex flex-wrap gap-2",
491
494
  children: [
492
495
  /* @__PURE__ */ B(E, {
493
- to: t.href,
496
+ to: n.href,
494
497
  className: P({
495
- variant: "primary",
498
+ variant: u ? "secondary" : "primary",
496
499
  size: "sm"
497
500
  }),
498
- children: r(t.kind === "project" ? "openProject" : t.kind === "doc" ? "openDoc" : "openIssue")
501
+ children: i(n.kind === "project" ? "openProject" : n.kind === "doc" ? "openDoc" : "openIssue")
499
502
  }),
500
503
  /* @__PURE__ */ B(k, {
501
504
  type: "button",
502
505
  size: "sm",
503
- onClick: () => n.toggleRead([t]),
504
- children: t.unread.length > 0 ? r("markRead") : r("markUnread")
506
+ onClick: () => r.toggleRead([n]),
507
+ children: n.unread.length > 0 ? i("markRead") : i("markUnread")
505
508
  }),
506
509
  /* @__PURE__ */ B(k, {
507
510
  type: "button",
508
511
  size: "sm",
509
- onClick: () => n.archiveGroups([t]),
510
- children: r("archive")
512
+ onClick: () => r.archiveGroups([n]),
513
+ children: i("archive")
511
514
  }),
512
- t.identifier && /* @__PURE__ */ B(me, {
515
+ n.identifier && /* @__PURE__ */ B(he, {
513
516
  workspace: e,
514
- identifier: t.identifier
517
+ identifier: n.identifier
515
518
  })
516
519
  ]
517
520
  }),
518
- t.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(pe, {
521
+ n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(me, {
519
522
  workspace: e,
520
- identifier: t.identifier
521
- }), /* @__PURE__ */ B(ve, {
523
+ identifier: n.identifier
524
+ }), /* @__PURE__ */ B(ye, {
522
525
  workspace: e,
523
- identifier: t.identifier
526
+ identifier: n.identifier
524
527
  })] }),
525
528
  /* @__PURE__ */ B(A, {
526
529
  size: "fill",
@@ -529,8 +532,8 @@ function he({ workspace: e, group: t, actions: n }) {
529
532
  interactive: !1,
530
533
  render: /* @__PURE__ */ B("ol", {}),
531
534
  className: "mt-5 overflow-hidden",
532
- children: t.items.map((t) => {
533
- let n = a(t);
535
+ children: n.items.map((t) => {
536
+ let n = o(t);
534
537
  return /* @__PURE__ */ V("li", {
535
538
  className: "flex gap-3 px-3 py-3",
536
539
  children: [/* @__PURE__ */ B(v, {
@@ -540,7 +543,7 @@ function he({ workspace: e, group: t, actions: n }) {
540
543
  className: "inline-flex shrink-0 self-start",
541
544
  children: /* @__PURE__ */ B(O, {
542
545
  name: n,
543
- src: i(t.actor.kind, t.actor.handle),
546
+ src: a(t.actor.kind, t.actor.handle),
544
547
  size: "sm"
545
548
  })
546
549
  }), /* @__PURE__ */ V("div", {
@@ -549,7 +552,7 @@ function he({ workspace: e, group: t, actions: n }) {
549
552
  className: "flex items-baseline gap-2 text-sm",
550
553
  children: [/* @__PURE__ */ B("span", {
551
554
  className: G("flex-1", !t.readAt && "font-medium"),
552
- children: r(t.reason, {
555
+ children: i(t.reason, {
553
556
  actor: n,
554
557
  agent: t.agentName ?? n,
555
558
  date: q(t)
@@ -560,7 +563,7 @@ function he({ workspace: e, group: t, actions: n }) {
560
563
  exact: "medium",
561
564
  className: "text-xs text-muted-foreground"
562
565
  })]
563
- }), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(ge, { text: t.excerpt })]
566
+ }), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(_e, { text: t.excerpt })]
564
567
  })]
565
568
  }, t.id);
566
569
  })
@@ -568,8 +571,8 @@ function he({ workspace: e, group: t, actions: n }) {
568
571
  ]
569
572
  });
570
573
  }
571
- function ge({ text: e }) {
572
- let t = R("agentWork"), n = b(e);
574
+ function _e({ text: e }) {
575
+ let t = R("agentWork"), n = x(e);
573
576
  return n ? /* @__PURE__ */ V("div", {
574
577
  className: "mt-1 min-w-0 text-sm text-muted-foreground",
575
578
  children: [
@@ -591,14 +594,14 @@ function ge({ text: e }) {
591
594
  })
592
595
  });
593
596
  }
594
- function _e({ text: e }) {
595
- let t = b(e);
597
+ function ve({ text: e }) {
598
+ let t = x(e);
596
599
  return t ? /* @__PURE__ */ B("code", {
597
600
  className: "font-mono",
598
601
  children: t.command
599
602
  }) : T(e);
600
603
  }
601
- function ve({ workspace: t, identifier: n }) {
604
+ function ye({ workspace: t, identifier: n }) {
602
605
  let r = R("notifications"), { data: i = [] } = H(e(t, n)), o = i.filter((e) => !e.answer && !e.canceled);
603
606
  return o.length === 0 ? null : /* @__PURE__ */ V("section", {
604
607
  "aria-label": r("waitingOnYou"),