WebSocket traffic support + GitHub Packages publishing - #1
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds WebSocket traffic support to this Chucker fork so that WebSocket events — outgoing/incoming messages and the full
WebSocketListenerlifecycle (open / closing / closed / failure) — are captured and shown mixed into the existing transaction list. Also wires up publishing to GitHub Packages on release so the fork can be consumed byblink-android.Motivation:
blink-android's realtime transport (WebsocketRealtimeImpl) uses a dedicated interceptor-lessOkHttpClient, so Chucker never observed WebSocket traffic. OkHttp does not run application interceptors on the WS frame stream, so a dedicated capture API is required rather than aChuckerInterceptor.WebSocket capture (public API)
ChuckerWebSockets.create(client, request, collector, listener)— drop-in replacement forOkHttpClient.newWebSocket(...); captures both directions and the full lifecycle.ChuckerWebSocketListener— aWebSocketListenerdecorator (incoming + lifecycle).RecordingWebSocket(internal) — wraps the returned socket to capture outgoingsend().Data & UI
WebSocketTraffic(one row per event) + DAO + repository;ChuckerDatabasebumped to v12 (destructive migration).MainActivitylist (TransactionRow+ multi-view-type adapter).sequencecaptured synchronously at record time breaks ties when multiple events share the same millisecond (fixes SENT appearing before OPEN).Export, notification, retention
ExportFormat.LOGin the API) now includes WS events mixed with HTTP, ordered by time. HAR stays HTTP-only.:library-no-opgets passthrough stubs so release builds keep compiling.Publishing to GitHub Packages
gradle/gradle-github-packages.gradleadds a GitHub Packages Maven repository to thereleasepublication (leaves upstream Sonatype setup untouched)..github/workflows/publish-github-packages.yamlpublisheslibraryandlibrary-no-opon Release → Published (and manual dispatch), using the built-inGITHUB_TOKEN(packages: write). Version is derived from the release tag.Verification
:library+:library-no-op+:samplebuild; full:libraryunit test suite,detekt, and Androidlintall green.ChuckerWebSocketListener,RecordingWebSocket,TrafficListSharable(export), and a Room round-trip for the WS repository.Notes
com.github.chuckerteam.chuckerso consumers can reuse the coordinate.read:packages), unlike JitPack/Maven Central.main) for thereleasetrigger to fire.🤖 Generated with Claude Code