You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let users explicitly mark screens as reusable components so the AI build
instructions describe each component once instead of duplicating code for
every placement.
- Sidebar + context-menu UI to mark canonical / pick "Instance of…" / unlink
- Purple `⟳ Component` and `↗ Instance` pills on the canvas
- Instances render the canonical's image and hotspots at draw time, so edits
on the canonical propagate live; hotspot editing is canonical-only
- generateInstructionFiles emits one `components/<slug>.md` per canonical;
instances in `screens.md` link to it instead of duplicating the spec
- Auto-promotion: deleting a canonical promotes the first instance, so
groups can never become orphaned
- importFlow backfills the new fields and enforces one canonical per group
- MCP `update_screen` accepts componentId / componentRole
- User guide updated
Co-authored-by: Quang Tran <16215255+trmquang93@users.noreply.github.com>
Copy file name to clipboardExpand all lines: mcp-server/src/tools/screen-tools.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ export const screenTools = [
49
49
},
50
50
{
51
51
name: "update_screen",
52
-
description: "Update properties of an existing screen (name, description, notes, status, etc.).",
52
+
description: "Update properties of an existing screen (name, description, notes, status, etc.). To mark a screen as a reusable component, set componentRole to 'canonical' and supply a componentId (any unique string). To mark a screen as an instance of an existing component, set componentRole to 'instance' and pass the same componentId as the canonical. To unlink, set both to null.",
53
53
inputSchema: {
54
54
type: "object",
55
55
properties: {
@@ -62,6 +62,8 @@ export const screenTools = [
62
62
tbdNote: {type: "string"},
63
63
roles: {type: "array",items: {type: "string"}},
64
64
codeRef: {type: "string"},
65
+
componentId: {type: ["string","null"],description: "Reusable component group key. All screens sharing a componentId belong to the same component. Pass null to unlink."},
66
+
componentRole: {type: ["string","null"],enum: ["canonical","instance",null],description: "Role within the component group. 'canonical' = owns the spec; 'instance' = references the canonical's spec. Pass null to unlink."},
0 commit comments