powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

Fix login button not working in Power Pages Actions Hub

Open Copilot opened this issue 6 months ago • 0 comments

The login button in the Power Pages Actions view was not working because it was calling a disabled command. When users clicked the "Login" button in the welcome content, nothing would happen.

Root Cause

The welcome content was calling microsoft.powerplatform.pages.actionsHub.newAuthProfile command, but this command was explicitly disabled with "when": "never" in the package.json commandPalette section. Additionally, the more appropriate loginToMatch command was implemented in the code but not declared in package.json.

Solution

  1. Added loginToMatch command declaration to package.json with proper title and enablement
  2. Updated welcome content to use loginToMatch instead of the disabled newAuthProfile command
  3. Updated all localized files to reference the correct command while preserving PAC CLI functionality

Why loginToMatch vs newAuthProfile?

  • loginToMatch is specifically designed for authentication in the Power Pages Actions Hub context
  • newAuthProfile creates PAC CLI auth profiles, which is more complex than needed for the welcome content
  • Both eventually call authenticateUserInVSCode() but loginToMatch is the appropriate choice for this scenario

Testing

The fix has been validated with:

  • Package.json command registration verification
  • Welcome content command reference validation
  • Localization file consistency checks
  • Unit test suite (62 tests passing)
  • Build verification

Users should now be able to click the login button in the Power Pages Actions view and see the VS Code authentication dialog appear as expected.

Fixes #1258.

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.138/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: node install.mjs (http block)
  • update.code.visualstudio.com
    • Triggering command: gulp testDesktopInt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Aug 29 '25 10:08 Copilot