Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de9fc58512
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rsion, quit install
Problem
Desktop usage reporting sent a narrow set of v1 events, dropped usage batches permanently on transient network or
5xx/429errors, lacked activation and tool-invocation metrics (app_active_heartbeat,app_update_event,workspace_added,feature_used,tool_invoked,crash_signal), and did not re-notify upgraded installs before sending expanded usage data.Change
Stacked on #4616 (
feat/launch-analytics-drive), companion to #4611 (feat/launch-analytics-site).reportingConfig.ts,telemetry.ts): ReusesposthogProjectandrateLimitMsfrom@dohc/service-http/telemetryso desktop and Drive services share one batch-endpoint derivation and rate-limit parser.telemetry.ts): Adds base properties (schema_version: 2,server_kind), per-eventuuidfor PostHog deduplication, bounded exponential backoff +Retry-Afterhandling for transient usage failures, and immediate abort + generation invalidation whenusageReportsturns off (so an aborted batch can never requeue after toggling off and back on). Error reports remain unlinkable with fresh randomdistinct_idper report.telemetry.ts,useReportsNotice.ts,ReportsSettings.tsx): Leavesreporting.json(ReportingState.strict()) unchanged so older nightlies keep working on downgrade, and tracksusageNoticeVersion: 2andlastCrashSeqin siblingreporting-notice.json. Upgraded installs keep their existinginstallIdand see updated v2 notice wording once before expanded usage events leave.telemetry.ts,main.ts,electronUpdater.ts,desktopWindows.ts,cliUsage.ts,cliServer.ts):app_launched(recorded after settings apply sohas_agents_configuredreflects real settings, plus bucketed workspace counts),app_active_heartbeat(once per UTC day on renderer activity),app_update_event(firinginstall_startedonce beforequit()/quitAndInstall()),workspace_added(dedupingmount_sharealreadyAdded),workspace_opened(createWorkspaceOpenTriggerspreserving overlappingauto_restoreanddeep_linktriggers via synchronousonTargetwindow binding),feature_used(renderer IPC writes, skippingcollections-refused),tool_invoked(CLI/MCP writes plus failed/refused reads with exhaustive compile-time read/write classification and refusal handling forcollections-refused,automationPressconfirmations, andMembersResultrefusals), and UTC-hour-coarsenedcrash_signal(filtering non-crash unhandled rejections).usageStore.tsstrictly local and decoupled from telemetry.docs/reference/usage-and-error-reports.md,docs/engineering/desktop-release.md): Documents the v2 event catalog, honestcrash_signalcorrelation limits, andALLOWED_TELEMETRY_KEYSalignment.Risk & rollback:
reporting.jsonis unchanged; reverting this PR leavesreporting-notice.jsonunused and harmless.Verification
Tested on commit
de9fc5851(Windows):pnpm fmt— cleanpnpm lint— 0 warnings, 0 errors across 4,717 filespnpm --filter @dohc/desktop typecheck— passed across all 10 tsconfigsreportingConfig.test.ts,telemetry.test.ts,cliUsage.test.ts,usageBoundary.test.ts,cliServer.analytics.test.ts,cliAccount.test.ts,electronUpdater.test.ts,desktopWindows.test.ts,ReportsSettings.test.tsx,useReportsNotice.test.tsx,DesktopWorkspaceShell.reports.test.tsx) — 11 files, 136/136 tests passed (verified after final edits oncliUsage.test.ts,cliServer.analytics.test.ts,telemetry.test.ts)pnpm --filter @dohc/desktop run test:scripts:isolated— 137/137 passed (0 failed, includingcheck-error-symbolication.test.mjs)Unverified locally: Full Electron desktop launch and live PostHog ingestion (desktop first-run notice UI and Electron Playwright verification follow in the companion PR 4; full GitHub CI checks run on this PR).
Council review
claude-opus-5-5gemini-4-neongpt-6.2-solCreated with Gemini 4 Neon in T3 Code.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.