Skip to content

[Console] Fix method suggestion order#270787

Merged
kapral18 merged 1 commit into
elastic:mainfrom
kapral18:console-method-suggestion-order-259251
May 26, 2026
Merged

[Console] Fix method suggestion order#270787
kapral18 merged 1 commit into
elastic:mainfrom
kapral18:console-method-suggestion-order-259251

Conversation

@kapral18
Copy link
Copy Markdown
Contributor

@kapral18 kapral18 commented May 22, 2026

Closes #259251

Summary

  • Pins Console HTTP method completion ordering with explicit sortText values so Monaco does not fall back to alphabetical label sorting.
  • Keeps the existing method set unchanged while ordering GET first and DELETE last.

Root Cause

  • Monaco uses sortText for completion ordering and falls back to the item label when sortText is missing, which can put DELETE before safer/default verbs.

Fix

  • Assign stable sortText values to method completion items based on the intended canonical order.
  • Add a focused unit test that sorts method suggestions the same way and verifies GET is first and DELETE is last.

Before

image

After

image

Test Plan

  • node scripts/jest --config=src/platform/plugins/shared/console/jest.config.js src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts — passed.
  • node scripts/check_changes.ts — passed.

Release Note

  • Fixes Console autocomplete so GET is shown before DELETE when suggesting HTTP methods on an empty request line.

Assisted with Cursor using GPT-5.5

Made with Cursor

@kapral18 kapral18 added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// Feature:Console Dev Tools Console Feature release_note:fix backport:skip This PR does not require backporting labels May 22, 2026
@kapral18 kapral18 changed the title Fix Console method suggestion order [Console] Fix method suggestion order May 22, 2026
@kapral18 kapral18 requested a review from Copilot May 22, 2026 22:36
@kapral18 kapral18 added reviewer:claude PR review and comments with Claude reviewer:codex PR review and comments with Codex labels May 22, 2026
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Pins Monaco HTTP method completion ordering so safer verbs appear first (GET) and destructive verbs appear last (DELETE), avoiding Monaco’s alphabetical fallback behavior.

Changes:

  • Reorders the HTTP method list and adds explicit sortText to each completion item.
  • Adds a unit test that validates Monaco-style sorting puts GET first and DELETE last.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/platform/plugins/shared/console/public/application/containers/editor/utils/autocomplete_utils.ts Adds explicit sortText and updates canonical HTTP method order for completions
src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts Adds focused test for method suggestion ordering using sortText

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

@kapral18 kapral18 marked this pull request as ready for review May 22, 2026 23:04
@kapral18 kapral18 requested a review from a team as a code owner May 22, 2026 23:04
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/kibana-management (Team:Kibana Management)

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod Bot requested a review from a team as a code owner May 22, 2026 23:40
@kapral18 kapral18 force-pushed the console-method-suggestion-order-259251 branch from 342b4c2 to 7a831dc Compare May 23, 2026 10:44
@kapral18 kapral18 removed the request for review from a team May 23, 2026 10:45
Copy link
Copy Markdown
Contributor

@SoniaSanzV SoniaSanzV left a comment

Choose a reason for hiding this comment

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

tested locally, lgtm! (great improvement, btw!)

Co-authored-by: Cursor <cursoragent@cursor.com>
@kapral18 kapral18 force-pushed the console-method-suggestion-order-259251 branch from 7a831dc to ffcc6f8 Compare May 26, 2026 10:02
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #33 - serverless-observability_complete / default / local-serverless-observability_complete - Hosts Page - Empty State - should show onboarding page when no data is present
  • [job] [logs] FTR Configs #66 / Serverless Common UI - Home Page Sample data in serverless Sample data loads

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
console 208.3KB 208.3KB +23.0B

History

@kapral18 kapral18 merged commit 8849fcf into elastic:main May 26, 2026
31 checks passed
@kapral18 kapral18 deleted the console-method-suggestion-order-259251 branch May 26, 2026 13:22
smith pushed a commit to smith/kibana that referenced this pull request May 27, 2026
Closes elastic#259251

## Summary

