@debugkit/dashboard 0.4.0 → 0.5.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 (45) hide show
  1. package/dist/client/assets/_authed-DTn7rMla.js +1 -0
  2. package/dist/client/assets/_authed-Dc7covsB.js +7 -0
  3. package/dist/client/assets/{charts-C76vsG2N.js → charts-C0zeGTzu.js} +18 -18
  4. package/dist/client/assets/index-D12jr1bm.js +10 -0
  5. package/dist/client/assets/issues._fingerprint-C6ryZvIu.js +1 -0
  6. package/dist/client/assets/login-oLP1Yyz3.js +1 -0
  7. package/dist/client/assets/preload-helper-CDziuvpw.js +3 -0
  8. package/dist/client/assets/settings-9oQsCwdV.js +1 -0
  9. package/dist/client/assets/styles-DBg7wMRg.css +2 -0
  10. package/dist/client/assets/ui-BiRMJGWB.js +1 -0
  11. package/dist/server/assets/{_authed-ClbGOSDJ.js → _authed-CuDay0Tl.js} +296 -70
  12. package/dist/server/assets/{_authed-BaehIntL.js → _authed-DODQ_Iys.js} +28 -8
  13. package/dist/server/assets/{_tanstack-start-manifest_v-eNUCOzFz.js → _tanstack-start-manifest_v-BBxgjm04.js} +16 -7
  14. package/dist/server/assets/{charts-CNlV7Pga.js → charts-DzTVqJ8z.js} +21 -4
  15. package/dist/server/assets/{demo-DTdlXNgj.js → demo-hrRBo9_U.js} +87 -10
  16. package/dist/server/assets/dynamodb-DyPK9SVV.js +354 -0
  17. package/dist/server/assets/{firestore-BH-gx9no.js → firestore-B2xzpzYA.js} +89 -5
  18. package/dist/server/assets/fns-DPsnK0zS.js +79 -0
  19. package/dist/server/assets/fns-hk_OJe6M.js +250 -0
  20. package/dist/server/assets/{issues._fingerprint-D78dy5os.js → issues._fingerprint-CZCZDm7t.js} +159 -17
  21. package/dist/server/assets/{login-h3B5Vdhl.js → login-D-UG6SFw.js} +3 -3
  22. package/dist/server/assets/{queries-DIVV-5j6.js → memory-Do0CDoAX.js} +205 -505
  23. package/dist/server/assets/queries-CxHrgTdM.js +955 -0
  24. package/dist/server/assets/range-picker-0zbSGr3Z.js +106 -0
  25. package/dist/server/assets/rolldown-runtime-D8jQpDG7.js +12 -0
  26. package/dist/server/assets/{router-DqTf7XfT.js → router-CIIGBCmL.js} +84 -44
  27. package/dist/server/assets/settings-BHfngShx.js +371 -0
  28. package/dist/server/assets/src-D9VHcuh4.js +491 -0
  29. package/dist/server/assets/src-JXktBs5H.js +4 -0
  30. package/dist/server/assets/{ui-Lv-KcOoP.js → ui-BJokJdYa.js} +25 -3
  31. package/dist/server/server.js +32 -8
  32. package/package.json +4 -4
  33. package/dist/client/assets/_authed-Bi62GTX3.js +0 -7
  34. package/dist/client/assets/_authed-mWCAMokt.js +0 -1
  35. package/dist/client/assets/index-D7uhDdvA.js +0 -12
  36. package/dist/client/assets/issues._fingerprint-fVGLnT37.js +0 -1
  37. package/dist/client/assets/login-MqvT094Y.js +0 -1
  38. package/dist/client/assets/styles-CZZRuG1z.css +0 -2
  39. package/dist/client/assets/ui-Bj6uJIr8.js +0 -1
  40. package/dist/server/assets/dynamodb-DejcakaF.js +0 -187
  41. package/dist/server/assets/fns-CgB12FUN.js +0 -31
  42. package/dist/server/assets/fns-Yg8sT1Cb.js +0 -87
  43. package/dist/server/assets/memory-4DwW5cTO.js +0 -59
  44. package/dist/server/assets/rollups-JXbazRNh.js +0 -22
  45. package/dist/server/assets/src-D5jyi_C4.js +0 -235
@@ -1,37 +1,61 @@
1
- import { r as TrendChart, t as FlowChart } from "./charts-CNlV7Pga.js";
2
- import { a as ShareBars, i as SeverityBadge, n as DataTable, o as Stat, s as timeAgo, t as Card } from "./ui-Lv-KcOoP.js";
3
- import { r as Route } from "./router-DqTf7XfT.js";
1
+ import { r as TrendChart, t as FlowChart } from "./charts-DzTVqJ8z.js";
2
+ import { a as SeverityBadge, c as timeAgo, n as DataTable, o as ShareBars, r as IssueLabels, s as Stat, t as Card } from "./ui-BJokJdYa.js";
3
+ import { n as RetentionNote, t as RangePicker } from "./range-picker-0zbSGr3Z.js";
4
+ import { i as Route } from "./router-CIIGBCmL.js";
4
5
  import { useEffect } from "react";
5
6
  import { Link, useNavigate, useRouter } from "@tanstack/react-router";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  // src/routes/_authed/index.tsx?tsr-split=component
8
9
  function Overview() {
9
10
  const summary = Route.useLoaderData();
10
- const { flow } = Route.useSearch();
11
+ const search = Route.useSearch();
12
+ const { flow } = search;
11
13
  const navigate = useNavigate({ from: Route.fullPath });
12
14
  if (!summary) return /* @__PURE__ */ jsx(EmptyState, {});
13
- const { totals } = summary;
14
- const issues = flow ? summary.issues.filter((i) => (i.flow ?? "untagged") === flow) : summary.issues;
15
+ const { totals, range } = summary;
16
+ const span = range.preset === "custom" ? "range" : range.preset;
17
+ const statusFilter = search.status ?? "open";
18
+ const byStatus = summary.issues.filter((i) => statusFilter === "all" ? true : statusFilter === "open" ? i.status === "open" || i.status === "regressed" : i.status === statusFilter);
19
+ const issues = flow ? byStatus.filter((i) => (i.flow ?? "untagged") === flow) : byStatus;
20
+ const countFor = (st) => summary.issues.filter((i) => st === "open" ? i.status === "open" || i.status === "regressed" : i.status === st).length;
15
21
  const change = totals.changePct;
16
22
  return /* @__PURE__ */ jsxs("main", {
17
23
  className: "mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6",
18
24
  children: [
19
25
  /* @__PURE__ */ jsxs("div", {
20
26
  className: "flex flex-wrap items-end justify-between gap-3",
21
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
27
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("p", {
22
28
  className: "text-xs uppercase tracking-wide text-muted",
23
- children: "Overview · last 24h"
29
+ children: ["Overview · ", range.label]
24
30
  }), /* @__PURE__ */ jsxs("h1", {
25
31
  className: "text-2xl font-semibold tracking-tight",
26
32
  children: ["What's going wrong in ", summary.app]
27
- })] }), summary.apps.length > 1 && /* @__PURE__ */ jsx("select", {
28
- "aria-label": "App",
29
- value: summary.app,
30
- onChange: (e) => navigate({ search: { app: e.target.value } }),
31
- className: "rounded-md border border-line bg-panel px-2 py-1.5 text-sm",
32
- children: summary.apps.map((a) => /* @__PURE__ */ jsx("option", { children: a }, a))
33
+ })] }), /* @__PURE__ */ jsxs("div", {
34
+ className: "flex flex-wrap items-center gap-2",
35
+ children: [/* @__PURE__ */ jsx(RangePicker, {
36
+ value: range,
37
+ today: summary.generatedAt.slice(0, 10),
38
+ onChange: (r) => navigate({ search: (s) => ({
39
+ ...s,
40
+ ...r
41
+ }) })
42
+ }, `${range.preset}${range.from}${range.to}`), summary.apps.length > 1 && /* @__PURE__ */ jsx("select", {
43
+ "aria-label": "App",
44
+ value: summary.app,
45
+ onChange: (e) => navigate({ search: (s) => ({
46
+ ...s,
47
+ app: e.target.value,
48
+ flow: void 0
49
+ }) }),
50
+ className: "rounded-md border border-line bg-panel px-2 py-1.5 text-sm",
51
+ children: summary.apps.map((a) => /* @__PURE__ */ jsx("option", { children: a }, a))
52
+ })]
33
53
  })]
34
54
  }),
55
+ /* @__PURE__ */ jsx(RetentionNote, {
56
+ rangeFrom: range.from,
57
+ retention: summary.retention
58
+ }),
35
59
  /* @__PURE__ */ jsx("section", {
36
60
  "aria-label": "Summary",
37
61
  className: "rounded-xl border border-line bg-panel p-4 sm:p-5",
@@ -47,10 +71,10 @@ function Overview() {
47
71
  className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
48
72
  children: [
49
73
  /* @__PURE__ */ jsx(Stat, {
50
- label: "Errors (24h)",
51
- value: totals.errors24h.toLocaleString(),
74
+ label: `Errors (${span})`,
75
+ value: totals.errorsRange.toLocaleString(),
52
76
  tone: totals.criticalIssues ? "critical" : void 0,
53
- hint: change === null ? "no prior data" : `${change > 0 ? "▲" : change < 0 ? "▼" : "•"} ${Math.abs(change)}% vs previous 24h`
77
+ hint: change === null ? "not enough earlier data to compare" : change > 500 ? `▲ from ${totals.errorsPrev.toLocaleString()} in the previous ${range.span}` : `${change > 0 ? "▲" : change < 0 ? "▼" : "•"} ${Math.abs(change)}% vs previous ${range.span}`
54
78
  }),
55
79
  /* @__PURE__ */ jsx(Stat, {
56
80
  label: "Critical issues",
@@ -59,25 +83,26 @@ function Overview() {
59
83
  hint: "≥ threshold occurrences in 24h"
60
84
  }),
61
85
  /* @__PURE__ */ jsx(Stat, {
62
- label: "Failing flows",
63
- value: totals.failingFlows,
64
- hint: "parts of the app with errors in 24h"
86
+ label: `Crash-free users (${span})`,
87
+ value: asPct(summary.health.crashFreeUsersRate),
88
+ tone: summary.health.crashFreeUsersRate !== null && summary.health.crashFreeUsersRate < .99 ? "high" : void 0,
89
+ hint: `${summary.health.users.toLocaleString()} users · ${summary.health.crashedUsers.toLocaleString()} crashed`
65
90
  }),
66
91
  /* @__PURE__ */ jsx(Stat, {
67
- label: "Crash-free sessions (14d)",
92
+ label: `Crash-free sessions (${span})`,
68
93
  value: asPct(summary.health.crashFreeRate),
69
94
  tone: summary.health.crashFreeRate !== null && summary.health.crashFreeRate < .99 ? "high" : void 0,
70
- hint: `${summary.health.sessions14d.toLocaleString()} sessions · ${totals.activeIssues} active issues`
95
+ hint: `${summary.health.sessionsRange.toLocaleString()} sessions · ${totals.activeIssues} active issues`
71
96
  })
72
97
  ]
73
98
  }),
74
99
  /* @__PURE__ */ jsxs("div", {
75
100
  className: "grid gap-5 lg:grid-cols-5",
76
101
  children: [/* @__PURE__ */ jsx("div", {
77
- className: "lg:col-span-3",
102
+ className: "min-w-0 lg:col-span-3",
78
103
  children: /* @__PURE__ */ jsxs(Card, {
79
104
  title: "Where the app is failing",
80
- subtitle: "Errors in the last 24h by flow, coloured by worst severity. Click a bar to filter issues.",
105
+ subtitle: `Errors in ${range.label} by flow, coloured by worst severity. Click a bar to filter issues.`,
81
106
  children: [/* @__PURE__ */ jsx(FlowChart, {
82
107
  data: summary.flows,
83
108
  onSelect: (f) => navigate({ search: (s) => ({
@@ -89,37 +114,54 @@ function Overview() {
89
114
  "Flow",
90
115
  "Severity",
91
116
  "Errors 24h",
92
- "Errors 14d",
117
+ `Errors (${span})`,
93
118
  "Issues",
94
- "Failure rate 14d"
119
+ `Failure rate (${span})`
95
120
  ],
96
121
  rows: summary.flows.map((f) => [
97
- f.flow,
122
+ f.critical ? `${f.flow} (critical)` : f.flow,
98
123
  f.severity,
99
124
  f.errors24h,
100
- f.errors14d,
125
+ f.errorsRange,
101
126
  f.issues,
102
127
  f.failureRate === null ? "—" : `${Math.round(f.failureRate * 100)}%`
103
128
  ])
104
129
  })]
105
130
  })
106
131
  }), /* @__PURE__ */ jsx("div", {
107
- className: "lg:col-span-2",
132
+ className: "min-w-0 lg:col-span-2",
108
133
  children: /* @__PURE__ */ jsxs(Card, {
109
134
  title: "Error trend",
110
- subtitle: "Errors per day, last 14 days (UTC)",
111
- children: [/* @__PURE__ */ jsx(TrendChart, { data: summary.trend }), /* @__PURE__ */ jsx(DataTable, {
112
- columns: [
113
- "Day",
114
- "Errors",
115
- "Events"
116
- ],
117
- rows: summary.trend.map((d) => [
118
- d.day,
119
- d.errors,
120
- d.events
121
- ])
122
- })]
135
+ subtitle: `Errors per ${range.granularity}, ${range.label} (UTC)`,
136
+ children: [
137
+ /* @__PURE__ */ jsx(TrendChart, {
138
+ data: summary.trend,
139
+ markers: summary.releases.map((r) => ({
140
+ day: r.firstDay,
141
+ label: r.release
142
+ }))
143
+ }),
144
+ summary.releases.length > 0 && /* @__PURE__ */ jsxs("p", {
145
+ className: "mt-2 text-xs text-muted",
146
+ children: [
147
+ "Dashed lines: a release's first sessions (",
148
+ summary.releases.map((r) => r.release).join(", "),
149
+ ")."
150
+ ]
151
+ }),
152
+ /* @__PURE__ */ jsx(DataTable, {
153
+ columns: [
154
+ "Day",
155
+ "Errors",
156
+ "Events"
157
+ ],
158
+ rows: summary.trend.map((d) => [
159
+ d.day,
160
+ d.errors,
161
+ d.events
162
+ ])
163
+ })
164
+ ]
123
165
  })
124
166
  })]
125
167
  }),
@@ -127,7 +169,7 @@ function Overview() {
127
169
  className: "grid gap-5 lg:grid-cols-2",
128
170
  children: [/* @__PURE__ */ jsx(Card, {
129
171
  title: "Release health",
130
- subtitle: "Share of sessions without a crash or unhandled error, per app version (14d). Recorded automatically by the SDK.",
172
+ subtitle: `Share of sessions without a crash or unhandled error, per app version, in ${range.label}. Recorded automatically by the SDK.`,
131
173
  children: summary.health.releases.length ? /* @__PURE__ */ jsx("div", {
132
174
  className: "-mx-4 overflow-x-auto sm:mx-0",
133
175
  children: /* @__PURE__ */ jsxs("table", {
@@ -183,27 +225,171 @@ function Overview() {
183
225
  })
184
226
  }), /* @__PURE__ */ jsx(Card, {
185
227
  title: "Failing endpoints",
186
- subtitle: "Requests that returned 5xx, timed out or failed, 14d. Captured automatically from fetch and XHR.",
228
+ subtitle: `Requests that returned 5xx, timed out or failed in ${range.label}. Captured automatically from fetch and XHR.`,
187
229
  children: summary.health.endpoints.length ? /* @__PURE__ */ jsx(ShareBars, { rows: summary.health.endpoints.map((e) => ({
188
230
  key: e.endpoint,
189
- value: e.failures14d
231
+ value: e.failuresRange
190
232
  })) }) : /* @__PURE__ */ jsx("p", {
191
233
  className: "text-sm text-muted",
192
234
  children: "No failed requests."
193
235
  })
194
236
  })]
195
237
  }),
238
+ (summary.steps.length > 0 || summary.timings.length > 0) && /* @__PURE__ */ jsxs("div", {
239
+ className: "grid gap-5 lg:grid-cols-2",
240
+ children: [summary.steps.length > 0 && /* @__PURE__ */ jsx(Card, {
241
+ title: "Steps that fail",
242
+ subtitle: `track() outcomes per step in ${range.label}, most failures first.${flow ? ` Filtered to ${flow}.` : ""}`,
243
+ children: /* @__PURE__ */ jsx("div", {
244
+ className: "-mx-4 overflow-x-auto sm:mx-0",
245
+ children: /* @__PURE__ */ jsxs("table", {
246
+ className: "tabular w-full min-w-[420px] text-left text-sm",
247
+ children: [/* @__PURE__ */ jsx("thead", {
248
+ className: "text-xs text-muted",
249
+ children: /* @__PURE__ */ jsxs("tr", {
250
+ className: "border-b border-line",
251
+ children: [
252
+ /* @__PURE__ */ jsx("th", {
253
+ className: "px-4 py-2 font-medium sm:px-2",
254
+ children: "Flow · step"
255
+ }),
256
+ /* @__PURE__ */ jsx("th", {
257
+ className: "px-2 py-2 text-right font-medium",
258
+ children: "Tries"
259
+ }),
260
+ /* @__PURE__ */ jsx("th", {
261
+ className: "px-2 py-2 text-right font-medium",
262
+ children: "Failed"
263
+ }),
264
+ /* @__PURE__ */ jsx("th", {
265
+ className: "px-2 py-2 text-right font-medium",
266
+ children: "Failure rate"
267
+ })
268
+ ]
269
+ })
270
+ }), /* @__PURE__ */ jsx("tbody", { children: summary.steps.filter((st) => !flow || st.flow === flow).slice(0, 8).map((st) => /* @__PURE__ */ jsxs("tr", {
271
+ className: "border-b border-line last:border-0",
272
+ children: [
273
+ /* @__PURE__ */ jsxs("td", {
274
+ className: "px-4 py-2 font-mono text-xs sm:px-2",
275
+ children: [
276
+ st.flow,
277
+ " · ",
278
+ st.step
279
+ ]
280
+ }),
281
+ /* @__PURE__ */ jsx("td", {
282
+ className: "px-2 py-2 text-right text-muted",
283
+ children: (st.successes + st.failures).toLocaleString()
284
+ }),
285
+ /* @__PURE__ */ jsx("td", {
286
+ className: "px-2 py-2 text-right",
287
+ children: st.failures.toLocaleString()
288
+ }),
289
+ /* @__PURE__ */ jsx("td", {
290
+ className: `px-2 py-2 text-right font-semibold ${st.failureRate !== null && st.failureRate >= .1 ? "text-sev-critical" : ""}`,
291
+ children: st.failureRate === null ? "—" : `${Math.round(st.failureRate * 100)}%`
292
+ })
293
+ ]
294
+ }, `${st.flow}|${st.step}`)) })]
295
+ })
296
+ })
297
+ }), summary.timings.length > 0 && /* @__PURE__ */ jsxs(Card, {
298
+ title: "Response times",
299
+ subtitle: `Busiest endpoints in ${range.label}. Measured by the SDK on real devices.`,
300
+ children: [/* @__PURE__ */ jsx("div", {
301
+ className: "-mx-4 overflow-x-auto sm:mx-0",
302
+ children: /* @__PURE__ */ jsxs("table", {
303
+ className: "tabular w-full min-w-[420px] text-left text-sm",
304
+ children: [/* @__PURE__ */ jsx("thead", {
305
+ className: "text-xs text-muted",
306
+ children: /* @__PURE__ */ jsxs("tr", {
307
+ className: "border-b border-line",
308
+ children: [
309
+ /* @__PURE__ */ jsx("th", {
310
+ className: "px-4 py-2 font-medium sm:px-2",
311
+ children: "Endpoint"
312
+ }),
313
+ /* @__PURE__ */ jsx("th", {
314
+ className: "px-2 py-2 text-right font-medium",
315
+ children: "Requests"
316
+ }),
317
+ /* @__PURE__ */ jsx("th", {
318
+ className: "px-2 py-2 text-right font-medium",
319
+ children: "p50"
320
+ }),
321
+ /* @__PURE__ */ jsx("th", {
322
+ className: "px-2 py-2 text-right font-medium",
323
+ children: "p95"
324
+ }),
325
+ /* @__PURE__ */ jsx("th", {
326
+ className: "px-2 py-2 text-right font-medium",
327
+ children: "Failed"
328
+ })
329
+ ]
330
+ })
331
+ }), /* @__PURE__ */ jsx("tbody", { children: summary.timings.map((t) => /* @__PURE__ */ jsxs("tr", {
332
+ className: "border-b border-line last:border-0",
333
+ children: [
334
+ /* @__PURE__ */ jsx("td", {
335
+ className: "max-w-[220px] truncate px-4 py-2 font-mono text-xs sm:px-2",
336
+ title: t.endpoint,
337
+ children: t.endpoint
338
+ }),
339
+ /* @__PURE__ */ jsx("td", {
340
+ className: "px-2 py-2 text-right text-muted",
341
+ children: t.requests.toLocaleString()
342
+ }),
343
+ /* @__PURE__ */ jsx("td", {
344
+ className: "px-2 py-2 text-right",
345
+ children: ms(t.p50)
346
+ }),
347
+ /* @__PURE__ */ jsx("td", {
348
+ className: `px-2 py-2 text-right font-semibold ${t.p95 !== null && t.p95 >= 3e3 ? "text-sev-high" : ""}`,
349
+ children: ms(t.p95)
350
+ }),
351
+ /* @__PURE__ */ jsx("td", {
352
+ className: `px-2 py-2 text-right ${t.errorRate >= .05 ? "font-semibold text-sev-critical" : "text-muted"}`,
353
+ children: `${(t.errorRate * 100).toFixed(t.errorRate < .1 ? 1 : 0)}%`
354
+ })
355
+ ]
356
+ }, t.endpoint)) })]
357
+ })
358
+ }), /* @__PURE__ */ jsx("p", {
359
+ className: "mt-2 text-xs text-muted",
360
+ children: "p50/p95: half / 95% of requests finished within this time."
361
+ })]
362
+ })]
363
+ }),
196
364
  /* @__PURE__ */ jsx(Card, {
197
365
  title: flow ? `Issues in ${flow}` : "Issues by severity",
198
- subtitle: "Grouped errors. Severity is set by occurrences in the last 24 hours.",
199
- right: flow ? /* @__PURE__ */ jsx("button", {
200
- className: "text-xs text-accent",
201
- onClick: () => navigate({ search: (s) => ({
202
- ...s,
203
- flow: void 0
204
- }) }),
205
- children: "Clear filter ×"
206
- }) : null,
366
+ subtitle: `Grouped errors seen in ${range.label}. Severity is set by occurrences in the last 24 hours.`,
367
+ right: /* @__PURE__ */ jsxs("div", {
368
+ className: "flex flex-wrap items-center justify-end gap-1 text-xs",
369
+ children: [flow && /* @__PURE__ */ jsx("button", {
370
+ className: "mr-2 text-accent",
371
+ onClick: () => navigate({ search: (s) => ({
372
+ ...s,
373
+ flow: void 0
374
+ }) }),
375
+ children: "Clear flow ×"
376
+ }), [
377
+ "open",
378
+ "resolved",
379
+ "ignored",
380
+ "all"
381
+ ].map((st) => /* @__PURE__ */ jsxs("button", {
382
+ onClick: () => navigate({ search: (s) => ({
383
+ ...s,
384
+ status: st === "open" ? void 0 : st
385
+ }) }),
386
+ className: `rounded-md border px-2 py-1 capitalize ${statusFilter === st ? "border-accent bg-accent-soft text-accent" : "border-line text-muted hover:bg-panel-2"}`,
387
+ children: [st, st !== "all" && /* @__PURE__ */ jsx("span", {
388
+ className: "ml-1 opacity-70",
389
+ children: countFor(st)
390
+ })]
391
+ }, st))]
392
+ }),
207
393
  children: /* @__PURE__ */ jsx("div", {
208
394
  className: "-mx-4 overflow-x-auto sm:mx-0",
209
395
  children: /* @__PURE__ */ jsxs("table", {
@@ -225,13 +411,17 @@ function Overview() {
225
411
  className: "px-2 py-2 font-medium",
226
412
  children: "Flow"
227
413
  }),
414
+ /* @__PURE__ */ jsx("th", {
415
+ className: "px-2 py-2 text-right font-medium",
416
+ children: "Users"
417
+ }),
228
418
  /* @__PURE__ */ jsx("th", {
229
419
  className: "px-2 py-2 text-right font-medium",
230
420
  children: "24h"
231
421
  }),
232
422
  /* @__PURE__ */ jsx("th", {
233
423
  className: "px-2 py-2 text-right font-medium",
234
- children: "Total"
424
+ children: span === "24h" ? "Total" : span === "range" ? "Range" : span
235
425
  }),
236
426
  /* @__PURE__ */ jsx("th", {
237
427
  className: "px-2 py-2 text-right font-medium",
@@ -248,16 +438,27 @@ function Overview() {
248
438
  }),
249
439
  /* @__PURE__ */ jsxs("td", {
250
440
  className: "max-w-[420px] px-2 py-2.5",
251
- children: [/* @__PURE__ */ jsx(Link, {
252
- to: "/issues/$fingerprint",
253
- params: { fingerprint: i.fingerprint },
254
- search: { app: summary.app },
255
- className: "block truncate font-medium hover:text-accent",
256
- children: i.title
257
- }), i.culprit && /* @__PURE__ */ jsx("div", {
258
- className: "truncate font-mono text-xs text-muted",
259
- children: i.culprit
260
- })]
441
+ children: [
442
+ /* @__PURE__ */ jsx(Link, {
443
+ to: "/issues/$fingerprint",
444
+ params: { fingerprint: i.fingerprint },
445
+ search: {
446
+ app: summary.app,
447
+ range: range.preset === "14d" ? void 0 : range.preset,
448
+ ...range.preset === "custom" ? {
449
+ from: range.from,
450
+ to: range.to
451
+ } : {}
452
+ },
453
+ className: "block truncate font-medium hover:text-accent",
454
+ children: i.title
455
+ }),
456
+ i.culprit && /* @__PURE__ */ jsx("div", {
457
+ className: "truncate font-mono text-xs text-muted",
458
+ children: i.culprit
459
+ }),
460
+ /* @__PURE__ */ jsx(IssueLabels, { issue: i })
461
+ ]
261
462
  }),
262
463
  /* @__PURE__ */ jsx("td", {
263
464
  className: "px-2 py-2.5 text-xs",
@@ -266,13 +467,17 @@ function Overview() {
266
467
  children: "untagged"
267
468
  })
268
469
  }),
470
+ /* @__PURE__ */ jsx("td", {
471
+ className: "px-2 py-2.5 text-right text-muted",
472
+ children: i.users ?? "—"
473
+ }),
269
474
  /* @__PURE__ */ jsx("td", {
270
475
  className: "px-2 py-2.5 text-right font-semibold",
271
476
  children: i.count24h
272
477
  }),
273
478
  /* @__PURE__ */ jsx("td", {
274
479
  className: "px-2 py-2.5 text-right text-muted",
275
- children: i.countTotal
480
+ children: span === "24h" ? i.countTotal : i.countRange
276
481
  }),
277
482
  /* @__PURE__ */ jsx("td", {
278
483
  className: "px-2 py-2.5 text-right text-xs text-muted",
@@ -280,7 +485,7 @@ function Overview() {
280
485
  })
281
486
  ]
282
487
  }, i.fingerprint)), !issues.length && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
283
- colSpan: 6,
488
+ colSpan: 7,
284
489
  className: "px-2 py-6 text-center text-muted",
285
490
  children: "No issues."
286
491
  }) })] })]
@@ -290,9 +495,25 @@ function Overview() {
290
495
  /* @__PURE__ */ jsxs("div", {
291
496
  className: "grid gap-5 md:grid-cols-3",
292
497
  children: [
498
+ /* @__PURE__ */ jsx(Card, {
499
+ title: "By network",
500
+ subtitle: `Errors, ${range.label}`,
501
+ children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.network.map((r) => ({
502
+ key: r.key,
503
+ value: r.errors
504
+ })) })
505
+ }),
506
+ /* @__PURE__ */ jsx(Card, {
507
+ title: "By country",
508
+ subtitle: `Errors, ${range.label}. From the device's timezone, not its IP.`,
509
+ children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.country.map((r) => ({
510
+ key: r.key,
511
+ value: r.errors
512
+ })) })
513
+ }),
293
514
  /* @__PURE__ */ jsx(Card, {
294
515
  title: "By OS",
295
- subtitle: "Errors, 14d",
516
+ subtitle: `Errors, ${range.label}`,
296
517
  children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.os.map((r) => ({
297
518
  key: r.key,
298
519
  value: r.errors
@@ -300,7 +521,7 @@ function Overview() {
300
521
  }),
301
522
  /* @__PURE__ */ jsx(Card, {
302
523
  title: "By app version",
303
- subtitle: "Errors, 14d",
524
+ subtitle: `Errors, ${range.label}`,
304
525
  children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.appVersion.map((r) => ({
305
526
  key: r.key,
306
527
  value: r.errors
@@ -308,7 +529,7 @@ function Overview() {
308
529
  }),
309
530
  /* @__PURE__ */ jsx(Card, {
310
531
  title: "By device",
311
- subtitle: "Errors, 14d",
532
+ subtitle: `Errors, ${range.label}`,
312
533
  children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.deviceModel.map((r) => ({
313
534
  key: r.key,
314
535
  value: r.errors
@@ -481,4 +702,9 @@ await deBug.track("auth.login", "submit_otp", () => verifyOtp(code));`
481
702
  ]
482
703
  });
483
704
  }
705
+ function ms(v) {
706
+ if (v === null) return "—";
707
+ if (!Number.isFinite(v)) return "> 10 s";
708
+ return v >= 1e3 ? `≤ ${(v / 1e3).toFixed(v % 1e3 ? 1 : 0)} s` : `≤ ${v} ms`;
709
+ }
484
710
  export { Overview as component };
@@ -1,6 +1,6 @@
1
- import { r as Logo } from "./ui-Lv-KcOoP.js";
2
- import { o as logout } from "./fns-CgB12FUN.js";
3
- import { a as Route } from "./router-DqTf7XfT.js";
1
+ import { i as Logo } from "./ui-BJokJdYa.js";
2
+ import { s as logout } from "./fns-DPsnK0zS.js";
3
+ import { o as Route } from "./router-CIIGBCmL.js";
4
4
  import { Link, Outlet, useRouter } from "@tanstack/react-router";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/routes/_authed.tsx?tsr-split=component
@@ -13,11 +13,31 @@ function Layout() {
13
13
  className: "sticky top-0 z-10 border-b border-line bg-bg/90 backdrop-blur",
14
14
  children: /* @__PURE__ */ jsxs("div", {
15
15
  className: "mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3 sm:px-6",
16
- children: [/* @__PURE__ */ jsx(Link, {
17
- to: "/",
18
- search: {},
19
- className: "shrink-0",
20
- children: /* @__PURE__ */ jsx(Logo, {})
16
+ children: [/* @__PURE__ */ jsxs("div", {
17
+ className: "flex items-center gap-5",
18
+ children: [/* @__PURE__ */ jsx(Link, {
19
+ to: "/",
20
+ search: {},
21
+ className: "shrink-0",
22
+ children: /* @__PURE__ */ jsx(Logo, {})
23
+ }), /* @__PURE__ */ jsxs("nav", {
24
+ className: "flex items-center gap-3 text-sm",
25
+ "aria-label": "Main",
26
+ children: [/* @__PURE__ */ jsx(Link, {
27
+ to: "/",
28
+ search: {},
29
+ className: "text-muted hover:text-ink",
30
+ activeProps: { className: "font-medium text-ink" },
31
+ activeOptions: { exact: true },
32
+ children: "Overview"
33
+ }), /* @__PURE__ */ jsx(Link, {
34
+ to: "/settings",
35
+ search: {},
36
+ className: "text-muted hover:text-ink",
37
+ activeProps: { className: "font-medium text-ink" },
38
+ children: "Settings"
39
+ })]
40
+ })]
21
41
  }), /* @__PURE__ */ jsxs("div", {
22
42
  className: "flex items-center gap-3 text-sm",
23
43
  children: [/* @__PURE__ */ jsx("span", {
@@ -9,32 +9,41 @@ var tsrStartManifest = () => ({ routes: {
9
9
  "/api/summary",
10
10
  "/api/issues/$fingerprint"
11
11
  ],
12
- preloads: ["/assets/index-D7uhDdvA.js"],
12
+ preloads: ["/assets/index-D12jr1bm.js", "/assets/preload-helper-CDziuvpw.js"],
13
13
  scripts: [{ attrs: {
14
14
  type: "module",
15
15
  async: !0,
16
- src: "/assets/index-D7uhDdvA.js"
16
+ src: "/assets/index-D12jr1bm.js"
17
17
  } }]
18
18
  },
19
19
  "/_authed": {
20
20
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed.tsx",
21
- children: ["/_authed/", "/_authed/issues/$fingerprint"],
22
- preloads: ["/assets/_authed-mWCAMokt.js", "/assets/ui-Bj6uJIr8.js"]
21
+ children: [
22
+ "/_authed/settings",
23
+ "/_authed/",
24
+ "/_authed/issues/$fingerprint"
25
+ ],
26
+ preloads: ["/assets/_authed-DTn7rMla.js", "/assets/ui-BiRMJGWB.js"]
23
27
  },
24
28
  "/login": {
25
29
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/login.tsx",
26
30
  children: void 0,
27
- preloads: ["/assets/login-MqvT094Y.js", "/assets/ui-Bj6uJIr8.js"]
31
+ preloads: ["/assets/login-oLP1Yyz3.js", "/assets/ui-BiRMJGWB.js"]
32
+ },
33
+ "/_authed/settings": {
34
+ filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/settings.tsx",
35
+ children: void 0,
36
+ preloads: ["/assets/settings-9oQsCwdV.js"]
28
37
  },
29
38
  "/_authed/": {
30
39
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/index.tsx",
31
40
  children: void 0,
32
- preloads: ["/assets/_authed-Bi62GTX3.js", "/assets/charts-C76vsG2N.js"]
41
+ preloads: ["/assets/_authed-Dc7covsB.js", "/assets/charts-C0zeGTzu.js"]
33
42
  },
34
43
  "/_authed/issues/$fingerprint": {
35
44
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/issues.$fingerprint.tsx",
36
45
  children: void 0,
37
- preloads: ["/assets/issues._fingerprint-fVGLnT37.js", "/assets/charts-C76vsG2N.js"]
46
+ preloads: ["/assets/issues._fingerprint-C6ryZvIu.js", "/assets/charts-C0zeGTzu.js"]
38
47
  }
39
48
  } });
40
49
  export { tsrStartManifest };