Skip to content

feat(website): the Details tab draws the graph rather than a picture of it - #19010

Closed
mariana953 wants to merge 9 commits into
mariana/v2-workflow-factsfrom
mariana/v2-workflow-graph
Closed

mariana953 wants to merge 9 commits into
mariana/v2-workflow-factsfrom
mariana/v2-workflow-graph

Conversation

@mariana953

@mariana953 mariana953 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Details tab showed a flat SVG exported when the workflow was added. It now draws the graph from the same JSON the page already offers for download, so it cannot drift, and it can be dragged and zoomed to read a node. What the workflow makes hangs in the node that hands it back.

Stacked on #19008 (the facts rail) and carries #19009 (the reader it draws from). Bases retarget as those merge; read #19009 first, since this is only the drawing.

Changes

  • What: WorkflowGraph.vue fetches the template JSON on mount, draws the picture as SVG, and gives it pan, zoom and a reset. WorkflowGraphNode.vue draws one node: header, slots, the widget values on its face, and the picture where the node left room for one. WorkflowPreview.vue uses it in place of the flat <img>. Seven keys in en and zh-CN, and three component tests.
  • Breaking: none. The run path is untouched.

Nothing is bundled. The graph JSON is already published and is fetched at mount, so the only cost to the page is the two components.

The flat export is still the fallback. A fetch that fails, or a graph with nothing in it, falls back to the SVG the page shows today rather than to a message — so a reader never loses the picture over a network that went.

One picture, in the output node. Every one of the thirty has an image thumbnail. The samples underneath it are results too, so there is no before to hang at the way in, and a node cannot play a video — the reader's two-picture case is there but this page has nothing to feed it.

Review Focus

  • WorkflowGraphNode.vue carries the editor's greys as hex constants rather than theme tokens. They are the canvas's palette, and the point of the preview is that it reads like the canvas; making them follow the site theme would defeat that. They are named and in one place at the top of the file.
  • Pan is pointer-only. Zoom in, zoom out and reset are buttons and reach the keyboard; dragging does not. That is the design as drawn, and the graph is a picture with a download beside it rather than the only way to get at the workflow.
  • One affordance is lost: the flat image was a link that opened the full-size SVG in a new tab, which was how a phone reader got a readable view. The new graph pans and zooms in place instead. If that trade is wrong for phones, say so and the link can come back under the graph.
  • Tests stub fetch for every case, so no test reaches the network; one serves the real published graph and one serves an error to prove the fallback.

Verified in the browser on the running page at 1440 and 390: fourteen groups drawn, one picture hung, no fallback shown, the graph measures 904×512 beside the rail on desktop and 342×448 at phone width, no console errors, and documentElement.scrollWidth equals the viewport at both.

Screenshots (if applicable)

Captured locally at both widths. This session cannot attach binaries to a pull request; the preview link shows the result once deploy-preview passes.

The Details tab shows a flat SVG of the graph, exported when the workflow was
added. It cannot be moved, nothing in it can be read at the size it is drawn,
and it goes stale the moment the template changes without anyone noticing.

The same JSON the page already offers for download describes the graph: the
nodes, where they sit, how big they are, what they are wired to, the colours
somebody chose, and the values sitting on their faces. This turns that into
laid-out boxes and curves and nothing else — no execution, no editing, no
litegraph — so a page can draw it without the editor coming with it.

It also hangs the template's own pictures where they belong. One picture is the
result, and goes in the node that hands the result back; two are a before and
an after, and the before goes where the run takes it in.

Nothing draws it yet. The tests read all thirty graphs this site publishes,
rather than a hand-written one that could not go stale the same way.
…of it

The tab showed a flat SVG exported when the workflow was added: nothing in it
could be read at the size it was drawn, and it went stale the moment the
template changed without anyone noticing. It now draws the graph from the same
JSON the page already offers for download, so it cannot drift, and it can be
dragged and zoomed to read a node.

What the workflow makes hangs in the node that hands it back, in the room the
node left for it. Every one of the thirty has a picture for this; the samples
underneath are results too, so there is nothing to hang at the way in, and a
node cannot play a video.

