Skip to content

Show partial results after search has been canceled#242346

Merged
lukasolson merged 24 commits intoelastic:mainfrom
lukasolson:show_results_after_cancel
Dec 16, 2025
Merged

Show partial results after search has been canceled#242346
lukasolson merged 24 commits intoelastic:mainfrom
lukasolson:show_results_after_cancel

Conversation

@lukasolson
Copy link
Contributor

@lukasolson lukasolson commented Nov 7, 2025

Summary

Resolves #205783.
Resolves #215950.

When a user clicks "Cancel" while a query is running, show the partial results instead of simply canceling the search request.

Before ("cancel" cancels the query and shows empty results):

Screen.Recording.2025-11-10.at.2.12.09.PM.mov

After ("cancel" retrieves the latest results, cancels the query, and shows the results):

Screen.Recording.2025-11-10.at.2.10.23.PM.mov
@lukasolson lukasolson self-assigned this Nov 7, 2025
@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Nov 7, 2025
@kibanamachine
Copy link
Contributor

Project deployments require a Github label, please add one or more of ci:project-deploy-(elasticsearch|observability|security) and trigger the job through the checkbox again.

@lukasolson lukasolson added the Feature:ES|QL ES|QL related features in Kibana label Nov 11, 2025
@lukasolson lukasolson marked this pull request as ready for review November 22, 2025 00:34
@lukasolson lukasolson requested review from a team as code owners November 22, 2025 00:34
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot added the Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) label Nov 22, 2025
@lukasolson lukasolson added backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes labels Nov 22, 2025
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Abort controller reason change LGTM!

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Code changes make sense to me.

Working for me in a mixed ccs scenario:

Image

Also, I guess this is expected here since we don't have results?

Image

Let me know if there's anything else to test.

I'll leave the approval to Alex. Great feature!

Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to add a test to this suite for the cancelled case?

Copy link
Contributor

@AlexGPlay AlexGPlay left a comment

Choose a reason for hiding this comment

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

code changes LGTM too

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Vis code change LGTM

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Retested on ES|QL, things seem to work great. Test coverage has improved and I no longer see the undefined requests.

@lukasolson
Copy link
Contributor Author

Running the flaky test runner on this one: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/10073

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#10073

[❌] src/platform/test/functional/config.ccs.ts: 0/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10090

[✅] src/platform/test/functional/config.ccs.ts: 25/25 tests passed.

see run history

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #121 / serverless observability UI - Cases and Rules Serverless Observability Cases Cases list row actions Severity to critical

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressions 1796 1802 +6
kibanaUtils 422 423 +1
total +7

Async chunks

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

id before after diff
dashboard 721.3KB 721.3KB +35.0B
discover 1.3MB 1.3MB +286.0B
total +321.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 442.4KB 442.8KB +406.0B
expressions 93.3KB 93.5KB +197.0B
kibanaUtils 48.8KB 49.0KB +134.0B
total +737.0B
Unknown metric groups

API count

id before after diff
expressions 2269 2275 +6
kibanaUtils 615 616 +1
total +7

History

cc @lukasolson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Feature:Search Querying infrastructure in Kibana needs_docs release_note:feature Makes this part of the condensed release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.3.0

9 participants