@debugkit/dashboard 0.7.0 → 0.9.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.
Files changed (62) hide show
  1. package/dist/client/assets/_authed-C29P68T-.js +1 -0
  2. package/dist/client/assets/_authed-D-dYbHoP.js +7 -0
  3. package/dist/client/assets/{charts-XyOWJI9T.js → charts--S1o8iId.js} +6 -6
  4. package/dist/client/assets/copy-button-BJkvWYRY.js +1 -0
  5. package/dist/client/assets/customers-Cwx5qEO1.js +1 -0
  6. package/dist/client/assets/endpoints-zz1TotR2.js +1 -0
  7. package/dist/client/assets/events._eventId-Bx6TfUjv.js +3 -0
  8. package/dist/client/assets/index-COHr_cc3.js +10 -0
  9. package/dist/client/assets/invite._token-DiDJMnQu.js +1 -0
  10. package/dist/client/assets/issues._fingerprint-Cv522h2j.js +1 -0
  11. package/dist/client/assets/login-CKkpc0t5.js +1 -0
  12. package/dist/client/assets/sessions._sessionId-B0NxM46y.js +1 -0
  13. package/dist/client/assets/settings-CIlF10MI.js +1 -0
  14. package/dist/client/assets/src-BKSiJUs3.js +3 -0
  15. package/dist/client/assets/styles-GAsMUS4-.css +2 -0
  16. package/dist/client/assets/team-BRuVQ2bU.js +1 -0
  17. package/dist/client/assets/timeline-BIGo9MCA.js +1 -0
  18. package/dist/client/assets/ui-CaEZB1j2.js +1 -0
  19. package/dist/client/assets/version-banner-VFvyqbPh.js +1 -0
  20. package/dist/server/assets/_authed-BJWDiF9i.js +92 -0
  21. package/dist/server/assets/{_authed-C-sIPXSO.js → _authed-X9u_5JUy.js} +318 -126
  22. package/dist/server/assets/_tanstack-start-manifest_v-C6vaeBdY.js +90 -0
  23. package/dist/server/assets/copy-button-D3RddzTw.js +52 -0
  24. package/dist/server/assets/customers-827fC5I3.js +163 -0
  25. package/dist/server/assets/{demo-BsMMDk_F.js → demo-DDNiXCgj.js} +29 -7
  26. package/dist/server/assets/{dynamodb-Zkk1-mgz.js → dynamodb-Cd4blXkh.js} +98 -17
  27. package/dist/server/assets/endpoints-_T0NSOyA.js +371 -0
  28. package/dist/server/assets/{queries-BJxX3Kjp.js → errors-Po4Tt5zd.js} +893 -66
  29. package/dist/server/assets/events._eventId-Dcsu4oVO.js +765 -0
  30. package/dist/server/assets/{firestore-C52q_vwM.js → firestore-c8Sz2Q4O.js} +26 -6
  31. package/dist/server/assets/{fns-DwGaMi8S.js → fns-BiUOnY1_.js} +27 -3
  32. package/dist/server/assets/fns-CVbk8Gf9.js +1310 -0
  33. package/dist/server/assets/{invite._token-xnpnkdRv.js → invite._token-7DjEeeaD.js} +3 -3
  34. package/dist/server/assets/{issues._fingerprint-e7ubdJf0.js → issues._fingerprint-vc9r3jgg.js} +89 -11
  35. package/dist/server/assets/{login-EopnOJXA.js → login-CwKAx9Bj.js} +3 -3
  36. package/dist/server/assets/{memory-BssaqdZm.js → memory-Bv4C8uyK.js} +431 -28
  37. package/dist/server/assets/router-Dk3XHn7B.js +512 -0
  38. package/dist/server/assets/sessions._sessionId-BvXxK9qF.js +264 -0
  39. package/dist/server/assets/{settings-CaJN69N6.js → settings-B9NLQjl1.js} +221 -5
  40. package/dist/server/assets/{src-D83GYTrp.js → src-oWPSAvXv.js} +1 -1
  41. package/dist/server/assets/{team-B1UcM1jA.js → team-Bsm2wFG0.js} +3 -3
  42. package/dist/server/assets/timeline-MDRNDhiA.js +132 -0
  43. package/dist/server/assets/{ui-BJokJdYa.js → ui-SAkSlP7f.js} +53 -13
  44. package/dist/server/assets/version-banner-nf-yZurq.js +106 -0
  45. package/dist/server/assets/versions-BOlL8jam.js +58 -0
  46. package/dist/server/server.js +41 -21
  47. package/package.json +4 -4
  48. package/dist/client/assets/_authed-BN39b-7H.js +0 -1
  49. package/dist/client/assets/_authed-CspAf0jN.js +0 -7
  50. package/dist/client/assets/index-Bfb2UOzB.js +0 -10
  51. package/dist/client/assets/invite._token-B4HN51-h.js +0 -1
  52. package/dist/client/assets/issues._fingerprint-BV1QrETY.js +0 -1
  53. package/dist/client/assets/login-COlvJ5Je.js +0 -1
  54. package/dist/client/assets/preload-helper-Dscj_TcA.js +0 -3
  55. package/dist/client/assets/settings-Dl4EWeWC.js +0 -1
  56. package/dist/client/assets/styles-DztngwT9.css +0 -2
  57. package/dist/client/assets/team-7Zekz_Er.js +0 -1
  58. package/dist/client/assets/ui-C0HGOza2.js +0 -1
  59. package/dist/server/assets/_authed-CrjuC0O3.js +0 -73
  60. package/dist/server/assets/_tanstack-start-manifest_v-CqaE4wze.js +0 -61
  61. package/dist/server/assets/fns-mbUIXXep.js +0 -529
  62. package/dist/server/assets/router-G99085_Q.js +0 -315
