Skip to content

Update naming of functions to make state ownership clearer.#260839

Closed
ThomThomson wants to merge 13 commits into
elastic:mainfrom
ThomThomson:clearerEmbeddableStateOwnership
Closed

Update naming of functions to make state ownership clearer.#260839
ThomThomson wants to merge 13 commits into
elastic:mainfrom
ThomThomson:clearerEmbeddableStateOwnership

Conversation

@ThomThomson
Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson commented Apr 1, 2026

Followup to #260082.

The above PR made embeddables capable of "resetting" to any arbitrary state by moving "last saved state" based resetting into the Dashboard, and changing the related unsaved changes interfaces to take arguments for state to set.

This PR promotes that capability directly into the Embeddable framework and updates the naming of all related functionality. Embeddables no longer need to import and call initializeUnsavedChanges and instead get this capability provided to them as an argument called initializeStateApi.

Renamed and changed types for unsaved changes

blurp
@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@ThomThomson
Copy link
Copy Markdown
Contributor Author

/ci

elasticAssistantSharedState: 4881
elasticConsole: 4451
embeddable: 16634
embeddable: 19659
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I opted to update the limits here manually rather than async importing the function responsible for the increase. This is because the function is required for every embeddable on start up.

An async import of this function would require either an additional bundle, or placement of this function with another module that hosts unrelated code that isn't imported for every embeddable.

This function has been moved from a package import into the embeddable plugin.

@ThomThomson
Copy link
Copy Markdown
Contributor Author

/ci

@ThomThomson
Copy link
Copy Markdown
Contributor Author

/ci

