Skip to content

amazon-workspaces: Add context menu entry & URL protocol handler#17980

Open
FilipDeVos wants to merge 1 commit into
ScoopInstaller:masterfrom
FilipDeVos:amazon-workspaces-sso
Open

amazon-workspaces: Add context menu entry & URL protocol handler#17980
FilipDeVos wants to merge 1 commit into
ScoopInstaller:masterfrom
FilipDeVos:amazon-workspaces-sso

Conversation

@FilipDeVos

Copy link
Copy Markdown
Contributor

Add support to create the workspace uri handler for amazon-workspaces post install and remove it post uninstall.

Closes #17913

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Add support to create the workspace uri handler for amazon-workspaces post install and remove it post uninstall.
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates bucket/amazon-workspaces.json to add post-install and post-uninstall script steps for registering a Windows URL protocol handler. During installation, the script creates registry entries under HKCU:\Software\Classes\workspaces to register the workspaces:// URI scheme, sets the handler icon to workspaces.exe,1, and configures the shell open command to invoke workspaces.exe --uri "%1". During uninstallation, the script validates that the registered command matches the expected configuration before removing the protocol handler registry tree, using silent error handling to avoid failures if the key is not found.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description provides clear context, references the linked issue (#17913), and confirms adherence to contribution guidelines with required checkboxes marked.
Linked Issues check ✅ Passed The PR implements the proposed solution from issue #17913 by adding post_install and post_uninstall scripts to register/remove the workspaces URI protocol handler.
Out of Scope Changes check ✅ Passed All changes are directly related to adding the URI handler support for SSO as specified in issue #17913, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately reflects the main changes: adding a context menu entry and URL protocol handler for amazon-workspaces to enable SSO functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
bucket/amazon-workspaces.json (1)

1-68: ⚡ Quick win

Testing instructions for this manifest.

Before merging, please test the manifest locally:

  1. Optional: Enable debug mode and set GitHub token (for checkver to access GitHub API for releases):

    scoop config debug true
    scoop config gh_token <your-github-token>  # Read access only
  2. Force version detection and autoupdate:

    .\bin\checkver.ps1 -App amazon-workspaces -f
  3. Auto-format (Lint) the JSON manifest:

    .\bin\formatjson.ps1 -App amazon-workspaces
  4. Test installation (including URL handler registration):

    scoop install .\bucket\amazon-workspaces.json
  5. Verify URL handler was registered correctly:

    Get-Item -LiteralPath 'HKCU:\Software\Classes\workspaces\shell\open\command' | Get-ItemProperty
  6. Test uninstallation (including URL handler cleanup):

    scoop uninstall amazon-workspaces
  7. Verify URL handler was removed:

    Test-Path 'HKCU:\Software\Classes\workspaces'
    # Should return False

For more details, see the Contribution Guide.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bucket/amazon-workspaces.json` around lines 1 - 68, The reviewer provided
manual testing steps to validate this manifest — run checkver and autoupdate,
format the JSON, install the manifest, verify the URL protocol registration and
removal, and confirm the pre_install/post_install/post_uninstall registry logic
works as expected; specifically execute .\bin\checkver.ps1 -App
amazon-workspaces -f, .\bin\formatjson.ps1 -App amazon-workspaces, scoop install
.\bucket\amazon-workspaces.json, inspect
HKCU:\Software\Classes\workspaces\shell\open\command to confirm the command set
by post_install (uses workspaces.exe and the 'workspaces' scheme), then scoop
uninstall amazon-workspaces and ensure the post_uninstall logic removed
HKCU:\Software\Classes\workspaces when the value matches the expected string.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@bucket/amazon-workspaces.json`:
- Around line 1-68: The reviewer provided manual testing steps to validate this
manifest — run checkver and autoupdate, format the JSON, install the manifest,
verify the URL protocol registration and removal, and confirm the
pre_install/post_install/post_uninstall registry logic works as expected;
specifically execute .\bin\checkver.ps1 -App amazon-workspaces -f,
.\bin\formatjson.ps1 -App amazon-workspaces, scoop install
.\bucket\amazon-workspaces.json, inspect
HKCU:\Software\Classes\workspaces\shell\open\command to confirm the command set
by post_install (uses workspaces.exe and the 'workspaces' scheme), then scoop
uninstall amazon-workspaces and ensure the post_uninstall logic removed
HKCU:\Software\Classes\workspaces when the value matches the expected string.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4398946e-3c5f-49ea-8193-20de3a2b38b6

📥 Commits

Reviewing files that changed from the base of the PR and between fbc226d and e22d64e.

📒 Files selected for processing (1)
  • bucket/amazon-workspaces.json

@FilipDeVos

Copy link
Copy Markdown
Contributor Author

/verify

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

amazon-workspaces

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@z-Fng z-Fng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please update the manifest based on the existing one, e.g., #17728, with the following changes:

  1. Use a .reg file instead of executing PowerShell commands within the manifest to add registry keys.
  2. Make it optional so that users can manually run the reg import xxx.reg command to apply it themselves.
  3. Adapt for global installation: The registry keys should be written to HKLM (HKEY_LOCAL_MACHINE) instead of HKCU (HKEY_CURRENT_USER) when a global installation is performed.

@z-Fng z-Fng changed the title amazon-workspaces@5.32.2.5905: add support for sso amazon-workspaces: Add context menu entry & URL protocol handler Jun 5, 2026
@z-Fng

z-Fng commented Jun 5, 2026

Copy link
Copy Markdown
Member

arvdk added a commit to arvdk/Extras that referenced this pull request Jun 8, 2026
arvdk added a commit to arvdk/Extras that referenced this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: amazon-workspaces is missing the url handler to support SSO login

2 participants