Conversation
A component variable `default_value` is untyped in the MCP tool schema, so an
agent can store a bare string where the renderer expects
`{ type: 'dynamic_text', data: { content } }`. Probing that primitive with the
`in` operator threw, `fetchPageByPath` swallowed the error, and every page
using the component fell back to the starter template — both in the builder
preview and on the published site.
Coerce strings to `dynamic_text` at render time so existing bad data recovers
without a migration, and wrap them at the MCP boundary so new writes are
stored in the correct shape.
Co-authored-by: Cursor <cursoragent@cursor.com>
…e-values fix: guard string component variable values
The design guide sent to agents omitted several properties the schema and class mapper already support (mixBlendMode, filter, backdropFilter, raw backgroundImage values), so agents assumed blend-mode overlays required custom code. Also documents that htmlEmbed renders as a sandboxed iframe on published sites and the custom_attributes style escape hatch for CSS with no design field (e.g. pointer-events).
docs: surface undocumented MCP design capabilities in agent instructions
ysamcode
requested review from
liamwalder,
lunenas and
tristan-mouchet
as code owners
July 31, 2026 14:42
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
Release
developtomain. Fixes a crash caused by component text variables stored as bare strings, and documents previously hidden MCP design capabilities so agents can build richer visuals without workarounds.Changes
Fix: guard string component variable values (#480)
default_valueinputs from the MCP component tools into the proper{ type, data }object shape before storing themDocs: surface undocumented MCP design capabilities (#482)
backgroundImage,backgroundSize/Position/Repeat,filter,backdropFilter, andmixBlendModedesign properties in the MCP agent instructionshtmlEmbedruns in a sandboxed, auto-resizing iframe and steer agents toward native layers for overlays and page custom code for scriptspointer-events) can be set viacustom_attributesTest plan
default_valueis a bare string — the page using it should render the text instead of erroringMade with Cursor