@ThomThomson
Copy link
Copy Markdown
Contributor Author

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 14, 2026

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as acknowledged should mark as acknowledged
  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as acknowledged should mark as acknowledged
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as acknowledged should mark as acknowledged
  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as acknowledged should mark as acknowledged
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as closed should mark as closed
  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as closed should mark as closed
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as closed should mark as closed
  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Alert details expandable flyout right panel should mark as closed should mark as closed
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #4 / Alerts page filters - alerts data modification should update alert status list when the alerts are updated should update alert status list when the alerts are updated
  • [job] [logs] Investigations - Security Solution Cypress Tests #7 / Alerts page filters - alerts data modification should update alert status list when the alerts are updated should update alert status list when the alerts are updated
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #4 / Alerts page filters - alerts data modification should update alert status list when the alerts are updated should update alert status list when the alerts are updated
  • [job] [logs] Investigations - Security Solution Cypress Tests #7 / Alerts page filters - alerts data modification should update alert status list when the alerts are updated should update alert status list when the alerts are updated
  • [job] [logs] Investigations - Security Solution Cypress Tests #9 / Alerts page filters - kqlbar should take kqlQuery into account should take kqlQuery into account
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #6 / Alerts page filters - kqlbar should take kqlQuery into account should take kqlQuery into account
  • [job] [logs] Investigations - Security Solution Cypress Tests #9 / Alerts page filters - kqlbar should take kqlQuery into account should take kqlQuery into account
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #6 / Alerts page filters - kqlbar should take kqlQuery into account should take kqlQuery into account
  • [job] [logs] Investigations - Security Solution Cypress Tests #9 / Alerts page filters - kqlbar should take timeRange into account should take timeRange into account
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #6 / Alerts page filters - kqlbar should take timeRange into account should take timeRange into account
  • [job] [logs] Investigations - Security Solution Cypress Tests #9 / Alerts page filters - kqlbar should take timeRange into account should take timeRange into account
  • [job] [logs] Serverless Investigations - Security Solution Cypress Tests #6 / Alerts page filters - kqlbar should take timeRange into account should take timeRange into account
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding check Agent Status when data is present when data is present
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding check Agent Status when data is present when data is present
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding check Agent Status when no data is present when no data is present
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding check Agent Status when no data is present when no data is present
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding create API Key create the key successfully create the key successfully
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding create API Key create the key successfully create the key successfully
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding General navigation navigation to different Tabs navigation to different Tabs
  • [job] [logs] APM Cypress Tests #2 / APM Onboarding General navigation navigation to different Tabs navigation to different Tabs
  • [job] [logs] FTR Configs #66 / Controls Range Slider Control create and edit applies filter from the first control on the second control
  • [job] [logs] FTR Configs #66 / Controls Range Slider Control create and edit applies filter from the first control on the second control
  • [job] [logs] FTR Configs #71 / dashboard drilldowns Dashboard to dashboard drilldown Create & use drilldowns test dashboard to dashboard drilldown with controls creates filter pills representing controls selections
  • [job] [logs] FTR Configs #71 / dashboard drilldowns Dashboard to dashboard drilldown Create & use drilldowns test dashboard to dashboard drilldown with controls creates filter pills representing controls selections
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as "viewer" user when importing a file displays documents tab for the imported bundle displays documents tab for the imported bundle
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as "viewer" user when importing a file displays documents tab for the imported bundle displays documents tab for the imported bundle
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display data streams tab can display data streams tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display data streams tab can display data streams tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display index template tab can display index template tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display index template tab can display index template tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display indices tab can display indices tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display indices tab can display indices tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display summary tab can display summary tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file can display summary tab can display summary tab
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file shows the remove button shows the remove button
  • [job] [logs] APM Cypress Tests #1 / Diagnostics when logging in as superuser when importing a file shows the remove button shows the remove button
  • [job] [logs] APM Cypress Tests #1 / Errors table navigates to error detail page navigates to error detail page
  • [job] [logs] APM Cypress Tests #1 / Errors table navigates to error detail page navigates to error detail page
  • [job] [logs] APM Cypress Tests #1 / Errors table navigates to the errors page navigates to the errors page
  • [job] [logs] APM Cypress Tests #1 / Errors table navigates to the errors page navigates to the errors page
  • [job] [logs] affected Scout: [ platform / dashboard-stateful-classic ] plugin / local-stateful-classic - Controls migration smoke (8.0.0) - imports and renders controls without regressions
  • [job] [logs] affected Scout: [ platform / dashboard-stateful-classic ] plugin / local-stateful-classic - Controls migration smoke (8.0.0) - imports and renders controls without regressions
  • [job] [logs] APM Cypress Tests #1 / Mobile transaction details page opens the action menu popup when clicking the investigate button opens the action menu popup when clicking the investigate button
  • [job] [logs] APM Cypress Tests #1 / Mobile transaction details page opens the action menu popup when clicking the investigate button opens the action menu popup when clicking the investigate button
  • [job] [logs] APM Cypress Tests #2 / Mobile transactions page when click on tab it shows the correct table for each tab when click on tab it shows the correct table for each tab
  • [job] [logs] APM Cypress Tests #2 / Mobile transactions page when click on tab it shows the correct table for each tab when click on tab it shows the correct table for each tab
  • [job] [logs] FTR Configs #25 / Options list control Interactions between options list and dashboard Applies query settings to controls Malformed query throws an error
  • [job] [logs] FTR Configs #25 / Options list control Interactions between options list and dashboard Applies query settings to controls Malformed query throws an error
  • [job] [logs] APM Cypress Tests #1 / Rules Error count when created from APM when created from Service inventory creates a rule creates a rule
  • [job] [logs] APM Cypress Tests #1 / Rules Error count when created from APM when created from Service inventory creates a rule creates a rule
  • [job] [logs] APM Cypress Tests #2 / Service inventory Calls APIs when selecting a different time range and clicking the update button when selecting a different time range and clicking the update button
  • [job] [logs] APM Cypress Tests #2 / Service inventory Calls APIs when selecting a different time range and clicking the update button when selecting a different time range and clicking the update button
  • [job] [logs] APM Cypress Tests #2 / Service inventory Calls APIs with the correct environment when changing the environment with the correct environment when changing the environment
  • [job] [logs] APM Cypress Tests #2 / Service inventory Calls APIs with the correct environment when changing the environment with the correct environment when changing the environment
  • [job] [logs] APM Cypress Tests #2 / Service inventory Check detailed statistics API with multiple services calls detailed API with visible items only calls detailed API with visible items only
  • [job] [logs] APM Cypress Tests #2 / Service inventory Check detailed statistics API with multiple services calls detailed API with visible items only calls detailed API with visible items only
  • [job] [logs] APM Cypress Tests #2 / Service inventory Check pagination with progressive loading enabled should navigate to the next page when clicking on the pagination button should navigate to the next page when clicking on the pagination button
  • [job] [logs] APM Cypress Tests #2 / Service inventory Check pagination with progressive loading enabled should navigate to the next page when clicking on the pagination button should navigate to the next page when clicking on the pagination button
  • [job] [logs] APM Cypress Tests #2 / Service inventory Table search Uses the fast filter to search for services Uses the fast filter to search for services
  • [job] [logs] APM Cypress Tests #2 / Service inventory Table search Uses the fast filter to search for services Uses the fast filter to search for services
  • [job] [logs] APM Cypress Tests #1 / Trace Explorer opens the action menu popup when clicking the investigate button opens the action menu popup when clicking the investigate button
  • [job] [logs] APM Cypress Tests #1 / Trace Explorer opens the action menu popup when clicking the investigate button opens the action menu popup when clicking the investigate button
  • [job] [logs] APM Cypress Tests #3 / When navigating between pages should only load certain resources once should only load certain resources once
  • [job] [logs] APM Cypress Tests #3 / When navigating between pages should only load certain resources once should only load certain resources once

History

@nreese
Copy link
Copy Markdown
Contributor

nreese commented May 21, 2026

Replacing with #270270

@nreese nreese closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants