Skip to content

wiretap v0.5.0

Choose a tag to compare

@plutack plutack released this 27 Sep 07:39
· 9 commits to main since this release

wiretap v0.5.0

This release makes large payloads safe to inspect and fixes a delivery stall
that could pin a project's webhook cursor indefinitely.

Large values collapse instead of freezing the viewer

Selecting a webhook or captured exchange with a large body used to freeze the
desktop. The detail pane sent the entire body across the desktop IPC boundary
and rendered it as a single text node, so the browser had to line-break one
multi-hundred-kilobyte token.

Bodies are now bounded end to end, and what remains is collapsed:

  • A base64 or hex value of 2 KiB or more renders as a chip naming the value and
    its size, with a thumbnail when the data is a recognised image.
  • The body around the chip keeps its structure. JSON still pretty-prints at any
    size, so a collapsed value stays readable in context.
  • Click a chip to render it inline; click it again to collapse it.
  • Show more, Save, and Copy all still fetch the complete value when
    you deliberately ask for it.

Large bodies stay out of the interface until you ask

The webhook detail view now fetches a 256 KiB preview with a truncation flag and
requests the rest on demand, so a multi-megabyte payload no longer crosses the
desktop IPC boundary just because a row was selected. Export as code also
generates a snippet on demand for large webhooks instead of rebuilding a
full-body snippet every time the selection changes.

Webhooks larger than 32 KiB no longer stall delivery

Relay pushes arrive as one WebSocket frame carrying the body and raw headers,
with the body base64-encoded. The desktop client used the websocket library's
32 KiB default read limit, so a webhook body over roughly 24 KiB failed the read
and closed the tunnel. Because the relay resumes from the last acknowledged
sequence, the same oversized row was pushed again on every reconnect: that
project's cursor never advanced, and any other project sharing the tunnel
stalled with it. The limit is now 16 MiB, above the relay's 10 MiB ingress cap.

The terminal dashboard keeps up, and holds its columns

The dashboard re-queried full rows on every tick, so each refresh read and
copied up to a hundred request and response bodies — each up to the 10 MiB
ingress cap — purely so the detail pane could render without a refetch. Against
a half-second refresh that is around a second of work, so the view fell
permanently behind. Lists now read a summary projection, load a full row only
when you open it, and skip re-rendering a list whose rows have not changed.

The ingress and traffic tables also hold their columns still. The flexible
column was truncated but never padded, so the payload and transfer columns
followed the length of each URL or route and moved from row to row, while the
table used only a fraction of the terminal width. Columns are now a fixed width
with sizes and timestamps right-aligned, the URL or route takes the spare width,
and a header line names the columns.

  METHOD  SOURCE              ROUTE                                    PAYLOAD      SEEN
  POST    nuvion/156          /test                                      747 B  16:59:35
  POST    nuvion/155          /webhooks/plaid/payment_...                738 B  16:59:35

Upgrade notes

  • Restart the desktop (wiretap gui or wiretap tui) to pick up the read-limit
    fix. A cursor pinned by an oversized webhook resumes on the next connect; no
    webhooks are lost and no manual cleanup is needed.
  • Existing databases need no migration. The webhook preview is served from the
    same table.