Conversation
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.
Summary
Resolves #149 (Tier 2 — Part 1 of 3 in stack).
When a new project has screens generated via
project.generate(), the Stitch backend populatesget_project'sscreenInstancesarray (sourceScreen: "projects/{projectId}/screens/{screenId}") and returns the generatedScreenobjects ingenerate_screen_from_text, but the MCPlist_screensendpoint returns[]until the project is manually opened institch.withgoogle.com.Changes
EntityManager.prototype.getCachedScreensData(projectId): Returns raw screen payloads for anyScreeninstances already resolved in the current session forprojectId.StitchToolClient.prototype.callTool("list_screens", { projectId }):list_screensreturns[], automatically falls back toget_project(screenInstances) and hydrates eachsourceScreenviaget_screen(falling back toScreenInstancemetadata ifget_screenis unavailable), combined with any in-session cached screens inEntityManager.list_screensreturns a subset of screens (stale index after an in-sessionproject.generate()), merges any missing in-session generated screens fromEntityManager.await project.screens()andawait project.downloadAssets()immediately afterproject.generate().