Repository navigation
Build the theme graph without an assets folder - #1348
Merged
Merged
Conversation
getWebComponentMap read the assets folder without checking that it exists, so it rejected for a theme without one, and so did building its graph. The language server caches the graph as a promise, and its rebuild awaits the cached one first, so that theme never got a graph, even after the folder was created. A missing assets folder now means no web components. Other errors, like an assets folder that can't be read, still reject. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
clauderic
added this pull request to stack #1353
October 20, 2026 13:15
charlespwd
approved these changes
Oct 20, 2026
EvilGenius13
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you adding in this PR?
A theme without an
assetsfolder never gets a theme graph in the language server.getWebComponentMapreadsassets/without checking that it exists. For a theme without one, it rejects, and so does building the graph.ThemeGraphManagercaches the graph as a promise. Its rebuild on file changes awaits the cached promise before replacing it, so it rejects too and the graph is never rebuilt. Creating the folder doesn't help; only restarting the server does.Now a missing
assetsfolder means no web components. Other errors, like anassetsfolder that can't be read, still reject. The check uses theme-graph's existingexistshelper, which is astat.What's next? Any followup issues?
assetsfolder.Tophatting
npx vitest run packages/theme-graph/src/getWebComponentMap.spec.ts. Without the fix it fails withDirectory not found: file:///assets.Before you deploy
changeset🤖 Generated with Claude Code