[Discover sessions as Code] Default-on discover.embeddableTransforms#260945
Merged
lukasolson merged 4 commits intoApr 7, 2026
Merged
Conversation
Use true as the fallback for unset flags in server state, getBooleanValue$, and client getEmbeddableTransformsEnabled. Explicit false keeps legacy path. The discover services test mock returns true to match production default. Refs elastic#260103 Made-with: Cursor
113e12a to
04621ee
Compare
davismcphee
approved these changes
Apr 3, 2026
Contributor
davismcphee
left a comment
There was a problem hiding this comment.
LGTM 👍 Approving now so it's ready assuming we're enabling it. I think we should try to get that unsaved changes bug in dashboard fixed first though.
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
cc @lukasolson |
5 tasks
lukasolson
added a commit
that referenced
this pull request
Apr 8, 2026
) ### Summary Closes #260804. Related to #260945. ### Problem With **`discover.embeddableTransforms`** enabled, opening a dashboard that includes Discover session panels could mark the dashboard as **dirty immediately**, even though nothing was edited ([issue #260804](#260804)). ### Solution - Pass **`defaultState`** into `initializeUnsavedChanges` so comparator inputs fall back to the same defaults when a key is absent on **last saved** or **current** serialized state: - **Transforms / sessions shape:** `selected_tab_id` → first tab id when present. - **Legacy saved-search shape:** `selectedTabId` plus other embeddable defaults (`sort`, `grid`, and values from `getSearchEmbeddableDefaults(uiSettings)`) so omitted persisted fields align with what we serialize at runtime. - **Remove** the bespoke `compareSelectedTabId` helper; **`referenceEquality`** on the tab id fields is sufficient once `defaultState` supplies the default tab id. - **Refactor** Discover-specific comparator maps into **`get_search_embeddable_comparators.ts`** (`getSearchEmbeddableComparators` / `getDiscoverSessionEmbeddableComparators`) and **add unit tests** ### How to verify 1. Enable **`discover.embeddableTransforms`**. 2. Open a dashboard that contains Discover session (by-reference) panels that do **not** persist an explicit selected tab (or match the scenario from the issue). 3. Confirm the dashboard **does not** show unsaved changes on load until something is actually edited. --------- Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
nickpeihl
added a commit
that referenced
this pull request
Apr 8, 2026
…cal Preview (#256302) Fixes #256073 ## Summary Introduces the Dashboard API endpoints as Technical Preview Dashboard API documentation will be published as OpenAPI specifications and available in the [Kibana API Documentation](https://www.elastic.co/docs/api/doc/kibana/). Dashboard API create/update endpoints are initially limited to a select few types including Lens, markdown, synthetics, and SLO panels. Support for additional panel types will be available in future updates. ## OAS documentation To build documentation bundle for public route * Add `server.oas.enabled: true` to `config/kibana.dev.yml` * Run `node scripts/capture_oas_snapshot --include-path /api/dashboards --no-serverless --update` ### Blocked by - [x] #259670 - [x] #259461 - [x] #260040 - [x] #261186 - [x] #260945 --------- Co-authored-by: Nathan Reese <reese.nathan@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #260103.
When the
discover.embeddableTransformsfeature flag is unset, Kibana now defaults to enabled (declarative Discover session panel shape / dashboards-as-code alignment). Setting the flag explicitly tofalsecontinues to use the legacytransformOutpath.Changes
embeddableTransformsEnabledmatches the default;getBooleanValue$already used this field as fallback.getEmbeddableTransformsEnabled()uses the same default forgetBooleanValuewhen the flag is unset.createDiscoverServicesMockreturnstruefor embeddable transforms to mirror production default; tests that need legacy behavior still override the mock.Acceptance criteria
falsestill disables new path (legacy unchanged).legacyTransformOutor flag key.Closes #260103
Made with Cursor