@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,31 +1,39 @@
1
- import { jsx as e, jsxs as n, Fragment as D } from "react/jsx-runtime";
2
- import { ExternalLink as _, ArrowRight as P, Loader2 as U, RefreshCw as $ } from "lucide-react";
1
+ import { jsx as e, jsxs as n, Fragment as U } from "react/jsx-runtime";
2
+ import { ExternalLink as _, ArrowRight as R, Loader2 as $, RefreshCw as A } from "lucide-react";
3
3
  import { useMemo as W } from "react";
4
- import { useNavigation as O } from "../../../../context.js";
5
- import { plainObligationReason as A } from "../../../../lib/obligation-reason-text.js";
4
+ import { useNavigation as D } from "../../../../context.js";
5
+ import { plainObligationReason as M } from "../../../../lib/obligation-reason-text.js";
6
6
  import { cn as m, titleCase as F } from "../../../../lib/utils.js";
7
- import { useSubmissionDetail as M, useRetrySubmission as j } from "../api.js";
8
- import { ErrorExplanation as B } from "../ErrorExplanation.js";
9
- import { TONE_TEXT as d, TONE_SOFT as w, agoText as C, exactTime as y } from "../tone.js";
10
- import { AttemptHistory as z } from "./attempts.js";
11
- import { CodeBlock as q, pretty as E } from "./json.js";
12
- import { RequesterChip as S } from "./requester.js";
13
- import { StatusPill as H } from "./status.js";
14
- function I() {
15
- const t = O();
7
+ import { useSubmissionDetail as j, useRetrySubmission as B } from "../api.js";
8
+ import { ErrorExplanation as z } from "../ErrorExplanation.js";
9
+ import { TONE_TEXT as c, TONE_SOFT as y, agoText as q, exactTime as w } from "../tone.js";
10
+ import { AttemptHistory as H } from "./attempts.js";
11
+ import { CodeBlock as S, pretty as T } from "./json.js";
12
+ import { RequesterChip as L } from "./requester.js";
13
+ import { StatusPill as I } from "./status.js";
14
+ function X() {
15
+ const t = D();
16
16
  return (i) => i ? t.consoleUrl ? t.consoleUrl(i) : i : null;
17
17
  }
18
- function T(t, i) {
18
+ function k(t, i) {
19
19
  /^https?:/.test(i) ? window.open(i, "_blank", "noopener") : t.navigate(i);
20
20
  }
21
- function h({ name: t, title: i, children: o }) {
21
+ function G(t, i) {
22
+ try {
23
+ const o = new URL(i, window.location.href);
24
+ if (o.origin === window.location.origin) return t.navigate(`${o.pathname}${o.search}`);
25
+ } catch {
26
+ }
27
+ k(t, i);
28
+ }
29
+ function x({ name: t, title: i, children: o }) {
22
30
  return /* @__PURE__ */ n("section", { "data-ic-drill-section": t, className: "min-w-0", children: [
23
31
  /* @__PURE__ */ e("h4", { className: "mb-1.5 text-[12px] font-semibold text-foreground", children: i }),
24
32
  o
25
33
  ] });
26
34
  }
27
35
  function b({ label: t, children: i }) {
28
- return /* @__PURE__ */ n(D, { children: [
36
+ return /* @__PURE__ */ n(U, { children: [
29
37
  /* @__PURE__ */ e("dt", { className: "text-[11.5px] text-muted-foreground", children: t }),
30
38
  /* @__PURE__ */ e("dd", { className: "min-w-0 text-[12px] text-foreground", children: i })
31
39
  ] });
@@ -33,18 +41,18 @@ function b({ label: t, children: i }) {
33
41
  function N() {
34
42
  return /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-muted-foreground", children: "·" });
35
43
  }
36
- function X(t, i) {
37
- var o, c, l, u;
38
- return (o = t.user) != null && o.id || (c = i.user) != null && c.id ? ((l = t.user) == null ? void 0 : l.id) === ((u = i.user) == null ? void 0 : u.id) : t.kind === i.kind && t.label === i.label;
44
+ function J(t, i) {
45
+ var o, u, l, d;
46
+ return (o = t.user) != null && o.id || (u = i.user) != null && u.id ? ((l = t.user) == null ? void 0 : l.id) === ((d = i.user) == null ? void 0 : d.id) : t.kind === i.kind && t.label === i.label;
39
47
  }
40
- const G = {
48
+ const K = {
41
49
  transient: "Temporary failure",
42
50
  rate_limited: "Rate limited",
43
51
  auth: "Credentials refused",
44
52
  not_found: "Target not found",
45
53
  validation: "Content refused",
46
54
  unknown: "Unclassified failure"
47
- }, R = {
55
+ }, O = {
48
56
  sent: "positive",
49
57
  failed: "negative",
50
58
  overdue: "negative",
@@ -53,7 +61,7 @@ const G = {
53
61
  skipped: "neutral",
54
62
  superseded: "neutral"
55
63
  };
56
- function J() {
64
+ function Q() {
57
65
  return /* @__PURE__ */ n("div", { className: "space-y-2.5", "aria-busy": !0, children: [
58
66
  [72, 96, 60, 84].map((t) => /* @__PURE__ */ e(
59
67
  "div",
@@ -66,41 +74,42 @@ function J() {
66
74
  /* @__PURE__ */ e("div", { className: "h-16 animate-pulse rounded-md bg-[hsl(var(--nvr-skeleton))]" })
67
75
  ] });
68
76
  }
69
- function de({ id: t, onOpenRecord: i, onRetry: o, retryBusy: c }) {
70
- var g, f, x;
71
- const { data: l, isLoading: u, isError: v, error: r } = M(t), p = j();
72
- if (u) return /* @__PURE__ */ e(J, {});
77
+ function ue({ id: t, onOpenRecord: i, onRetry: o, retryBusy: u }) {
78
+ var g, f, h;
79
+ const { data: l, isLoading: d, isError: v, error: r } = j(t), p = B();
80
+ if (d) return /* @__PURE__ */ e(Q, {});
73
81
  if (v || !l) {
74
82
  const s = ((g = r == null ? void 0 : r.response) == null ? void 0 : g.error) ?? (r instanceof Error ? r.message : null);
75
- return /* @__PURE__ */ n("p", { className: m("rounded-md px-3 py-2 text-[12px]", w.negative, d.negative), children: [
83
+ return /* @__PURE__ */ n("p", { className: m("rounded-md px-3 py-2 text-[12px]", y.negative, c.negative), children: [
76
84
  "Couldn't load this push",
77
85
  s ? ` · ${s}` : "",
78
86
  "."
79
87
  ] });
80
88
  }
81
89
  return /* @__PURE__ */ e(
82
- K,
90
+ V,
83
91
  {
84
92
  d: l,
85
93
  onOpenRecord: i,
86
94
  onRetry: o ?? (() => p.mutate(t)),
87
- retryBusy: o ? !!c : p.isPending,
88
- retryError: o ? null : p.isError ? ((x = (f = p.error) == null ? void 0 : f.response) == null ? void 0 : x.error) ?? "The retry failed" : null
95
+ retryBusy: o ? !!u : p.isPending,
96
+ retryError: o ? null : p.isError ? ((h = (f = p.error) == null ? void 0 : f.response) == null ? void 0 : h.error) ?? "The retry failed" : null
89
97
  }
90
98
  );
91
99
  }
92
- function K({
100
+ function V({
93
101
  d: t,
94
102
  onOpenRecord: i,
95
103
  onRetry: o,
96
- retryBusy: c,
104
+ retryBusy: u,
97
105
  retryError: l
98
106
  }) {
99
- const u = O(), v = I(), r = t.submission, p = W(
107
+ var E;
108
+ const d = D(), v = X(), r = t.submission, p = W(
100
109
  () => new Map(t.attempt_requesters.map((a) => [a.attempt, a.requester])),
101
110
  [t.attempt_requesters]
102
- ), g = F(r.collection).replace(/s$/, ""), f = v(t.trigger.link), x = t.partner.id != null ? v(`/external-apis/${t.partner.id}`) : null, s = t.obligation, k = t.attempt_requesters.filter(
103
- (a) => a.attempt > 1 && a.requester.kind !== "unknown" && !X(a.requester, t.triggered_by)
111
+ ), g = F(r.collection).replace(/s$/, ""), f = v(t.trigger.link), h = t.partner.id != null ? v(`/external-apis/${t.partner.id}`) : null, s = t.obligation, C = t.attempt_requesters.filter(
112
+ (a) => a.attempt > 1 && a.requester.kind !== "unknown" && !J(a.requester, t.triggered_by)
104
113
  );
105
114
  return /* @__PURE__ */ n("div", { className: "space-y-4", "data-ic-drill": `submission:${r.id}`, children: [
106
115
  /* @__PURE__ */ n(
@@ -137,17 +146,17 @@ function K({
137
146
  r.record_label
138
147
  ] }),
139
148
  /* @__PURE__ */ e(N, {}),
140
- /* @__PURE__ */ e(H, { status: r.status }),
149
+ /* @__PURE__ */ e(I, { status: r.status, stale: ((E = r.unanswered) == null ? void 0 : E.stale) === !0 }),
141
150
  r.error_class && /* @__PURE__ */ e(
142
151
  "span",
143
152
  {
144
153
  className: m(
145
154
  "rounded px-1.5 py-0.5 text-[11px] font-medium",
146
- w.warning,
147
- d.warning
155
+ y.warning,
156
+ c.warning
148
157
  ),
149
158
  "data-tip": `Error class: ${r.error_class}`,
150
- children: G[r.error_class] ?? r.error_class
159
+ children: K[r.error_class] ?? r.error_class
151
160
  }
152
161
  ),
153
162
  /* @__PURE__ */ e(N, {}),
@@ -158,28 +167,28 @@ function K({
158
167
  ] }),
159
168
  /* @__PURE__ */ e(N, {}),
160
169
  /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 tabular-nums", children: [
161
- /* @__PURE__ */ n("span", { "data-tip": y(r.created_at), children: [
170
+ /* @__PURE__ */ n("span", { "data-tip": w(r.created_at), children: [
162
171
  "first sent ",
163
- C(r.created_at)
172
+ q(r.created_at)
164
173
  ] }),
165
- /* @__PURE__ */ e(P, { className: "h-3 w-3", "aria-hidden": !0 }),
166
- /* @__PURE__ */ n("span", { "data-tip": y(r.updated_at), children: [
174
+ /* @__PURE__ */ e(R, { className: "h-3 w-3", "aria-hidden": !0 }),
175
+ /* @__PURE__ */ n("span", { "data-tip": w(r.updated_at), children: [
167
176
  "last tried ",
168
- C(r.updated_at)
177
+ q(r.updated_at)
169
178
  ] })
170
179
  ] })
171
180
  ]
172
181
  }
173
182
  ),
174
- (r.last_error || (s == null ? void 0 : s.reason)) && /* @__PURE__ */ n(h, { name: "error", title: "What went wrong", children: [
175
- r.last_error && r.explanation && /* @__PURE__ */ e(B, { explanation: r.explanation, raw: r.last_error }),
183
+ (r.last_error || (s == null ? void 0 : s.reason)) && /* @__PURE__ */ n(x, { name: "error", title: "What went wrong", children: [
184
+ r.last_error && r.explanation && /* @__PURE__ */ e(z, { explanation: r.explanation, raw: r.last_error }),
176
185
  r.last_error && !r.explanation && /* @__PURE__ */ e(
177
186
  "p",
178
187
  {
179
188
  className: m(
180
189
  "whitespace-pre-wrap break-words rounded-md px-3 py-2 font-mono text-[11.5px] leading-relaxed",
181
- w.negative,
182
- d.negative
190
+ y.negative,
191
+ c.negative
183
192
  ),
184
193
  children: r.last_error
185
194
  }
@@ -187,29 +196,29 @@ function K({
187
196
  (s == null ? void 0 : s.reason) && s.reason !== r.last_error && /* @__PURE__ */ n("p", { className: "mt-1.5 max-w-[80ch] text-[12px] leading-relaxed text-muted-foreground", children: [
188
197
  /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: "Obligation:" }),
189
198
  " ",
190
- A(s.reason)
199
+ M(s.reason)
191
200
  ] })
192
201
  ] }),
193
- /* @__PURE__ */ e(h, { name: "attempts", title: "Attempts", children: /* @__PURE__ */ e(z, { submissionId: r.id, requesters: p, title: null }) }),
202
+ /* @__PURE__ */ e(x, { name: "attempts", title: "Attempts", children: /* @__PURE__ */ e(H, { submissionId: r.id, requesters: p, title: null }) }),
194
203
  /* @__PURE__ */ e(
195
- h,
204
+ x,
196
205
  {
197
206
  name: "bodies",
198
207
  title: r.attempts > 1 ? "Latest request and response" : "Request and response",
199
208
  children: /* @__PURE__ */ n("div", { className: "grid gap-3 lg:grid-cols-2", children: [
200
- /* @__PURE__ */ e(q, { label: "Request", value: E(r.payload), fold: !0 }),
201
- /* @__PURE__ */ e(q, { label: "Response", value: E(r.response), fold: !0 })
209
+ /* @__PURE__ */ e(S, { label: "Request", value: T(r.payload), fold: !0 }),
210
+ /* @__PURE__ */ e(S, { label: "Response", value: T(r.response), fold: !0 })
202
211
  ] })
203
212
  }
204
213
  ),
205
214
  /* @__PURE__ */ n("div", { className: "grid gap-4 xl:grid-cols-2", children: [
206
- /* @__PURE__ */ e(h, { name: "why", title: "Why it was sent — and who", children: /* @__PURE__ */ n("dl", { className: "grid grid-cols-[max-content_minmax(0,1fr)] items-baseline gap-x-4 gap-y-1.5", children: [
207
- /* @__PURE__ */ e(b, { label: "Triggered by", children: /* @__PURE__ */ e("span", { className: "inline-flex max-w-full", "data-ic-drill-triggered-by": !0, children: /* @__PURE__ */ e(S, { r: t.triggered_by }) }) }),
215
+ /* @__PURE__ */ e(x, { name: "why", title: "Why it was sent — and who", children: /* @__PURE__ */ n("dl", { className: "grid grid-cols-[max-content_minmax(0,1fr)] items-baseline gap-x-4 gap-y-1.5", children: [
216
+ /* @__PURE__ */ e(b, { label: "Triggered by", children: /* @__PURE__ */ e("span", { className: "inline-flex max-w-full", "data-ic-drill-triggered-by": !0, children: /* @__PURE__ */ e(L, { r: t.triggered_by }) }) }),
208
217
  /* @__PURE__ */ e(b, { label: "What sent it", children: f ? /* @__PURE__ */ n(
209
218
  "button",
210
219
  {
211
220
  type: "button",
212
- onClick: () => T(u, f),
221
+ onClick: () => k(d, f),
213
222
  className: "inline-flex items-center gap-1 text-left font-medium underline decoration-border underline-offset-2 hover:decoration-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
214
223
  children: [
215
224
  t.trigger.label,
@@ -223,12 +232,12 @@ function K({
223
232
  children: t.trigger.label
224
233
  }
225
234
  ) }),
226
- k.length > 0 && /* @__PURE__ */ e(b, { label: "Retried by", children: /* @__PURE__ */ e("span", { className: "flex flex-col gap-1", children: k.map((a) => /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5", children: [
235
+ C.length > 0 && /* @__PURE__ */ e(b, { label: "Retried by", children: /* @__PURE__ */ e("span", { className: "flex flex-col gap-1", children: C.map((a) => /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5", children: [
227
236
  /* @__PURE__ */ n("span", { className: "text-[11.5px] tabular-nums text-muted-foreground", children: [
228
237
  "#",
229
238
  a.attempt
230
239
  ] }),
231
- /* @__PURE__ */ e(S, { r: a.requester, size: "sm" })
240
+ /* @__PURE__ */ e(L, { r: a.requester, size: "sm" })
232
241
  ] }, a.attempt)) }) }),
233
242
  /* @__PURE__ */ e(b, { label: "Obligation", children: s ? /* @__PURE__ */ n("span", { className: "inline-flex flex-wrap items-center gap-x-1.5 gap-y-0.5", children: [
234
243
  /* @__PURE__ */ e("span", { className: "font-mono text-[11.5px]", children: s.kind }),
@@ -237,15 +246,15 @@ function K({
237
246
  {
238
247
  className: m(
239
248
  "rounded px-1.5 py-px text-[11px] font-medium",
240
- w[R[s.outcome] ?? "neutral"],
241
- d[R[s.outcome] ?? "neutral"]
249
+ y[O[s.outcome] ?? "neutral"],
250
+ c[O[s.outcome] ?? "neutral"]
242
251
  ),
243
252
  children: s.outcome
244
253
  }
245
254
  ),
246
255
  /* @__PURE__ */ n("span", { className: "text-[11.5px] text-muted-foreground", children: [
247
256
  s.open ? "still open" : "closed",
248
- s.due_at && /* @__PURE__ */ n("span", { "data-tip": y(s.due_at), children: [
257
+ s.due_at && /* @__PURE__ */ n("span", { "data-tip": w(s.due_at), children: [
249
258
  " ",
250
259
  "· due ",
251
260
  new Date(s.due_at).toLocaleString()
@@ -254,9 +263,9 @@ function K({
254
263
  ] }) : /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "None recorded for this push" }) }),
255
264
  t.partner.owner && /* @__PURE__ */ e(b, { label: "Partner owner", children: t.partner.owner.name })
256
265
  ] }) }),
257
- /* @__PURE__ */ n(h, { name: "calls", title: "Call log", children: [
266
+ /* @__PURE__ */ n(x, { name: "calls", title: "Call log", children: [
258
267
  t.call_logs.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "No partner calls matched this push — the writer that sent it does not log its calls." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-border rounded-md border border-border", children: t.call_logs.map((a) => {
259
- const L = a.error != null || (a.status ?? 0) >= 400;
268
+ const P = a.error != null || (a.status ?? 0) >= 400;
260
269
  return /* @__PURE__ */ n(
261
270
  "li",
262
271
  {
@@ -267,7 +276,7 @@ function K({
267
276
  "span",
268
277
  {
269
278
  className: "tabular-nums text-muted-foreground",
270
- "data-tip": y(a.created_at),
279
+ "data-tip": w(a.created_at),
271
280
  children: new Date(a.created_at).toLocaleString()
272
281
  }
273
282
  ),
@@ -277,7 +286,7 @@ function K({
277
286
  {
278
287
  className: m(
279
288
  "font-mono font-medium",
280
- L ? d.negative : d.positive
289
+ P ? c.negative : c.positive
281
290
  ),
282
291
  children: a.status ?? "no response"
283
292
  }
@@ -296,12 +305,12 @@ function K({
296
305
  a.id
297
306
  );
298
307
  }) }),
299
- x && /* @__PURE__ */ n(
308
+ h && /* @__PURE__ */ n(
300
309
  "button",
301
310
  {
302
311
  type: "button",
303
312
  "data-ic-drill-call-logs": !0,
304
- onClick: () => T(u, x),
313
+ onClick: () => k(d, h),
305
314
  className: "mt-1.5 inline-flex items-center gap-1 text-[12px] font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
306
315
  children: [
307
316
  "Open in Call Logs",
@@ -322,15 +331,28 @@ function K({
322
331
  {
323
332
  type: "button",
324
333
  "data-ic-drill-retry": !0,
325
- disabled: !t.retry.eligible || c,
334
+ disabled: !t.retry.eligible || u,
326
335
  onClick: o,
327
336
  className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
328
337
  children: [
329
- c ? /* @__PURE__ */ e(U, { className: "h-3 w-3 animate-spin", "aria-hidden": !0 }) : /* @__PURE__ */ e($, { className: "h-3 w-3", "aria-hidden": !0 }),
338
+ u ? /* @__PURE__ */ e($, { className: "h-3 w-3 animate-spin", "aria-hidden": !0 }) : /* @__PURE__ */ e(A, { className: "h-3 w-3", "aria-hidden": !0 }),
330
339
  "Retry"
331
340
  ]
332
341
  }
333
342
  ),
343
+ t.retry.review_url && /* @__PURE__ */ n(
344
+ "button",
345
+ {
346
+ type: "button",
347
+ "data-ic-drill-review": !0,
348
+ onClick: () => G(d, t.retry.review_url),
349
+ className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
350
+ children: [
351
+ "Mark it on the ERP tab",
352
+ /* @__PURE__ */ e(R, { className: "h-3 w-3", "aria-hidden": !0 })
353
+ ]
354
+ }
355
+ ),
334
356
  i && /* @__PURE__ */ e(
335
357
  "button",
336
358
  {
@@ -341,14 +363,14 @@ function K({
341
363
  }
342
364
  ),
343
365
  !t.retry.eligible && t.retry.reason && /* @__PURE__ */ e("span", { className: "text-[12px] text-muted-foreground", "data-ic-drill-retry-reason": !0, children: t.retry.reason }),
344
- t.retry.eligible && t.retry.warning && /* @__PURE__ */ e("span", { className: m("text-[12px]", d.warning), children: t.retry.warning }),
345
- l && /* @__PURE__ */ e("span", { className: m("text-[12px]", d.negative), children: l })
366
+ t.retry.eligible && t.retry.warning && /* @__PURE__ */ e("span", { className: m("text-[12px]", c.warning), children: t.retry.warning }),
367
+ l && /* @__PURE__ */ e("span", { className: m("text-[12px]", c.negative), children: l })
346
368
  ]
347
369
  }
348
370
  )
349
371
  ] });
350
372
  }
351
373
  export {
352
- de as SubmissionDrill,
353
- X as sameRequester
374
+ ue as SubmissionDrill,
375
+ J as sameRequester
354
376
  };
@@ -1,40 +1,45 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { cn as d } from "../../../../lib/utils.js";
3
- import { TONE_TEXT as s, TONE_SOFT as n } from "../tone.js";
4
- const i = {
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { cn as a } from "../../../../lib/utils.js";
3
+ import { TONE_TEXT as n, TONE_SOFT as s } from "../tone.js";
4
+ const k = {
5
5
  accepted: "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400",
6
6
  failed: "bg-red-50 text-red-700 dark:bg-red-500/10 dark:text-red-400",
7
7
  rejected: "bg-red-50 text-red-700 dark:bg-red-500/10 dark:text-red-400",
8
8
  pending: "bg-sky-50 text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
9
- submitted: "bg-sky-50 text-sky-700 dark:bg-sky-500/10 dark:text-sky-400"
9
+ submitted: "bg-sky-50 text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
10
+ // Written before the partner call, still in flight (api erp-unanswered.ts).
11
+ sending: "bg-sky-50 text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
12
+ // …and past its time: the partner may already have it (the ERP tab's "no answer").
13
+ "no answer": "bg-orange-50 text-orange-700 dark:bg-orange-500/10 dark:text-orange-300"
10
14
  };
11
- function p({ status: e }) {
12
- return /* @__PURE__ */ r(
15
+ function i({ status: t, stale: r }) {
16
+ const e = t === "sending" && r ? "no answer" : t;
17
+ return /* @__PURE__ */ d(
13
18
  "span",
14
19
  {
15
- className: d(
20
+ className: a(
16
21
  "rounded px-1.5 py-0.5 text-[10.5px] font-semibold uppercase tracking-wide",
17
- i[e] ?? "bg-slate-100 text-slate-600 dark:bg-muted dark:text-slate-300"
22
+ k[e] ?? "bg-slate-100 text-slate-600 dark:bg-muted dark:text-slate-300"
18
23
  ),
19
24
  children: e
20
25
  }
21
26
  );
22
27
  }
23
- function l({ status: e, ok: a }) {
24
- const t = a ? "positive" : "negative";
25
- return /* @__PURE__ */ r(
28
+ function b({ status: t, ok: r }) {
29
+ const e = r ? "positive" : "negative";
30
+ return /* @__PURE__ */ d(
26
31
  "span",
27
32
  {
28
- className: d(
33
+ className: a(
29
34
  "inline-flex items-center rounded px-1.5 py-0.5 text-[11px] font-semibold tabular-nums",
30
- n[t],
31
- s[t]
35
+ s[e],
36
+ n[e]
32
37
  ),
33
- children: e ?? "No response"
38
+ children: t ?? "No response"
34
39
  }
35
40
  );
36
41
  }
37
42
  export {
38
- l as HttpStatusChip,
39
- p as StatusPill
43
+ b as HttpStatusChip,
44
+ i as StatusPill
40
45
  };