Commit 967e15f
authored
# 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-->
1 parent ee9d831 commit 967e15f
2 files changed
Lines changed: 27 additions & 3 deletions
File tree
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
290 | 308 | | |
291 | 309 | | |
292 | 310 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | | - | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
0 commit comments