Skip to content

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Dec 22, 2025

Brings elements of #8518 to the Explore Workspace to fix a few initialization bugs and clean things up for #8501.

Namely, this ensures that the VisualExploreEditing component doesn't render until an underlying exploreStore is available. This fixes a bug that prevented the VisualExploreEditing component from receiving updates to the ExploreState object.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@ericokuma
Copy link
Contributor

statusCode={404}
/>
{:else if exploreName && metricsViewName}
{#if ready}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This check adds an edge case as mentioned by @ericokuma . Another scenario where a blank page is shown,

  1. Start app.
  2. Go to explore directly.
  3. Open visual editing. You will see a blank page.

This is because DashboardStateManager is responsible for creating explore store for the given name. So adding it behind an if that check that depends on presence of explore store leads to a deadlock.

Since stateManagers is created only if a metricsViewName is present and we are already checking for it a line above then can we get rid of the ready check here?

// This needs to change, but this is a workaround for now
$: if (visualEditing) {
stateManagers.metricsViewName.set(metricsViewName);
$: if (visualEditing && stateManagers && metricsViewName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still need this if we are keying based on metricsViewName?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. metricsViewName can be undefined in the ExploreWorkspace if there is an error further up the DAG. It's really just a types thing, though. The check really only needs to be for stateManagers

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