Skip to content

feat(sequence): participant logos through the shared icon contract - #380

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/sequence-participant-logos
Oct 11, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
feat/sequence-participant-logos

Conversation

@anandpant

@anandpant anandpant commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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 feat(scenarios): maintained sequence scenarios and evals #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.

anandpant commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • fast - for urgent changes, fast-track this PR to the front of 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@anandpant
anandpant force-pushed the feat/sequence-extension-path branch from efba349 to bfa41d0 Compare October 11, 2026 00:37
@anandpant
anandpant force-pushed the feat/sequence-participant-logos branch from 44f3831 to 767a411 Compare October 11, 2026 00:37
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Sketchi Web Preview

Status: deleted

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Sketchi Icons Preview

Status: deleted

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Sketchi Eval Harness Preview

Status: deleted

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Sketchi Excalidraw Workspace Preview

Status: deleted

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Sketchi Playground / Studio Preview

Status: deleted

@anandpant
anandpant force-pushed the feat/sequence-participant-logos branch 2 times, most recently from 9ea1af5 to a84ff1c Compare October 11, 2026 01:39
@anandpant
anandpant force-pushed the feat/sequence-extension-path branch from 6373afd to d1df28c Compare October 11, 2026 01:39
@graphite-app

graphite-app Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

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
graphite-app Bot force-pushed the feat/sequence-extension-path branch from d1df28c to 69561ff Compare October 11, 2026 01:50
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
graphite-app Bot force-pushed the feat/sequence-participant-logos branch from a84ff1c to e536cb4 Compare October 11, 2026 01:51
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
graphite-app Bot force-pushed the feat/sequence-extension-path branch from 69561ff to 6cc6b39 Compare October 11, 2026 01:56
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
graphite-app Bot force-pushed the feat/sequence-participant-logos branch from e536cb4 to 5db7f87 Compare October 11, 2026 01:57
Base automatically changed from feat/sequence-extension-path to main October 11, 2026 01:59
)

## 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
graphite-app Bot force-pushed the feat/sequence-participant-logos branch from 5db7f87 to ac83f4d Compare October 11, 2026 02:00
@graphite-app
graphite-app Bot merged commit ac83f4d into main Oct 11, 2026
11 checks passed
@graphite-app
graphite-app Bot deployed to production October 11, 2026 02:01 Active
@graphite-app
graphite-app Bot deleted the feat/sequence-participant-logos branch October 11, 2026 02:01
@graphite-app
graphite-app Bot deployed to production October 11, 2026 02:01 Active
@graphite-app
graphite-app Bot deployed to production October 11, 2026 02:01 Active
@graphite-app
graphite-app Bot deployed to production October 11, 2026 02:01 Active
@graphite-app
graphite-app Bot deployed to production October 11, 2026 02:01 Active
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026

This branch was successfully deployed

2 active deployments
staging — ac83f4d0 Deployed Oct 11, 2026 by graphite-app[bot] via cleanup-preview (playground) #451
production — ac83f4d0 Deployed Oct 11, 2026 by graphite-app[bot] via deploy (playground) #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant