Skip to content

VS Code: report Command.GoToStepDefinition for F12 / Ctrl+Click - #1308

Merged
clrudolphi merged 3 commits into
mainfrom
feature/1266-vscode-goto-definition-telemetry
Oct 26, 2026
Merged

clrudolphi merged 3 commits into
mainfrom
feature/1266-vscode-goto-definition-telemetry

Conversation

@clrudolphi

Copy link
Copy Markdown
Contributor

Addresses #1266 (option 1: client-side detection).

textDocument/definition also fires on Ctrl+hover, so the request alone cannot say a navigation happened. A provideDefinition middleware records each response's targets; Command.GoToStepDefinition (with LocationCount) is sent only when the active editor or selection then lands on one of those targets within 2s. A hover never moves the editor, so it sends nothing.

Logic lives in lsp/definitionNavigation.ts (pure DefinitionNavigationTracker with an injectable clock, plus the middleware and editor-event registration).

Testing

  • New definitionNavigation suite (tracker + result mapping) passes in the extension host.
  • The full run in my environment had 2 failures (defineStepRecovery, Language client should start after activation) that need a built server/fixture and are unrelated to this change.

Not verified

🤖 Generated with Claude Code

textDocument/definition also fires on hover, so a response is remembered and
counted as a navigation only when the active editor lands on a returned
location within two seconds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@clrudolphi
clrudolphi merged commit 99c6558 into main Oct 26, 2026
3 checks passed
@clrudolphi
clrudolphi deleted the feature/1266-vscode-goto-definition-telemetry branch October 26, 2026 14:40
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.

VS Code: report Command.GoToStepDefinition for F12 / Ctrl+Click navigation

1 participant