feat(inspector,engine): stream live traffic over WebSocket (/admin/traffic/ws) with polling fallback
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- fastapi, next.js, python, typescript
- Domain
- backend, frontend, observability
Research direction
Start with engine/app/inspector.py and trace how middleware captures traffic and how GET /admin/traffic returns it. Then read inspector/src/lib/api.ts, inspector/src/components/Workbench.tsx, and engine/tests/test_inspector.py to understand the client state and existing test patterns. Add the WebSocket stream, prefix filtering, Pause/Resume handling, and polling fallback; done means the WebSocket tests pass and the specified pytest, typecheck, and build commands succeed.
Written by the indexing model from the issue text.
Description
Context
Currently the Next.js Inspector polls GET /admin/traffic every 2.5 seconds. Adding a FastAPI WebSocket stream will give developers instant sub-50ms request telemetry while keeping HTTP polling as an automatic fallback if the socket drops.
Scope & Target Files
engine/app/inspector.py(add WebSocket broadcaster +/admin/traffic/wsendpoint)inspector/src/lib/api.tsandinspector/src/components/Workbench.tsx- Add WebSocket tests in
engine/tests/test_inspector.py
Acceptance Criteria
- Expose
WS /admin/traffic/wsinengine/app/inspector.pypushing new captured request events as JSON frames immediately after middleware completion. - Respect optional
prefixquery filtering and Pause/Resume state on the client. - Fall back gracefully to HTTP polling if the WebSocket connection closes or fails.
- Verify both
pytest -vandnpm run typecheck && npm run buildpass cleanly.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 19h 43m
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sepbox-dev/sepbox
-
complexity: trivial engine good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sepbox-dev/sepbox#19 ·
-
complexity: trivial contracts good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
sepbox-dev/sepbox#18 ·
-
complexity: trivial good first issue inspector
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sepbox-dev/sepbox#17 ·
-
complexity: medium engine
Difficulty 4/5 3-5 days Newbie friendliness 52/100
sepbox-dev/sepbox#13 ·
-
complexity: medium engine
Difficulty 3/5 1-2 days Newbie friendliness 76/100
sepbox-dev/sepbox#12 ·
All issues in sepbox-dev/sepbox
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day