- Pins Console HTTP method completion ordering with explicit `sortText`
values so Monaco does not fall back to alphabetical label sorting.
- Keeps the existing method set unchanged while ordering `GET` first and
`DELETE` last.

## Root Cause

- Monaco uses `sortText` for completion ordering and falls back to the
item label when `sortText` is missing, which can put `DELETE` before
safer/default verbs.

## Fix

- Assign stable `sortText` values to method completion items based on
the intended canonical order.
- Add a focused unit test that sorts method suggestions the same way and
verifies `GET` is first and `DELETE` is last.

## Before
<img width="723" height="466" alt="image"
src="https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18"
/>

## After
<img width="725" height="437" alt="image"
src="https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383"
/>

## Test Plan

- `node scripts/jest
--config=src/platform/plugins/shared/console/jest.config.js
src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`
— passed.
- `node scripts/check_changes.ts` — passed.

## Release Note

- Fixes Console autocomplete so `GET` is shown before `DELETE` when
suggesting HTTP methods on an empty request line.

Assisted with Cursor using GPT-5.5

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
@kapral18 kapral18 added backport:all-open Backport to all branches that could still receive a release and removed backport:skip This PR does not require backporting labels May 28, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.3, 9.4

https://github.com/elastic/kibana/actions/runs/26546457748

@elastic elastic deleted a comment from kibanamachine May 28, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.3 Backport failed because of merge conflicts
9.4 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 270787

Questions ?

Please refer to the Backport tool documentation

@kapral18
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.4
9.3
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 29, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @kapral18

kapral18 added a commit to kapral18/kibana that referenced this pull request May 29, 2026
Closes elastic#259251

## Summary

- Pins Console HTTP method completion ordering with explicit `sortText`
values so Monaco does not fall back to alphabetical label sorting.
- Keeps the existing method set unchanged while ordering `GET` first and
`DELETE` last.

## Root Cause

- Monaco uses `sortText` for completion ordering and falls back to the
item label when `sortText` is missing, which can put `DELETE` before
safer/default verbs.

## Fix

- Assign stable `sortText` values to method completion items based on
the intended canonical order.
- Add a focused unit test that sorts method suggestions the same way and
verifies `GET` is first and `DELETE` is last.

## Before
<img width="723" height="466" alt="image"
src="https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18"
/>

## After
<img width="725" height="437" alt="image"
src="https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383"
/>

## Test Plan

- `node scripts/jest
--config=src/platform/plugins/shared/console/jest.config.js
src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`
— passed.
- `node scripts/check_changes.ts` — passed.

## Release Note

- Fixes Console autocomplete so `GET` is shown before `DELETE` when
suggesting HTTP methods on an empty request line.

Assisted with Cursor using GPT-5.5

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 8849fcf)

# Conflicts:
#	src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts
kapral18 added a commit to kapral18/kibana that referenced this pull request May 29, 2026
Closes elastic#259251

## Summary

- Pins Console HTTP method completion ordering with explicit `sortText`
values so Monaco does not fall back to alphabetical label sorting.
- Keeps the existing method set unchanged while ordering `GET` first and
`DELETE` last.

## Root Cause

- Monaco uses `sortText` for completion ordering and falls back to the
item label when `sortText` is missing, which can put `DELETE` before
safer/default verbs.

## Fix

- Assign stable `sortText` values to method completion items based on
the intended canonical order.
- Add a focused unit test that sorts method suggestions the same way and
verifies `GET` is first and `DELETE` is last.

## Before
<img width="723" height="466" alt="image"
src="https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18"
/>

## After
<img width="725" height="437" alt="image"
src="https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383"
/>

## Test Plan

- `node scripts/jest
--config=src/platform/plugins/shared/console/jest.config.js
src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`
— passed.
- `node scripts/check_changes.ts` — passed.

## Release Note

- Fixes Console autocomplete so `GET` is shown before `DELETE` when
suggesting HTTP methods on an empty request line.

Assisted with Cursor using GPT-5.5

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 8849fcf)

# Conflicts:
#	src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts
kapral18 added a commit that referenced this pull request May 29, 2026
# Backport

This will backport the following commits from `main` to `9.4`:
- [[Console] Fix method suggestion order
(#270787)](#270787)

<!--- Backport version: 11.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2026-05-26T13:22:04Z","message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","release_note:fix","Team:Kibana
Management","backport:all-open","reviewer:claude","v9.5.0","reviewer:codex"],"title":"[Console]
Fix method suggestion
order","number":270787,"url":"https://github.com/elastic/kibana/pull/270787","mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/270787","number":270787,"mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}}]}]
BACKPORT-->
kapral18 added a commit that referenced this pull request May 29, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [[Console] Fix method suggestion order
(#270787)](#270787)

<!--- Backport version: 11.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2026-05-26T13:22:04Z","message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","release_note:fix","Team:Kibana
Management","backport:all-open","reviewer:claude","v9.5.0","reviewer:codex"],"title":"[Console]
Fix method suggestion
order","number":270787,"url":"https://github.com/elastic/kibana/pull/270787","mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/270787","number":270787,"mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}}]}]
BACKPORT-->
kapral18 added a commit to kapral18/kibana that referenced this pull request May 29, 2026
The console autocomplete FTR suite is active on 8.19 (describe.skip on
main/9.x), so the new sortText-based ordering from elastic#270787 made the
stale HTTP methods assertion fail. Update the expected P* order to
match the pinned order (POST, PUT, PATCH).

Co-authored-by: Cursor <cursoragent@cursor.com>
kapral18 added a commit that referenced this pull request May 29, 2026
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Console] Fix method suggestion order
(#270787)](#270787)

<!--- Backport version: 11.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2026-05-26T13:22:04Z","message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","release_note:fix","Team:Kibana
Management","backport:all-open","reviewer:claude","v9.5.0","reviewer:codex"],"title":"[Console]
Fix method suggestion
order","number":270787,"url":"https://github.com/elastic/kibana/pull/270787","mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/270787","number":270787,"mergeCommit":{"message":"[Console]
Fix method suggestion order (#270787)\n\nCloses #259251\n\n##
Summary\n\n- Pins Console HTTP method completion ordering with explicit
`sortText`\nvalues so Monaco does not fall back to alphabetical label
sorting.\n- Keeps the existing method set unchanged while ordering `GET`
first and\n`DELETE` last.\n\n## Root Cause\n\n- Monaco uses `sortText`
for completion ordering and falls back to the\nitem label when
`sortText` is missing, which can put `DELETE` before\nsafer/default
verbs.\n\n## Fix\n\n- Assign stable `sortText` values to method
completion items based on\nthe intended canonical order.\n- Add a
focused unit test that sorts method suggestions the same way
and\nverifies `GET` is first and `DELETE` is last.\n\n## Before\n<img
width=\"723\" height=\"466\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/faf244b2-4207-483b-acbc-32b148441b18\"\n/>\n\n##
After\n<img width=\"725\" height=\"437\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/782c0c60-6052-4c28-80bc-f45403fa1383\"\n/>\n\n##
Test Plan\n\n- `node
scripts/jest\n--config=src/platform/plugins/shared/console/jest.config.js\nsrc/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.test.ts`\n—
passed.\n- `node scripts/check_changes.ts` — passed.\n\n## Release
Note\n\n- Fixes Console autocomplete so `GET` is shown before `DELETE`
when\nsuggesting HTTP methods on an empty request line.\n\nAssisted with
Cursor using GPT-5.5\n\nMade with
[Cursor](https://cursor.com)\n\nCo-authored-by: Cursor
<cursoragent@cursor.com>","sha":"8849fcf6623fc7d917db93caba0c18d5e8f16b34"}}]}]
BACKPORT-->

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@kibanamachine kibanamachine added v8.19.16 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release Feature:Console Dev Tools Console Feature release_note:fix reviewer:claude PR review and comments with Claude reviewer:codex PR review and comments with Codex Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.19.16 v9.3.5 v9.4.2 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dev Console] Kibana Autocomplete suggests DELETE statement as first HTTP Verb

4 participants