Skip to content

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Dec 16, 2025

This PR refactors CanvasProvider to separate out its two responsibilities:

  • Creates a new CanvasInitialization component responsible for accessing existing canvases or initializing new ones as well as providing slot props for the status of the initialization
  • Creates a new CanvasLoadingState component that takes in these slot props and renders out the appropriate loading spinners or error messages

In all places besides the CanvasWorkspace, this results in no fundamental changes.

In CanvasWorkspace, the structure has been altered so that CanvasInitialization wraps the entire workspace and CanvasLoadingState is used around only the Canvas preview surface.

On the CanvasWorkspace, this solves a bug where the ready state was being reset when the canvas name changed.

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!
@briangregoryholmes briangregoryholmes merged commit f400fbc into main Dec 16, 2025
11 checks passed
@briangregoryholmes briangregoryholmes deleted the bgh/canvas-workspace-init-sequencing branch December 16, 2025 21:17
briangregoryholmes added a commit that referenced this pull request Dec 17, 2025
* update provider component

* update workspace component

* refactor
k-anshul pushed a commit that referenced this pull request Dec 18, 2025
* update provider component

* update workspace component

* refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants