Skip to content

[Index Management] Fix error on index lifecycle summary tab#246606

Merged
damian-polewski merged 2 commits intoelastic:mainfrom
damian-polewski:index_management/fix_hook_error_on_index_lifecycle_summary_tab
Dec 18, 2025
Merged

[Index Management] Fix error on index lifecycle summary tab#246606
damian-polewski merged 2 commits intoelastic:mainfrom
damian-polewski:index_management/fix_hook_error_on_index_lifecycle_summary_tab

Conversation

@damian-polewski
Copy link
Contributor

@damian-polewski damian-polewski commented Dec 16, 2025

Summary

Closes #246573

This PR fixes an issue where the IndexLifecycleSummary component was passed directly to renderTabContent instead of being wrapped in an arrow function.

When PR #240978 introduced the usePhaseColors() hook, this broke the Index Lifecycle tab because renderTabContent is called as a plain function in details_page_tab.tsx:

selectedTab.renderTabContent({ index, getUrlForApp, euiTheme })>

Because of this hook wasn't getting called during proper React rendering causing "Invalid hook call" errors.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@damian-polewski damian-polewski self-assigned this Dec 16, 2025
@damian-polewski damian-polewski requested a review from a team as a code owner December 16, 2025 16:35
@damian-polewski damian-polewski added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Dec 16, 2025
@elasticmachine
Copy link
Contributor

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

@ElenaStoeva
Copy link
Contributor

ElenaStoeva commented Dec 16, 2025

Thanks for working on this @damian-polewski! I noticed the card doesn't seem to load properly unless the page is reloaded:

Screen.Recording.2025-12-16.at.17.22.18.mov

Here is how it was in 9.2:

9.2.mov

@ElenaStoeva ElenaStoeva added the ci:cloud-deploy Create or update a Cloud deployment label Dec 17, 2025
@ElenaStoeva
Copy link
Contributor

/ci

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Approving so that at least we fix the broken page. I also tested in the cloud deployment and it works perfectly fine there (no delays in loading the tab), so it seems the delay problem is on prem only.

@ElenaStoeva
Copy link
Contributor

@elasticmachine run docs-build

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 18, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #10 / Uprade package install version with package installed with a previous format install version should upgrade package install version for outdated packages

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
@kbn/index-management-shared-types 180 179 -1

Page load bundle

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

id before after diff
indexLifecycleManagement 27.5KB 27.6KB +68.0B

History

cc @damian-polewski

@damian-polewski damian-polewski changed the title fix: error on index lifecycle summary tab [Index Management] Fix error on index lifecycle summary tab Dec 18, 2025
@damian-polewski damian-polewski enabled auto-merge (squash) December 18, 2025 11:06
@damian-polewski damian-polewski merged commit df6ae8b into elastic:main Dec 18, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2, 9.3

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 18, 2025
…246606)

## Summary

Closes elastic#246573

This PR fixes an issue where the IndexLifecycleSummary component was
passed directly to renderTabContent instead of being wrapped in an arrow
function.

When PR elastic#240978 introduced the `usePhaseColors()` hook, this broke the
Index Lifecycle tab because `renderTabContent` is called as a plain
function in `details_page_tab.tsx`:

```
selectedTab.renderTabContent({ index, getUrlForApp, euiTheme })>
```

Because of this hook wasn't getting called during proper React rendering
causing "Invalid hook call" errors.

(cherry picked from commit df6ae8b)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts
9.3

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 246606

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 18, 2025
…46606) (#246869)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Index Management] Fix error on index lifecycle summary tab
(#246606)](#246606)

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

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

<!--BACKPORT [{"author":{"name":"Damian
Polewski","email":"125268832+damian-polewski@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-18T12:19:51Z","message":"[Index
Management] Fix error on index lifecycle summary tab (#246606)\n\n##
Summary\n\nCloses #246573\n\nThis PR fixes an issue where the
IndexLifecycleSummary component was\npassed directly to renderTabContent
instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978
introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle
tab because `renderTabContent` is called as a plain\nfunction in
`details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index,
getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting
called during proper React rendering\ncausing \"Invalid hook call\"
errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","backport:all-open","ci:cloud-deploy","v9.4.0"],"title":"[Index
Management] Fix error on index lifecycle summary
tab","number":246606,"url":"https://github.com/elastic/kibana/pull/246606","mergeCommit":{"message":"[Index
Management] Fix error on index lifecycle summary tab (#246606)\n\n##
Summary\n\nCloses #246573\n\nThis PR fixes an issue where the
IndexLifecycleSummary component was\npassed directly to renderTabContent
instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978
introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle
tab because `renderTabContent` is called as a plain\nfunction in
`details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index,
getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting
called during proper React rendering\ncausing \"Invalid hook call\"
errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246606","number":246606,"mergeCommit":{"message":"[Index
Management] Fix error on index lifecycle summary tab (#246606)\n\n##
Summary\n\nCloses #246573\n\nThis PR fixes an issue where the
IndexLifecycleSummary component was\npassed directly to renderTabContent
instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978
introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle
tab because `renderTabContent` is called as a plain\nfunction in
`details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index,
getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting
called during proper React rendering\ncausing \"Invalid hook call\"
errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a"}}]}]
BACKPORT-->

Co-authored-by: Damian Polewski <125268832+damian-polewski@users.noreply.github.com>
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 ci:cloud-deploy Create or update a Cloud deployment Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Index Management] Index lifecycle tab in index details page is broken

4 participants