feat(duo-agent-platform-v2): integrate classic layout switch survey
Description
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_uicommand that triggers the survey and switches layout on the webview's response. - Persist the survey opt-out flag,
hideDuoAgentPlatformNewUISurvey, in global state viasetDuoAgentPlatformNewUi, and addisDuoAgentPlatformSurveyHiddenhelper to read it.
| User action | Opt-out of future surveys? | |
|---|---|---|
| Submit feedback |
|
|
| Dismiss |
|
|
|
Click |
|
Related Issues
Closes #2325 (closed)
How has this been tested?
- If
src/browserorsrc/commonhas 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.
-
Link this MR with gitlab-org/editor-extensions/gitlab-lsp!3958 (merged)
-
Set up local snowplow to test telemetry tracking (follow here)
-
Apply this patch to reset
HIDE_SURVEY_STORAGE_KEYon reloaddiff --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)); }; -
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

