You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/dashboard.md
+37-34Lines changed: 37 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Dashboard
2
2
3
-
Brakit serves a live dashboard at `/__brakit` that shows requests, queries, errors, performance insights, and security findings in real time. This document covers how it's built.
3
+
Brakit serves a live dashboard at `/__brakit` that shows requests, queries, errors, performance issues, and security issues in real time. This document covers how it's built.
4
4
5
5
## Table of contents
6
6
@@ -39,12 +39,12 @@ Brakit serves a live dashboard at `/__brakit` that shows requests, queries, erro
|`analysis:updated`|`issues` + `insights` + `security`| Computed issues, raw insights, and security findings |
124
126
125
-
The `analysis:updated` channel emits two SSE events — one for insights, one for security findings — so the client can update each section independently.
127
+
The `analysis:updated` channel emits three SSE events: `issues` (the unified StatefulIssue list with lifecycle state), `insights` (raw Insight objects from performance rules), and `security` (raw SecurityFinding objects). The client can update each section independently.
126
128
127
129
---
128
130
@@ -149,6 +151,7 @@ The dashboard enforces several security measures:
149
151
**Localhost-only access.** The interceptor only serves dashboard routes to localhost connections. Non-local IPs get a 404.
150
152
151
153
**Content Security Policy.** Every response includes a strict CSP header:
`bus.on()` returns a dispose function. `SubscriptionBag.add()` accepts it. This is the only way to manage subscriptions — never call `bus.off()` directly.
214
+
`bus.on()` returns a dispose function. `SubscriptionBag.add()` accepts it. `bus.off(channel, fn)` also exists as a direct unsubscribe, but prefer `SubscriptionBag` for any code that manages multiple subscriptions — it avoids the error-prone manual pairing of every `on` with an `off`.
0 commit comments