@debugkit/dashboard 0.9.0 → 0.10.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.
- package/dist/client/assets/_authed-3se5Egqg.js +1 -0
- package/dist/client/assets/_authed-BfFWbTOO.js +1 -0
- package/dist/client/assets/app-code-BKWbvUMR.js +1 -0
- package/dist/client/assets/closed-issues-Cl-8l4oR.js +1 -0
- package/dist/client/assets/{copy-button-BJkvWYRY.js → copy-button-BwRd5q7l.js} +1 -1
- package/dist/client/assets/customers-Cf-R8BOg.js +1 -0
- package/dist/client/assets/empty-state-njgr1sWu.js +7 -0
- package/dist/client/assets/endpoints-BMqAUNyE.js +1 -0
- package/dist/client/assets/events._eventId-CVRZJ-bU.js +2 -0
- package/dist/client/assets/exchange-view-DVwSLcXF.js +2 -0
- package/dist/client/assets/index-DEnCDILF.js +10 -0
- package/dist/client/assets/{invite._token-DiDJMnQu.js → invite._token-CKAfd5iB.js} +1 -1
- package/dist/client/assets/issues._fingerprint-Cm72LNM_.js +55 -0
- package/dist/client/assets/login-BTxOhEbN.js +1 -0
- package/dist/client/assets/request-panel-DmtFRF8Z.js +1 -0
- package/dist/client/assets/services._service-CU1a45f3.js +1 -0
- package/dist/client/assets/{sessions._sessionId-B0NxM46y.js → sessions._sessionId-LRo3QNQP.js} +1 -1
- package/dist/client/assets/settings-Ctzvl2LL.js +1 -0
- package/dist/client/assets/src-BiKxgjA_.js +3 -0
- package/dist/client/assets/styles-Tcq0pvWj.css +2 -0
- package/dist/client/assets/{team-BRuVQ2bU.js → team-xlrjhEGp.js} +1 -1
- package/dist/client/assets/{timeline-BIGo9MCA.js → timeline-WXE49N62.js} +1 -1
- package/dist/client/assets/ui-DRjjeSWy.js +1 -0
- package/dist/client/assets/{version-banner-VFvyqbPh.js → version-banner-BYe4PVzv.js} +1 -1
- package/dist/server/assets/_authed-Bn-IktVS.js +120 -0
- package/dist/server/assets/_authed-RXh7GpoE.js +252 -0
- package/dist/server/assets/_tanstack-start-manifest_v-C4dQ3MxD.js +122 -0
- package/dist/server/assets/app-code-BQL_FcSx.js +212 -0
- package/dist/server/assets/app-name-BcbY1BZN.js +11 -0
- package/dist/server/assets/closed-issues-o9U80FXv.js +45 -0
- package/dist/server/assets/config-Bp8m0B8q.js +57 -0
- package/dist/server/assets/{customers-827fC5I3.js → customers-CD84Bz4P.js} +11 -6
- package/dist/server/assets/{demo-DDNiXCgj.js → demo-D-o8m75S.js} +222 -6
- package/dist/server/assets/{dynamodb-Cd4blXkh.js → dynamodb-CcH0cp7R.js} +2 -2
- package/dist/server/assets/empty-state-wz34oAi8.js +163 -0
- package/dist/server/assets/endpoints-8N389Poe.js +248 -0
- package/dist/server/assets/{endpoints-_T0NSOyA.js → endpoints-C0Cxc_-x.js} +38 -36
- package/dist/server/assets/{events._eventId-Dcsu4oVO.js → events._eventId-BOHkNO5W.js} +90 -351
- package/dist/server/assets/exchange-view-DzoSBt_R.js +112 -0
- package/dist/server/assets/{firestore-c8Sz2Q4O.js → firestore-DyvYMiz3.js} +2 -2
- package/dist/server/assets/{fns-BiUOnY1_.js → fns-BcVGbSID.js} +20 -7
- package/dist/server/assets/fns-DE03YExD.js +831 -0
- package/dist/server/assets/{invite._token-7DjEeeaD.js → invite._token-DhlACkIe.js} +3 -3
- package/dist/server/assets/{issues._fingerprint-vc9r3jgg.js → issues._fingerprint-BBd-_Nn5.js} +400 -28
- package/dist/server/assets/{login-CwKAx9Bj.js → login-CbfdHJvg.js} +3 -3
- package/dist/server/assets/{memory-Bv4C8uyK.js → memory-CZBUh1Zc.js} +75 -3
- package/dist/server/assets/{errors-Po4Tt5zd.js → queries-wha4cZbw.js} +1394 -128
- package/dist/server/assets/request-panel-DpCSwl2q.js +162 -0
- package/dist/server/assets/{router-Dk3XHn7B.js → router-BXkzR89j.js} +195 -91
- package/dist/server/assets/services._service-DWjFFGON.js +309 -0
- package/dist/server/assets/{sessions._sessionId-BvXxK9qF.js → sessions._sessionId-DDspiPTe.js} +2 -2
- package/dist/server/assets/{settings-B9NLQjl1.js → settings-DCLIaZ_p.js} +146 -25
- package/dist/server/assets/{src-oWPSAvXv.js → src-B2GKPQyN.js} +1 -1
- package/dist/server/assets/{team-Bsm2wFG0.js → team-jd_TmWP4.js} +3 -3
- package/dist/server/assets/ui-C3pl0edn.js +302 -0
- package/dist/server/assets/{version-banner-nf-yZurq.js → version-banner-BX34ijG5.js} +1 -1
- package/dist/server/assets/{versions-BOlL8jam.js → versions-YI_zK1ql.js} +3 -3
- package/dist/server/assets/warm-C3GbXP1_.js +16 -0
- package/dist/server/server.js +37 -29
- package/package.json +4 -4
- package/dist/client/assets/_authed-C29P68T-.js +0 -1
- package/dist/client/assets/_authed-D-dYbHoP.js +0 -7
- package/dist/client/assets/charts--S1o8iId.js +0 -55
- package/dist/client/assets/customers-Cwx5qEO1.js +0 -1
- package/dist/client/assets/endpoints-zz1TotR2.js +0 -1
- package/dist/client/assets/events._eventId-Bx6TfUjv.js +0 -3
- package/dist/client/assets/index-COHr_cc3.js +0 -10
- package/dist/client/assets/issues._fingerprint-Cv522h2j.js +0 -1
- package/dist/client/assets/login-CKkpc0t5.js +0 -1
- package/dist/client/assets/settings-CIlF10MI.js +0 -1
- package/dist/client/assets/src-BKSiJUs3.js +0 -3
- package/dist/client/assets/styles-GAsMUS4-.css +0 -2
- package/dist/client/assets/ui-CaEZB1j2.js +0 -1
- package/dist/server/assets/_authed-BJWDiF9i.js +0 -92
- package/dist/server/assets/_authed-X9u_5JUy.js +0 -902
- package/dist/server/assets/_tanstack-start-manifest_v-C6vaeBdY.js +0 -90
- package/dist/server/assets/charts-DzTVqJ8z.js +0 -238
- package/dist/server/assets/fns-CVbk8Gf9.js +0 -1310
- package/dist/server/assets/ui-SAkSlP7f.js +0 -193
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { h as SEVERITY_INFO } from "./memory-CZBUh1Zc.js";
|
|
2
|
+
import { t as appLabel } from "./app-name-BcbY1BZN.js";
|
|
3
|
+
import { Link } from "@tanstack/react-router";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/ui.tsx
|
|
6
|
+
/** An app picker's options: each app by its display name from Settings, its id as the value. */
|
|
7
|
+
function AppOptions({ apps, names }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Fragment, { children: apps.map((a) => /* @__PURE__ */ jsx("option", {
|
|
9
|
+
value: a,
|
|
10
|
+
children: appLabel(a, names[a])
|
|
11
|
+
}, a)) });
|
|
12
|
+
}
|
|
13
|
+
function Logo() {
|
|
14
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
15
|
+
className: "inline-flex items-center gap-2 font-semibold tracking-tight",
|
|
16
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "grid h-7 w-7 place-items-center rounded-md bg-sev-critical text-[11px] font-bold text-white",
|
|
18
|
+
children: "dB"
|
|
19
|
+
}), /* @__PURE__ */ jsxs("span", { children: ["de", /* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "text-sev-critical",
|
|
21
|
+
children: "Bug"
|
|
22
|
+
})] })]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** Full class names (not built from parts) so Tailwind keeps them. */
|
|
26
|
+
var TONE = {
|
|
27
|
+
critical: {
|
|
28
|
+
surface: "bg-level-critical-bg text-level-critical-fg border-level-critical-edge",
|
|
29
|
+
edge: "border-level-critical-edge",
|
|
30
|
+
text: "text-level-critical-fg"
|
|
31
|
+
},
|
|
32
|
+
high: {
|
|
33
|
+
surface: "bg-level-high-bg text-level-high-fg border-level-high-edge",
|
|
34
|
+
edge: "border-level-high-edge",
|
|
35
|
+
text: "text-level-high-fg"
|
|
36
|
+
},
|
|
37
|
+
medium: {
|
|
38
|
+
surface: "bg-level-medium-bg text-level-medium-fg border-level-medium-edge",
|
|
39
|
+
edge: "border-level-medium-edge",
|
|
40
|
+
text: "text-level-medium-fg"
|
|
41
|
+
},
|
|
42
|
+
low: {
|
|
43
|
+
surface: "bg-level-low-bg text-level-low-fg border-level-low-edge",
|
|
44
|
+
edge: "border-level-low-edge",
|
|
45
|
+
text: "text-level-low-fg"
|
|
46
|
+
},
|
|
47
|
+
healthy: {
|
|
48
|
+
surface: "bg-level-healthy-bg text-level-healthy-fg border-level-healthy-edge",
|
|
49
|
+
edge: "border-level-healthy-edge",
|
|
50
|
+
text: "text-level-healthy-fg"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/** A level's classes: `surface` fills a box (background, text, edge), `edge` and `text` colour one part. */
|
|
54
|
+
var toneClass = (level, part) => TONE[level][part];
|
|
55
|
+
/** An issue's level, in words and colour. */
|
|
56
|
+
function LevelBadge({ level }) {
|
|
57
|
+
return /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: `inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-semibold ${TONE[level].surface}`,
|
|
59
|
+
title: SEVERITY_INFO[level].description,
|
|
60
|
+
children: SEVERITY_INFO[level].name
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A row in a list ranked by level: a coloured block with the level in words (and, say, the
|
|
65
|
+
* customers affected), then the row's content. The block sits on top at phone width.
|
|
66
|
+
*/
|
|
67
|
+
function LevelRow({ level, aside, children }) {
|
|
68
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: `flex flex-col overflow-hidden rounded-xl border bg-panel sm:flex-row ${TONE[level].edge}`,
|
|
70
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: `flex shrink-0 flex-row items-center justify-between gap-2 px-3 py-2 sm:w-28 sm:flex-col sm:justify-center sm:py-3 sm:text-center ${TONE[level].surface}`,
|
|
72
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
73
|
+
className: "text-sm",
|
|
74
|
+
children: levelName(level)
|
|
75
|
+
}), aside && /* @__PURE__ */ jsx("span", {
|
|
76
|
+
className: "text-xs",
|
|
77
|
+
children: aside
|
|
78
|
+
})]
|
|
79
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: "min-w-0 flex-1 p-3 sm:p-4",
|
|
81
|
+
children
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** A level's name, healthy included. */
|
|
86
|
+
var levelName = (level) => level === "healthy" ? "Healthy" : SEVERITY_INFO[level].name;
|
|
87
|
+
/**
|
|
88
|
+
* A box on the health wall: the whole box in its level's colour, so the wall reads at a glance.
|
|
89
|
+
* The whole box is a link one level down, and looks it (arrow, lift on hover, focus ring). A
|
|
90
|
+
* critical one still failing in the last hour pulses; any still failing says so.
|
|
91
|
+
*/
|
|
92
|
+
function HealthBox({ level, name, side, outage, headline, measure, live, lastFailure, link, big, now }) {
|
|
93
|
+
return /* @__PURE__ */ jsxs(Link, {
|
|
94
|
+
...link,
|
|
95
|
+
style: { "--alarm": `var(--level-${level}-edge)` },
|
|
96
|
+
"aria-label": `${name}${side ? `, ${side}` : ""}: ${levelName(level)}. ${outage ? `${outage}. ` : ""}${headline ? `${headline}. ` : ""}${measure}.${live ? " Still happening." : ""}`,
|
|
97
|
+
className: `group relative flex h-full flex-col gap-1.5 rounded-xl border-2 p-4 pr-10 transition hover:-translate-y-0.5 hover:shadow-lg hover:brightness-110 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${TONE[level].surface} ${live && level === "critical" ? "level-alarm" : ""}`,
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsxs("span", {
|
|
100
|
+
className: "flex flex-wrap items-center gap-2 text-[11px] font-bold uppercase tracking-wide",
|
|
101
|
+
children: [
|
|
102
|
+
levelName(level),
|
|
103
|
+
live && /* @__PURE__ */ jsxs("span", {
|
|
104
|
+
className: "inline-flex items-center gap-1 normal-case",
|
|
105
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
106
|
+
className: "relative flex h-2 w-2",
|
|
107
|
+
"aria-hidden": true,
|
|
108
|
+
children: [/* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full rounded-full bg-current opacity-75 motion-safe:animate-ping" }), /* @__PURE__ */ jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-current" })]
|
|
109
|
+
}), "Still happening"]
|
|
110
|
+
}),
|
|
111
|
+
side && /* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "rounded-full border border-current px-1.5 py-px normal-case opacity-90",
|
|
113
|
+
children: side
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsx("strong", {
|
|
118
|
+
className: `break-words leading-tight ${big ? "text-2xl" : "text-lg"}`,
|
|
119
|
+
children: name
|
|
120
|
+
}),
|
|
121
|
+
outage && /* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: "break-words text-sm font-semibold",
|
|
123
|
+
children: outage
|
|
124
|
+
}),
|
|
125
|
+
headline && /* @__PURE__ */ jsx("span", {
|
|
126
|
+
className: `break-words font-mono ${big ? "text-sm" : "line-clamp-2 text-xs"}`,
|
|
127
|
+
children: headline
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ jsxs("span", {
|
|
130
|
+
className: "tabular mt-auto pt-1 text-xs opacity-90",
|
|
131
|
+
children: [measure, lastFailure && level !== "healthy" ? ` · last ${timeAgo(lastFailure, now)}` : ""]
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ jsx("span", {
|
|
134
|
+
"aria-hidden": true,
|
|
135
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-xl opacity-60 transition group-hover:translate-x-0.5 group-hover:opacity-100",
|
|
136
|
+
children: "→"
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function Card({ title, subtitle, children, right }) {
|
|
142
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
143
|
+
className: "min-w-0 rounded-xl border border-line bg-panel p-4 sm:p-5",
|
|
144
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
145
|
+
className: "mb-3 flex items-start justify-between gap-3",
|
|
146
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
|
|
147
|
+
className: "text-sm font-semibold",
|
|
148
|
+
children: title
|
|
149
|
+
}), subtitle && /* @__PURE__ */ jsx("p", {
|
|
150
|
+
className: "mt-0.5 text-xs text-muted",
|
|
151
|
+
children: subtitle
|
|
152
|
+
})] }), right]
|
|
153
|
+
}), children]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function Stat({ label, value, hint, tone }) {
|
|
157
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
158
|
+
className: "rounded-xl border border-line bg-panel p-4",
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: "text-xs text-muted",
|
|
162
|
+
children: label
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx("div", {
|
|
165
|
+
className: `tabular mt-1 text-2xl font-semibold ${tone === "critical" ? "text-sev-critical" : tone === "high" ? "text-sev-high" : "text-ink"}`,
|
|
166
|
+
children: value
|
|
167
|
+
}),
|
|
168
|
+
hint && /* @__PURE__ */ jsx("div", {
|
|
169
|
+
className: "mt-1 text-xs text-muted",
|
|
170
|
+
children: hint
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/** Collapsible table with the exact numbers behind a chart. */
|
|
176
|
+
function DataTable({ columns, rows }) {
|
|
177
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
178
|
+
className: "mt-3 text-xs",
|
|
179
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
180
|
+
className: "cursor-pointer text-muted hover:text-ink",
|
|
181
|
+
children: "View data"
|
|
182
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
183
|
+
className: "mt-2 max-h-64 overflow-auto rounded-md border border-line",
|
|
184
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
185
|
+
className: "tabular w-full text-left",
|
|
186
|
+
children: [/* @__PURE__ */ jsx("thead", {
|
|
187
|
+
className: "sticky top-0 bg-panel-2",
|
|
188
|
+
children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsx("th", {
|
|
189
|
+
className: "px-2 py-1 font-medium",
|
|
190
|
+
children: c
|
|
191
|
+
}, c)) })
|
|
192
|
+
}), /* @__PURE__ */ jsx("tbody", { children: rows.map((r, i) => /* @__PURE__ */ jsx("tr", {
|
|
193
|
+
className: "border-t border-line",
|
|
194
|
+
children: r.map((v, j) => /* @__PURE__ */ jsx("td", {
|
|
195
|
+
className: "px-2 py-1",
|
|
196
|
+
children: v
|
|
197
|
+
}, j))
|
|
198
|
+
}, i)) })]
|
|
199
|
+
})
|
|
200
|
+
})]
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Horizontal share bars — used for small categorical breakdowns where a full chart is overkill.
|
|
205
|
+
* With onSelect, each row is a button that toggles a filter; `selected` marks the active one.
|
|
206
|
+
*/
|
|
207
|
+
function ShareBars({ rows, total, onSelect, selected }) {
|
|
208
|
+
const sum = total ?? rows.reduce((a, r) => a + r.value, 0);
|
|
209
|
+
if (!rows.length) return /* @__PURE__ */ jsx("p", {
|
|
210
|
+
className: "text-xs text-muted",
|
|
211
|
+
children: "No data."
|
|
212
|
+
});
|
|
213
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
214
|
+
className: "space-y-2",
|
|
215
|
+
children: rows.map((r) => {
|
|
216
|
+
const share = sum ? r.value / sum : 0;
|
|
217
|
+
const on = selected === r.key;
|
|
218
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
219
|
+
className: "flex justify-between gap-2 text-xs",
|
|
220
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
221
|
+
className: `truncate ${on ? "font-semibold text-accent" : ""}`,
|
|
222
|
+
title: r.label ? r.key : void 0,
|
|
223
|
+
children: r.label ?? r.key
|
|
224
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
225
|
+
className: "tabular shrink-0 text-muted",
|
|
226
|
+
children: [
|
|
227
|
+
r.value.toLocaleString(),
|
|
228
|
+
" · ",
|
|
229
|
+
Math.round(share * 100),
|
|
230
|
+
"%"
|
|
231
|
+
]
|
|
232
|
+
})]
|
|
233
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
234
|
+
className: "mt-1 h-1.5 rounded-full bg-panel-2",
|
|
235
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
236
|
+
className: `h-1.5 rounded-full ${on ? "bg-accent" : "bg-[var(--chart-errors)]"}`,
|
|
237
|
+
style: { width: `${Math.max(2, share * 100)}%` }
|
|
238
|
+
})
|
|
239
|
+
})] });
|
|
240
|
+
return /* @__PURE__ */ jsx("li", { children: onSelect ? /* @__PURE__ */ jsx("button", {
|
|
241
|
+
type: "button",
|
|
242
|
+
"aria-pressed": on,
|
|
243
|
+
onClick: () => onSelect(r.key),
|
|
244
|
+
className: "-mx-1 block w-[calc(100%+0.5rem)] rounded px-1 py-0.5 text-left hover:bg-panel-2",
|
|
245
|
+
children: body
|
|
246
|
+
}) : body }, r.key);
|
|
247
|
+
})
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/** A small chip under an issue's title. */
|
|
251
|
+
var CHIP = "mt-1 mr-1 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide";
|
|
252
|
+
function timeAgo(iso, now = Date.now()) {
|
|
253
|
+
const s = Math.max(0, Math.round((now - Date.parse(iso)) / 1e3));
|
|
254
|
+
if (s < 60) return `${s}s ago`;
|
|
255
|
+
if (s < 3600) return `${Math.round(s / 60)}m ago`;
|
|
256
|
+
if (s < 86400) return `${Math.round(s / 3600)}h ago`;
|
|
257
|
+
return `${Math.round(s / 86400)}d ago`;
|
|
258
|
+
}
|
|
259
|
+
/** Small labels under an issue: regressed, new in the latest release, resolved, ignored. */
|
|
260
|
+
function IssueLabels({ issue }) {
|
|
261
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
262
|
+
issue.test && /* @__PURE__ */ jsx("span", {
|
|
263
|
+
className: `${CHIP} border border-line text-muted`,
|
|
264
|
+
title: "Made on purpose to test deBug (tag test=true). Never counted.",
|
|
265
|
+
children: "Test error"
|
|
266
|
+
}),
|
|
267
|
+
issue.status === "regressed" && /* @__PURE__ */ jsxs("span", {
|
|
268
|
+
className: `${CHIP} bg-sev-critical text-white`,
|
|
269
|
+
children: ["Regressed", issue.resolvedIn ? ` after ${issue.resolvedIn}` : ""]
|
|
270
|
+
}),
|
|
271
|
+
issue.newInLatest && /* @__PURE__ */ jsxs("span", {
|
|
272
|
+
className: `${CHIP} bg-accent-soft text-accent`,
|
|
273
|
+
children: ["New in ", issue.firstVersion]
|
|
274
|
+
}),
|
|
275
|
+
issue.status === "resolved" && /* @__PURE__ */ jsxs("span", {
|
|
276
|
+
className: `${CHIP} border border-line text-muted`,
|
|
277
|
+
children: ["Resolved", issue.resolvedIn ? ` in ${issue.resolvedIn}` : ""]
|
|
278
|
+
}),
|
|
279
|
+
issue.status === "ignored" && /* @__PURE__ */ jsx("span", {
|
|
280
|
+
className: `${CHIP} border border-line text-muted`,
|
|
281
|
+
children: "Ignored"
|
|
282
|
+
})
|
|
283
|
+
] });
|
|
284
|
+
}
|
|
285
|
+
/** Label/value rows; empty values are left out. */
|
|
286
|
+
function Facts({ rows, mono }) {
|
|
287
|
+
const shown = rows.filter(([, v]) => v !== void 0 && v !== "");
|
|
288
|
+
return /* @__PURE__ */ jsx("dl", {
|
|
289
|
+
className: "grid grid-cols-[minmax(6rem,auto)_1fr] gap-x-4 gap-y-1.5 text-sm",
|
|
290
|
+
children: shown.map(([k, v]) => /* @__PURE__ */ jsxs("div", {
|
|
291
|
+
className: "contents",
|
|
292
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
293
|
+
className: `text-muted ${mono ? "break-all font-mono text-xs" : ""}`,
|
|
294
|
+
children: k
|
|
295
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
296
|
+
className: `min-w-0 break-words ${mono ? "font-mono text-xs" : ""}`,
|
|
297
|
+
children: v
|
|
298
|
+
})]
|
|
299
|
+
}, k))
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
export { HealthBox as a, LevelRow as c, Stat as d, levelName as f, Facts as i, Logo as l, toneClass as m, Card as n, IssueLabels as o, timeAgo as p, DataTable as r, LevelBadge as s, AppOptions as t, ShareBars as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as getVersionStatus } from "./fns-BcVGbSID.js";
|
|
2
2
|
import { t as CopyButton } from "./copy-button-D3RddzTw.js";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as parseVersion, r as compareVersions } from "./memory-
|
|
2
|
-
import "./src-
|
|
1
|
+
import { a as parseVersion, r as compareVersions } from "./memory-CZBUh1Zc.js";
|
|
2
|
+
import "./src-B2GKPQyN.js";
|
|
3
3
|
// package.json
|
|
4
|
-
var version = "0.
|
|
4
|
+
var version = "0.10.0";
|
|
5
5
|
// src/server/versions.ts
|
|
6
6
|
/**
|
|
7
7
|
* How far apart two versions are: "minor" when they differ in major or minor, "patch" when only
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as config } from "./config-Bp8m0B8q.js";
|
|
2
|
+
import { t as buildEndpoints } from "./endpoints-8N389Poe.js";
|
|
3
|
+
import { r as buildSummary } from "./queries-wha4cZbw.js";
|
|
4
|
+
// src/server/warm.ts
|
|
5
|
+
/**
|
|
6
|
+
* Fills the store cache with what the home page reads (the summary and the endpoints for the
|
|
7
|
+
* first app, over the default period), in the background as the server starts. Nothing waits on
|
|
8
|
+
* it and a failure is ignored: the page reads for itself.
|
|
9
|
+
*/
|
|
10
|
+
async function warmUp(store, now = Date.now()) {
|
|
11
|
+
const app = (await store.listApps())[0];
|
|
12
|
+
if (!app) return;
|
|
13
|
+
const opts = { retentionDays: config().retentionDays };
|
|
14
|
+
await Promise.all([buildEndpoints(store, app, now, opts), buildSummary(store, app, config().severity, now, opts)]);
|
|
15
|
+
}
|
|
16
|
+
export { warmUp };
|
package/dist/server/server.js
CHANGED
|
@@ -4485,7 +4485,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
|
|
|
4485
4485
|
* the dev styles URL for route-scoped CSS collection.
|
|
4486
4486
|
*/
|
|
4487
4487
|
async function getStartManifest(matchedRoutes) {
|
|
4488
|
-
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-
|
|
4488
|
+
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-C4dQ3MxD.js");
|
|
4489
4489
|
const startManifest = tsrStartManifest();
|
|
4490
4490
|
let routes = startManifest.routes;
|
|
4491
4491
|
routes[rootRouteId];
|
|
@@ -4508,99 +4508,107 @@ async function getStartManifest(matchedRoutes) {
|
|
|
4508
4508
|
var manifest = {
|
|
4509
4509
|
"0c2f8fcb35c5e356e4a58fce376bb16efb0e006f519592fdd5f120fa868720cd": {
|
|
4510
4510
|
functionName: "saveRetention_createServerFn_handler",
|
|
4511
|
-
importer: () => import("./assets/fns-
|
|
4511
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4512
4512
|
},
|
|
4513
4513
|
"0dcf3aa141898f7bb0cefed3e6129613f6226a680cc800b8cb18d2c60b7706fa": {
|
|
4514
4514
|
functionName: "inviteToTeam_createServerFn_handler",
|
|
4515
|
-
importer: () => import("./assets/fns-
|
|
4515
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4516
4516
|
},
|
|
4517
4517
|
"1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f": {
|
|
4518
4518
|
functionName: "getSessionUser_createServerFn_handler",
|
|
4519
|
-
importer: () => import("./assets/fns-
|
|
4519
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4520
4520
|
},
|
|
4521
4521
|
"2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220": {
|
|
4522
4522
|
functionName: "joinTeam_createServerFn_handler",
|
|
4523
|
-
importer: () => import("./assets/fns-
|
|
4523
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4524
4524
|
},
|
|
4525
4525
|
"2727b9721f5d291dbb62652d2de5cff55fd7871756147d8ce441b03a7a494617": {
|
|
4526
4526
|
functionName: "removeFromTeam_createServerFn_handler",
|
|
4527
|
-
importer: () => import("./assets/fns-
|
|
4527
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4528
|
+
},
|
|
4529
|
+
"4f05eccbec2dfe6e5477f43b46368306bcb812e59bc1084627f631905366e1cf": {
|
|
4530
|
+
functionName: "refreshData_createServerFn_handler",
|
|
4531
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4528
4532
|
},
|
|
4529
4533
|
"51bfd02b4d1772943ec480c2dcd7b445826bcfa7d494453d269cc82644ea2a42": {
|
|
4530
4534
|
functionName: "setMemberRole_createServerFn_handler",
|
|
4531
|
-
importer: () => import("./assets/fns-
|
|
4535
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4532
4536
|
},
|
|
4533
4537
|
"54a67fa946c48ef3e3aaa27c8b323c380b12a14879a00a9567f52e31c358a0ed": {
|
|
4534
4538
|
functionName: "findCustomer_createServerFn_handler",
|
|
4535
|
-
importer: () => import("./assets/fns-
|
|
4539
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4536
4540
|
},
|
|
4537
4541
|
"7028d75aed3e58a91f5f26a3821d0cec6bb478a913058f5aa73cbfb64bbc41d3": {
|
|
4538
4542
|
functionName: "sendTestAlert_createServerFn_handler",
|
|
4539
|
-
importer: () => import("./assets/fns-
|
|
4543
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4540
4544
|
},
|
|
4541
4545
|
"86933afdbcaa1be4a0aa07c4f8e690fdd684edbeab02a49ffdb73e85cadf9933": {
|
|
4542
4546
|
functionName: "getIssueDetail_createServerFn_handler",
|
|
4543
|
-
importer: () => import("./assets/fns-
|
|
4547
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4544
4548
|
},
|
|
4545
4549
|
"8ade0e7bba4102fdb7cbe0494762fbb0d01a480c84a69f325fc76686a0dc0237": {
|
|
4546
4550
|
functionName: "getEndpoints_createServerFn_handler",
|
|
4547
|
-
importer: () => import("./assets/fns-
|
|
4551
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4548
4552
|
},
|
|
4549
4553
|
"8e8646e3fd8b630ba5696313fb01543dc62410ff8fa9b1eea9763286d32c8927": {
|
|
4550
4554
|
functionName: "getInvite_createServerFn_handler",
|
|
4551
|
-
importer: () => import("./assets/fns-
|
|
4555
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4552
4556
|
},
|
|
4553
4557
|
"8fc5d548afdc47f30ea4f9fab6f96cf926fd407c0b80ea68c796b6de7e606a4e": {
|
|
4554
4558
|
functionName: "getEventDetail_createServerFn_handler",
|
|
4555
|
-
importer: () => import("./assets/fns-
|
|
4559
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4556
4560
|
},
|
|
4557
4561
|
"8ff7e08627330b1c64257ee12b7ed04815853cb3735a9324805c0bcf149bae9f": {
|
|
4558
4562
|
functionName: "getTeam_createServerFn_handler",
|
|
4559
|
-
importer: () => import("./assets/fns-
|
|
4560
|
-
},
|
|
4561
|
-
"9354c2231554471ec5cde4e9a07b2e32662a8ce0bf29b09b5b930359d374f862": {
|
|
4562
|
-
functionName: "getOverview_createServerFn_handler",
|
|
4563
|
-
importer: () => import("./assets/fns-CVbk8Gf9.js")
|
|
4563
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4564
4564
|
},
|
|
4565
4565
|
"949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1": {
|
|
4566
4566
|
functionName: "getLoginInfo_createServerFn_handler",
|
|
4567
|
-
importer: () => import("./assets/fns-
|
|
4567
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4568
4568
|
},
|
|
4569
4569
|
"950c0a9412e17ae8308bccd862dee5faea0375153c5ce59491a033dbcb7e7181": {
|
|
4570
4570
|
functionName: "saveAppSettings_createServerFn_handler",
|
|
4571
|
-
importer: () => import("./assets/fns-
|
|
4571
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4572
4572
|
},
|
|
4573
4573
|
"a1b47d616a31acc3132c1bb8258bde961d9c419ff91b2ce1d6479ebb9760b393": {
|
|
4574
4574
|
functionName: "restampExisting_createServerFn_handler",
|
|
4575
|
-
importer: () => import("./assets/fns-
|
|
4575
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4576
4576
|
},
|
|
4577
4577
|
"a4d3bc63ce8ef43aeb81dfb47c631fe47d634d298109d6b5865742aff7363696": {
|
|
4578
4578
|
functionName: "getSessionDetail_createServerFn_handler",
|
|
4579
|
-
importer: () => import("./assets/fns-
|
|
4579
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4580
4580
|
},
|
|
4581
4581
|
"a9edf8f42685a06ce282bb7c9f888e3ae39636f350a90750c31a47b27de7dca8": {
|
|
4582
4582
|
functionName: "login_createServerFn_handler",
|
|
4583
|
-
importer: () => import("./assets/fns-
|
|
4583
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4584
4584
|
},
|
|
4585
4585
|
"b4629be951e5766734fb72f9e1400c19f585a4381d9172539b2512ae5056f4e8": {
|
|
4586
4586
|
functionName: "cancelInvite_createServerFn_handler",
|
|
4587
|
-
importer: () => import("./assets/fns-
|
|
4587
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4588
|
+
},
|
|
4589
|
+
"c070aa6e848a86610db68e1835bacf10a87e00e6d58cbf8df2b533e14fe95b7b": {
|
|
4590
|
+
functionName: "getAppCode_createServerFn_handler",
|
|
4591
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4588
4592
|
},
|
|
4589
4593
|
"c263ee8bf14396211aeb95bc2b2aec914480b38cc99a9024c1319f932f590f2f": {
|
|
4590
4594
|
functionName: "updateIssueStatus_createServerFn_handler",
|
|
4591
|
-
importer: () => import("./assets/fns-
|
|
4595
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4592
4596
|
},
|
|
4593
4597
|
"c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2": {
|
|
4594
4598
|
functionName: "getVersionStatus_createServerFn_handler",
|
|
4595
|
-
importer: () => import("./assets/fns-
|
|
4599
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4600
|
+
},
|
|
4601
|
+
"e4bd743644d2eb6b2abc17f991555672e3e18eef87fa6328ad519266e5340ee2": {
|
|
4602
|
+
functionName: "getHealth_createServerFn_handler",
|
|
4603
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4596
4604
|
},
|
|
4597
4605
|
"e97a9c2b8715ff5e25a9629262b594fb42f11853d6eea78b87305fd0b5155d4d": {
|
|
4598
4606
|
functionName: "getSettings_createServerFn_handler",
|
|
4599
|
-
importer: () => import("./assets/fns-
|
|
4607
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4600
4608
|
},
|
|
4601
4609
|
"fd40d9026eb7d8fb5ab200daaed9a58f1d7b4eaf5b1ccab3e4cef9b0fedd9bc4": {
|
|
4602
4610
|
functionName: "logout_createServerFn_handler",
|
|
4603
|
-
importer: () => import("./assets/fns-
|
|
4611
|
+
importer: () => import("./assets/fns-DE03YExD.js")
|
|
4604
4612
|
}
|
|
4605
4613
|
};
|
|
4606
4614
|
async function getServerFnById(id, access) {
|
|
@@ -7332,7 +7340,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
7332
7340
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
7333
7341
|
async function loadEntries() {
|
|
7334
7342
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
7335
|
-
import("./assets/router-
|
|
7343
|
+
import("./assets/router-BXkzR89j.js").then((n) => n.t),
|
|
7336
7344
|
import("./assets/start-t09PGpZL.js"),
|
|
7337
7345
|
import("./assets/empty-plugin-adapters-BsRz-CQL.js")
|
|
7338
7346
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debugkit/dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The self-hosted deBug dashboard. Run it with npx debugkit dashboard, or npx @debugkit/dashboard with your own settings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"tailwindcss": "^4.3.5",
|
|
29
29
|
"vite": "^8.3.7",
|
|
30
30
|
"@tanstack/react-start": "^1.169.5",
|
|
31
|
-
"@debugkit/
|
|
32
|
-
"@debugkit/schema": "0.
|
|
33
|
-
"@debugkit/
|
|
31
|
+
"@debugkit/adapters": "0.10.0",
|
|
32
|
+
"@debugkit/schema": "0.10.0",
|
|
33
|
+
"@debugkit/ingest": "0.10.0"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=20.12"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,P as t,V as n,z as r}from"./src-BKSiJUs3.js";import{b as i,y as a}from"./index-COHr_cc3.js";import{a as o}from"./ui-CaEZB1j2.js";import{n as s}from"./version-banner-VFvyqbPh.js";var c=n();function l(){let{user:n}=a.useRouteContext(),l=r();return(0,c.jsxs)(`div`,{className:`min-h-screen`,children:[(0,c.jsx)(`header`,{className:`sticky top-0 z-10 border-b border-line bg-bg/90 backdrop-blur`,children:(0,c.jsxs)(`div`,{className:`mx-auto flex max-w-7xl flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 py-3 sm:px-6`,children:[(0,c.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-5 gap-y-2`,children:[(0,c.jsx)(t,{to:`/`,search:{},className:`shrink-0`,children:(0,c.jsx)(o,{})}),(0,c.jsxs)(`nav`,{className:`flex items-center gap-3 text-sm`,"aria-label":`Main`,children:[(0,c.jsx)(t,{to:`/`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},activeOptions:{exact:!0},children:`Overview`}),(0,c.jsx)(t,{to:`/endpoints`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Endpoints`}),(0,c.jsx)(t,{to:`/customers`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Customers`}),(0,c.jsx)(t,{to:`/settings`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Settings`}),(0,c.jsx)(t,{to:`/team`,className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Team`})]})]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,c.jsxs)(`span`,{className:`hidden text-muted sm:inline`,children:[n.email,` · `,n.role]}),(0,c.jsx)(`button`,{className:`rounded-md border border-line px-2.5 py-1 hover:bg-panel-2`,onClick:async()=>{await e(),await l.invalidate(),await l.navigate({to:`/login`})},children:`Sign out`})]})]})}),(0,c.jsx)(s,{}),(0,c.jsx)(i,{})]})}export{l as component};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{F as e,P as t,V as n,st as r,ut as i,z as a}from"./src-BKSiJUs3.js";import{r as o,t as s}from"./charts--S1o8iId.js";import{c,i as l,l as u,n as d,o as f,r as p,s as m,t as h}from"./ui-CaEZB1j2.js";import{_ as g,d as _,f as v,g as y,h as b,l as x,m as S,p as C,u as w}from"./index-COHr_cc3.js";var T=i(r()),E=n(),D=(e,t)=>v[e].info[t]?.name??t;function O(){let n=x.useLoaderData(),r=x.useSearch(),{flow:i}=r,a=e({from:x.fullPath});if(!n)return(0,E.jsx)(N,{});let{totals:T,range:O}=n,M=O.preset===`custom`?`range`:O.preset,F={app:n.app,range:O.preset===`14d`?void 0:O.preset,...O.preset===`custom`?{from:O.from,to:O.to}:{}},I=r.status??`open`,L={status:I,flow:i,category:r.category,owner:r.owner,impact:r.impact},R=y(n.issues,L),z=e=>y(n.issues,{...L,status:e}).length,B=C.filter(e=>L[e]),V=(e,t)=>a({search:n=>({...n,[e]:n[e]===t?void 0:t}),resetScroll:!1}),H=B.length&&!L.owner?[...g(n.issues,L,`owner`)].sort((e,t)=>t[1]-e[1]):[],U=R.length===0&&I!==`all`?z(`all`):0,W=B.length?`Issues: ${B.map(e=>D(e,L[e])).join(` · `)}${i?` in ${i}`:``}`:i?`Issues in ${i}`:`Issues by severity`,G=T.changePct;return(0,E.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:[`Overview · `,O.label]}),(0,E.jsxs)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:[`What's going wrong in `,n.app]})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,E.jsx)(w,{value:O,today:n.generatedAt.slice(0,10),onChange:e=>a({search:t=>({...t,...e})})},`${O.preset}${O.from}${O.to}`),n.apps.length>1&&(0,E.jsx)(`select`,{"aria-label":`App`,value:n.app,onChange:e=>a({search:t=>({...t,app:e.target.value,flow:void 0})}),className:`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,children:n.apps.map(e=>(0,E.jsx)(`option`,{children:e},e))})]})]}),(0,E.jsx)(_,{rangeFrom:O.from,retention:n.retention}),(0,E.jsx)(`section`,{"aria-label":`Summary`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:(0,E.jsx)(`ul`,{className:`space-y-1.5 text-[15px] leading-relaxed`,children:n.narrative.map((e,t)=>(0,E.jsx)(`li`,{className:t===0?`font-medium`:`text-ink/90`,children:e},t))})}),(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,E.jsx)(c,{label:`Errors (${M})`,value:T.errorsRange.toLocaleString(),tone:T.criticalIssues?`critical`:void 0,hint:G===null?`not enough earlier data to compare`:G>500?`▲ from ${T.errorsPrev.toLocaleString()} in the previous ${O.span}`:`${G>0?`▲`:G<0?`▼`:`•`} ${Math.abs(G)}% vs previous ${O.span}`}),(0,E.jsx)(c,{label:`Critical issues`,value:T.criticalIssues,tone:T.criticalIssues?`critical`:void 0,hint:`≥ threshold occurrences in 24h`}),(0,E.jsx)(c,{label:`Crash-free users (${M})`,value:k(n.health.crashFreeUsersRate),tone:n.health.crashFreeUsersRate!==null&&n.health.crashFreeUsersRate<.99?`high`:void 0,hint:`${n.health.users.toLocaleString()} users · ${n.health.crashedUsers.toLocaleString()} crashed`}),(0,E.jsx)(c,{label:`Crash-free sessions (${M})`,value:k(n.health.crashFreeRate),tone:n.health.crashFreeRate!==null&&n.health.crashFreeRate<.99?`high`:void 0,hint:`${n.health.sessionsRange.toLocaleString()} sessions · ${T.activeIssues} active issues`})]}),(0,E.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-5`,children:[(0,E.jsx)(`div`,{className:`min-w-0 lg:col-span-3`,children:(0,E.jsxs)(h,{title:`Where the app is failing`,subtitle:`Errors in ${O.label} by flow, coloured by worst severity. Click a bar to filter issues.`,children:[(0,E.jsx)(s,{data:n.flows,onSelect:e=>a({search:t=>({...t,flow:t.flow===e?void 0:e}),resetScroll:!1})}),(0,E.jsx)(d,{columns:[`Flow`,`Severity`,`Errors 24h`,`Errors (${M})`,`Issues`,`Failure rate (${M})`],rows:n.flows.map(e=>[e.critical?`${e.flow} (critical)`:e.flow,e.severity,e.errors24h,e.errorsRange,e.issues,e.failureRate===null?`—`:`${Math.round(e.failureRate*100)}%`])})]})}),(0,E.jsx)(`div`,{className:`min-w-0 lg:col-span-2`,children:(0,E.jsxs)(h,{title:`Error trend`,subtitle:`Errors per ${O.granularity}, ${O.label} (UTC)`,children:[(0,E.jsx)(o,{data:n.trend,markers:n.releases.map(e=>({day:e.firstDay,label:e.release}))}),n.releases.length>0&&(0,E.jsxs)(`p`,{className:`mt-2 text-xs text-muted`,children:[`Dashed lines: a release's first sessions (`,n.releases.map(e=>e.release).join(`, `),`).`]}),(0,E.jsx)(d,{columns:[`Day`,`Errors`,`Events`],rows:n.trend.map(e=>[e.day,e.errors,e.events])})]})})]}),(0,E.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,E.jsx)(h,{title:`Release health`,subtitle:`Share of sessions without a crash or unhandled error, per app version, in ${O.label}. Recorded automatically by the SDK.`,children:n.health.releases.length?(0,E.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,E.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,E.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,E.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Version`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Sessions`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Crash-free`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Error-free`})]})}),(0,E.jsx)(`tbody`,{children:n.health.releases.map(e=>(0,E.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,E.jsx)(`td`,{className:`px-4 py-2 font-medium sm:px-2`,children:e.version}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:e.sessions.toLocaleString()}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right font-semibold ${A(e.crashFreeRate)}`,children:k(e.crashFreeRate)}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right`,children:k(e.errorFreeRate)})]},e.version))})]})}):(0,E.jsx)(`p`,{className:`text-sm text-muted`,children:`No sessions yet. They're recorded automatically from SDK 0.2.`})}),(0,E.jsx)(h,{title:`Failing endpoints`,subtitle:`Requests that returned 5xx, timed out or failed in ${O.label}. Captured automatically from fetch and XHR.`,children:n.health.endpoints.length?(0,E.jsx)(m,{rows:n.health.endpoints.map(e=>({key:e.endpoint,label:e.label,value:e.failuresRange}))}):(0,E.jsx)(`p`,{className:`text-sm text-muted`,children:`No failed requests.`})})]}),(n.steps.length>0||n.timings.length>0)&&(0,E.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[n.steps.length>0&&(0,E.jsx)(h,{title:`Steps that fail`,subtitle:`track() outcomes per step in ${O.label}, most failures first.${i?` Filtered to ${i}.`:``}`,children:(0,E.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,E.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,E.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,E.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Flow · step`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Tries`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failed`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failure rate`})]})}),(0,E.jsx)(`tbody`,{children:n.steps.filter(e=>!i||e.flow===i).slice(0,8).map(e=>(0,E.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,E.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs sm:px-2`,children:[e.flow,` · `,e.step]}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:(e.successes+e.failures).toLocaleString()}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right`,children:e.failures.toLocaleString()}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right font-semibold ${e.failureRate!==null&&e.failureRate>=.1?`text-sev-critical`:``}`,children:e.failureRate===null?`—`:`${Math.round(e.failureRate*100)}%`})]},`${e.flow}|${e.step}`))})]})})}),n.timings.length>0&&(0,E.jsxs)(h,{title:`Response times`,subtitle:`Busiest endpoints in ${O.label}. Measured by the SDK on real devices.`,children:[(0,E.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,E.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,E.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,E.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Endpoint`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Requests`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`p50`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`p95`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failed`})]})}),(0,E.jsx)(`tbody`,{children:n.timings.map(e=>(0,E.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,E.jsx)(`td`,{className:`max-w-[220px] truncate px-4 py-2 text-xs sm:px-2 ${e.label?``:`font-mono`}`,title:e.endpoint,children:e.label??e.endpoint}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:e.requests.toLocaleString()}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right`,children:P(e.p50)}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right font-semibold ${e.p95!==null&&e.p95>=3e3?`text-sev-high`:``}`,children:P(e.p95)}),(0,E.jsx)(`td`,{className:`px-2 py-2 text-right ${e.errorRate>=.05?`font-semibold text-sev-critical`:`text-muted`}`,children:`${(e.errorRate*100).toFixed(+(e.errorRate<.1))}%`})]},e.endpoint))})]})}),(0,E.jsx)(`p`,{className:`mt-2 text-xs text-muted`,children:`p50/p95: half / 95% of requests finished within this time.`})]})]}),!i&&n.incidents.some(e=>e.active)&&(0,E.jsx)(h,{title:`Incidents`,subtitle:`Issues that failed together for the same reason in ${O.label}, folded into one problem.`,children:(0,E.jsx)(`ul`,{className:`space-y-3`,children:n.incidents.filter(e=>e.active).map(e=>(0,E.jsxs)(`li`,{className:`rounded-lg border border-line p-3`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,E.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,E.jsxs)(`span`,{className:`text-xs text-muted`,children:[j(e.errors,`error`),` · `,j(e.issues.length,`issue`),` · `,e.users?j(e.users,`user`):`users —`,` · happened `,j(e.episodes,`time`)]})]}),(0,E.jsx)(`ul`,{className:`mt-2 space-y-1 text-sm`,children:e.issues.map(e=>(0,E.jsxs)(`li`,{className:`flex items-baseline justify-between gap-3`,children:[(0,E.jsx)(t,{to:`/issues/$fingerprint`,params:{fingerprint:e.fingerprint},search:F,className:`block min-w-0 truncate text-muted hover:text-accent`,children:e.title}),(0,E.jsx)(`span`,{className:`shrink-0 text-xs text-muted`,children:e.errors.toLocaleString()})]},e.fingerprint))})]},e.key))})}),n.breakdowns.impact.length>0&&(0,E.jsxs)(h,{title:`Who it hurts and whose it is`,subtitle:`Errors in ${O.label}, by how badly they hurt users, who likely fixes them, and what kind of problem. Click one to filter issues.`,children:[(0,E.jsx)(`div`,{className:`grid gap-5 md:grid-cols-3`,children:C.map(e=>(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-muted`,children:v[e].title}),(0,E.jsx)(m,{rows:n.breakdowns[e].map(t=>({key:t.key,label:D(e,t.key),value:t.errors})),selected:L[e],onSelect:t=>V(e,t)})]},e))}),(0,E.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`Bars count every error in the range, as labelled when it arrived, whatever its issue's status. The list below shows each issue's labels now, including host owners set in Settings since.`})]}),(0,E.jsxs)(h,{title:W,subtitle:`Grouped errors seen in ${O.label}. Severity is set by occurrences in the last 24 hours.`,right:(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 text-xs`,children:[i&&(0,E.jsx)(`button`,{type:`button`,className:`mr-2 text-accent`,onClick:()=>a({search:e=>({...e,flow:void 0}),resetScroll:!1}),children:`Clear flow ×`}),B.length>0&&(0,E.jsx)(`button`,{type:`button`,className:`mr-2 text-accent`,onClick:()=>a({search:e=>({...e,...S}),resetScroll:!1}),children:`Clear labels ×`}),b.map(e=>(0,E.jsxs)(`button`,{type:`button`,"aria-pressed":I===e,onClick:()=>a({search:t=>({...t,status:e===`open`?void 0:e}),resetScroll:!1}),className:`rounded-md border px-2 py-1 capitalize ${I===e?`border-accent bg-accent-soft text-accent`:`border-line text-muted hover:bg-panel-2`}`,children:[e,e!==`all`&&(0,E.jsx)(`span`,{className:`ml-1 opacity-70`,children:z(e)})]},e))]}),children:[(0,E.jsx)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:C.map(e=>{let t=g(n.issues,L,e);return(0,E.jsxs)(`select`,{"aria-label":`Filter by ${v[e].title.toLowerCase()}`,value:L[e]??``,onChange:t=>a({search:n=>({...n,[e]:t.target.value||void 0}),resetScroll:!1}),className:`rounded-md border bg-panel px-2 py-1 text-xs ${L[e]?`border-accent text-accent`:`border-line`}`,children:[(0,E.jsxs)(`option`,{value:``,children:[`Any `,v[e].title.toLowerCase()]}),Object.entries(v[e].info).filter(([n])=>t.has(n)||L[e]===n).map(([e,n])=>(0,E.jsxs)(`option`,{value:e,children:[n.name,` (`,t.get(e)??0,`)`]},e))]},e)})}),H.length>0&&(0,E.jsxs)(`p`,{className:`mb-3 text-sm`,children:[(0,E.jsx)(`span`,{className:`text-muted`,children:`Whose: `}),H.map(([e,t],n)=>(0,E.jsxs)(`span`,{children:[n>0&&`, `,(0,E.jsx)(`button`,{type:`button`,className:`text-accent hover:underline`,onClick:()=>V(`owner`,e),children:D(`owner`,e)}),` `,t]},e))]}),(0,E.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,E.jsxs)(`table`,{className:`tabular w-full min-w-[640px] text-left text-sm`,children:[(0,E.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,E.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Severity`}),(0,E.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Issue`}),(0,E.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Flow`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Users`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`24h`}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:M===`24h`?`Total`:M===`range`?`Range`:M}),(0,E.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Last seen`})]})}),(0,E.jsxs)(`tbody`,{children:[R.map(e=>(0,E.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-panel-2`,children:[(0,E.jsx)(`td`,{className:`px-4 py-2.5 sm:px-2`,children:(0,E.jsx)(f,{severity:e.severity})}),(0,E.jsxs)(`td`,{className:`max-w-[420px] px-2 py-2.5`,children:[(0,E.jsx)(t,{to:`/issues/$fingerprint`,params:{fingerprint:e.fingerprint},search:F,className:`block truncate font-medium hover:text-accent`,children:e.title}),e.culprit&&(0,E.jsx)(`div`,{className:`truncate font-mono text-xs text-muted`,children:e.culprit}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(l,{labels:e.labels}),(0,E.jsx)(p,{issue:e})]})]}),(0,E.jsx)(`td`,{className:`px-2 py-2.5 text-xs`,children:e.flow??(0,E.jsx)(`span`,{className:`text-muted`,children:`untagged`})}),(0,E.jsx)(`td`,{className:`px-2 py-2.5 text-right text-muted`,children:e.users??`—`}),(0,E.jsx)(`td`,{className:`px-2 py-2.5 text-right font-semibold`,children:e.count24h}),(0,E.jsx)(`td`,{className:`px-2 py-2.5 text-right text-muted`,children:M===`24h`?e.countTotal:e.countRange}),(0,E.jsx)(`td`,{className:`px-2 py-2.5 text-right text-xs text-muted`,children:u(e.lastSeen)})]},e.fingerprint)),!R.length&&(0,E.jsx)(`tr`,{children:(0,E.jsx)(`td`,{colSpan:7,className:`px-2 py-6 text-center text-muted`,children:U>0?(0,E.jsxs)(E.Fragment,{children:[`No `,I,` issues match.`,` `,(0,E.jsxs)(`button`,{type:`button`,className:`text-accent hover:underline`,onClick:()=>a({search:e=>({...e,status:`all`}),resetScroll:!1}),children:[`Show `,U,` in other statuses`]})]}):B.length||i?`No issues match these filters.`:`No issues.`})})]})]})})]}),(0,E.jsxs)(`div`,{className:`grid gap-5 md:grid-cols-3`,children:[(0,E.jsx)(h,{title:`By network`,subtitle:`Errors, ${O.label}`,children:(0,E.jsx)(m,{rows:n.breakdowns.network.map(e=>({key:e.key,value:e.errors}))})}),(0,E.jsx)(h,{title:`By country`,subtitle:`Errors, ${O.label}. From the device's timezone, not its IP.`,children:(0,E.jsx)(m,{rows:n.breakdowns.country.map(e=>({key:e.key,value:e.errors}))})}),(0,E.jsx)(h,{title:`By OS`,subtitle:`Errors, ${O.label}`,children:(0,E.jsx)(m,{rows:n.breakdowns.os.map(e=>({key:e.key,value:e.errors}))})}),(0,E.jsx)(h,{title:`By app version`,subtitle:`Errors, ${O.label}`,children:(0,E.jsx)(m,{rows:n.breakdowns.appVersion.map(e=>({key:e.key,value:e.errors}))})}),(0,E.jsx)(h,{title:`By device`,subtitle:`Errors, ${O.label}`,children:(0,E.jsx)(m,{rows:n.breakdowns.deviceModel.map(e=>({key:e.key,value:e.errors}))})})]}),(0,E.jsxs)(`p`,{className:`pb-6 text-xs text-muted`,children:[`Machine-readable: `,(0,E.jsxs)(`code`,{children:[`GET /api/summary?app=`,n.app]}),` returns this page as JSON with field descriptions.`]})]})}function k(e){return e===null?`—`:`${(Math.floor(e*1e3)/10).toFixed(1)}%`}function A(e){return e===null?``:e<.98?`text-sev-critical`:e<.995?`text-sev-high`:``}var j=(e,t)=>`${e.toLocaleString()} ${t}${e===1?``:`s`}`,M=[{title:`A written summary`,when:`after the first error`,detail:`How many errors in the last 24 hours, the worst part of the app, the top issue and the release that's struggling, in plain sentences.`},{title:`Incidents`,when:`when several errors share a cause`,detail:`Issues that failed together for the same reason, like every request failing right after the app reopens, shown as one problem with the issues inside it.`},{title:`Issues by severity`,when:`after the first error`,detail:`Errors grouped by cause. Severity comes from how often each happened in the last 24 hours. Open one for the stack trace and the steps that led to it.`},{title:`Release health`,when:`as soon as the app starts`,detail:`Every app launch is a session. You'll see the share of sessions per version that ran without a crash or an unhandled error.`},{title:`Failing endpoints`,when:`after the first failed request`,detail:`Requests that timed out, failed or returned 5xx, captured from fetch and XHR without any code from you.`},{title:`Where the app is failing`,when:`once you tag flows`,detail:`Errors by flow, like auth.login or checkout.payment. Wrap a step in deBug.track() and each flow also gets a failure rate.`},{title:`Breakdowns`,when:`after the first error`,detail:`Errors split by OS, app version and device model, so you can see who is affected.`}];function N(){let e=a();return(0,T.useEffect)(()=>{let t=setInterval(()=>void e.invalidate(),5e3);return()=>clearInterval(t)},[e]),(0,E.jsxs)(`main`,{className:`mx-auto max-w-4xl space-y-6 px-4 py-10 sm:px-6`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Connected · waiting for the first event`}),(0,E.jsx)(`h1`,{className:`mt-1 text-2xl font-semibold tracking-tight`,children:`Your dashboard is ready, and empty for now.`}),(0,E.jsxs)(`p`,{className:`mt-2 max-w-2xl text-sm text-muted`,children:[`Nothing has arrived yet. Run your app with the SDK initialised, or send a test event with `,(0,E.jsx)(`code`,{children:`npx debugkit test`}),` (or `,(0,E.jsx)(`code`,{children:`npx @debugkit/cli test`}),`). This page fills in on its own.`]})]}),(0,E.jsxs)(`section`,{"aria-labelledby":`see-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,E.jsx)(`h2`,{id:`see-h`,className:`text-sm font-semibold`,children:`What you'll see here`}),(0,E.jsx)(`ul`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:M.map(e=>(0,E.jsxs)(`li`,{className:`rounded-lg border border-line p-3`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,E.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,E.jsx)(`span`,{className:`text-[11px] uppercase tracking-wide text-muted`,children:e.when})]}),(0,E.jsx)(`p`,{className:`mt-1 text-sm text-ink/80`,children:e.detail})]},e.title))})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,E.jsxs)(`section`,{"aria-labelledby":`auto-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,E.jsx)(`h2`,{id:`auto-h`,className:`text-sm font-semibold`,children:`Recorded automatically`}),(0,E.jsxs)(`p`,{className:`mt-1 text-xs text-muted`,children:[`Once `,(0,E.jsx)(`code`,{children:`init()`}),` runs, with no other code.`]}),(0,E.jsxs)(`ul`,{className:`mt-3 list-disc space-y-1 pl-5 text-sm`,children:[(0,E.jsx)(`li`,{children:`Crashes and unhandled promise rejections`}),(0,E.jsx)(`li`,{children:`Failed, timed-out and 5xx requests, with the code that made them`}),(0,E.jsx)(`li`,{children:`Sessions, for crash-free rates per release`}),(0,E.jsx)(`li`,{children:`Screens visited, buttons clicked, console warnings, app backgrounded or offline`}),(0,E.jsx)(`li`,{children:`Device, OS, app version and network on every event`})]})]}),(0,E.jsxs)(`section`,{"aria-labelledby":`manual-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,E.jsx)(`h2`,{id:`manual-h`,className:`text-sm font-semibold`,children:`What you add`}),(0,E.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Only what the app can't know on its own.`}),(0,E.jsx)(`pre`,{className:`mt-3 overflow-x-auto rounded-md bg-panel-2 p-3 text-xs leading-relaxed`,children:`// in a try/catch you already have
|
|
2
|
-
catch (err) {
|
|
3
|
-
deBug.error(err, { flow: "checkout.payment", step: "charge" });
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
// success or failure of a step, plus the error
|
|
7
|
-
await deBug.track("auth.login", "submit_otp", () => verifyOtp(code));`})]})]})]})}function P(e){return e===null?`—`:Number.isFinite(e)?e>=1e3?`≤ ${(e/1e3).toFixed(e%1e3?1:0)} s`:`≤ ${e} ms`:`> 10 s`}export{O as component};
|