@@ -1,3 +1,4 @@
1
+ import { E as OWNER_INFO, S as CATEGORY_INFO, w as IMPACT_INFO } from "./memory-Bv4C8uyK.js";
1
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  // src/components/ui.tsx
3
4
  function Logo() {
@@ -86,8 +87,11 @@ function DataTable({ columns, rows }) {
86
87
  })]
87
88
  });
88
89
  }
89
- /** Horizontal share bars — used for small categorical breakdowns where a full chart is overkill. */
90
- function ShareBars({ rows, total }) {
90
+ /**
91
+ * Horizontal share bars — used for small categorical breakdowns where a full chart is overkill.
92
+ * With onSelect, each row is a button that toggles a filter; `selected` marks the active one.
93
+ */
94
+ function ShareBars({ rows, total, onSelect, selected }) {
91
95
  const sum = total ?? rows.reduce((a, r) => a + r.value, 0);
92
96
  if (!rows.length) return /* @__PURE__ */ jsx("p", {
93
97
  className: "text-xs text-muted",
@@ -97,11 +101,13 @@ function ShareBars({ rows, total }) {
97
101
  className: "space-y-2",
98
102
  children: rows.map((r) => {
99
103
  const share = sum ? r.value / sum : 0;
100
- return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("div", {
104
+ const on = selected === r.key;
105
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
101
106
  className: "flex justify-between gap-2 text-xs",
102
107
  children: [/* @__PURE__ */ jsx("span", {
103
- className: "truncate",
104
- children: r.key
108
+ className: `truncate ${on ? "font-semibold text-accent" : ""}`,
109
+ title: r.label ? r.key : void 0,
110
+ children: r.label ?? r.key
105
111
  }), /* @__PURE__ */ jsxs("span", {
106
112
  className: "tabular shrink-0 text-muted",
107
113
  children: [
@@ -114,13 +120,48 @@ function ShareBars({ rows, total }) {
114
120
  }), /* @__PURE__ */ jsx("div", {
115
121
  className: "mt-1 h-1.5 rounded-full bg-panel-2",
116
122
  children: /* @__PURE__ */ jsx("div", {
117
- className: "h-1.5 rounded-full bg-[var(--chart-errors)]",
123
+ className: `h-1.5 rounded-full ${on ? "bg-accent" : "bg-[var(--chart-errors)]"}`,
118
124
  style: { width: `${Math.max(2, share * 100)}%` }
119
125
  })
120
- })] }, r.key);
126
+ })] });
127
+ return /* @__PURE__ */ jsx("li", { children: onSelect ? /* @__PURE__ */ jsx("button", {
128
+ type: "button",
129
+ "aria-pressed": on,
130
+ onClick: () => onSelect(r.key),
131
+ className: "-mx-1 block w-[calc(100%+0.5rem)] rounded px-1 py-0.5 text-left hover:bg-panel-2",
132
+ children: body
133
+ }) : body }, r.key);
121
134
  })
122
135
  });
123
136
  }
