feat(analytics): tag cloud transcriptions and report feature usage events#1121
Open
gabrielste1n wants to merge 1 commit into
Open
feat(analytics): tag cloud transcriptions and report feature usage events#1121gabrielste1n wants to merge 1 commit into
gabrielste1n wants to merge 1 commit into
Conversation
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.
Desktop side of the workspace usage analytics feature (plan:
admin-console-usage-analytics-page.md). Works with the openwhispr-api companion PR; fully backward-compatible with the currently-deployed API (new fields are additive and ignored by the old parser).What's new
/api/transcribemultipart gainsfeature(dictation/upload),audioDurationSeconds(inline requests), and per-chunkclientEventId(clientTranscriptionId:chunkIndex, retry-safe);/api/streaming-usagegainsfeature/clientEventId. Uploads deliberately do not transmitclientTranscriptionId(would flip deployed-server chunked uploads to last-chunk-wins quota accounting); the id base is passed out-of-band for event derivation only.UsageReportingService(renderer, SyncService conventions): localStorage queue with cross-window Web-Lock serialization, batch flush (≤50) on enqueue/startup/interval, idempotent event ids. Gating: signed-in + managed workspace required for everything; local/BYOK events additionally require the admin'scollectLocalUsagesetting (from/api/stt-config, honored at enqueue and re-checked at flush so an admin turning collection off drops queued events instead of sending them). Offline/gate-fetch failures queue rather than drop; nothing is ever sent for free individual accounts.x-openwhispr-versionheader now sent on authenticated cloud calls (shared header builder) so the console's per-member coverage badges work.local.Verification
npm run quality-check(eslint, prettier, tsc),check-i18n, and the test suite (194 pass / 0 fail) green. Wire-compat of every new field verified against the deployed API parser.