feat(duo-agent-platform-v2): integrate classic layout switch survey

Description

⚠️ This MR is set to DRAFT as gitlab-org/editor-extensions/gitlab-lsp!3958 (merged) should be merged first and released to avoid blocking layout switches.

Integrates and shows a short feedback survey before switching back from the new Duo Agent Platform UI to the classic layout, so we can learn why users switch back.

The "disable new UI" command now asks the webview to show a survey instead of switching immediately. The layout only switches once the user responds. Users who opt out skip the survey next time.

  • Add toggle_duo_agent_platform_ui command that triggers the survey and switches layout on the webview's response.
  • Persist the survey opt-out flag, hideDuoAgentPlatformNewUISurvey, in global state via setDuoAgentPlatformNewUi, and add isDuoAgentPlatformSurveyHidden helper to read it.
User action Opt-out of future surveys?
Submit feedback

  • Includes reloading the IDE & persisting the survey state
Dismiss

dismiss.gif

Click Don't show again

Dont show again.gif

Closes #2325 (closed)

How has this been tested?

  • If src/browser or src/common has been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE.
  • Consider an end-to-end test for significant new features that aren't covered by integration tests.
  1. Link this MR with gitlab-org/editor-extensions/gitlab-lsp!3958 (merged)

  2. Set up local snowplow to test telemetry tracking (follow here)

  3. Apply this patch to reset HIDE_SURVEY_STORAGE_KEY on reload

    diff --git a/src/common/feature_flags/duo_agent_platform_new_ui_context.ts b/src/common/feature_flags/duo_agent_platform_new_ui_context.ts index d33a73b5..892f2942 100644 --- a/src/common/feature_flags/duo_agent_platform_new_ui_context.ts +++ b/src/common/feature_flags/duo_agent_platform_new_ui_context.ts @@ -16,6 +16,9 @@ const publish = (enabled: boolean) => { export const restoreDuoAgentPlatformNewUiContext = async ( context: vscode.ExtensionContext, ): Promise => {
    // reset survey-hidden flag for testing
    await context.globalState.update(HIDE_SURVEY_STORAGE_KEY, undefined);
    await publish(context.globalState.get(STORAGE_KEY, true)); };
  4. Test different user actions listed in the table above - submit, dismiss, don't show again.

    • When you opt-out of future surveys, toggling back and forth should not trigger a survey form
    • Reload to reset the state when testing different user action

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Juhee Lee

Merge request reports

Loading
Loading