@beignet/devtools 0.0.6 → 0.0.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @beignet/devtools
2
2
 
3
+ ## 0.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 3537da0: Rewrite the devtools dashboard as a shadcn-based UI with dark mode, sidebar navigation grouped by section, a request lifecycle waterfall, owner-grouped errors, focus-panel metrics, and a JSON viewer with syntax highlighting. The route contract is unchanged and the package adds zero new runtime dependencies — the dashboard compiles into a single self-contained HTML file at package build time.
8
+
3
9
  ## 0.0.6
4
10
 
5
11
  ## 0.0.5
package/README.md CHANGED
@@ -64,27 +64,37 @@ export const { GET, POST } = createDevtoolsRoute(server.ports.devtools, {
64
64
  Open `/api/devtools`.
65
65
 
66
66
  The dashboard connects to the event stream with Server-Sent Events and falls
67
- back to polling when `EventSource` is unavailable. It includes tabs for the
68
- timeline, requests, use cases, errors, domain events, jobs, outbox delivery, schedules, providers, and
69
- provider-owned events such as database/cache/storage/uploads/mail/notifications/auth/audit/rate limit
70
- activity, and custom events.
71
- Request rows expand into an end-to-end lifecycle view. The detail view groups
72
- route match, contract name, request ID, trace ID, method, path, status,
73
- duration, response ownership, use case spans, correlated provider events, side
74
- effects, errors, and redaction status for events that share the same `traceId` or
75
- `requestId`.
76
-
77
- Use the toolbar to search across event summaries, paths, messages, names,
78
- watchers, IDs, and details. The dashboard also includes method, status, and
79
- watcher filters for narrowing noisy timelines.
80
-
81
- The Errors tab groups failures by owner: route, framework, provider, job,
67
+ back to polling when `EventSource` is unavailable. A sidebar groups views by
68
+ section Overview, HTTP, Application, Infrastructure, and Operations with
69
+ live event-count badges per view, plus dynamic views for enabled custom
70
+ watchers. The header shows clickable stats (events, requests, errors, use
71
+ cases), live connection status, Pause/Resume, and Clear. Pausing buffers
72
+ incoming events and reveals them on resume.
73
+
74
+ The dashboard follows the system color scheme and includes a manual
75
+ light/dark/system toggle persisted in `localStorage`. The theme matches the
76
+ shadcn look of generated Beignet starter apps.
77
+
78
+ Request rows expand into an end-to-end lifecycle view for events that share
79
+ the same `traceId` or `requestId`. The detail renders a lifecycle waterfall:
80
+ correlated spans drawn as relative timing bars (durations are measured at
81
+ completion), alongside overview facts such as route match, contract name,
82
+ request ID, trace ID, method, path, status, duration, and response ownership,
83
+ a redaction note, correlated activity grouped by category, and the raw JSON.
84
+
85
+ Press `/` to focus search, which matches event summaries, paths, messages,
86
+ names, watchers, IDs, and details. Method, status, and watcher filters narrow
87
+ noisy timelines. Timeline rows lead with the human-readable summary, and IDs
88
+ truncate to copy-on-click chips. The JSON detail viewer renders syntax
89
+ highlighting, collapsible nodes, and a copy button.
90
+
91
+ The errors view groups failures by owner: route, framework, provider, job,
82
92
  schedule, outbox, client-side, devtools, or unknown. Each row shows the
83
93
  message, owner, related route/status, request ID, trace ID, and nearby
84
94
  correlated events so you can see whether a failure belongs to application code,
85
95
  the framework boundary, provider work, or background execution.
86
96
 
87
- Focused panels render subsystem metrics, row summaries, and drill-down fields
97
+ Focus panels render subsystem metrics, row summaries, and drill-down fields
88
98
  for each Beignet workflow primitive. Database shows query counts, failures,
89
99
  inferred table names, redaction status, provider name, port, parameter count,
90
100
  and request/trace IDs when the runtime can preserve active request context.
@@ -200,8 +210,8 @@ Disabled watchers do not store matching events. The installed watcher metadata
200
210
  is available through `ctx.ports.devtools.getWatchers()` and the dashboard API.
201
211
 
202
212
  Custom integrations can also register watcher metadata for their own event
203
- types. Custom watcher tabs appear in the dashboard when they own `custom`
204
- events:
213
+ types. Custom watcher views appear in the dashboard sidebar when they own
214
+ `custom` events:
205
215
 
206
216
  ```typescript
207
217
  createDevtoolsProvider({
@@ -506,6 +516,15 @@ code does not need null checks.
506
516
  Devtools can contain sensitive request, error, and domain data. Keep it on local
507
517
  development routes unless you intentionally add authentication and redaction.
508
518
 
519
+ ## Development
520
+
521
+ The dashboard UI is a React app in `ui/`. `bun run build:ui` compiles it into
522
+ one self-contained HTML file and embeds it in the package as a generated module
523
+ (`src/ui-html.generated.ts`, gitignored); `bun run build` runs `build:ui` and
524
+ then the TypeScript build. From a fresh clone, run `bun run build` once before
525
+ running this package's tests directly — the root `bun run test` handles that
526
+ ordering through turbo.
527
+
509
528
  ## License
510
529
 
511
530
  MIT
@@ -0,0 +1,2 @@
1
+ export declare const DEVTOOLS_DASHBOARD_HTML: string;
2
+ //# sourceMappingURL=ui-html.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-html.generated.d.ts","sourceRoot":"","sources":["../src/ui-html.generated.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,uBAAuB,EAAE,MACqprc,CAAC"}