bug(frontend): Left panel shows stale metadata when switching between notebooks
- Dominant language
- Python
- Stars
- 703
- Forks
- 161
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 10
Description
### Description
When switching between notebooks, the left panel briefly shows metadata (experiment name, pipeline name) from the previous notebook before loading the new notebook's metadata.
This happens because `setNotebookPanel()` in `LeftPanel.tsx`https://github.com/kubeflow/kale/blob/36a24509df3dba60ab72ffa35a8397471122ab87/labextension/src/widgets/LeftPanel.tsx#L4 has multiple `setState` calls with `await`s between them. While waiting for async operations (RPC calls like `getBaseImage()`, `getExperiments()`), the UI still displays the old notebook's state.
You can see it in this video at the moment of switching from titanic to cifar10 the left panel still shows titanic's metadata on the cifar10 notebook:
https://www.loom.com/share/228199400bbb494c8d2b7106a46f822e
### Expected result
When switching notebooks, the left panel should immediately reset or show a loading state, not carry over metadata from the previous notebook.
---
Impacted by this bug? Give it a 👍.
Contributor guide
Assessment
This issue has not been assessed yet.