Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ data class EventRequest(
val appVersion: String? = null,
val eventType: String,
val repoId: Long? = null,
val queryHash: String? = null,
val resultCount: Int? = null,
val success: Boolean? = null,
val errorCode: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import kotlinx.coroutines.withContext
import zed.rainxch.core.data.BuildKonfig
import zed.rainxch.core.data.dto.EventRequest
import zed.rainxch.core.data.network.BackendApiClient
import zed.rainxch.core.data.utils.hashQuery
import zed.rainxch.core.domain.logging.GitHubStoreLogger
import zed.rainxch.core.domain.model.Platform
import zed.rainxch.core.domain.repository.DeviceIdentityRepository
Expand Down Expand Up @@ -42,10 +41,12 @@ class TelemetryRepositoryImpl(

// ── recording (fire-and-forget, guarded by opt-in) ──────────────

override fun recordSearchPerformed(query: String, resultCount: Int) {
override fun recordSearchPerformed(resultCount: Int) {
// Query intentionally dropped: a 16-hex SHA-256 prefix of a
// lowercased repo-name search is rainbow-table-trivial. The
// count-only signal here is what survives.
enqueue(
eventType = "search_performed",
queryHash = hashQuery(query),
resultCount = resultCount,
)
}
Expand Down Expand Up @@ -240,7 +241,6 @@ class TelemetryRepositoryImpl(
private fun enqueue(
eventType: String,
repoId: Long? = null,
queryHash: String? = null,
resultCount: Int? = null,
success: Boolean? = null,
errorCode: String? = null,
Expand All @@ -256,7 +256,6 @@ class TelemetryRepositoryImpl(
appVersion = BuildKonfig.VERSION_NAME,
eventType = eventType,
repoId = repoId,
queryHash = queryHash,
resultCount = resultCount,
success = success,
errorCode = errorCode,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package zed.rainxch.core.domain.repository

interface TelemetryRepository {
fun recordSearchPerformed(query: String, resultCount: Int)
fun recordSearchPerformed(resultCount: Int)

fun recordSearchResultClicked(repoId: Long)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ class SearchViewModel(

if (isInitial) {
telemetryRepository.recordSearchPerformed(
query = query,
resultCount = _state.value.repositories.size,
)
}
Expand Down