Skip to content

Fix terminal profile schema to allow null in keybinding id#19332

Merged
DHowett merged 1 commit intomicrosoft:mainfrom
cavanaug:main
Sep 11, 2025
Merged

Fix terminal profile schema to allow null in keybinding id#19332
DHowett merged 1 commit intomicrosoft:mainfrom
cavanaug:main

Conversation

@cavanaug
Copy link
Contributor

@cavanaug cavanaug commented Sep 8, 2025

feat(doc/cascadia/profiles.schema.json): ✨ extend the “id” property to accept null so default keybindings can be disabled

Summary of the Pull Request

Fixes the terminal profile jsonschema to allow for null in the id. This is to match the current implementation when disabling a built in default keybind.

References and Relevant Issues

I didnt submit an issue on this as the fix is less lines of code change than even filing a new defecct. But I can if you want me to.

Detailed Description of the Pull Request / Additional comments

Simply adding an oneOf and allowing a null type

Validation Steps Performed

I tested that this no longer generates schema violation errors when keybindings are set to null and using an editor like vscode or neovim to edit the settings.json file

I looked thru the code base but didnt find an explicit tests for confirming json schema validation of the settings.json file. There are tests that look to do roundtrip validation of writing to json and reading back.

PR Checklist

  • [] Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)

feat(doc/cascadia/profiles.schema.json): ✨ extend the “id” property to accept null so default keybindings can be disabled
Copilot AI review requested due to automatic review settings September 8, 2025 23:11
Copy link

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 JSON schema for Windows Terminal keybindings to properly support disabling default keybindings by allowing null values in the "id" property. This aligns the schema validation with the existing implementation behavior.

  • Updates the keybinding "id" property schema to accept both string and null types
  • Improves the description to clarify that null values can be used to disable default keybindings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Love it, thank you

@DHowett
Copy link
Member

DHowett commented Sep 10, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@github-project-automation github-project-automation bot moved this to To Cherry Pick in 1.24 Servicing Pipeline Sep 10, 2025
@github-project-automation github-project-automation bot moved this to To Cherry Pick in 1.23 Servicing Pipeline Sep 10, 2025
@DHowett DHowett enabled auto-merge (squash) September 10, 2025 21:46
@DHowett DHowett disabled auto-merge September 11, 2025 18:05
@DHowett DHowett merged commit eb16eb2 into microsoft:main Sep 11, 2025
7 checks passed
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.23 Servicing Pipeline Sep 16, 2025
DHowett pushed a commit that referenced this pull request Sep 16, 2025
Fixes the terminal profile jsonschema to allow for null in the id. This
is to match the current implementation when disabling a built in default
keybind.

(cherry picked from commit eb16eb2)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgemwL4
Service-Version: 1.23
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.24 Servicing Pipeline Sep 16, 2025
DHowett pushed a commit that referenced this pull request Sep 16, 2025
Fixes the terminal profile jsonschema to allow for null in the id. This
is to match the current implementation when disabling a built in default
keybind.

(cherry picked from commit eb16eb2)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgemwL0
Service-Version: 1.24
@DHowett DHowett moved this from Cherry Picked to Shipped in 1.23 Servicing Pipeline Jan 15, 2026
@DHowett DHowett moved this from Cherry Picked to Shipped in 1.24 Servicing Pipeline Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants