Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Oct 29, 2025

Description

The gui settings for telemetry enabling was in sync with the vscode ide settings only when the ide restarted. This PR fixes that.

Resolves CON-4319

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before.mp4
after.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Decouples telemetry from IDE settings and makes the in-app toggle the single source of truth. Removes the VS Code continue.telemetryEnabled setting and the isTelemetryEnabled protocol across core, VS Code, and JetBrains (CON-4319).

Written for commit 9a0265c. Summary will update automatically on new commits.

@uinstinct uinstinct requested a review from a team as a code owner October 29, 2025 07:07
@uinstinct uinstinct requested review from Patrick-Erichsen and removed request for a team October 29, 2025 07:07
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 29, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="extensions/vscode/src/VsCodeIde.ts">

<violation number="1" location="extensions/vscode/src/VsCodeIde.ts:703">
Await the VS Code configuration update so the promise resolves only after the telemetry setting is written.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Await the VS Code configuration update so the promise resolves only after the telemetry setting is written.

Prompt for AI agents
Address the following comment on extensions/vscode/src/VsCodeIde.ts at line 703:

<comment>Await the VS Code configuration update so the promise resolves only after the telemetry setting is written.</comment>

<file context>
@@ -698,6 +698,12 @@ class VsCodeIde implements IDE {
   }
+
+  async updateTelemetryEnabled(enabled: boolean): Promise&lt;void&gt; {
+    vscode.workspace
+      .getConfiguration(&quot;continue&quot;)
+      .update(&quot;telemetryEnabled&quot;, enabled, vscode.ConfigurationTarget.Global);
</file context>
Suggested change
vscode.workspace
await vscode.workspace

✅ Addressed in d7c5494

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uinstinct when ide settings are changed it comes through as an ide settings update which causes a config reload, which accounts for the ide setting when setting config.allowAnonymousTelemetry. It should already sync properly, although it might result in the toggle being un-toggleable if set to false in IDE settings (probably fine)

Could you explain the background a bit more?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 29, 2025
@uinstinct
Copy link
Contributor Author

@uinstinct when ide settings are changed it comes through as an ide settings update which causes a config reload, which accounts for the ide setting when setting config.allowAnonymousTelemetry. It should already sync properly, although it might result in the toggle being un-toggleable if set to false in IDE settings (probably fine)
Could you explain the background a bit more?

Right. The scenario mentioned by you happens for syncing vscode settings page --> gui settings page configuration. The current PR adds the ability to for syncing gui settings page --> vscode settings page which was absent.

@uinstinct uinstinct requested a review from RomneyDa October 29, 2025 13:11
@RomneyDa
Copy link
Collaborator

RomneyDa commented Oct 29, 2025

I think we've more or less deprecated the allowAnonymousTelemetry IDE setting or at least it's not the preferred way to configure. The issue with this approach is that it prevents people from just editing the JSON because now it's out of sync. E.g. the only way to change allowAnonymousTelemetry is now through the toggle, which would create a security concern affecting the preferred config approach (globalContext)

Potentially a better UI would be to disable the toggle if set by the UI?

@uinstinct
Copy link
Contributor Author

I think we've more or less deprecated the allowAnonymousTelemetry IDE setting or at least it's not the preferred way to configure. The issue with this approach is that it prevents people from just editing the JSON because now it's out of sync. E.g. the only way to change allowAnonymousTelemetry is now through the toggle, which would create a security concern affecting the preferred config approach (globalContext)

Potentially a better UI would be to disable the toggle if set by the UI?

True. We should have one setting and that should be the toggle in extension gui settings page.
About config.json 's allowAnonymousTelemetry setting, we have deprecated it for a long time and guess we can now remove it. Thoughts? (IMO, all the deprecated config.json settings should be removed together later in a major release)

@RomneyDa
Copy link
Collaborator

RomneyDa commented Nov 3, 2025

@uinstinct the current functionality is that if allowAnonymousTelemetry is detected in config.json it migrates the value to shared config and then removes it from config.json. This can stay the same.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 4, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Nov 4, 2025
@uinstinct
Copy link
Contributor Author

uinstinct commented Nov 4, 2025

@RomneyDa Now I have removed the isTelemetryEnabled setting from vscode and jetbrains. Hence currently the only way to set allowAnonymousTelemetry is now through the settings page toggle, config.json and org policy

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uinstinct we should probably keep support for the IDE setting since if people have it set to false we will then be violating their prior setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants