Skip to content

[Discover] Should be able to complete all quickly opened tabs#246941

Merged
jughosta merged 5 commits intoelastic:mainfrom
jughosta:246406-fix-esql-loading
Jan 6, 2026
Merged

[Discover] Should be able to complete all quickly opened tabs#246941
jughosta merged 5 commits intoelastic:mainfrom
jughosta:246406-fix-esql-loading

Conversation

@jughosta
Copy link
Contributor

@jughosta jughosta commented Dec 18, 2025

Summary

Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab.

Checklist

@jughosta jughosta self-assigned this Dec 18, 2025
@jughosta jughosta added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Project:OneDiscover Enrich Discover with contextual awareness backport:version Backport to applied version labels v9.3.0 Feature:DiscoverTabs Tabs feature within Discover v9.2.4 labels Dec 18, 2025
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

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

[✅] src/platform/test/functional/apps/discover/tabs/config.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 #61 / InfraOps App Metrics UI Home page with metrics present renders the kubernetes tour component and allows user to dismiss it without seeing it again

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
discover 1.3MB 1.3MB +64.0B

cc @jughosta

@jughosta jughosta marked this pull request as ready for review December 19, 2025 13:24
@jughosta jughosta requested a review from a team as a code owner December 19, 2025 13:24
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it!

Comment on lines +437 to +442
if (numberOfFetches > 0) {
subscription.unsubscribe();
} else {
// to let the initial fetch to execute properly before unsubscribing
setTimeout(() => subscription.unsubscribe(), 200);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think ideally we'd extract the fetch$ subscription callback to a separate function and call it directly on init to avoid the debounce vs relying on a timeout. But that's also a higher impact change for something backported, so this is good for now. Still think it's worth doing at some point though.

@jughosta jughosta merged commit 3acd431 into elastic:main Jan 6, 2026
13 checks passed
@jughosta jughosta deleted the 246406-fix-esql-loading branch January 6, 2026 08:34
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.2, 9.3

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 6, 2026
…c#246941)

- Closes elastic#246406

## Summary

Unsubscribe was triggered too fast and it did not allow the initial
fetch to even start to execute. This PR delays the unsubscribe and lets
to fetch the data for the tab.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 3acd431)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 6, 2026
…c#246941)

- Closes elastic#246406

## Summary

Unsubscribe was triggered too fast and it did not allow the initial
fetch to even start to execute. This PR delays the unsubscribe and lets
to fetch the data for the tab.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 3acd431)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.2
9.3

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 6, 2026
…246941) (#247910)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Discover] Should be able to complete all quickly opened tabs
(#246941)](#246941)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-01-06T08:34:19Z","message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.3.0","Feature:DiscoverTabs","v9.4.0","v9.2.4"],"title":"[Discover]
Should be able to complete all quickly opened
tabs","number":246941,"url":"https://github.com/elastic/kibana/pull/246941","mergeCommit":{"message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246941","number":246941,"mergeCommit":{"message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 6, 2026
…246941) (#247909)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Discover] Should be able to complete all quickly opened tabs
(#246941)](#246941)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-01-06T08:34:19Z","message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.3.0","Feature:DiscoverTabs","v9.4.0","v9.2.4"],"title":"[Discover]
Should be able to complete all quickly opened
tabs","number":246941,"url":"https://github.com/elastic/kibana/pull/246941","mergeCommit":{"message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246941","number":246941,"mergeCommit":{"message":"[Discover]
Should be able to complete all quickly opened tabs (#246941)\n\n- Closes
https://github.com/elastic/kibana/issues/246406\n\n##
Summary\n\nUnsubscribe was triggered too fast and it did not allow the
initial\nfetch to even start to execute. This PR delays the unsubscribe
and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 6, 2026
…c#246941)

- Closes elastic#246406

## Summary

Unsubscribe was triggered too fast and it did not allow the initial
fetch to even start to execute. This PR delays the unsubscribe and lets
to fetch the data for the tab.


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
dej611 pushed a commit to dej611/kibana that referenced this pull request Jan 8, 2026
…c#246941)

- Closes elastic#246406

## Summary

Unsubscribe was triggered too fast and it did not allow the initial
fetch to even start to execute. This PR delays the unsubscribe and lets
to fetch the data for the tab.


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
devamanv pushed a commit to devamanv/kibana that referenced this pull request Jan 12, 2026
…c#246941)

- Closes elastic#246406

## Summary

Unsubscribe was triggered too fast and it did not allow the initial
fetch to even start to execute. This PR delays the unsubscribe and lets
to fetch the data for the tab.


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
@florent-leborgne florent-leborgne added release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:DiscoverTabs Tabs feature within Discover Project:OneDiscover Enrich Discover with contextual awareness release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.2.4 v9.3.0 v9.4.0

5 participants