elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.78k stars 8.18k forks source link

Execution context remains the same on every route change #195778

Open eokoneyo opened 2 hours ago

eokoneyo commented 2 hours ago

Kibana version: main (8.15)

Describe the bug:

This issue was reported by on slack, it seems the pageName in the execution context remains the same on every route change. Ideally the on route change the we should set the values of the execution, this typically includes pageName, alongside couple of other values. On investigating this it seems the implementation to gather the details for the current page's context does exist, however it doesn't get persisted to the execution context instance because it's also undefined within said implementation, hence why subscribers receive a stale value

Steps to reproduce:

  1. Open up the use_execution_context.ts file, add in the following
    console.log('executionContext:: %o , context to update:: %o \n', executionContext, context);
  2. on navigating through pages in app, we'll consistently notice that the value for execution context instance is undefined, with context value actually updating.

Expected behavior:

elasticmachine commented 2 hours ago

Pinging @elastic/appex-sharedux (Team:SharedUX)