@nivaro/react 0.3.99 → 0.3.101

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 (60) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useFormSchema.js +82 -85
  3. package/dist/hooks/useSessionRecorder.js +206 -175
  4. package/dist/index.d.ts +84 -16
  5. package/dist/index.js +627 -622
  6. package/dist/lib/commands.js +15 -11
  7. package/dist/shared/components/ActivityEntry.js +5 -5
  8. package/dist/shared/components/CollectionBrowserView.js +516 -503
  9. package/dist/shared/components/ItemEditForm.js +3471 -3465
  10. package/dist/shared/components/JobsTray.js +76 -61
  11. package/dist/shared/components/MyWorkView.js +133 -126
  12. package/dist/shared/components/NotificationBell.js +322 -289
  13. package/dist/shared/components/RecordCompare.js +38 -40
  14. package/dist/shared/components/RecordReadView.js +119 -119
  15. package/dist/shared/components/TipLayer.js +56 -41
  16. package/dist/shared/components/cbv/FoundElsewhere.js +61 -0
  17. package/dist/shared/components/integrations/console/SignalCard.js +40 -40
  18. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +95 -73
  19. package/dist/shared/components/integrations/console/drill/status.js +23 -18
  20. package/dist/shared/components/item-edit/InlineGridField.js +45 -45
  21. package/dist/shared/components/item-edit/InlineTableField.js +750 -749
  22. package/dist/shared/components/item-edit/QuickPickerDialog.js +44 -44
  23. package/dist/shared/components/item-edit/RawEditSheet.js +122 -114
  24. package/dist/shared/components/item-edit/RecordInsights.js +86 -86
  25. package/dist/shared/components/item-edit/RelationCombobox.js +454 -378
  26. package/dist/shared/components/item-edit/SummaryPanel.js +56 -48
  27. package/dist/shared/components/item-edit/header-path-preview.js +46 -34
  28. package/dist/shared/components/item-edit/related-missing.js +75 -19
  29. package/dist/shared/components/notifications/DeliveryChips.js +1 -2
  30. package/dist/shared/components/notifications/NotificationCenterView.js +249 -226
  31. package/dist/shared/components/panels/AccessDeniedPanel.js +31 -28
  32. package/dist/shared/components/panels/BackgroundMove.js +242 -0
  33. package/dist/shared/components/panels/MoveAdvisory.js +204 -0
  34. package/dist/shared/components/panels/PipelinePanel.js +1459 -1220
  35. package/dist/shared/components/panels/RecordIntegrityBanner.js +113 -112
  36. package/dist/shared/components/profile/ActivityFeedCard.js +322 -0
  37. package/dist/shared/components/profile/DayTimeline.js +145 -140
  38. package/dist/shared/components/profile/PersonAccess.js +679 -383
  39. package/dist/shared/components/profile/PersonActivity.js +404 -427
  40. package/dist/shared/components/profile/PersonDidPanel.js +248 -134
  41. package/dist/shared/components/profile/PersonProfile.js +33 -32
  42. package/dist/shared/components/profile/journey-view.js +166 -0
  43. package/dist/shared/lib/activity-sentence.js +319 -236
  44. package/dist/shared/lib/commands.js +18 -14
  45. package/dist/shared/lib/error-hints.js +1 -1
  46. package/dist/shared/lib/job-failure-text.js +12 -0
  47. package/dist/shared/lib/jobs-tray.js +60 -41
  48. package/dist/shared/lib/move-failure.js +19 -0
  49. package/dist/shared/lib/obligation-banner.js +22 -21
  50. package/dist/shared/lib/partner-failure.js +83 -0
  51. package/dist/shared/lib/prefetch.js +73 -73
  52. package/dist/shared/lib/replay-checkout.js +18 -13
  53. package/dist/shared/lib/replay-context.js +90 -77
  54. package/dist/shared/lib/replay-idle.js +21 -0
  55. package/dist/shared/lib/replay-socket.js +21 -17
  56. package/dist/shared/lib/rum.js +56 -51
  57. package/dist/shared/lib/safe-error.js +17 -13
  58. package/dist/shared/lib/stale-chunk.js +69 -26
  59. package/dist/shared/lib/system-collections.js +20 -0
  60. package/package.json +1 -1
