Skip to content

Conversation

@nickrolfe
Copy link
Contributor

This appears to fix a problem I noticed, where all the settings defined by this extension appeared in the settings UI under "Extensions->CLI" (the name of our first config category), rather than "Extensions->CodeQL->CLI", "Extensions->CodeQL->Running queries", etc.

I don't know exactly why this works, but I was just looking for differences between our package.json and that of a different open-source extension.

Before

Screenshot 2025-11-25 at 16 43 51

After

Screenshot 2025-11-25 at 16 43 38

@nickrolfe nickrolfe requested a review from a team as a code owner November 25, 2025 16:51
Copilot AI review requested due to automatic review settings November 25, 2025 16:51
Copilot finished reviewing on behalf of nickrolfe November 25, 2025 16:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the settings UI rendering issue where all extension settings appeared under a single "Extensions->CLI" category instead of being properly organized under their respective categories like "Extensions->CodeQL->CLI", "Extensions->CodeQL->Running queries", etc. The fix involves adding unique id fields to each configuration section in the package.json file.

  • Adds id fields to all 12 configuration sections in package.json
  • Uses consistent kebab-case naming convention with codeql- prefix
  • Improves settings organization and discoverability in VS Code's settings UI

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@d10c d10c left a comment

Choose a reason for hiding this comment

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

According to these docs,

If the configuration has multiple categories of settings, and the category does not have the same title as the extension's display name, then for settings within that category, the settings UI will use the settings ID and the category id field to determine the display title.

As an example, for settings ID css.completion.completePropertyWithSemicolon and category ID css, because the prefix of the settings ID matches with the suffix of the category ID, the css part of the settings ID will be removed in the settings UI, and the generated title for the setting will be "Completion: Complete Property With Semicolon".

It doesn't say anything about kebab-case, which makes me think that the more typical format would be (say) "codeQL.cli" instead of "codeql-cli", i.e. the actual prefix from the properties keys.

Copy link
Contributor

@d10c d10c left a comment

Choose a reason for hiding this comment

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

Also, according to your screenshot, there remains a difference in the display of the title between codeQL.cli.downloadTimeout (id: codeql-cli, displayed as "Download Timeout" within the "CLI" category) and codeQL.runningQueries.cacheSize (id: codeql-running-queries, displayed as "Code QL > Running Queries: Cache Size" within the "Running queries" category), which makes me suspect that - is treated similar to . in stripping off the prefix from the setting ID. So I would suggest renaming the category id to always be a prefix of the setting IDs beneath it, and seeing if that gives a more consistent look to all the settings.

@nickrolfe nickrolfe force-pushed the nickrolfe/config-ids branch from f573c12 to 270d27b Compare November 26, 2025 11:05
@nickrolfe
Copy link
Contributor Author

Nice sleuthing, I think you've explained it. With the change I just force-pushed, the cache size setting is also rendered correctly.

Screenshot 2025-11-26 at 11 04 39

Copy link
Contributor

@d10c d10c left a comment

Choose a reason for hiding this comment

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

Nice! Still a couple of discrepancies left, which if my theory is correct should display differently from the other settings.

This appears to fix a problem I noticed, where all the settings defined
by this extension appeared in the settings UI under "Extensions->CLI"
(the name of our first config category), rather than
"Extensions->CodeQL->CLI", "Extensions->CodeQL->Running queries", etc.
@nickrolfe nickrolfe force-pushed the nickrolfe/config-ids branch from 270d27b to b517ed5 Compare November 26, 2025 11:14
@nickrolfe nickrolfe enabled auto-merge November 26, 2025 11:18
@nickrolfe nickrolfe merged commit 21192d8 into main Nov 26, 2025
38 of 40 checks passed
@nickrolfe nickrolfe deleted the nickrolfe/config-ids branch November 26, 2025 11:58
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.

3 participants