kubeflow / kubeflow/kale

bug(frontend): Left panel shows stale metadata when switching between notebooks

Open
#644 4 comments 0 reactions 1 assignee Claimed by @Hariharanpugazh View on GitHub
2.x candidate area/frontend bug good first issue
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.