Record the dashboard, and make the page capturable
node scripts/record-dashboard.mjs drives the gateway with real requests and screenshots the real dashboard between them with headless Chrome. Screen recording was the obvious route and the wrong one: it would photograph whatever else happened to be on screen and needs a permission grant. Headless captures only the page, needs no permission, and writes frames straight to disk. The dashboard never finished loading under a headless browser, because it holds an SSE connection open and polls on an interval — so ?nolive=1 now renders once and goes quiet. That also makes the page screenshot-testable in general. Chrome does not reliably exit after --screenshot, so the recorder waits for the PNG to appear and stop growing rather than guessing a sleep, and treats profile cleanup as best-effort since Chrome keeps flushing after SIGKILL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eeb5cad4ce
commit
6c41b6d804
5 files changed
+160
-3
No files matched your search
@@ -10,8 +10,14 @@ has a sixteenth of the context window.
|
||||
|
||||

|
||||
|
||||
*Every frame above is a real request against a live provider — recorded by
|
||||
`./scripts/demo.sh`, which you can run yourself.*
|
||||
**The dashboard, reacting to that same traffic:**
|
||||
|
||||

|
||||
|
||||
*Both are real. The terminal is `./scripts/demo.sh`; the dashboard is headless
|
||||
Chrome screenshotting the actual page via `node scripts/record-dashboard.mjs`,
|
||||
between real requests. Watch the token totals, cache hit rate and per-model
|
||||
counts climb — nothing is mocked up.*
|
||||
|
||||
```
|
||||
your app ──▶ Freeway ──┬──▶ Mistral 1B tokens/month
|
||||
@@ -404,7 +410,8 @@ gateway flatly refuses to bind one with no keys at all.
|
||||
## Development
|
||||
|
||||
```bash
|
||||
./scripts/demo.sh # scripted walkthrough against your real providers
|
||||
./scripts/demo.sh # scripted walkthrough against your providers
|
||||
node scripts/record-dashboard.mjs # re-record the dashboard GIF
|
||||
npm run build # tsc --build, must be clean
|
||||
npm test # node:test across all workspaces
|
||||
npm run smoke # every route against mock upstreams — run this after adding a provider
|
||||
|
||||
Reference in new issue
Block a user