Repository navigation
fix(mcp): draw the logo a group's label names, before its name, when the diagram already draws logos - #537
Merged
Conversation
Collaborator
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Sketchi Icons PreviewStatus:
|
Contributor
Sketchi Web PreviewStatus:
|
Contributor
Sketchi Excalidraw Workspace PreviewStatus:
|
Contributor
Sketchi Eval Harness PreviewStatus:
|
Contributor
Sketchi Playground / Studio PreviewStatus:
|
Merge activity
|
…the diagram already draws logos (#537) ## What MCP flowchart builds now draw the logo a group's label names, before the group's name, when the diagram already draws logos. In Frontierclimb r23 (Sonnet, ai-app-stack-logos s4), the model drew Next.js, Redis, OpenAI and Sentry logos but left its "Vercel" group a bare name. That group now draws the Vercel mark. ## Rule Same terms as #519's node fill, MCP `execute` only (`fillNamedLogos`): - **Fills** a group whose label names exactly one catalog logo, distinctively (`logoNamedByLabel`). - **Never fills:** - a diagram whose nodes draw no logo; - labels naming several products or an everyday word ("GKE cluster (Kubernetes)", "Frontend", "Edge"); - a group whose logo a node inside it already draws, nested groups included; - a group inside another group that already draws that logo (the outer one keeps it); - groups that hold no nodes and so aren't drawn. - Reports an `icon_filled` info note with `ref: { kind: "group", id }`. **Why the no-duplicate rule covers nodes inside the group only:** a header logo that repeats a member's logo says nothing new inside the same box. A node outside the group with the same logo names its own product, so it doesn't block the fill. Across the corpus, no fill shares its slug with any drawn node anyway. ## Rendering Groups couldn't carry a logo anywhere before this PR (IR, renderer, scene, Excalidraw or PNG). This PR adds the smallest header logo consistent with node logos, 18 px: - **Frame (plain group):** inside the frame's top-left corner, 10 px in, under the frame's name. It is a frame child (`frameId` = the frame), so it moves with the frame in Excalidraw and Studio and isn't clipped. A frame's padding is at least 40 px (`GROUP_PADDING`), so members always clear the logo. The padded logo is a keep-out alongside the frame's name for routes, branch labels and marker room. - **Zone:** at the start of the header strip, with the label shifted after it. The zone widens to fit both. The logo shares the zone outline's `groupIds`, so the two move together. ## API and model-facing surface - `DiagramGroup.icon` (core IR) and the canvas frame `icon` are new. A zone (`rendererRole: "zone"`) may now carry an `icon`. - The `FlowchartSpec` group contract, guidance and prompts are unchanged; groups take no authored logo. - **One generated-types line changes:** the `CanvasElement` frame member gains `icon?: { slug; size }`. The fill has to survive the scene schema: the artifact viewer, patches, CLI and Studio all decode stored scenes through `FrameSceneElement`, which drops unknown keys. That text appears only in docs topics. - Generation drops any `icon` a model puts on a group, so `/api/v1/generate` stays unchanged. ## Measured Oct 17–23 Frontierclimb corpus: 5,434 specs replayed through Code Mode with MCP fill on, main against this branch. - **Byte-identical:** 5,073 of 5,434 in scene and Excalidraw. All 361 changed specs gained a group logo; nothing else changed. - **Fills:** 361, all checked by hand, every one on a diagram that already draws node logos (0 on logo-less diagrams): - "AWS cloud" → `aws` (208, hybrid-cloud zones) - "GKE cluster" → `gke` (147, kubernetes-cluster zones) - "Vercel" → `vercel` (5, ai-app-stack frames, including r23 s4) - "AWS · us-east-1" → `aws` (1, top-level region) - **Collisions:** none between a logo and a node, frame, route or text. No drawn node repeats a group's logo. - **Placement:** all 5 frame logos have their frame's `frameId` and sit inside it; all 356 zone logos sit inside their zone and share its group. - **PNGs inspected** for all four pairs; main's PNGs are identical apart from the logo. ## Proof - Failing-first tests: - agent: frame and zone fills, the r23 s4 spec, and negatives for logo-less diagrams, multi-vendor and everyday-word labels, duplicates and host opt-in; - core: embedding, validation and header geometry; - generation: drops group icons. - `pnpm nx affected -t typecheck,test,build`, `pnpm run check` and `build-storybook diagram-ui` pass. New `GroupLogo` and `ZoneLogo` stories.
graphite-app
Bot
force-pushed
the
fix/group-logo-fill
branch
from
October 23, 2026 21:30
30f7227 to
5165f43
Compare
This branch was successfully deployed
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
MCP flowchart builds now draw the logo a group's label names, before the group's name, when the diagram already draws logos. In Frontierclimb r23 (Sonnet, ai-app-stack-logos s4), the model drew Next.js, Redis, OpenAI and Sentry logos but left its "Vercel" group a bare name. That group now draws the Vercel mark.
Rule
Same terms as #519's node fill, MCP
executeonly (fillNamedLogos):logoNamedByLabel).icon_filledinfo note withref: { kind: "group", id }.Why the no-duplicate rule covers nodes inside the group only: a header logo that repeats a member's logo says nothing new inside the same box. A node outside the group with the same logo names its own product, so it doesn't block the fill. Across the corpus, no fill shares its slug with any drawn node anyway.
Rendering
Groups couldn't carry a logo anywhere before this PR (IR, renderer, scene, Excalidraw or PNG). This PR adds the smallest header logo consistent with node logos, 18 px:
frameId= the frame), so it moves with the frame in Excalidraw and Studio and isn't clipped. A frame's padding is at least 40 px (GROUP_PADDING), so members always clear the logo. The padded logo is a keep-out alongside the frame's name for routes, branch labels and marker room.groupIds, so the two move together.API and model-facing surface
DiagramGroup.icon(core IR) and the canvas frameiconare new. A zone (rendererRole: "zone") may now carry anicon.FlowchartSpecgroup contract, guidance and prompts are unchanged; groups take no authored logo.CanvasElementframe member gainsicon?: { slug; size }. The fill has to survive the scene schema: the artifact viewer, patches, CLI and Studio all decode stored scenes throughFrameSceneElement, which drops unknown keys. That text appears only in docs topics.icona model puts on a group, so/api/v1/generatestays unchanged.Measured
Oct 17–23 Frontierclimb corpus: 5,434 specs replayed through Code Mode with MCP fill on, main against this branch.
aws(208, hybrid-cloud zones)gke(147, kubernetes-cluster zones)vercel(5, ai-app-stack frames, including r23 s4)aws(1, top-level region)frameIdand sit inside it; all 356 zone logos sit inside their zone and share its group.Proof
pnpm nx affected -t typecheck,test,build,pnpm run checkandbuild-storybook diagram-uipass. NewGroupLogoandZoneLogostories.