feat: report login funnel events (login_started, login_cancelled) - #2238
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2238 +/- ##
==========================================
+ Coverage 29.84% 30.32% +0.47%
==========================================
Files 79 79
Lines 25751 25816 +65
==========================================
+ Hits 7685 7828 +143
+ Misses 18066 17988 -78
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The UTM tags added in the previous PR only see clicks that reach the
browser. These events cover the rest of the funnel: which add-on surface
prompted a login (placement + signup), and users who click and then
abandon before the browser flow completes - the gap that made the -25%
sign-in decline impossible to attribute per surface.
client_lib.report_event() posts fire-and-forget through Blendkit-Client's
/report_event route (bk_client), which forwards to the server in the
background and surfaces nothing to the UI - so nothing breaks or warns
while the server endpoint does not exist yet. CLIENT_VERSION follows the
submodule bump to v1.12.0.
Server contract: POST /api/v1/telemetry/events/ with {"event", "data"};
implemented in BlenderKit-server#3263.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov reported the new telemetry lines as uncovered. The cause was not a missing test: tests/test_bkit_oauth.py was never listed in test.py's _test_modules, so the whole module - including the OAuth tests that predate this branch - has never executed in CI. Registering it makes the existing login/signup tests and the new telemetry test actually run. Also adds a test for the cancel path, the one telemetry line no existing test reached. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PetrDlouhy
force-pushed
the
feature/login-funnel-telemetry
branch
from
July 29, 2026 08:18
b56843b to
8e40958
Compare
Closes the funnel: started/cancelled alone cannot tell an abandoned browser flow from a failed OAuth exchange. The events live in handle_login_task, not write_tokens - write_tokens is shared with token refresh, which must not count as a login. login_failed carries the user-facing error message (truncated) so failure reasons are countable server-side. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tweekazoid
approved these changes
Aug 4, 2026
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
Login-funnel telemetry, split out of #2228 so it can proceed independently of the machine-ID question. Now covers the full funnel:
login_started— which add-on surface prompted it (placement) and whether it was signuplogin_cancelled— user closed the login dialoglogin_completed— OAuth finished, tokens receivedlogin_failed— OAuth errored, with the user-facing message (truncated) so failure reasons are countable server-sideTogether with the UTM tags (#2227) that makes the −25% sign-in decline attributable per surface and per failure mode: prompted → clicked → landed → completed/failed/abandoned.
How
client_lib.report_event()posts fire-and-forget through Blendkit-Client's/report_eventroute, which forwards to the server in the background. It creates no Task and surfaces nothing to the UI — telemetry can never break or annoy login. Server contract:POST /api/v1/telemetry/events/(BlenderKit-server#3263, live in production).The completed/failed events live in
handle_login_task, notwrite_tokens—write_tokensis shared with token refresh, which must not count as a login (guarded by a dedicated test).Tests
TestLoginTelemetry: started-with-placement, cancelled via the real operator, completed, failed-with-message, and refresh-does-not-fire-completed.TestReportEvent: correct Client URL/payload, never raises. Also registers the previously-dormanttests/test_bkit_oauth.pymodule intests/test.py— it had never run in CI.Stack
#2227 (merged) → this → #2228 (stable machine ID, on hold)
🤖 Generated with Claude Code