Repository navigation
feat(sequence): participant logos through the shared icon contract - #380
Merged
Merged
Conversation
This was referenced Oct 11, 2026
Collaborator
Author
anandpant
marked this pull request as ready for review
October 11, 2026 00:22
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
anandpant
force-pushed
the
feat/sequence-extension-path
branch
from
October 11, 2026 00:37
efba349 to
bfa41d0
Compare
anandpant
force-pushed
the
feat/sequence-participant-logos
branch
from
October 11, 2026 00:37
44f3831 to
767a411
Compare
Contributor
Sketchi Web PreviewStatus:
|
Contributor
Sketchi Icons PreviewStatus:
|
Contributor
Sketchi Eval Harness PreviewStatus:
|
Contributor
Sketchi Excalidraw Workspace PreviewStatus:
|
Contributor
Sketchi Playground / Studio PreviewStatus:
|
anandpant
force-pushed
the
feat/sequence-participant-logos
branch
2 times, most recently
from
October 11, 2026 01:39
9ea1af5 to
a84ff1c
Compare
anandpant
force-pushed
the
feat/sequence-extension-path
branch
from
October 11, 2026 01:39
6373afd to
d1df28c
Compare
Merge activity
|
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 11, 2026
## What changed
- Four maintained sequence scenarios in `diagram-scenarios`, from smoke to challenge: checkout payment, an API cache miss with a fire-and-forget event, the OAuth authorization code flow, and a payment webhook where the provider calls back into the service.
- Sequence checks score the model's own diagram from before candidate enforcement, the same way the logo evals do:
- participant and message counts
- required participants and messages (label alternatives, optional `return` type)
- `message-order`: the required messages appear as a chronological subsequence
- `answered-calls`: enough calls are answered by returns, which Sketchi draws as activation bars
- `returns-answer-calls`: no stray returns
- a valid Excalidraw export
- `diagramScenarios` / `getDiagramScenario` register every family. The scenario CLI (`--list`, `--all`, `--scenario`), the fixture generation client, prompt building, and the eval-harness registry (`/api/scenario-candidates`) now serve sequence scenarios.
- The flowchart-only types are renamed to say so: `DiagramScenario` → `FlowchartScenario`, `getScenario` → `getFlowchartScenario`. The flowchart scenario playground UI and `harness-eval` stay flowchart-only.
- `icon-catalog` imports its generated JSON with `with { type: "json" }`. Since the logo work (#367/#368), `pnpm nx scenario diagram-scenarios` had been failing on `main` with `ERR_IMPORT_ATTRIBUTE_MISSING`, because plain Node can't load the catalog's `dist` without the attribute. Sequence evals run through that CLI, so the fix is in this PR.
## Why
#280 asks for maintained sequence scenarios and evals with meaningful assertions, and #345 needs model-scored evals to hill-climb on. The checks target what a sequence model gets wrong: missing participants, reordered messages, and responses drawn as new calls.
## Verification
- `pnpm nx affected -t typecheck,test --base=origin/main` (18 projects), `pnpm run test:tools`
- New tests:
- every fixture passes every check
- targeted regressions fail exactly the expected checks: reordering, responses drawn as calls, a missing participant
- checks score the model's diagram, not the repaired one
- a flowchart is rejected for a sequence scenario
- fixture generation and a CLI envelope run
- `pnpm nx scenario diagram-scenarios -- --scenario payment-webhook-reentrant-sequence --fixture` passes end to end
- `pnpm nx run-many -t build -p sketchi-cli playground eval-harness web icons excalidraw` passes with the import attributes
Refs #280, #345
## Review follow-ups
- The API cache-miss scenario asserts its analytics call stays unanswered (`unanswered:1`). A regression test inserts an `Ack` return and fails exactly that check.
- Alternatives of three characters or fewer match whole words only, so "ok" and "ack" no longer match "Callback token". Regression test included.
- The scenario CLI scores the model's own diagram even when enforcement rejects it, and records the verdict as a failed `intent-contract` check. Before, the run threw and lost the structural signal. This applies to flowcharts and sequence diagrams. A family mismatch or unparseable output still errors.
- Participant logo checks, including for the OAuth scenario, are in #380.
graphite-app
Bot
force-pushed
the
feat/sequence-extension-path
branch
from
October 11, 2026 01:50
d1df28c to
69561ff
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 11, 2026
) ## What changed Sequence participants can carry brand logos, reusing the node-logos design (#357-#368) rather than forking it: - **Contract**: `SequenceParticipant.icon` is the shared `DiagramIconRef`. The Code Mode `SequenceParticipantSpec.icon` is the shared `NodeIconSpec`, and the MCP docs and generated types are updated. - **Renderer**: a 28px logo sits above the participant label (`verticalAlign: bottom`, as flowchart rectangles do). The shared header row grows by the logo band, so every header keeps one height. - **Code Mode**: `buildSequenceDiagram` resolves participant icons against the catalog with `resolveNodeIcons` (unknown slugs give an `unknown_icon` warning with `participants.icon.slug`) and embeds them with `embedSceneIcons`. Excalidraw image elements and PNG export work without new code. - **Generation**: - The "Available logos" prompt section is offered for flowcharts and sequence diagrams (participant wording for an explicit sequence request). - Participant slugs are sanitized like node slugs. - `placeNodeLogos` places offered logos on the participants whose labels name them and drops the rest (`groundDiagramIcons`). - **Studio chat**: one `groundOfferedLogos` helper serves both build tools, and the NODE LOGOS prompt covers participants. - **Evals**: `scenarioLogoChecks` scores flowchart nodes or sequence participants, so every sequence scenario gets recall, grounding, and placement checks on the model's own diagram. That includes OAuth (review on #378). A maintained `deploy-webhook-logos-sequence` scenario is added. - **Storybook**: `ExcalidrawSceneCanvas/SequenceParticipantLogos` uses the real GitHub, Cloudflare, and Docker marks. The CLI `sketchi docs` text is updated, and a changeset is included. ## Why #280 goal 3: participant logos using the same contract, catalog resolution, prompt grounding, Excalidraw output, and PNG export as node logos. ## Verification - `pnpm run check`, `pnpm run test:tools`, `pnpm nx affected -t typecheck,test --base=origin/main` (18 projects), `pnpm nx build-storybook diagram-ui` - New tests: - core icon contract - renderer header geometry and embedding - Excalidraw images positioned at `canvasNodeIconBox` - Code Mode embed and the unknown-slug warning - headless PNG brand-pixel check for participant logos - generation slug sanitizing and placement - Studio grounding - sequence logo eval regressions - The story was checked in Chrome: logos render above the labels in GitHub, Cloudflare Worker, and Docker build. Refs #280 ## Review follow-ups - `placeNodeLogos` takes a noun, so sequence diagnostics name participants (for example `icon_dropped: participant "dev" …`). Generation and Studio pass it, and the tests are updated. - The placement eval message says "participant" for sequence diagrams and "step" for flowcharts, pinned by a test. - The `sketchi docs` node-logos paragraph is reflowed and the help snapshot regenerated.
graphite-app
Bot
force-pushed
the
feat/sequence-participant-logos
branch
from
October 11, 2026 01:51
a84ff1c to
e536cb4
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 11, 2026
## What changed
- Four maintained sequence scenarios in `diagram-scenarios`, from smoke to challenge: checkout payment, an API cache miss with a fire-and-forget event, the OAuth authorization code flow, and a payment webhook where the provider calls back into the service.
- Sequence checks score the model's own diagram from before candidate enforcement, the same way the logo evals do:
- participant and message counts
- required participants and messages (label alternatives, optional `return` type)
- `message-order`: the required messages appear as a chronological subsequence
- `answered-calls`: enough calls are answered by returns, which Sketchi draws as activation bars
- `returns-answer-calls`: no stray returns
- a valid Excalidraw export
- `diagramScenarios` / `getDiagramScenario` register every family. The scenario CLI (`--list`, `--all`, `--scenario`), the fixture generation client, prompt building, and the eval-harness registry (`/api/scenario-candidates`) now serve sequence scenarios.
- The flowchart-only types are renamed to say so: `DiagramScenario` → `FlowchartScenario`, `getScenario` → `getFlowchartScenario`. The flowchart scenario playground UI and `harness-eval` stay flowchart-only.
- `icon-catalog` imports its generated JSON with `with { type: "json" }`. Since the logo work (#367/#368), `pnpm nx scenario diagram-scenarios` had been failing on `main` with `ERR_IMPORT_ATTRIBUTE_MISSING`, because plain Node can't load the catalog's `dist` without the attribute. Sequence evals run through that CLI, so the fix is in this PR.
## Why
#280 asks for maintained sequence scenarios and evals with meaningful assertions, and #345 needs model-scored evals to hill-climb on. The checks target what a sequence model gets wrong: missing participants, reordered messages, and responses drawn as new calls.
## Verification
- `pnpm nx affected -t typecheck,test --base=origin/main` (18 projects), `pnpm run test:tools`
- New tests:
- every fixture passes every check
- targeted regressions fail exactly the expected checks: reordering, responses drawn as calls, a missing participant
- checks score the model's diagram, not the repaired one
- a flowchart is rejected for a sequence scenario
- fixture generation and a CLI envelope run
- `pnpm nx scenario diagram-scenarios -- --scenario payment-webhook-reentrant-sequence --fixture` passes end to end
- `pnpm nx run-many -t build -p sketchi-cli playground eval-harness web icons excalidraw` passes with the import attributes
Refs #280, #345
## Review follow-ups
- The API cache-miss scenario asserts its analytics call stays unanswered (`unanswered:1`). A regression test inserts an `Ack` return and fails exactly that check.
- Alternatives of three characters or fewer match whole words only, so "ok" and "ack" no longer match "Callback token". Regression test included.
- The scenario CLI scores the model's own diagram even when enforcement rejects it, and records the verdict as a failed `intent-contract` check. Before, the run threw and lost the structural signal. This applies to flowcharts and sequence diagrams. A family mismatch or unparseable output still errors.
- Participant logo checks, including for the OAuth scenario, are in #380.
graphite-app
Bot
force-pushed
the
feat/sequence-extension-path
branch
from
October 11, 2026 01:56
69561ff to
6cc6b39
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 11, 2026
) ## What changed Sequence participants can carry brand logos, reusing the node-logos design (#357-#368) rather than forking it: - **Contract**: `SequenceParticipant.icon` is the shared `DiagramIconRef`. The Code Mode `SequenceParticipantSpec.icon` is the shared `NodeIconSpec`, and the MCP docs and generated types are updated. - **Renderer**: a 28px logo sits above the participant label (`verticalAlign: bottom`, as flowchart rectangles do). The shared header row grows by the logo band, so every header keeps one height. - **Code Mode**: `buildSequenceDiagram` resolves participant icons against the catalog with `resolveNodeIcons` (unknown slugs give an `unknown_icon` warning with `participants.icon.slug`) and embeds them with `embedSceneIcons`. Excalidraw image elements and PNG export work without new code. - **Generation**: - The "Available logos" prompt section is offered for flowcharts and sequence diagrams (participant wording for an explicit sequence request). - Participant slugs are sanitized like node slugs. - `placeNodeLogos` places offered logos on the participants whose labels name them and drops the rest (`groundDiagramIcons`). - **Studio chat**: one `groundOfferedLogos` helper serves both build tools, and the NODE LOGOS prompt covers participants. - **Evals**: `scenarioLogoChecks` scores flowchart nodes or sequence participants, so every sequence scenario gets recall, grounding, and placement checks on the model's own diagram. That includes OAuth (review on #378). A maintained `deploy-webhook-logos-sequence` scenario is added. - **Storybook**: `ExcalidrawSceneCanvas/SequenceParticipantLogos` uses the real GitHub, Cloudflare, and Docker marks. The CLI `sketchi docs` text is updated, and a changeset is included. ## Why #280 goal 3: participant logos using the same contract, catalog resolution, prompt grounding, Excalidraw output, and PNG export as node logos. ## Verification - `pnpm run check`, `pnpm run test:tools`, `pnpm nx affected -t typecheck,test --base=origin/main` (18 projects), `pnpm nx build-storybook diagram-ui` - New tests: - core icon contract - renderer header geometry and embedding - Excalidraw images positioned at `canvasNodeIconBox` - Code Mode embed and the unknown-slug warning - headless PNG brand-pixel check for participant logos - generation slug sanitizing and placement - Studio grounding - sequence logo eval regressions - The story was checked in Chrome: logos render above the labels in GitHub, Cloudflare Worker, and Docker build. Refs #280 ## Review follow-ups - `placeNodeLogos` takes a noun, so sequence diagnostics name participants (for example `icon_dropped: participant "dev" …`). Generation and Studio pass it, and the tests are updated. - The placement eval message says "participant" for sequence diagrams and "step" for flowcharts, pinned by a test. - The `sketchi docs` node-logos paragraph is reflowed and the help snapshot regenerated.
graphite-app
Bot
force-pushed
the
feat/sequence-participant-logos
branch
from
October 11, 2026 01:57
e536cb4 to
5db7f87
Compare
) ## What changed Sequence participants can carry brand logos, reusing the node-logos design (#357-#368) rather than forking it: - **Contract**: `SequenceParticipant.icon` is the shared `DiagramIconRef`. The Code Mode `SequenceParticipantSpec.icon` is the shared `NodeIconSpec`, and the MCP docs and generated types are updated. - **Renderer**: a 28px logo sits above the participant label (`verticalAlign: bottom`, as flowchart rectangles do). The shared header row grows by the logo band, so every header keeps one height. - **Code Mode**: `buildSequenceDiagram` resolves participant icons against the catalog with `resolveNodeIcons` (unknown slugs give an `unknown_icon` warning with `participants.icon.slug`) and embeds them with `embedSceneIcons`. Excalidraw image elements and PNG export work without new code. - **Generation**: - The "Available logos" prompt section is offered for flowcharts and sequence diagrams (participant wording for an explicit sequence request). - Participant slugs are sanitized like node slugs. - `placeNodeLogos` places offered logos on the participants whose labels name them and drops the rest (`groundDiagramIcons`). - **Studio chat**: one `groundOfferedLogos` helper serves both build tools, and the NODE LOGOS prompt covers participants. - **Evals**: `scenarioLogoChecks` scores flowchart nodes or sequence participants, so every sequence scenario gets recall, grounding, and placement checks on the model's own diagram. That includes OAuth (review on #378). A maintained `deploy-webhook-logos-sequence` scenario is added. - **Storybook**: `ExcalidrawSceneCanvas/SequenceParticipantLogos` uses the real GitHub, Cloudflare, and Docker marks. The CLI `sketchi docs` text is updated, and a changeset is included. ## Why #280 goal 3: participant logos using the same contract, catalog resolution, prompt grounding, Excalidraw output, and PNG export as node logos. ## Verification - `pnpm run check`, `pnpm run test:tools`, `pnpm nx affected -t typecheck,test --base=origin/main` (18 projects), `pnpm nx build-storybook diagram-ui` - New tests: - core icon contract - renderer header geometry and embedding - Excalidraw images positioned at `canvasNodeIconBox` - Code Mode embed and the unknown-slug warning - headless PNG brand-pixel check for participant logos - generation slug sanitizing and placement - Studio grounding - sequence logo eval regressions - The story was checked in Chrome: logos render above the labels in GitHub, Cloudflare Worker, and Docker build. Refs #280 ## Review follow-ups - `placeNodeLogos` takes a noun, so sequence diagnostics name participants (for example `icon_dropped: participant "dev" …`). Generation and Studio pass it, and the tests are updated. - The placement eval message says "participant" for sequence diagrams and "step" for flowcharts, pinned by a test. - The `sketchi docs` node-logos paragraph is reflowed and the help snapshot regenerated.
graphite-app
Bot
force-pushed
the
feat/sequence-participant-logos
branch
from
October 11, 2026 02:00
5db7f87 to
ac83f4d
Compare
Merged
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 changed
Sequence participants can carry brand logos, reusing the node-logos design (#357-#368) rather than forking it:
SequenceParticipant.iconis the sharedDiagramIconRef. The Code ModeSequenceParticipantSpec.iconis the sharedNodeIconSpec, and the MCP docs and generated types are updated.verticalAlign: bottom, as flowchart rectangles do). The shared header row grows by the logo band, so every header keeps one height.buildSequenceDiagramresolves participant icons against the catalog withresolveNodeIcons(unknown slugs give anunknown_iconwarning withparticipants.icon.slug) and embeds them withembedSceneIcons. Excalidraw image elements and PNG export work without new code.placeNodeLogosplaces offered logos on the participants whose labels name them and drops the rest (groundDiagramIcons).groundOfferedLogoshelper serves both build tools, and the NODE LOGOS prompt covers participants.scenarioLogoChecksscores flowchart nodes or sequence participants, so every sequence scenario gets recall, grounding, and placement checks on the model's own diagram. That includes OAuth (review on feat(scenarios): maintained sequence scenarios and evals #378). A maintaineddeploy-webhook-logos-sequencescenario is added.ExcalidrawSceneCanvas/SequenceParticipantLogosuses the real GitHub, Cloudflare, and Docker marks. The CLIsketchi docstext is updated, and a changeset is included.Why
#280 goal 3: participant logos using the same contract, catalog resolution, prompt grounding, Excalidraw output, and PNG export as node logos.
Verification
pnpm run check,pnpm run test:tools,pnpm nx affected -t typecheck,test --base=origin/main(18 projects),pnpm nx build-storybook diagram-uicanvasNodeIconBoxRefs #280
Review follow-ups
placeNodeLogostakes a noun, so sequence diagnostics name participants (for exampleicon_dropped: participant "dev" …). Generation and Studio pass it, and the tests are updated.sketchi docsnode-logos paragraph is reflowed and the help snapshot regenerated.