Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

When selecting "Group by ARM Tag..." with no tags in the subscription, users see an empty input box with only a placeholder—no indication that tags need to be created first.

Changes

  • Check for empty tags in getQuickPicks: Throw NoResourceFoundError with actionable message when no tag keys exist
  • Error message: "No tag keys found. Please add tags to your resources to use this grouping option."
async function getQuickPicks(context: IActionContext, subscription: AzureSubscription): Promise<QuickPickItem[]> {
    const client = await createResourceClient([context, createSubscriptionContext(subscription)]);
    const tags = await uiUtils.listAllIterator(client.tagsOperations.list());
    
    if (tags.length === 0) {
        (context as { noItemFoundErrorMessage?: string }).noItemFoundErrorMessage = localize('noTagKeysFound', 'No tag keys found. Please add tags to your resources to use this grouping option.');
        throw new NoResourceFoundError(context);
    }
    
    return tags.map(tag => ({
        label: nonNullProp(tag, 'tagName'),
    }));
}

Follows the same pattern as deleteResourceGroupV2.ts for empty resource lists.

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:

  • update.code.visualstudio.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/vscode-azureresourcegroups/vscode-azureresourcegroups/node_modules/.bin/vscode-test (dns block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>“Group by ARM Tag...” shows an empty input box with no guidance when no tags exist</issue_title>
<issue_description>OS: Win11
Build Version: 20251210.1

Repro Steps:

  1. Ensure that none of the resources/resource groups in the current subscription have any ARM tags.
  2. Open the Azure Resources view -> Click "Group By" icon -> Select “Group by ARM Tag...”.
  3. Observe the UI for selecting the tag key.

Expect:
There is a clear empty-state message, such as “No tag keys found. Please add tags to your resources to use this grouping option.”

Actual:
The UI displays an empty input box with placeholder “Select the tag key to group by…”.
Image</issue_description>

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


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

Co-authored-by: motm32 <59709511+motm32@users.noreply.github.com>
Copilot AI changed the title [WIP] Add empty state message for group by ARM Tag Handle empty state when grouping by ARM tag Jan 28, 2026
Copilot AI requested a review from motm32 January 28, 2026 19:47
@motm32 motm32 marked this pull request as ready for review January 28, 2026 19:53
@motm32 motm32 requested a review from a team as a code owner January 28, 2026 19:53
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.

“Group by ARM Tag...” shows an empty input box with no guidance when no tags exist

2 participants