137
+ /** A small chip under an issue's title. */
138
+ var CHIP = "mt-1 mr-1 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide";
139
+ var IMPACT_STYLE = {
140
+ blocked: "bg-sev-critical text-white",
141
+ degraded: "bg-sev-medium text-black",
142
+ silent: "border border-line text-muted"
143
+ };
144
+ /** An issue's impact and category as badges, and its likely owner, from docs/taxonomy.md. */
145
+ function LabelBadges({ labels }) {
146
+ if (!labels) return null;
147
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
148
+ /* @__PURE__ */ jsx("span", {
149
+ className: `${CHIP} ${IMPACT_STYLE[labels.impact]}`,
150
+ title: IMPACT_INFO[labels.impact].description,
151
+ children: IMPACT_INFO[labels.impact].name
152
+ }),
153
+ /* @__PURE__ */ jsx("span", {
154
+ className: `${CHIP} bg-panel-2 text-ink/80`,
155
+ title: CATEGORY_INFO[labels.category].description,
156
+ children: CATEGORY_INFO[labels.category].name
157
+ }),
158
+ /* @__PURE__ */ jsx("span", {
159
+ className: "mt-1 mr-1 inline-flex text-[11px] text-muted",
160
+ title: OWNER_INFO[labels.owner].description,
161
+ children: OWNER_INFO[labels.owner].name
162
+ })
163
+ ] });
164
+ }
124
165
  function timeAgo(iso, now = Date.now()) {
125
166
  const s = Math.max(0, Math.round((now - Date.parse(iso)) / 1e3));
126
167
  if (s < 60) return `${s}s ago`;
@@ -130,24 +171,23 @@ function timeAgo(iso, now = Date.now()) {
130
171
  }
131
172
  /** Small labels under an issue: regressed, new in the latest release, resolved, ignored. */
132
173
  function IssueLabels({ issue }) {
133
- const chip = "mt-1 mr-1 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide";
134
174
  return /* @__PURE__ */ jsxs(Fragment, { children: [
135
175
  issue.status === "regressed" && /* @__PURE__ */ jsxs("span", {
136
- className: `${chip} bg-sev-critical text-white`,
176
+ className: `${CHIP} bg-sev-critical text-white`,
137
177
  children: ["Regressed", issue.resolvedIn ? ` after ${issue.resolvedIn}` : ""]
138
178
  }),
139
179
  issue.newInLatest && /* @__PURE__ */ jsxs("span", {
140
- className: `${chip} bg-accent-soft text-accent`,
180
+ className: `${CHIP} bg-accent-soft text-accent`,
141
181
  children: ["New in ", issue.firstVersion]
142
182
  }),
143
183
  issue.status === "resolved" && /* @__PURE__ */ jsxs("span", {
144
- className: `${chip} border border-line text-muted`,
184
+ className: `${CHIP} border border-line text-muted`,
145
185
  children: ["Resolved", issue.resolvedIn ? ` in ${issue.resolvedIn}` : ""]
146
186
  }),
147
187
  issue.status === "ignored" && /* @__PURE__ */ jsx("span", {
148
- className: `${chip} border border-line text-muted`,
188
+ className: `${CHIP} border border-line text-muted`,
149
189
  children: "Ignored"
150
190
  })
151
191
  ] });
152
192
  }
153
- export { SeverityBadge as a, timeAgo as c, Logo as i, DataTable as n, ShareBars as o, IssueLabels as r, Stat as s, Card as t };
193
+ export { Logo as a, Stat as c, LabelBadges as i, timeAgo as l, DataTable as n, SeverityBadge as o, IssueLabels as r, ShareBars as s, Card as t };
@@ -0,0 +1,106 @@
1
+ import { p as getVersionStatus } from "./fns-BiUOnY1_.js";
2
+ import { t as CopyButton } from "./copy-button-D3RddzTw.js";
3
+ import { useEffect, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ // src/lib/version-text.ts
6
+ var NAME = {
7
+ sdk: "your app's SDK",
8
+ ingest: "ingest",
9
+ dashboard: "this dashboard"
10
+ };
11
+ /** "ingest is 0.7.2", "ingest predates version tracking". */
12
+ function partText(p) {
13
+ return p.version ? `${NAME[p.part]} is ${p.version}` : `${NAME[p.part]} predates version tracking`;
14
+ }
15
+ /** The headline: "Your app sends SDK 0.9.0, but ingest is 0.7.2 and this dashboard is 0.7.2." */
16
+ function bannerText(s) {
17
+ const sdk = s.parts.find((p) => p.part === "sdk");
18
+ return `${sdk?.version && sdk.version === s.newest ? `Your app sends SDK ${sdk.version}, but ` : `deBug is out of step: `}${s.behind.filter((p) => p.part !== "sdk").map(partText).join(" and ")}. Newer data and pages won't show until you run:`;
19
+ }
20
+ // src/components/version-banner.tsx
21
+ var DISMISSED = "debugkit.versionBanner.dismissed";
22
+ /** What the banner was dismissed for: the versions behind, so the next release shows it again. */
23
+ var signature = (s) => `${s.newest}|${s.behind.map((p) => `${p.part}@${p.version ?? "?"}`).join(",")}`;
24
+ /**
25
+ * Across the top of every page when part of the project's deBug is a minor version or more behind
26
+ * the rest. Dismissed per browser for these versions; it comes back when they change.
27
+ */
28
+ function VersionBanner() {
29
+ const status = useVersionStatus();
30
+ const [dismissed, setDismissed] = useState(void 0);
31
+ useEffect(() => {
32
+ try {
33
+ setDismissed(localStorage.getItem(DISMISSED));
34
+ } catch {
35
+ setDismissed(null);
36
+ }
37
+ }, []);
38
+ if (!status || status.level !== "banner" || dismissed === void 0) return null;
39
+ const sig = signature(status);
40
+ if (dismissed === sig) return null;
41
+ return /* @__PURE__ */ jsx("div", {
42
+ role: "status",
43
+ className: "border-b border-sev-medium/40 bg-sev-medium/10",
44
+ children: /* @__PURE__ */ jsxs("div", {
45
+ className: "mx-auto flex max-w-7xl flex-wrap items-center gap-x-3 gap-y-2 px-4 py-2.5 text-sm sm:px-6",
46
+ children: [
47
+ /* @__PURE__ */ jsx("span", {
48
+ className: "min-w-0 flex-1 basis-64",
49
+ children: bannerText(status)
50
+ }),
51
+ /* @__PURE__ */ jsx(UpgradeCommand, { status }),
52
+ /* @__PURE__ */ jsx("button", {
53
+ type: "button",
54
+ className: "ml-auto text-xs text-muted hover:text-ink",
55
+ onClick: () => {
56
+ setDismissed(sig);
57
+ try {
58
+ localStorage.setItem(DISMISSED, sig);
59
+ } catch {}
60
+ },
61
+ children: "Dismiss"
62
+ })
63
+ ]
64
+ })
65
+ });
66
+ }
67
+ /** The upgrade command with a copy button, and the --env hint when the dashboard doesn't know its environment. */
68
+ function UpgradeCommand({ status }) {
69
+ return /* @__PURE__ */ jsxs("span", {
70
+ className: "flex flex-wrap items-center gap-2",
71
+ children: [
72
+ /* @__PURE__ */ jsx("code", {
73
+ className: "break-all rounded bg-panel-2 px-2 py-1 font-mono text-xs",
74
+ children: status.command
75
+ }),
76
+ /* @__PURE__ */ jsx(CopyButton, {
77
+ text: status.command,
78
+ label: "Copy",
79
+ ariaLabel: "Copy the upgrade command"
80
+ }),
81
+ !status.environment && /* @__PURE__ */ jsx("span", {
82
+ className: "text-xs text-muted",
83
+ children: "Add --env <name> if you set up environments."
84
+ })
85
+ ]
86
+ });
87
+ }
88
+ /** One read per page load, shared by the banner and Settings. */
89
+ var pending;
90
+ /**
91
+ * The project's version status, read in the browser after the page renders: no page waits on it,
92
+ * and the banner and Settings share one request. undefined until it arrives.
93
+ */
94
+ function useVersionStatus() {
95
+ const [status, setStatus] = useState(void 0);
96
+ useEffect(() => {
97
+ let live = true;
98
+ pending ??= getVersionStatus().catch(() => null);
99
+ pending.then((s) => live && setStatus(s));
100
+ return () => {
101
+ live = false;
102
+ };
103
+ }, []);
104
+ return status;
105
+ }
106
+ export { partText as i, VersionBanner as n, useVersionStatus as r, UpgradeCommand as t };
@@ -0,0 +1,58 @@
1
+ import { a as parseVersion, r as compareVersions } from "./memory-Bv4C8uyK.js";
2
+ import "./src-oWPSAvXv.js";
3
+ // package.json
4
+ var version = "0.9.0";
5
+ // src/server/versions.ts
6
+ /**
7
+ * How far apart two versions are: "minor" when they differ in major or minor, "patch" when only
8
+ * below that, undefined when the same. A part that doesn't say its version (an ingest from before
9
+ * tracking) counts as a minor gap: it's at least that old.
10
+ */
11
+ function gap(a, b) {
12
+ const pa = parseVersion(a);
13
+ const pb = parseVersion(b);
14
+ if (!pa || !pb) return pa || pb ? "minor" : void 0;
15
+ if (pa.major !== pb.major || pa.minor !== pb.minor) return "minor";
16
+ return compareVersions(a, b) !== 0 ? "patch" : void 0;
17
+ }
18
+ /**
19
+ * The project's versions from each app's record: the newest SDK across apps, and the ingest that
20
+ * wrote last (one ingest serves all of a project's apps; a quiet app's record can be older). No
21
+ * ingest version at all means the ingest predates version tracking.
22
+ */
23
+ function versionStatus(records, dashboard, environment) {
24
+ const sdk = records.flatMap((r) => r.sdk ? [r.sdk] : []).sort((a, b) => compareVersions(b.version, a.version))[0];
25
+ const ingest = records.flatMap((r) => r.ingest ? [r.ingest] : []).sort((a, b) => b.at.localeCompare(a.at))[0];
26
+ const parts = [
27
+ {
28
+ part: "sdk",
29
+ version: sdk?.version,
30
+ at: sdk?.seenAt
31
+ },
32
+ {
33
+ part: "ingest",
34
+ version: ingest?.version,
35
+ at: ingest?.at
36
+ },
37
+ {
38
+ part: "dashboard",
39
+ version: dashboard
40
+ }
41
+ ];
42
+ const newest = parts.filter((p) => p.version && parseVersion(p.version)).map((p) => p.version).sort((a, b) => compareVersions(b, a))[0];
43
+ const tracked = records.length > 0;
44
+ const behind = parts.filter((p) => p.part === "ingest" ? tracked && gap(p.version, newest) : p.version && gap(p.version, newest)).sort((a, b) => compareVersions(a.version, b.version));
45
+ return {
46
+ parts,
47
+ newest,
48
+ behind,
49
+ level: behind.some((p) => p.part !== "sdk" && gap(p.version, newest) === "minor") ? "banner" : behind.length ? "note" : "none",
50
+ command: `npx debugkit upgrade${environment ? ` --env ${environment}` : ""}`,
51
+ environment
52
+ };
53
+ }
54
+ async function buildVersionStatus(store, environment) {
55
+ const apps = await store.listApps();
56
+ return versionStatus(await Promise.all(apps.map((a) => store.getVersions(a).catch(() => ({})))), version, environment);
57
+ }
58
+ export { version as n, buildVersionStatus as t };
@@ -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-CqaE4wze.js");
4488
+ const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-C6vaeBdY.js");
4489
4489
  const startManifest = tsrStartManifest();
4490
4490
  let routes = startManifest.routes;
4491
4491
  routes[rootRouteId];
@@ -4508,79 +4508,99 @@ async function getStartManifest(matchedRoutes) {
4508
4508
  var manifest = {
4509
4509
  "0c2f8fcb35c5e356e4a58fce376bb16efb0e006f519592fdd5f120fa868720cd": {
4510
4510
  functionName: "saveRetention_createServerFn_handler",
4511
- importer: () => import("./assets/fns-mbUIXXep.js")
4511
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4512
4512
  },
4513
4513
  "0dcf3aa141898f7bb0cefed3e6129613f6226a680cc800b8cb18d2c60b7706fa": {
4514
4514
  functionName: "inviteToTeam_createServerFn_handler",
4515
- importer: () => import("./assets/fns-mbUIXXep.js")
4515
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4516
4516
  },
4517
4517
  "1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f": {
4518
4518
  functionName: "getSessionUser_createServerFn_handler",
4519
- importer: () => import("./assets/fns-mbUIXXep.js")
4519
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4520
4520
  },
4521
4521
  "2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220": {
4522
4522
  functionName: "joinTeam_createServerFn_handler",
4523
- importer: () => import("./assets/fns-mbUIXXep.js")
4523
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4524
4524
  },
4525
4525
  "2727b9721f5d291dbb62652d2de5cff55fd7871756147d8ce441b03a7a494617": {
4526
4526
  functionName: "removeFromTeam_createServerFn_handler",
4527
- importer: () => import("./assets/fns-mbUIXXep.js")
4527
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4528
4528
  },
4529
4529
  "51bfd02b4d1772943ec480c2dcd7b445826bcfa7d494453d269cc82644ea2a42": {
4530
4530
  functionName: "setMemberRole_createServerFn_handler",
4531
- importer: () => import("./assets/fns-mbUIXXep.js")
4531
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4532
+ },
4533
+ "54a67fa946c48ef3e3aaa27c8b323c380b12a14879a00a9567f52e31c358a0ed": {
4534
+ functionName: "findCustomer_createServerFn_handler",
4535
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4532
4536
  },
4533
4537
  "7028d75aed3e58a91f5f26a3821d0cec6bb478a913058f5aa73cbfb64bbc41d3": {
4534
4538
  functionName: "sendTestAlert_createServerFn_handler",
4535
- importer: () => import("./assets/fns-mbUIXXep.js")
4539
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4536
4540
  },
4537
4541
  "86933afdbcaa1be4a0aa07c4f8e690fdd684edbeab02a49ffdb73e85cadf9933": {
4538
4542
  functionName: "getIssueDetail_createServerFn_handler",
4539
- importer: () => import("./assets/fns-mbUIXXep.js")
4543
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4544
+ },
4545
+ "8ade0e7bba4102fdb7cbe0494762fbb0d01a480c84a69f325fc76686a0dc0237": {
4546
+ functionName: "getEndpoints_createServerFn_handler",
4547
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4540
4548
  },
4541
4549
  "8e8646e3fd8b630ba5696313fb01543dc62410ff8fa9b1eea9763286d32c8927": {
4542
4550
  functionName: "getInvite_createServerFn_handler",
4543
- importer: () => import("./assets/fns-mbUIXXep.js")
4551
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4552
+ },
4553
+ "8fc5d548afdc47f30ea4f9fab6f96cf926fd407c0b80ea68c796b6de7e606a4e": {
4554
+ functionName: "getEventDetail_createServerFn_handler",
4555
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4544
4556
  },
4545
4557
  "8ff7e08627330b1c64257ee12b7ed04815853cb3735a9324805c0bcf149bae9f": {
4546
4558
  functionName: "getTeam_createServerFn_handler",
4547
- importer: () => import("./assets/fns-mbUIXXep.js")
4559
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4548
4560
  },
4549
4561
  "9354c2231554471ec5cde4e9a07b2e32662a8ce0bf29b09b5b930359d374f862": {
4550
4562
  functionName: "getOverview_createServerFn_handler",
4551
- importer: () => import("./assets/fns-mbUIXXep.js")
4563
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4552
4564
  },
4553
4565
  "949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1": {
4554
4566
  functionName: "getLoginInfo_createServerFn_handler",
4555
- importer: () => import("./assets/fns-mbUIXXep.js")
4567
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4556
4568
  },
4557
4569
  "950c0a9412e17ae8308bccd862dee5faea0375153c5ce59491a033dbcb7e7181": {
4558
4570
  functionName: "saveAppSettings_createServerFn_handler",
4559
- importer: () => import("./assets/fns-mbUIXXep.js")
4571
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4560
4572
  },
4561
4573
  "a1b47d616a31acc3132c1bb8258bde961d9c419ff91b2ce1d6479ebb9760b393": {
4562
4574
  functionName: "restampExisting_createServerFn_handler",
4563
- importer: () => import("./assets/fns-mbUIXXep.js")
4575
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4576
+ },
4577
+ "a4d3bc63ce8ef43aeb81dfb47c631fe47d634d298109d6b5865742aff7363696": {
4578
+ functionName: "getSessionDetail_createServerFn_handler",
4579
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4564
4580
  },
4565
4581
  "a9edf8f42685a06ce282bb7c9f888e3ae39636f350a90750c31a47b27de7dca8": {
4566
4582
  functionName: "login_createServerFn_handler",
4567
- importer: () => import("./assets/fns-mbUIXXep.js")
4583
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4568
4584
  },
4569
4585
  "b4629be951e5766734fb72f9e1400c19f585a4381d9172539b2512ae5056f4e8": {
4570
4586
  functionName: "cancelInvite_createServerFn_handler",
4571
- importer: () => import("./assets/fns-mbUIXXep.js")
4587
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4572
4588
  },
4573
4589
  "c263ee8bf14396211aeb95bc2b2aec914480b38cc99a9024c1319f932f590f2f": {
4574
4590
  functionName: "updateIssueStatus_createServerFn_handler",
4575
- importer: () => import("./assets/fns-mbUIXXep.js")
4591
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4592
+ },
4593
+ "c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2": {
4594
+ functionName: "getVersionStatus_createServerFn_handler",
4595
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4576
4596
  },
4577
4597
  "e97a9c2b8715ff5e25a9629262b594fb42f11853d6eea78b87305fd0b5155d4d": {
4578
4598
  functionName: "getSettings_createServerFn_handler",
4579
- importer: () => import("./assets/fns-mbUIXXep.js")
4599
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4580
4600
  },
4581
4601
  "fd40d9026eb7d8fb5ab200daaed9a58f1d7b4eaf5b1ccab3e4cef9b0fedd9bc4": {
4582
4602
  functionName: "logout_createServerFn_handler",
4583
- importer: () => import("./assets/fns-mbUIXXep.js")
4603
+ importer: () => import("./assets/fns-CVbk8Gf9.js")
4584
4604
  }
4585
4605
  };
4586
4606
  async function getServerFnById(id, access) {
@@ -7312,7 +7332,7 @@ var getBaseManifest = getProdBaseManifest;
7312
7332
  var createEarlyHintsForRequest = createEarlyHintsCollector;
7313
7333
  async function loadEntries() {
7314
7334
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
7315
- import("./assets/router-G99085_Q.js").then((n) => n.t),
7335
+ import("./assets/router-Dk3XHn7B.js").then((n) => n.t),
7316
7336
  import("./assets/start-t09PGpZL.js"),
7317
7337
  import("./assets/empty-plugin-adapters-BsRz-CQL.js")
7318
7338
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugkit/dashboard",
3
- "version": "0.7.0",
3
+ "version": "0.9.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/adapters": "0.7.0",
32
- "@debugkit/schema": "0.7.0",
33
- "@debugkit/ingest": "0.7.0"
31
+ "@debugkit/ingest": "0.9.0",
32
+ "@debugkit/schema": "0.9.0",
33
+ "@debugkit/adapters": "0.9.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=20.12"
@@ -1 +0,0 @@
1
- import{j as e,k as t,p as n,w as r}from"./preload-helper-Dscj_TcA.js";import{l as i,u as a}from"./index-Bfb2UOzB.js";import{i as o}from"./ui-C0HGOza2.js";var s=e();function c(){let{user:e}=i.useRouteContext(),c=t();return(0,s.jsxs)(`div`,{className:`min-h-screen`,children:[(0,s.jsx)(`header`,{className:`sticky top-0 z-10 border-b border-line bg-bg/90 backdrop-blur`,children:(0,s.jsxs)(`div`,{className:`mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3 sm:px-6`,children:[(0,s.jsxs)(`div`,{className:`flex items-center gap-5`,children:[(0,s.jsx)(r,{to:`/`,search:{},className:`shrink-0`,children:(0,s.jsx)(o,{})}),(0,s.jsxs)(`nav`,{className:`flex items-center gap-3 text-sm`,"aria-label":`Main`,children:[(0,s.jsx)(r,{to:`/`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},activeOptions:{exact:!0},children:`Overview`}),(0,s.jsx)(r,{to:`/settings`,search:{},className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Settings`}),(0,s.jsx)(r,{to:`/team`,className:`text-muted hover:text-ink`,activeProps:{className:`font-medium text-ink`},children:`Team`})]})]}),(0,s.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,s.jsxs)(`span`,{className:`hidden text-muted sm:inline`,children:[e.email,` · `,e.role]}),(0,s.jsx)(`button`,{className:`rounded-md border border-line px-2.5 py-1 hover:bg-panel-2`,onClick:async()=>{await n(),await c.invalidate(),await c.navigate({to:`/login`})},children:`Sign out`})]})]})}),(0,s.jsx)(a,{})]})}export{c as component};
@@ -1,7 +0,0 @@
1
- import{T as e,Z as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{r as o,t as s}from"./charts-XyOWJI9T.js";import{a as c,c as l,n as u,o as d,r as f,s as p,t as m}from"./ui-C0HGOza2.js";import{a as h,o as g,s as _}from"./index-Bfb2UOzB.js";var v=n(t()),y=r();function b(){let t=h.useLoaderData(),n=h.useSearch(),{flow:r}=n,i=e({from:h.fullPath});if(!t)return(0,y.jsx)(w,{});let{totals:v,range:b}=t,C=b.preset===`custom`?`range`:b.preset,E=n.status??`open`,D=t.issues.filter(e=>E===`all`?!0:E===`open`?e.status===`open`||e.status===`regressed`:e.status===E),O=r?D.filter(e=>(e.flow??`untagged`)===r):D,k=e=>t.issues.filter(t=>e===`open`?t.status===`open`||t.status===`regressed`:t.status===e).length,A=v.changePct;return(0,y.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:[`Overview · `,b.label]}),(0,y.jsxs)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:[`What's going wrong in `,t.app]})]}),(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsx)(g,{value:b,today:t.generatedAt.slice(0,10),onChange:e=>i({search:t=>({...t,...e})})},`${b.preset}${b.from}${b.to}`),t.apps.length>1&&(0,y.jsx)(`select`,{"aria-label":`App`,value:t.app,onChange:e=>i({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:t.apps.map(e=>(0,y.jsx)(`option`,{children:e},e))})]})]}),(0,y.jsx)(_,{rangeFrom:b.from,retention:t.retention}),(0,y.jsx)(`section`,{"aria-label":`Summary`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:(0,y.jsx)(`ul`,{className:`space-y-1.5 text-[15px] leading-relaxed`,children:t.narrative.map((e,t)=>(0,y.jsx)(`li`,{className:t===0?`font-medium`:`text-ink/90`,children:e},t))})}),(0,y.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,y.jsx)(p,{label:`Errors (${C})`,value:v.errorsRange.toLocaleString(),tone:v.criticalIssues?`critical`:void 0,hint:A===null?`not enough earlier data to compare`:A>500?`▲ from ${v.errorsPrev.toLocaleString()} in the previous ${b.span}`:`${A>0?`▲`:A<0?`▼`:`•`} ${Math.abs(A)}% vs previous ${b.span}`}),(0,y.jsx)(p,{label:`Critical issues`,value:v.criticalIssues,tone:v.criticalIssues?`critical`:void 0,hint:`≥ threshold occurrences in 24h`}),(0,y.jsx)(p,{label:`Crash-free users (${C})`,value:x(t.health.crashFreeUsersRate),tone:t.health.crashFreeUsersRate!==null&&t.health.crashFreeUsersRate<.99?`high`:void 0,hint:`${t.health.users.toLocaleString()} users · ${t.health.crashedUsers.toLocaleString()} crashed`}),(0,y.jsx)(p,{label:`Crash-free sessions (${C})`,value:x(t.health.crashFreeRate),tone:t.health.crashFreeRate!==null&&t.health.crashFreeRate<.99?`high`:void 0,hint:`${t.health.sessionsRange.toLocaleString()} sessions · ${v.activeIssues} active issues`})]}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-5`,children:[(0,y.jsx)(`div`,{className:`min-w-0 lg:col-span-3`,children:(0,y.jsxs)(m,{title:`Where the app is failing`,subtitle:`Errors in ${b.label} by flow, coloured by worst severity. Click a bar to filter issues.`,children:[(0,y.jsx)(s,{data:t.flows,onSelect:e=>i({search:t=>({...t,flow:t.flow===e?void 0:e})})}),(0,y.jsx)(u,{columns:[`Flow`,`Severity`,`Errors 24h`,`Errors (${C})`,`Issues`,`Failure rate (${C})`],rows:t.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,y.jsx)(`div`,{className:`min-w-0 lg:col-span-2`,children:(0,y.jsxs)(m,{title:`Error trend`,subtitle:`Errors per ${b.granularity}, ${b.label} (UTC)`,children:[(0,y.jsx)(o,{data:t.trend,markers:t.releases.map(e=>({day:e.firstDay,label:e.release}))}),t.releases.length>0&&(0,y.jsxs)(`p`,{className:`mt-2 text-xs text-muted`,children:[`Dashed lines: a release's first sessions (`,t.releases.map(e=>e.release).join(`, `),`).`]}),(0,y.jsx)(u,{columns:[`Day`,`Errors`,`Events`],rows:t.trend.map(e=>[e.day,e.errors,e.events])})]})})]}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,y.jsx)(m,{title:`Release health`,subtitle:`Share of sessions without a crash or unhandled error, per app version, in ${b.label}. Recorded automatically by the SDK.`,children:t.health.releases.length?(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Version`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Sessions`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Crash-free`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Error-free`})]})}),(0,y.jsx)(`tbody`,{children:t.health.releases.map(e=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,y.jsx)(`td`,{className:`px-4 py-2 font-medium sm:px-2`,children:e.version}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:e.sessions.toLocaleString()}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right font-semibold ${S(e.crashFreeRate)}`,children:x(e.crashFreeRate)}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right`,children:x(e.errorFreeRate)})]},e.version))})]})}):(0,y.jsx)(`p`,{className:`text-sm text-muted`,children:`No sessions yet. They're recorded automatically from SDK 0.2.`})}),(0,y.jsx)(m,{title:`Failing endpoints`,subtitle:`Requests that returned 5xx, timed out or failed in ${b.label}. Captured automatically from fetch and XHR.`,children:t.health.endpoints.length?(0,y.jsx)(d,{rows:t.health.endpoints.map(e=>({key:e.endpoint,value:e.failuresRange}))}):(0,y.jsx)(`p`,{className:`text-sm text-muted`,children:`No failed requests.`})})]}),(t.steps.length>0||t.timings.length>0)&&(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[t.steps.length>0&&(0,y.jsx)(m,{title:`Steps that fail`,subtitle:`track() outcomes per step in ${b.label}, most failures first.${r?` Filtered to ${r}.`:``}`,children:(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Flow · step`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Tries`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failed`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failure rate`})]})}),(0,y.jsx)(`tbody`,{children:t.steps.filter(e=>!r||e.flow===r).slice(0,8).map(e=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,y.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs sm:px-2`,children:[e.flow,` · `,e.step]}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:(e.successes+e.failures).toLocaleString()}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right`,children:e.failures.toLocaleString()}),(0,y.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}`))})]})})}),t.timings.length>0&&(0,y.jsxs)(m,{title:`Response times`,subtitle:`Busiest endpoints in ${b.label}. Measured by the SDK on real devices.`,children:[(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[420px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Endpoint`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Requests`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`p50`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`p95`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Failed`})]})}),(0,y.jsx)(`tbody`,{children:t.timings.map(e=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,y.jsx)(`td`,{className:`max-w-[220px] truncate px-4 py-2 font-mono text-xs sm:px-2`,title:e.endpoint,children:e.endpoint}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right text-muted`,children:e.requests.toLocaleString()}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right`,children:T(e.p50)}),(0,y.jsx)(`td`,{className:`px-2 py-2 text-right font-semibold ${e.p95!==null&&e.p95>=3e3?`text-sev-high`:``}`,children:T(e.p95)}),(0,y.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,y.jsx)(`p`,{className:`mt-2 text-xs text-muted`,children:`p50/p95: half / 95% of requests finished within this time.`})]})]}),(0,y.jsx)(m,{title:r?`Issues in ${r}`:`Issues by severity`,subtitle:`Grouped errors seen in ${b.label}. Severity is set by occurrences in the last 24 hours.`,right:(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 text-xs`,children:[r&&(0,y.jsx)(`button`,{className:`mr-2 text-accent`,onClick:()=>i({search:e=>({...e,flow:void 0})}),children:`Clear flow ×`}),[`open`,`resolved`,`ignored`,`all`].map(e=>(0,y.jsxs)(`button`,{onClick:()=>i({search:t=>({...t,status:e===`open`?void 0:e})}),className:`rounded-md border px-2 py-1 capitalize ${E===e?`border-accent bg-accent-soft text-accent`:`border-line text-muted hover:bg-panel-2`}`,children:[e,e!==`all`&&(0,y.jsx)(`span`,{className:`ml-1 opacity-70`,children:k(e)})]},e))]}),children:(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[640px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`Severity`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Issue`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Flow`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Users`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`24h`}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:C===`24h`?`Total`:C===`range`?`Range`:C}),(0,y.jsx)(`th`,{className:`px-2 py-2 text-right font-medium`,children:`Last seen`})]})}),(0,y.jsxs)(`tbody`,{children:[O.map(e=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-panel-2`,children:[(0,y.jsx)(`td`,{className:`px-4 py-2.5 sm:px-2`,children:(0,y.jsx)(c,{severity:e.severity})}),(0,y.jsxs)(`td`,{className:`max-w-[420px] px-2 py-2.5`,children:[(0,y.jsx)(a,{to:`/issues/$fingerprint`,params:{fingerprint:e.fingerprint},search:{app:t.app,range:b.preset===`14d`?void 0:b.preset,...b.preset===`custom`?{from:b.from,to:b.to}:{}},className:`block truncate font-medium hover:text-accent`,children:e.title}),e.culprit&&(0,y.jsx)(`div`,{className:`truncate font-mono text-xs text-muted`,children:e.culprit}),(0,y.jsx)(f,{issue:e})]}),(0,y.jsx)(`td`,{className:`px-2 py-2.5 text-xs`,children:e.flow??(0,y.jsx)(`span`,{className:`text-muted`,children:`untagged`})}),(0,y.jsx)(`td`,{className:`px-2 py-2.5 text-right text-muted`,children:e.users??`—`}),(0,y.jsx)(`td`,{className:`px-2 py-2.5 text-right font-semibold`,children:e.count24h}),(0,y.jsx)(`td`,{className:`px-2 py-2.5 text-right text-muted`,children:C===`24h`?e.countTotal:e.countRange}),(0,y.jsx)(`td`,{className:`px-2 py-2.5 text-right text-xs text-muted`,children:l(e.lastSeen)})]},e.fingerprint)),!O.length&&(0,y.jsx)(`tr`,{children:(0,y.jsx)(`td`,{colSpan:7,className:`px-2 py-6 text-center text-muted`,children:`No issues.`})})]})]})})}),(0,y.jsxs)(`div`,{className:`grid gap-5 md:grid-cols-3`,children:[(0,y.jsx)(m,{title:`By network`,subtitle:`Errors, ${b.label}`,children:(0,y.jsx)(d,{rows:t.breakdowns.network.map(e=>({key:e.key,value:e.errors}))})}),(0,y.jsx)(m,{title:`By country`,subtitle:`Errors, ${b.label}. From the device's timezone, not its IP.`,children:(0,y.jsx)(d,{rows:t.breakdowns.country.map(e=>({key:e.key,value:e.errors}))})}),(0,y.jsx)(m,{title:`By OS`,subtitle:`Errors, ${b.label}`,children:(0,y.jsx)(d,{rows:t.breakdowns.os.map(e=>({key:e.key,value:e.errors}))})}),(0,y.jsx)(m,{title:`By app version`,subtitle:`Errors, ${b.label}`,children:(0,y.jsx)(d,{rows:t.breakdowns.appVersion.map(e=>({key:e.key,value:e.errors}))})}),(0,y.jsx)(m,{title:`By device`,subtitle:`Errors, ${b.label}`,children:(0,y.jsx)(d,{rows:t.breakdowns.deviceModel.map(e=>({key:e.key,value:e.errors}))})})]}),(0,y.jsxs)(`p`,{className:`pb-6 text-xs text-muted`,children:[`Machine-readable: `,(0,y.jsxs)(`code`,{children:[`GET /api/summary?app=`,t.app]}),` returns this page as JSON with field descriptions.`]})]})}function x(e){return e===null?`—`:`${(Math.floor(e*1e3)/10).toFixed(1)}%`}function S(e){return e===null?``:e<.98?`text-sev-critical`:e<.995?`text-sev-high`:``}var C=[{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:`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 w(){let e=i();return(0,v.useEffect)(()=>{let t=setInterval(()=>void e.invalidate(),5e3);return()=>clearInterval(t)},[e]),(0,y.jsxs)(`main`,{className:`mx-auto max-w-4xl space-y-6 px-4 py-10 sm:px-6`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Connected · waiting for the first event`}),(0,y.jsx)(`h1`,{className:`mt-1 text-2xl font-semibold tracking-tight`,children:`Your dashboard is ready, and empty for now.`}),(0,y.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,y.jsx)(`code`,{children:`npx debugkit test`}),` (or `,(0,y.jsx)(`code`,{children:`npx @debugkit/cli test`}),`). This page fills in on its own.`]})]}),(0,y.jsxs)(`section`,{"aria-labelledby":`see-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,y.jsx)(`h2`,{id:`see-h`,className:`text-sm font-semibold`,children:`What you'll see here`}),(0,y.jsx)(`ul`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:C.map(e=>(0,y.jsxs)(`li`,{className:`rounded-lg border border-line p-3`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,y.jsx)(`span`,{className:`text-[11px] uppercase tracking-wide text-muted`,children:e.when})]}),(0,y.jsx)(`p`,{className:`mt-1 text-sm text-ink/80`,children:e.detail})]},e.title))})]}),(0,y.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,y.jsxs)(`section`,{"aria-labelledby":`auto-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,y.jsx)(`h2`,{id:`auto-h`,className:`text-sm font-semibold`,children:`Recorded automatically`}),(0,y.jsxs)(`p`,{className:`mt-1 text-xs text-muted`,children:[`Once `,(0,y.jsx)(`code`,{children:`init()`}),` runs, with no other code.`]}),(0,y.jsxs)(`ul`,{className:`mt-3 list-disc space-y-1 pl-5 text-sm`,children:[(0,y.jsx)(`li`,{children:`Crashes and unhandled promise rejections`}),(0,y.jsx)(`li`,{children:`Failed, timed-out and 5xx requests, with the code that made them`}),(0,y.jsx)(`li`,{children:`Sessions, for crash-free rates per release`}),(0,y.jsx)(`li`,{children:`Screens visited, buttons clicked, console warnings, app backgrounded or offline`}),(0,y.jsx)(`li`,{children:`Device, OS, app version and network on every event`})]})]}),(0,y.jsxs)(`section`,{"aria-labelledby":`manual-h`,className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,y.jsx)(`h2`,{id:`manual-h`,className:`text-sm font-semibold`,children:`What you add`}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Only what the app can't know on its own.`}),(0,y.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 T(e){return e===null?`—`:Number.isFinite(e)?e>=1e3?`≤ ${(e/1e3).toFixed(e%1e3?1:0)} s`:`≤ ${e} ms`:`> 10 s`}export{b as component};