Repository navigation
Feat/location ping - #56
Merged
Merged
Conversation
Adds NetworkTransactionRecorder.withCompletionObserver(...). The observer gets every completed request with its raw body and status before capture rules and redaction run, so a feature can react to traffic the capture rules exclude. Provisional streaming records are skipped so a request is only reported once.
New sdk:location-ping module. The host describes its ping endpoints (LocationPingStream) and the body shape (LocationPingSchema), and LocationPingStore appends matching request bodies as JSON lines, one file per stream, group id and day. It enforces a storage cap, rejects path traversal in stream and file names, and reads a track back as points ordered by device time with device and fix time gaps. Pings can be answered, dropped on device or never sent, and each outcome is kept with the ping.
GET /api/v1/location-pings lists streams, schema hints, storage use and
recorded tracks. GET /api/v1/location-pings/track returns one track's
points with a status the map can colour (sent, failed, dropped, offline).
PUT /streams/{name} switches a stream on or off, and the DELETE routes
remove a track or everything.
Mutations need the CSRF token and are written to the audit log, and all
routes sit behind the network capture category. The engine takes the
store through withLocationPings so its constructor ABI is unchanged.
Replays a recorded track on an OpenStreetMap map. Each ping is a dot coloured by its outcome, the route runs through them in device-time order, and the first and last pings are ringed. The view has recording switches per stream, status and app-state filters, device and fix time gap labels, a ping list, a details dialog with copy as JSON, a route summary, auto-refresh, and delete track / delete all. Leaflet 1.9.4 ships with the dashboard (BSD-2, licence alongside). The CSP allows images from tile.openstreetmap.org and nothing else, and the OSM credit sits in the map legend.
DevConsoleConfig.withLocationPingTracking(...) (and the Builder's locationPingTracking) registers the ping streams and body schema. The full runtime keeps the store in app-private files, remembers each stream's switch in SharedPreferences, and records every matching request that goes through the OkHttp interceptor. A request that fails before a response counts as offline. DevConsole.recordLocationPing(...) covers pings the app drops or cannot send, and isLocationPingTrackingEnabled(...) reports whether a stream is recording. Both are gated by the network capture category, and the no-op runtime answers false.
The in-app inspector's More screen lists each configured stream with a switch, so a tester can start or stop recording on the phone without opening the dashboard. The list is empty, and the group hidden, when no streams are configured or network capture is off.
Registers a "ride" stream and adds a Send location ping button. Each tap moves 120 m along a route and cycles through the four outcomes: 200 and 401 go through OkHttp, answered by mock rules, while dropped and offline are reported with DevConsole.recordLocationPing.
Adds docs/LOCATION_PINGS.md (setup, schema, storage, dashboard, security), the protocol reference for the new routes, a README row and a changelog entry.
# Conflicts: # samples/views-java-app/src/main/java/io/devconsole/sample/viewsjava/MainActivity.java # sdk/api/api/api.api # sdk/full/src/main/kotlin/io/devconsole/FullInspectorDataSource.kt # sdk/full/src/main/kotlin/io/devconsole/PlatformFacadeProvider.kt # sdk/server-ktor/api/server-ktor.api # sdk/server-ktor/src/main/resources/devconsole-web/dashboard.css # sdk/server-ktor/src/main/resources/devconsole-web/index.html # sdk/ui-compose/api/ui-compose.api # sdk/ui-compose/src/main/kotlin/io/devconsole/ui/compose/InspectorDataSource.kt # sdk/ui-compose/src/main/kotlin/io/devconsole/ui/compose/InspectorMoreScreen.kt
Shakibuzzaman3104
approved these changes
Nov 8, 2026
Shakibuzzaman3104
added a commit
that referenced
this pull request
Nov 8, 2026
Bring in the location ping tracker from #56 alongside this branch's capture controls, retained run tools and dashboard hardening. - Keep both sides of the facade, dashboard, inspector and API additions - Read the location ping toggle body through receiveTextWithin - Carry locationPingStreams through withSnapshot - Move withSnapshot out of InspectorViewModel to stay under the class size limit - Regenerate the binary compatibility snapshots
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.
What
One or two sentences on what changed and why (the "why" matters more than the "what" — the diff
already shows the what).
Verification
Which
./gradlewcommands did you run, and what did they confirm? (SeeCONTRIBUTING.md for the standard set.)
./gradlew testDebugUnitTest— passing./gradlew ktlintCheck detekt— clean (or new detekt findings are justified, not baselined away)./gradlew apiCheck— clean, orapiDumpis included in this diff because the public API changedrun for the affected sample(s) (
:samples:<name>:assembleRelease :samples:<name>:verifyDevConsoleProtectedArtifacts)Checklist
RedactionEnginefirst(see docs/README.md for the index)
Anything reviewers should look at closely
Optional — call out anything you're unsure about, a tradeoff you made, or a spot you want a second
look at.