Skip to content

Fix inconsistency between JSON schema and code for secondary sidebar view containers#264864

Merged
benibenj merged 2 commits intomainfrom
copilot/fix-264529
Sep 3, 2025
Merged

Fix inconsistency between JSON schema and code for secondary sidebar view containers#264864
benibenj merged 2 commits intomainfrom
copilot/fix-264529

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 3, 2025

Extension developers were required to use "secondarySideBar" (uppercase B) in their package.json to register view containers in the secondary sidebar, but this caused JSON schema validation errors because the schema expected "secondarySidebar" (lowercase b).

The issue was caused by an inconsistency between:

  • JSON schema definition: 'secondarySidebar' (lowercase b)
  • Switch case logic: 'secondarySideBar' (uppercase B)
  • API proposal name: 'contribSecondarySideBar' (uppercase B)

This fix makes everything consistent by using secondarySidebar (lowercase b) throughout:

  1. Updated the switch case from 'secondarySideBar' to 'secondarySidebar' in viewsExtensionPoint.ts
  2. Changed API proposal name from 'contribSecondarySideBar' to 'contribSecondarySidebar' in extensionsApiProposals.ts
  3. Renamed contribSecondarySideBar.d.ts to contribSecondarySidebar.d.ts and updated the URL reference

Now extension developers can use the correct schema-compliant syntax without validation errors:

{
  "contributes": {
    "viewsContainers": {
      "secondarySidebar": [
        {
          "id": "myViewContainer",
          "title": "My View Container",
          "icon": "$(symbol-class)"
        }
      ]
    }
  },
  "enabledApiProposals": ["contribSecondarySidebar"]
}

Fixes #264529.

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:

  • electronjs.org
    • Triggering command: node-gyp (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.

…view containers

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Copilot AI changed the title [WIP] The key must be secondarySideBar for it to work (which causes a JSON schema error) Fix inconsistency between JSON schema and code for secondary sidebar view containers Sep 3, 2025
Copilot AI requested a review from benibenj September 3, 2025 07:45
@benibenj benibenj marked this pull request as ready for review September 3, 2025 08:42
@vs-code-engineering vs-code-engineering Bot added this to the August 2025 milestone Sep 3, 2025
@benibenj benibenj enabled auto-merge (squash) September 3, 2025 10:54
@benibenj benibenj merged commit 5be90b9 into main Sep 3, 2025
18 checks passed
@benibenj benibenj deleted the copilot/fix-264529 branch September 3, 2025 10:59
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The key must be secondarySideBar for it to work (which causes a JSON schema error)

4 participants