@@ -1,42 +1,57 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import { useState as m, useRef as v, useEffect as h, useLayoutEffect as x } from "react";
3
- import { createPortal as b } from "react-dom";
4
- const u = [];
5
- function R() {
6
- const [e, o] = m(null), [t, s] = m(!1), d = v(null);
7
- return h(() => (u.push(s), u[0] === s && s(!0), () => {
8
- var n;
9
- const r = u.indexOf(s);
10
- r < 0 || (u.splice(r, 1), r === 0 && ((n = u[0]) == null || n.call(u, !0)));
11
- }), []), h(() => {
12
- if (!t) return;
13
- const r = (c) => {
14
- var l, p;
15
- const i = (p = (l = c.target) == null ? void 0 : l.closest) == null ? void 0 : p.call(l, "[data-tip]"), f = i == null ? void 0 : i.getAttribute("data-tip");
16
- if (!i || !f || i.getAttribute("aria-expanded") === "true") {
17
- o((w) => w && null);
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import { useState as g, useRef as v, useEffect as m, useLayoutEffect as b } from "react";
3
+ import { createPortal as E } from "react-dom";
4
+ const c = [], L = '[data-nvr-header-menu-panel], [role="menu"]', x = 6;
5
+ function A() {
6
+ const [e, o] = g(null), [r, u] = g(!1), f = v(null);
7
+ return m(() => (c.push(u), c[0] === u && u(!0), () => {
8
+ var t;
9
+ const i = c.indexOf(u);
10
+ i < 0 || (c.splice(i, 1), i === 0 && ((t = c[0]) == null || t.call(c, !0)));
11
+ }), []), m(() => {
12
+ if (!r) return;
13
+ const i = (l) => {
14
+ var w, p;
15
+ const n = (p = (w = l.target) == null ? void 0 : w.closest) == null ? void 0 : p.call(w, "[data-tip]"), s = n == null ? void 0 : n.getAttribute("data-tip");
16
+ if (!n || !s || n.getAttribute("aria-expanded") === "true") {
17
+ o((a) => a && null);
18
+ return;
19
+ }
20
+ const d = n.getBoundingClientRect(), h = n.closest(L);
21
+ if (h && h !== n) {
22
+ const a = h.getBoundingClientRect();
23
+ o({
24
+ x: a.left,
25
+ y: d.top,
26
+ text: s,
27
+ beside: { left: a.left, right: a.right, rowTop: d.top, rowHeight: d.height }
28
+ });
18
29
  return;
19
30
  }
20
- const a = i.getBoundingClientRect();
21
- o({ x: a.left, y: a.bottom + 4, text: f });
22
- }, n = () => o(null);
23
- return window.addEventListener("mouseover", r), window.addEventListener("pointerdown", n, !0), window.addEventListener("scroll", n, !0), () => {
24
- window.removeEventListener("mouseover", r), window.removeEventListener("pointerdown", n, !0), window.removeEventListener("scroll", n, !0);
31
+ o({ x: d.left, y: d.bottom + 4, text: s });
32
+ }, t = () => o(null);
33
+ return window.addEventListener("mouseover", i), window.addEventListener("pointerdown", t, !0), window.addEventListener("scroll", t, !0), () => {
34
+ window.removeEventListener("mouseover", i), window.removeEventListener("pointerdown", t, !0), window.removeEventListener("scroll", t, !0);
25
35
  };
26
- }, [t]), x(() => {
36
+ }, [r]), b(() => {
27
37
  if (!e) return;
28
- const r = d.current;
29
- if (!r) return;
30
- const n = r.getBoundingClientRect();
31
- let { x: c, y: i } = e;
32
- n.right > window.innerWidth - 8 && (c = Math.max(8, window.innerWidth - n.width - 8)), n.bottom > window.innerHeight - 8 && (i = Math.max(8, e.y - n.height - 30)), (c !== e.x || i !== e.y) && o({ ...e, x: c, y: i });
33
- }, [e]), !t || !e ? null : b(
34
- /* @__PURE__ */ g(
38
+ const i = f.current;
39
+ if (!i) return;
40
+ const t = i.getBoundingClientRect();
41
+ let { x: l, y: n } = e;
42
+ if (e.beside) {
43
+ const s = e.beside, d = s.left - x - t.width;
44
+ l = d >= 8 ? d : Math.min(s.right + x, Math.max(8, window.innerWidth - t.width - 8)), n = Math.round(s.rowTop + (s.rowHeight - t.height) / 2), n = Math.max(8, Math.min(n, window.innerHeight - t.height - 8));
45
+ } else
46
+ t.right > window.innerWidth - 8 && (l = Math.max(8, window.innerWidth - t.width - 8)), t.bottom > window.innerHeight - 8 && (n = Math.max(8, e.y - t.height - 30));
47
+ (l !== e.x || n !== e.y) && o({ ...e, x: l, y: n });
48
+ }, [e]), !r || !e ? null : E(
49
+ /* @__PURE__ */ y(
35
50
  "div",
36
51
  {
37
- ref: d,
52
+ ref: f,
38
53
  style: { position: "fixed", left: e.x, top: e.y, zIndex: 120 },
39
- className: "pointer-events-none max-w-[340px] whitespace-pre-wrap break-words rounded-md bg-[#0f172a] px-2 py-1 text-[11px] font-medium leading-snug text-white shadow-lg dark:bg-[#334155]",
54
+ className: "pointer-events-none max-w-[340px] whitespace-pre-wrap break-words rounded-md bg-[#0f172a] px-2 py-1 text-[11px] font-medium leading-snug text-white shadow-lg dark:bg-[#334155] dark:ring-1 dark:ring-white/10",
40
55
  children: e.text
41
56
  }
42
57
  ),
@@ -45,18 +60,18 @@ function R() {
45
60
  }
46
61
  function O(e) {
47
62
  const o = v(null);
48
- return x(() => {
49
- const t = o.current;
50
- if (!t) return;
51
- const s = () => {
52
- (t.scrollWidth > t.clientWidth + 1 || t.scrollHeight > t.clientHeight + 1) && e ? t.setAttribute("data-tip", e) : t.removeAttribute("data-tip");
63
+ return b(() => {
64
+ const r = o.current;
65
+ if (!r) return;
66
+ const u = () => {
67
+ (r.scrollWidth > r.clientWidth + 1 || r.scrollHeight > r.clientHeight + 1) && e ? r.setAttribute("data-tip", e) : r.removeAttribute("data-tip");
53
68
  };
54
- if (s(), typeof ResizeObserver > "u") return;
55
- const d = new ResizeObserver(s);
56
- return d.observe(t), () => d.disconnect();
69
+ if (u(), typeof ResizeObserver > "u") return;
70
+ const f = new ResizeObserver(u);
71
+ return f.observe(r), () => f.disconnect();
57
72
  }, [e]), o;
58
73
  }
59
74
  export {
60
- R as TipLayer,
75
+ A as TipLayer,
61
76
  O as useOverflowTip
62
77
  };
@@ -0,0 +1,61 @@
1
+ import { jsx as u, Fragment as b, jsxs as f } from "react/jsx-runtime";
2
+ import { useQuery as k } from "@tanstack/react-query";
3
+ import { useNivaroClient as v, useItemNavigation as w } from "../../context.js";
4
+ import { get as F } from "../../lib/commands.js";
5
+ import { titleCase as N } from "../../lib/utils.js";
6
+ import { useOverflowTip as q } from "../TipLayer.js";
7
+ function K(r) {
8
+ const n = r.trim();
9
+ return /^[A-Za-z0-9][A-Za-z0-9._/#-]{3,63}$/.test(n) && /\d/.test(n);
10
+ }
11
+ function T({
12
+ term: r,
13
+ show: n,
14
+ ask: m = n,
15
+ collection: d,
16
+ fallback: p = null
17
+ }) {
18
+ var s;
19
+ const h = v(), { open: x, urlFor: y } = w(), l = r.trim(), { data: i } = k({
20
+ queryKey: ["cbv-found-elsewhere", l],
21
+ enabled: n && m && K(l),
22
+ staleTime: 6e4,
23
+ retry: !1,
24
+ queryFn: () => h.request(F("/global-search", { q: l })).then((t) => {
25
+ var c;
26
+ return ((c = t.data) == null ? void 0 : c.exact) ?? null;
27
+ }).catch(() => null)
28
+ }), e = n && i && i.id != null ? i : null, o = e ? e.label || String(e.id) : null, g = q(o);
29
+ if (!e) return /* @__PURE__ */ u(b, { children: p });
30
+ const a = { collection: e.collection, itemId: String(e.id) };
31
+ return /* @__PURE__ */ f(
32
+ "p",
33
+ {
34
+ className: "flex w-full max-w-[52ch] justify-center gap-1 whitespace-nowrap text-[12px] text-slate-600 dark:text-slate-300",
35
+ "data-found-elsewhere": e.collection,
36
+ children: [
37
+ /* @__PURE__ */ f("span", { className: "shrink-0", children: [
38
+ e.collection === d ? "Hidden by this list's filters" : `Found in ${((s = e.display_name) == null ? void 0 : s.trim()) || N(e.collection)}`,
39
+ ":",
40
+ " "
41
+ ] }),
42
+ /* @__PURE__ */ u(
43
+ "a",
44
+ {
45
+ ref: g,
46
+ href: y(a),
47
+ onClick: (t) => {
48
+ t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), x(a));
49
+ },
50
+ className: "min-w-0 truncate font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
51
+ children: o
52
+ }
53
+ )
54
+ ]
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ T as FoundElsewhere,
60
+ K as looksLikeIdentifier
61
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as a, jsx as r, Fragment as A } from "react/jsx-runtime";
2
- import { AlertOctagon as O, AlertTriangle as W, ChevronRight as I, Loader2 as M, ChevronDown as G, ExternalLink as V } from "lucide-react";
2
+ import { AlertOctagon as O, AlertTriangle as W, ChevronRight as E, Loader2 as M, ChevronDown as G, ExternalLink as V } from "lucide-react";
3
3
  import { useState as L, useMemo as X, useId as q, useRef as H } from "react";
4
4
  import { useItemEditAuth as J } from "../../../context.js";
5
- import { userErrorMessage as P } from "../../../lib/safe-error.js";
5
+ import { userErrorMessage as I } from "../../../lib/safe-error.js";
6
6
  import { cn as x, titleCase as Q } from "../../../lib/utils.js";
7
7
  import { ExplainButton as Y } from "../../ai/ExplainButton.js";
8
8
  import { useDrillWindows as Z, DrillTag as ee } from "../../chaos/DrillTag.js";
@@ -24,7 +24,7 @@ function De({
24
24
  onExplain: p,
25
25
  canExplain: l
26
26
  }) {
27
- const h = t.severity === "critical", v = h ? "negative" : "warning", S = h ? O : W, y = pe(t), z = Z(), $ = t.rows.reduce(
27
+ const f = t.severity === "critical", v = f ? "negative" : "warning", S = f ? O : W, y = pe(t), z = Z(), $ = t.rows.reduce(
28
28
  (N, D) => !N || D.first_seen > N ? D.first_seen : N,
29
29
  null
30
30
  ), k = t.rows[0], [b, C] = L(!1), _ = `ic-signal-body-${t.id.replace(/[^a-z0-9]/gi, "-")}`;
@@ -51,7 +51,7 @@ function De({
51
51
  "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
52
52
  de[v]
53
53
  ),
54
- "data-tip": h ? "Critical — something is failing now" : "Worth a look",
54
+ "data-tip": f ? "Critical — something is failing now" : "Worth a look",
55
55
  children: /* @__PURE__ */ r(S, { className: x("h-3.5 w-3.5", T[v]), "aria-hidden": !0 })
56
56
  }
57
57
  ),
@@ -77,7 +77,7 @@ function De({
77
77
  /* @__PURE__ */ r("span", { className: "mt-0.5 block truncate text-[12px] text-muted-foreground", children: t.error ? t.error : k ? `${k.title}${k.detail ? ` — ${K(k.detail)}` : ""}` : t.description })
78
78
  ] }),
79
79
  /* @__PURE__ */ r(
80
- I,
80
+ E,
81
81
  {
82
82
  className: x(
83
83
  "mt-1 h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200",
@@ -96,7 +96,7 @@ function De({
96
96
  ] }) : /* @__PURE__ */ a(A, { children: [
97
97
  /* @__PURE__ */ r("p", { className: "max-w-[80ch] px-4 pb-1 pt-3 text-[12px] leading-relaxed text-muted-foreground", children: t.description }),
98
98
  /* @__PURE__ */ r(
99
- fe,
99
+ he,
100
100
  {
101
101
  signal: t,
102
102
  rows: t.rows,
@@ -124,7 +124,7 @@ function De({
124
124
  className: "flex w-full items-center gap-1.5 px-4 py-2 text-left text-[12px] font-medium text-muted-foreground hover:text-foreground",
125
125
  children: [
126
126
  /* @__PURE__ */ r(
127
- I,
127
+ E,
128
128
  {
129
129
  className: x("h-3.5 w-3.5 transition-transform", b && "rotate-90")
130
130
  }
@@ -142,14 +142,14 @@ function De({
142
142
  }
143
143
  );
144
144
  }
145
- function fe({
145
+ function he({
146
146
  signal: t,
147
147
  rows: e,
148
148
  onOpenRecord: m,
149
149
  onExplain: g,
150
150
  canExplain: p
151
151
  }) {
152
- const l = te(), h = ne(), [v, S] = L({}), [y, z] = L(/* @__PURE__ */ new Set()), [$, k] = L(/* @__PURE__ */ new Set()), b = X(() => {
152
+ const l = te(), f = ne(), [v, S] = L({}), [y, z] = L(/* @__PURE__ */ new Set()), [$, k] = L(/* @__PURE__ */ new Set()), b = X(() => {
153
153
  if (!e.some((s) => s.group)) return null;
154
154
  const o = /* @__PURE__ */ new Map();
155
155
  for (const s of e) {
@@ -165,15 +165,15 @@ function fe({
165
165
  const c = await l.mutateAsync({ signal: t.id, row_keys: i, action: o });
166
166
  S((n) => {
167
167
  const u = { ...n };
168
- for (const f of c) u[f.key] = f;
168
+ for (const h of c) u[h.key] = h;
169
169
  return u;
170
170
  }), k((n) => new Set([...n].filter((u) => !i.includes(u))));
171
171
  } catch (c) {
172
- const n = ((d = c == null ? void 0 : c.response) == null ? void 0 : d.error) ?? P(c, "The action failed");
172
+ const n = ((d = c == null ? void 0 : c.response) == null ? void 0 : d.error) ?? I(c, "The action failed");
173
173
  S((u) => {
174
- const f = { ...u };
175
- for (const w of i) f[w] = { key: w, ok: !1, message: n };
176
- return f;
174
+ const h = { ...u };
175
+ for (const w of i) h[w] = { key: w, ok: !1, message: n };
176
+ return h;
177
177
  });
178
178
  } finally {
179
179
  z((c) => new Set([...c].filter((n) => !i.includes(n))));
@@ -183,12 +183,12 @@ function fe({
183
183
  const s = o.map((d) => d.key);
184
184
  z((d) => /* @__PURE__ */ new Set([...d, ...s]));
185
185
  try {
186
- await h.mutateAsync({ signal: t.id, row_keys: s }), k((d) => new Set([...d].filter((c) => !s.includes(c))));
186
+ await f.mutateAsync({ signal: t.id, row_keys: s }), k((d) => new Set([...d].filter((c) => !s.includes(c))));
187
187
  } catch (d) {
188
- const c = ((i = d == null ? void 0 : d.response) == null ? void 0 : i.error) ?? P(d, "Could not dismiss");
188
+ const c = ((i = d == null ? void 0 : d.response) == null ? void 0 : i.error) ?? I(d, "Could not dismiss");
189
189
  S((n) => {
190
190
  const u = { ...n };
191
- for (const f of s) u[f] = { key: f, ok: !1, message: c };
191
+ for (const h of s) u[h] = { key: h, ok: !1, message: c };
192
192
  return u;
193
193
  });
194
194
  } finally {
@@ -197,8 +197,8 @@ function fe({
197
197
  }, N = (o, s) => {
198
198
  var i, d, c, n;
199
199
  if (o.kind === "open") {
200
- const u = ((i = o.payload) == null ? void 0 : i.collection) ?? ((d = s.record) == null ? void 0 : d.collection), f = ((c = o.payload) == null ? void 0 : c.id) ?? ((n = s.record) == null ? void 0 : n.id);
201
- u && f && (m == null || m(u, String(f)));
200
+ const u = ((i = o.payload) == null ? void 0 : i.collection) ?? ((d = s.record) == null ? void 0 : d.collection), h = ((c = o.payload) == null ? void 0 : c.id) ?? ((n = s.record) == null ? void 0 : n.id);
201
+ u && h && (m == null || m(u, String(h)));
202
202
  return;
203
203
  }
204
204
  if (o.kind === "explain") {
@@ -207,7 +207,7 @@ function fe({
207
207
  }
208
208
  C(o, [s]);
209
209
  }, D = (o, s) => /* @__PURE__ */ r(
210
- he,
210
+ fe,
211
211
  {
212
212
  signal: t,
213
213
  row: o,
@@ -266,12 +266,12 @@ function fe({
266
266
  const s = o.rows.filter((n) => $.has(n.key)), i = o.rows.length > 0 && s.length === o.rows.length, d = /* @__PURE__ */ new Map();
267
267
  for (const n of s) {
268
268
  const u = /* @__PURE__ */ new Set();
269
- for (const f of n.actions) {
270
- if (!ue.includes(f.kind)) continue;
271
- const w = me(f);
269
+ for (const h of n.actions) {
270
+ if (!ue.includes(h.kind)) continue;
271
+ const w = me(h);
272
272
  if (u.has(w)) continue;
273
273
  u.add(w);
274
- const B = d.get(w) ?? { action: f, rows: [] };
274
+ const B = d.get(w) ?? { action: h, rows: [] };
275
275
  B.rows.push(n), d.set(w, B);
276
276
  }
277
277
  }
@@ -287,10 +287,10 @@ function fe({
287
287
  n && (n.indeterminate = s.length > 0 && !i);
288
288
  },
289
289
  onChange: (n) => k((u) => {
290
- const f = new Set(u);
290
+ const h = new Set(u);
291
291
  for (const w of o.rows)
292
- n.target.checked ? f.add(w.key) : f.delete(w.key);
293
- return f;
292
+ n.target.checked ? h.add(w.key) : h.delete(w.key);
293
+ return h;
294
294
  }),
295
295
  "aria-label": `Select every problem in ${o.label}`,
296
296
  "data-ic-group-select": o.key,
@@ -347,17 +347,17 @@ function fe({
347
347
  ] }, o.key);
348
348
  }) });
349
349
  }
350
- function E(t) {
350
+ function P(t) {
351
351
  return t.label ? t.label : `${Q(t.collection).replace(/s$/, "")} ${t.id}`;
352
352
  }
353
- function he({
353
+ function fe({
354
354
  signal: t,
355
355
  row: e,
356
356
  result: m,
357
357
  busy: g,
358
358
  selectable: p,
359
359
  selected: l,
360
- onSelect: h,
360
+ onSelect: f,
361
361
  onAction: v,
362
362
  onOpenRecord: S,
363
363
  canExplain: y
@@ -385,7 +385,7 @@ function he({
385
385
  {
386
386
  type: "checkbox",
387
387
  checked: l,
388
- onChange: (n) => h(n.target.checked),
388
+ onChange: (n) => f(n.target.checked),
389
389
  "aria-label": `Select ${e.title}`,
390
390
  "data-ic-select-row": e.key,
391
391
  className: "mt-1 h-3.5 w-3.5 shrink-0 accent-[rgb(var(--nvr-cyan-rgb))]"
@@ -509,7 +509,7 @@ function he({
509
509
  {
510
510
  kind: "signal-row",
511
511
  params: { signal: t.id, row_key: e.key },
512
- label: "Explain this failure"
512
+ label: t.id.startsWith("core:unanswered-") ? "Explain this" : "Explain this failure"
513
513
  }
514
514
  ) }),
515
515
  b && D && e.drill && // Esc anywhere inside the open drill collapses it.
@@ -559,11 +559,11 @@ function R({
559
559
  onClick: () => m(e.collection, e.id),
560
560
  className: "inline-flex max-w-full items-center gap-1 truncate font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground",
561
561
  children: [
562
- E(e),
562
+ P(e),
563
563
  /* @__PURE__ */ r(V, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": !0 })
564
564
  ]
565
565
  }
566
- ) : /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: E(e) })
566
+ ) : /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: P(e) })
567
567
  ] })
568
568
  ] });
569
569
  }
@@ -574,9 +574,9 @@ function be({ signal: t }) {
574
574
  const l = m.get(p.snooze.id) ?? [];
575
575
  l.push(p), m.set(p.snooze.id, l);
576
576
  }
577
- const g = (p) => new Set(p.map((h) => h.group ?? "")).size === 1 && p[0].group ? `everything in ${p[0].group_label ?? p[0].group}` : `all of “${t.label}”`;
577
+ const g = (p) => new Set(p.map((f) => f.group ?? "")).size === 1 && p[0].group ? `everything in ${p[0].group_label ?? p[0].group}` : `all of “${t.label}”`;
578
578
  return /* @__PURE__ */ r("ul", { className: "divide-y divide-border border-t border-border bg-muted/30", children: t.snoozed.map((p) => {
579
- const l = p.snooze, h = l ? m.get(l.id) ?? [] : [], v = l != null && l.until_occurrence ? "Dismissed — shows again if it happens again" : `Snoozed ${l != null && l.until_change ? "until it changes" : l != null && l.until ? `until ${new Date(l.until).toLocaleString(void 0, {
579
+ const l = p.snooze, f = l ? m.get(l.id) ?? [] : [], v = l != null && l.until_occurrence ? "Dismissed — shows again if it happens again" : `Snoozed ${l != null && l.until_change ? "until it changes" : l != null && l.until ? `until ${new Date(l.until).toLocaleString(void 0, {
580
580
  month: "short",
581
581
  day: "numeric",
582
582
  hour: "numeric",
@@ -587,7 +587,7 @@ function be({ signal: t }) {
587
587
  /* @__PURE__ */ r("p", { className: "truncate text-[12.5px] text-foreground", children: p.title }),
588
588
  /* @__PURE__ */ a("p", { className: "text-[11.5px] text-muted-foreground", children: [
589
589
  v,
590
- h.length > 1 ? ` with ${g(h)}` : "",
590
+ f.length > 1 ? ` with ${g(f)}` : "",
591
591
  l != null && l.note ? ` — “${l.note}”` : ""
592
592
  ] })
593
593
  ] }),
@@ -596,12 +596,12 @@ function be({ signal: t }) {
596
596
  {
597
597
  type: "button",
598
598
  "data-ic-unsnooze": l.id,
599
- "data-ic-unsnooze-count": h.length,
600
- "data-tip": h.length > 1 ? `This snooze covers ${h.length} problems (${g(h)}) — they all come back` : void 0,
599
+ "data-ic-unsnooze-count": f.length,
600
+ "data-tip": f.length > 1 ? `This snooze covers ${f.length} problems (${g(f)}) — they all come back` : void 0,
601
601
  disabled: e.isPending && e.variables === l.id,
602
602
  onClick: () => e.mutate(l.id),
603
603
  className: "h-7 shrink-0 rounded-md px-2.5 text-[12px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-60",
604
- children: h.length > 1 ? `Unsnooze all ${h.length}` : l != null && l.until_occurrence ? "Undo" : "Unsnooze"
604
+ children: f.length > 1 ? `Unsnooze all ${f.length}` : l != null && l.until_occurrence ? "Undo" : "Unsnooze"
605
605
  }
606
606
  )
607
607
  ] }, p.key);