The flat export is still published and is what a graph that cannot be read
falls back to, so a reader never loses the picture over a network that went.
@mariana953
mariana953 requested review from a team and dante01yoon as code owners September 26, 2026 15:06
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 27, 2026 9:57am UTC
billing-web-test Skipped Skipped Sep 27, 2026 9:57am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d752f122-a137-435e-aae5-e68f12454baf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

📦 Bundle Size

⏳ Size data collection in progress…

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 6d7e14a31643afc8e2f86720426409b7ae40e613

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-19010.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-lha62n9cn-comfyui.vercel.app

Last updated: 2026-09-27T10:00:08Z for deec3d7

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.29719% with 64 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apps/website/src/lib/workshop/workflow-graph.ts 72.72% 16 Missing and 32 partials ⚠️
.../website/src/components/workshop/WorkflowGraph.vue 69.56% 11 Missing and 3 partials ⚠️
...ebsite/src/components/workshop/WorkflowPreview.vue 50.00% 1 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (74.29%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

@@                     Coverage Diff                      @@
##             mariana/v2-workflow-facts   #19010   +/-   ##
============================================================
  Coverage                             ?   84.00%           
============================================================
  Files                                ?     3126           
  Lines                                ?   153780           
  Branches                             ?    41754           
============================================================
  Hits                                 ?   129185           
  Misses                               ?    22997           
  Partials                             ?     1598           
Flag Coverage Δ
website-unit 77.96% <74.29%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...site/src/components/workshop/WorkflowGraphNode.vue 100.00% <100.00%> (ø)
...ebsite/src/components/workshop/WorkflowPreview.vue 79.06% <50.00%> (ø)
.../website/src/components/workshop/WorkflowGraph.vue 69.56% <69.56%> (ø)
apps/website/src/lib/workshop/workflow-graph.ts 72.72% <72.72%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 26, 2026
…n one

Replacing the flat picture with the graph itself took away the link that opened
that picture full size in a new tab. The browser test caught it, which is the
right outcome: it was a real affordance, and on a phone it was the only way to
see the whole graph at a size worth looking at. Panning a graph on a phone is
not reading it.

The link is back, under the graph, pointing at the same export as before. The
test is unchanged.

The other assertion that moved is the one naming the picture at 320 pixels wide.
The graph is announced as the nodes of this workflow and the links between them,
where the flat picture was announced as "Workflow" — the same element checked by
the name it now has.
@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 26, 2026 15:34 Inactive
The endpoint check read one coordinate from each end, so a non-finite y1 or x2
went through it.
@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 26, 2026 17:01 Inactive
The Hub branches in this stack and main's new Cloud API pricing copy each
stay under the old 1.81MB ceiling on their own; measured together here the
route totals 1,810,629 bytes. The growth sits in chunks the homepage loads
as well — site-wide copy rather than catalogue code — and the catalogue's
own 900kB delta ceiling is untouched, so a catalogue regression still fails
this test.
@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 27, 2026 09:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 27, 2026 09:57 Inactive
benjcooley added a commit that referenced this pull request Sep 28, 2026
#18979's chip tests open the filter by the name 'Filter', which #19090
renames to its only group ('Use cases'). Each JS budget bump was sized
for one PR; together the /models/ scripts measure 1,816,095 bytes, so
the budget moves to 1,820,000 as #19008, #19010 and #19029 set it.
benjcooley added a commit that referenced this pull request Sep 28, 2026
Behaviour fixes from reviewing Mar's Hub V2 PRs together. No CSS, layout
or copy changes to her design.

- Details graph (#19010): zoom and Reset respond to mouse and touch
  (pointer capture no longer swallows their clicks); zoom scales about
  the drawing's centre instead of carrying it off-frame; drag follows
  the pointer in drawing units; phones can scroll the page past the
  graph; the graph JSON is fetched when Details first opens, not on
  every page view.
- Graph reader (#19009): subgraph nodes are titled with the subgraph's
  name instead of its UUID; unlinked widget inputs are no longer drawn
  as sockets; links find their socket by saved index.
- Filter chips (#18979): Clear on "Browse all models" keeps you in the
  full list; removing a chip keeps keyboard focus in the chip row, then
  returns it to the filter button; tests follow #19090's renamed button.
- Run panel (#19005): a request that never ran no longer says it may
  still be billed or have taken credits.
- Drop three translation keys #19029 left unused.
@benjcooley

Copy link
Copy Markdown
Collaborator

This head is fully contained in #19255, where Mar's Hub V2 work is being staged and reviewed together. Closing this intermediate PR in favor of the combined phase; review fixes are isolated in #19256.

@benjcooley benjcooley closed this Sep 28, 2026
benjcooley added a commit that referenced this pull request Sep 28, 2026
…te PRs (#19255)

## Summary

Mar's Hub V2, staged as one reviewable phase. This combines the 23 PRs
from her [#proj-comfy-hub
post](https://comfy-organization.slack.com/archives/C0AEPRS8N74/p1790528696016959),
including the latest head of #19004, while preserving her presentation
and commit history. Review fixes remain isolated in #19256 above this
PR.

Design reference (not for review): #17804 · [V2 Hub
preview](https://comfy-website-preview-pr-17804.vercel.app/hub/)

## Included

**Independent:** #19031 Hub not Models · #18916 search with filter and
sort · #18915 shorter workflows banner · #18979 filter chips · #19012
one "browse all" · #19016 shelf stops promising more · #18987 home hub
workflows tab · #19025 Apps tab · #19090 filter named after what it
filters · #19017 phone video controls · #19011 API tab endpoint · #19014
workflow header

**Catalogue cards:** #18921 → #19015

**Workflow page V2:** #19009 → #19004 → #19008 → #19010 → #19029

**Run states:** #19005 → #19006 → #19007 → #19022

## Integration with current main

- Rebases the phase onto current `main`, including the canonical
`/models/apps/<slug>/` routes and the separate Apps feature flag.
- Keeps Mar's Apps shelf and card presentation while sourcing its
entries and links from the canonical app catalogue.
- Keeps Apps gated by `workshop-apps-enabled`; Workflows remain gated
independently by `workshop-workflows-enabled`.
- Keeps Mar's latest #19004 Details cleanup and single template-author
attribution while retaining the later interactive graph work in
#19008/#19010.
- Resolves the combined `/models/` JavaScript budget to 1,820,000 bytes.

## Not included

- #19241 (API tab rail): conflicts with #19011 and still needs a design
call.
- #19227 (draft), #17865 and #18306: not part of the Hub V2 set.

## Verification

- Full website unit suite: 9,494 passed, 4 skipped.
- Focused post-rebase app/catalogue suite: 98 passed.
- Website typecheck: 0 errors.
- Commit and push checks: formatting, lint, app/website typechecks, knip
and Fallow passed.
- `workshop-workflows-enabled` gates the home tab, catalogue tab, direct
`?type=` URLs and detail pages without flashing gated content.

---------

Co-authored-by: Mariana Martinho <mariana@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions <github-actions@github.com>
benjcooley added a commit that referenced this pull request Sep 28, 2026
Behaviour fixes from reviewing Mar's Hub V2 PRs together. No CSS, layout
or copy changes to her design.

- Details graph (#19010): zoom and Reset respond to mouse and touch
  (pointer capture no longer swallows their clicks); zoom scales about
  the drawing's centre instead of carrying it off-frame; drag follows
  the pointer in drawing units; phones can scroll the page past the
  graph; the graph JSON is fetched when Details first opens, not on
  every page view.
- Graph reader (#19009): subgraph nodes are titled with the subgraph's
  name instead of its UUID; unlinked widget inputs are no longer drawn
  as sockets; links find their socket by saved index.
- Filter chips (#18979): Clear on "Browse all models" keeps you in the
  full list; removing a chip keeps keyboard focus in the chip row, then
  returns it to the filter button; tests follow #19090's renamed button.
- Run panel (#19005): a request that never ran no longer says it may
  still be billed or have taken credits.
- Drop three translation keys #19029 left unused.

This branch was previously deployed

1 inactive deployment
Preview – billing-web-test — deec3d73 Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants