[Search] Switch over to V2 index management details#259866
[Search] Switch over to V2 index management details#259866seialkali merged 5 commits intoelastic:mainfrom
Conversation
1e3f9a3 to
7087c82
Compare
b97254e to
1f35ec8
Compare
ApprovabilityVerdict: Needs human review This PR permanently enables V2 index management UI by removing a feature flag and consolidating V2 components into the main codebase. All modified files are owned by @elastic/kibana-management or @elastic/kibana-localization teams, not the PR author, so designated code owners should review this significant UI/behavior change. You can customize Macroscope's approvability policy. Learn more. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
1 similar comment
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughFeature-flag gating for platform index management V2 was removed and V2-specific components/hooks were deleted or merged into the primary implementations. Create-index modal UI and behavior were updated (pre-filled random name, themed styling, API code block, new copy) and corresponding locale strings were removed from several translation files. Details page and overview components were refactored to accept sample document data as props, V2 overview/content modules were removed, and some conditional rendering was simplified. Several tests were added (CreateIndexModal, DetailsPageOverview, DocumentList) and some tests and assertions related to back-button navigation were removed. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
💤 Files with no reviewable changes (14)
📝 WalkthroughWalkthroughThis change consolidates the index management feature by removing the v2 feature flag and its associated conditional code paths. The ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_modal.tsx`:
- Line 163: The form currently uses a real <form id="createIndexModalForm"> but
the submit logic is only on the button click, causing Enter to bypass it and
risking native submits; add an onSubmit handler on the form (e.g.,
onSubmit={handleFormSubmit}) that calls event.preventDefault() and then invokes
the existing create logic currently in the button's onClick (move that logic
into or call it from handleFormSubmit), and either remove the button's onClick
or make it call handleFormSubmit to avoid double-submit; update the code in
create_index_modal.tsx so the form submission path is centralized in
handleFormSubmit and prevents the default browser submit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 80ff589a-ed7a-4e7d-bc5e-3d3d1641e078
📒 Files selected for processing (21)
x-pack/platform/plugins/private/translations/translations/de-DE.jsonx-pack/platform/plugins/private/translations/translations/fr-FR.jsonx-pack/platform/plugins/private/translations/translations/ja-JP.jsonx-pack/platform/plugins/private/translations/translations/zh-CN.jsonx-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsxx-pack/platform/plugins/shared/index_management/common/constants/index.tsx-pack/platform/plugins/shared/index_management/public/application/hooks/use_is_platform_index_management_v2_enabled.tsx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_button.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_modal.test.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_modal.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_modal_v2.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_content.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_content_v2.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_overview/details_page_overview.test.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_overview/details_page_overview.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_overview/details_page_overview_v2.tsxx-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/index_documents/document_list.test.tsxx-pack/platform/plugins/shared/index_management/test/scout/ui/fixtures/page_objects/index_management_page.tsx-pack/platform/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.tsx-pack/platform/test/functional/page_objects/index_management_page.ts
💤 Files with no reviewable changes (14)
- x-pack/platform/plugins/shared/index_management/test/scout/ui/fixtures/page_objects/index_management_page.ts
- x-pack/platform/plugins/private/translations/translations/de-DE.json
- x-pack/platform/plugins/private/translations/translations/fr-FR.json
- x-pack/platform/plugins/shared/index_management/public/application/hooks/use_is_platform_index_management_v2_enabled.ts
- x-pack/platform/plugins/private/translations/translations/ja-JP.json
- x-pack/platform/plugins/private/translations/translations/zh-CN.json
- x-pack/platform/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts
- x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page.tsx
- x-pack/platform/plugins/shared/index_management/jest/client_integration/index_details_page/index_details_page.test.tsx
- x-pack/platform/plugins/shared/index_management/common/constants/index.ts
- x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/create_index/create_index_modal_v2.tsx
- x-pack/platform/test/functional/page_objects/index_management_page.ts
- x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_overview/details_page_overview_v2.tsx
- x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_content_v2.tsx
...x_management/public/application/sections/home/index_list/create_index/create_index_modal.tsx
Outdated
Show resolved
Hide resolved
a71afcf to
fded1bb
Compare
kapral18
left a comment
There was a problem hiding this comment.
Looks great overall. I left two small nits inline.
...management/public/application/sections/home/index_list/details_page/details_page_content.tsx
Outdated
Show resolved
Hide resolved
...agement/public/application/sections/home/index_list/create_index/create_index_modal.test.tsx
Show resolved
Hide resolved
fded1bb to
4bee528
Compare
4bee528 to
e13597a
Compare
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
…e_for_children6 * commit '3402744f63ca1196e97b11ffac4e7f7efab240df': (80 commits) [PerUserAuth] Add EARS auth type for Connectors V2 (elastic#253695) Fix `@elastic/eui/require-aria-label-for-modals` lint violations across `@elastic/kibana-core` files (elastic#259757) [Entity Analytics][Leads generation][4] Add API routes, LeadDataClient, and async generation (elastic#257046) [Agent Builder] Agent-centric UX redesign (elastic#258005) fix query streams failing test (elastic#260277) [Lens as code] Add list layout to the new API (elastic#259967) [FTR] Add warning comments to deployment-agnostic FTR base configs (elastic#260018) [Discover][Logs profile] Fix missing search highlights (elastic#260056) Plugin system: safe deletion (elastic#259038) [Infra] Fix Hosts filter options to match selected schema (elastic#259825) Manual Entity Resolution and flyout representation (elastic#260162) [Cascade] Handle grouping on fields with unset values (elastic#260033) [Fleet] generate OTel config for integration packages with otelcol inputs (elastic#259968) [Search] Switch over to V2 index management details (elastic#259866) [inference] increase timeout for ES inference calls (elastic#260382) [ES|QL] Enable subqueries (elastic#257455) [ES|QL] Change Point order free options (elastic#260282) [Auth] Added authentication strategy for UIAM OAuth (elastic#256182) [Security Solution] Add "alerts_candidate_count" rule execution metric (elastic#259917) [api-docs] 2026-03-31 Daily api_docs build (elastic#260380) ...
## Summary This PR completes the consolidation of the index details pages, and removes all V1 files in favour of V2, as well as the UI setting which controlled the display of V2. Any tests impacted by this change have been updated, and any tests needed for new components have been added. This change will only be visible in a Stateful deployment in a Classic space. A PR to fully deprecate search indices plugin, and use the index management plugin for the index details pages in Stateful/Search solution and Serverless will follow. ### Videos https://github.com/user-attachments/assets/8aaf68d1-2219-48d2-a560-521aa91fdfbf ### Testing Confirm the following: **Index List Page** - [ ] Clicking the `Create index` button brings up the new index modal - [ ] A randomly generated index name is pre-populated in the index name field - [ ] Clicking the `Create my index` button successfully creates an index **Index Details Page** - [ ] You can see the V2 header changes - [ ] The `Back to indices` button is no longer in the header - [ ] There is a `EuiButtonEmpty` labeled `Connection details`, which opens the connection details flyout when clicked - [ ] There is a `EuiButtonEmpty` labeled `Discover index` which opens the index on the Discover page - [ ] The `Manage index` button on the far right of the head - [ ] All header buttons are on the same row as the index title - [ ] The `Storage` and `Status` stats card are rendered - [ ] The `Status` card has an accurate count of the number of documents in the index - [ ] The `Add data to this index` section is rendered - [ ] If viewing an index with documents, the `Data preview` section is rendered - [ ] A maximum of 10 sample documents is shown - [ ] The section description shows an accurate count of the number of sample documents shows ### 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](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support]~(https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [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 - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) 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](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)~ - [ ] ~Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.~
## Summary This PR completes the consolidation of the index details pages, and removes all V1 files in favour of V2, as well as the UI setting which controlled the display of V2. Any tests impacted by this change have been updated, and any tests needed for new components have been added. This change will only be visible in a Stateful deployment in a Classic space. A PR to fully deprecate search indices plugin, and use the index management plugin for the index details pages in Stateful/Search solution and Serverless will follow. ### Videos https://github.com/user-attachments/assets/8aaf68d1-2219-48d2-a560-521aa91fdfbf ### Testing Confirm the following: **Index List Page** - [ ] Clicking the `Create index` button brings up the new index modal - [ ] A randomly generated index name is pre-populated in the index name field - [ ] Clicking the `Create my index` button successfully creates an index **Index Details Page** - [ ] You can see the V2 header changes - [ ] The `Back to indices` button is no longer in the header - [ ] There is a `EuiButtonEmpty` labeled `Connection details`, which opens the connection details flyout when clicked - [ ] There is a `EuiButtonEmpty` labeled `Discover index` which opens the index on the Discover page - [ ] The `Manage index` button on the far right of the head - [ ] All header buttons are on the same row as the index title - [ ] The `Storage` and `Status` stats card are rendered - [ ] The `Status` card has an accurate count of the number of documents in the index - [ ] The `Add data to this index` section is rendered - [ ] If viewing an index with documents, the `Data preview` section is rendered - [ ] A maximum of 10 sample documents is shown - [ ] The section description shows an accurate count of the number of sample documents shows ### 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](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support]~(https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [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 - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) 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](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)~ - [ ] ~Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.~
Summary
This PR completes the consolidation of the index details pages, and removes all V1 files in favour of V2, as well as the UI setting which controlled the display of V2. Any tests impacted by this change have been updated, and any tests needed for new components have been added.
This change will only be visible in a Stateful deployment in a Classic space. A PR to fully deprecate search indices plugin, and use the index management plugin for the index details pages in Stateful/Search solution and Serverless will follow.
Videos
index.details.consolidation.mov
Testing
Confirm the following:
Index List Page
Create indexbutton brings up the new index modalCreate my indexbutton successfully creates an indexIndex Details Page
Back to indicesbutton is no longer in the headerEuiButtonEmptylabeledConnection details, which opens the connection details flyout when clickedEuiButtonEmptylabeledDiscover indexwhich opens the index on the Discover pageManage indexbutton on the far right of the headStorageandStatusstats card are renderedStatuscard has an accurate count of the number of documents in the indexAdd data to this indexsection is renderedData previewsection is renderedChecklist
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](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)Documentation was added for features that require explanation or tutorialsIf a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listThis was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. Therelease_note:breakinglabel should be applied in these situations.Flaky Test Runner was used on any tests changedThe PR description includes the appropriate Release Notes section, and the correctrelease_note:*label is applied per the guidelinesReview the backport guidelines and apply applicablebackport:*labels.