Skip to content

Record where source opens land and fill code-navigation telemetry gaps - #1511

Merged
thesiti92 merged 1 commit into
mainfrom
fix/code-nav-telemetry
Nov 4, 2026
Merged

thesiti92 merged 1 commit into
mainfrom
fix/code-nav-telemetry

Conversation

@thesiti92

Copy link
Copy Markdown
Contributor

Telemetry could not say how often people leave the canvas to read code, or where they go. Every source open (go-to-definition from a peek, reveal links, file opens, the source tree) goes through openSourceEditor, which sends it to the Source window or to the editor set in review.openFilesIn. None of those opens was recorded.

Changes

  • New review_source_opened event with destination (source_window, vscode, cursor, zed, application) and kind (file, diff, references, tree). It is captured where the open lands, in reviewCanvasEditorTabsService.ts.
  • review_setting_changed for open_files_in now sends the choice. REVIEW_OPEN_FILES_IN_CHOICES is now a const list in the protocol.
  • Shift+F12 in a canvas peek (review.action.embeddedShowReferences) now counts as lsp_used references.
  • Go-to-definition inside a Diff-tab definition peek now reports editor_kind: definition_peek instead of files_tab. A jump inside an open definition peek now counts as peek_opened diff_definition.
  • Hover counts only when the model has a hover provider.
  • docs/telemetry.md lists the new event and properties.

Not in this PR

From v0.3.0 on, go-to-definition in canvas peeks dropped from about 30% to 5–8% of peek users, while hover held steady. We are still checking in a dev Desktop whether this is a regression or a telemetry gap. The fix will follow separately.

Testing

  • pnpm lint, pnpm format.
  • Typecheck for review-protocol, review, the canvas, and the Desktop fork.
  • ui-telemetry-events.test.ts and the tabs service, editor resolver, API editor serializer and telemetry contribution tests.
  • Runtime check of each new event in an isolated Desktop is in progress.

Add review_source_opened, send the open_files_in choice, count references from peeks, report definition-peek editors, and count hovers only with a hover provider.

Agent-Session: bc1bf4c6-92c5-43f7-ab76-1e3d3fee5932
Agent-Session: e35ee3f1-35bb-443a-a7fa-2d0fcb48c31e
@thesiti92
thesiti92 merged commit 20f4d6d into main Nov 4, 2026
2 checks passed
@thesiti92
thesiti92 deleted the fix/code-nav-telemetry branch November 4, 2026 14:46
thesiti92 added a commit that referenced this pull request Nov 4, 2026
`review_lsp_used` from keyboard commands fired for any mapped command,
even when the file had no provider for that feature. The mouse and hover
paths already check for a provider. For example, F12 on the base side of
a side-by-side peek has no language features since #1175. It shows "No
definition found" but was still counted as `goto_definition`.

- The command path now checks the matching provider (definition or
declaration, type definition, implementation, references, rename,
formatting, code action, hover, document symbols) before it records the
event.
- `docs/telemetry.md` notes the new condition.

## Context

This is a follow-up to #1511. In a dev Desktop, go-to-definition in
canvas peeks works for hover, ⌘-click and F12, in unified and
side-by-side views and on lower peeks. Every case is tagged
`editor_kind: inline_peek`. PostHog shows the ratio of go-to-definition
to hover falling steadily from week to week, including within 0.2, not a
sudden drop at 0.3.0. About a third of earlier go-to-definition users
still use it on 0.3+. So the drop is not a regression.

## Testing

- `pnpm lint`, `pnpm format`.
- Desktop fork typecheck.
- Fork test tier: 569 pass, 0 fail.
- Not yet run in a Desktop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant