Commit Graph
2 Commits
Author SHA1 Message Date
BaaRai 6067ea1489 feat(web): replay a recorded request from the traffic detail
Adds a Replay tab to the traffic detail sheet, backed by
POST /api/traffic/replay (#258). The form starts from the selected
exchange: method and URL from the exchange, headers and body from the
recorded request. Host is taken from the URL and not editable; headers
the server drops (hop-by-hop, Content-Length, Proxy-Authorization, and
those named in Connection) are left out and listed. A binary body
(NUL byte) disables Send. The response shows status, duration,
truncation, a passthrough warning when it was not recorded, the sorted
headers and the raw text; a recorded replay refreshes the list.

http() now throws ApiError, an Error with the HTTP status, so the tab
can tell 413, 502, 503 and 504 apart. parseRawRequest and
splitReplayHeaders live in lib/replay.ts with node tests run in CI
(test:replay). Stream exchanges show the tab disabled.
2026-11-16 17:56:19 +01:00
BaaRai 73aa56c16f perf(web): pause snapshot polling in hidden tabs
Adds setVisibleInterval (web/src/lib/polling.ts): no ticks while the tab is hidden, an immediate refresh on return, no overlapping polls, errors swallowed, cleanup removes the listener. API pollers use it; local clock ticks keep setInterval. CI runs the helper tests. Backported from #209 (contributed by @renaesop).
2026-11-15 23:08:24 +01:00