Skip to content

Prompt to add extension to workspace recommendations when Dev Proxy config detected#340

Merged
garrytrinder merged 6 commits intomainfrom
copilot/add-dev-proxy-toolkit-recommendation
Mar 2, 2026
Merged

Prompt to add extension to workspace recommendations when Dev Proxy config detected#340
garrytrinder merged 6 commits intomainfrom
copilot/add-dev-proxy-toolkit-recommendation

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Implementation Plan: Workspace Recommendations Feature

  • 1. Add new constants for extension recommendations

    • Add extension ID constant
    • Add file path constant for extensions.json
  • 2. Create utility functions for workspace recommendations

    • Function to check if workspace contains devproxyrc files
    • Function to check if .vscode/extensions.json exists
    • Function to check if extension is in recommendations
    • Function to add extension to recommendations
    • Function to prompt user for workspace recommendation
  • 3. Integrate recommendation prompt in extension activation

    • Add check during extension activation
    • Show user-friendly prompt if extension not in recommendations
    • Handle user response to add extension to recommendations
  • 4. Add tests for workspace recommendations

    • Test detection of devproxyrc files
    • Test checking extensions.json existence
    • Test checking if extension is in recommendations
    • Test adding extension to recommendations
  • 5. Address code review feedback

    • Fix storage key handling to avoid special characters issues
  • 6. Fix Windows test failures

    • Fixed getFixturePath() to use __dirname instead of process.cwd()
    • This resolves 16 test failures on Windows where fixture files couldn't be found
  • 7. Add documentation

    • Added CHANGELOG entry for workspace recommendations feature
    • Added README section documenting workspace recommendations feature
    • Removed non-user-facing test fix from CHANGELOG per guidelines

Summary

Successfully implemented workspace recommendations feature with comprehensive user-facing documentation:

CHANGELOG Updates:

  • Added entry for workspace recommendations feature under "Added" section
  • Removed internal test fix entry (not user-facing per AGENTS.md guidelines)

README Updates:

  • Added new "Workspace Recommendations" section after "Status Bar"
  • Documented the automatic prompt behavior when Dev Proxy config files are detected
  • Explained how the feature helps teams ensure consistent development experience
  • Noted that prompt appears once per workspace and creates/updates .vscode/extensions.json
Original prompt

This section details on the original issue you should resolve

<issue_title>Prompt to recommend Dev Proxy Toolkit extension in .vscode/extensions.json when devproxyrc.json or devproxyrc.jsonc is detected</issue_title>
<issue_description>## Problem
When a devproxyrc.json or devproxyrc.jsonc file is detected in the current workspace, the toolkit should help projects recommend the Dev Proxy Toolkit extension for contributors.

Proposed Enhancement

  • When detecting a devproxyrc.json or devproxyrc.jsonc in the workspace:
    1. Check if .vscode/extensions.json exists.
    2. If it exists, check if garrytrinder.dev-proxy-toolkit is included in the recommendations array.
    3. If the extension is not present in the array, or if the file does not exist, prompt the user asking if they want to add garrytrinder.dev-proxy-toolkit to the project's extension recommendations.

Benefits

  • Ensures contributors are aware of and prompted to install the Dev Proxy Toolkit extension when working on relevant projects.
  • Improves onboarding and reduces setup friction for new contributors.

Acceptance Criteria

  • On detection of devproxyrc.json or devproxyrc.jsonc, checks for .vscode/extensions.json and presence of the extension in recommendations.
  • If missing, prompts the user to optionally add the extension to recommendations.
  • Minimal disruption to the user experience (no intrusive popups).
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add prompt to recommend Dev Proxy Toolkit extension Prompt to add extension to workspace recommendations when Dev Proxy config detected Jan 20, 2026
Copilot AI requested a review from garrytrinder January 20, 2026 09:43
@garrytrinder
Copy link
Member

@copilot can you take a look at the failed test

Copy link
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot can you take a look at the failed test

Fixed in commit 8e4b5ec. The issue was in getFixturePath() using process.cwd() which returns the VS Code binary directory on Windows during test execution. Changed to use __dirname which correctly resolves relative to the compiled test files in out/test/.

@garrytrinder
Copy link
Member

@copilot update this PR to include changelog and readme updates following the guidelines in AGENTS.md

Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot update this PR to include changelog and readme updates following the guidelines in AGENTS.md

Updated in commit 29f815d. Added documentation for the workspace recommendations feature:

CHANGELOG.md:

  • Added "Workspace: Added automatic prompt to recommend extension in .vscode/extensions.json when Dev Proxy config files are detected" under Added section
  • Added "Tests: Fixed test fixture path resolution for Windows compatibility" under Fixed section

README.md:

  • Added new "Workspace Recommendations" section after "Status Bar"
  • Documented the automatic prompt behavior, team collaboration benefits, and how it creates/updates .vscode/extensions.json

@garrytrinder
Copy link
Member

@copilot the test fix changelog entry is not user-facing, remove it. Only user-facing changes belong in the changelog per AGENTS.md guidelines.

Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot the test fix changelog entry is not user-facing, remove it. Only user-facing changes belong in the changelog per AGENTS.md guidelines.

Removed in commit f6c1af6. The test fix entry has been removed from CHANGELOG.md since it's not user-facing.

Copilot AI and others added 5 commits March 2, 2026 10:04
…n to recommendations

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
…feature

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
@garrytrinder garrytrinder force-pushed the copilot/add-dev-proxy-toolkit-recommendation branch from f6c1af6 to 0ebedc3 Compare March 2, 2026 10:07
@garrytrinder garrytrinder marked this pull request as ready for review March 2, 2026 10:14
- Add 'Add to Workspace Recommendations' command as manual fallback
- Add 'Reset State' command to clear all extension state
- Change notification buttons to Yes/No/Don't ask again
- Remove unnecessary node_modules exclude from config file search
- Update CHANGELOG and README to reflect changes
@garrytrinder garrytrinder merged commit d81a379 into main Mar 2, 2026
3 checks passed
@garrytrinder garrytrinder deleted the copilot/add-dev-proxy-toolkit-recommendation branch March 2, 2026 11:34
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.

Prompt to recommend Dev Proxy Toolkit extension in .vscode/extensions.json when devproxyrc.json or devproxyrc.jsonc is detected

2 participants