Skip to content

fix(models): name the filter after what it filters by - #19090

Closed
mariana953 wants to merge 1 commit into
mainfrom
mariana/filter-label-on-main
Closed

mariana953 wants to merge 1 commit into
mainfrom
mariana/filter-label-on-main

Conversation

@mariana953

Copy link
Copy Markdown
Contributor

Summary

A filter sheet holding a single group hides that group's name, so the control that opens it is the only place a reader can learn what the filter narrows. It said Filter.

Replaces #17848, which was opened on 16 September and can no longer be merged: WorkshopFilterMenu.vue has since been rewritten on main — the panel moved into WorkshopFilterPanel.vue and toggle grew a model facet — so that branch conflicts in the one file it changes. This is the same change re-applied to main's shape, in one commit.

Changes

  • What: filterLabel names the control after the only group when there is one, and keeps the generic name when there is more than one. On the models half that reads Use cases; on the workflows half, which also filters by model, it stays Filter. The name reaches the trigger, its accessible name, and the sheet's own heading and dialog label, so all four say the same thing.
  • Dropped from the older branch: a gap-2 → gap-3 tweak on the catalogue card's text block. It was unrelated to naming the filter, and feat(website): one name and one mark on a catalogue card #18921 now makes that same change as part of the card work.

Review Focus

  • The rule is a pure function with its own cases, so the two-group answer is pinned without rendering anything.
  • WorkshopFilterMenu.test.ts and WorkshopModelsGrid.test.ts now open the control by the name a reader sees. They fail on main, where the trigger answers to Filter.
  • 42 cases pass across the filter menu, the grid, the rule and the catalogue.

Screenshots (if applicable)

Before: a control named Filter over a sheet whose only group is unnamed. After: the control reads Use cases on the models half, and stays Filter on the workflows half, where two groups make the generic name the honest one.


Generated by Claude Code

A sheet holding one group hides that group name, so the control is the only place a reader learns what the filter narrows. With more than one group there is no single answer and the generic name is the honest one.
@mariana953
mariana953 requested review from a team September 27, 2026 08:54
@vercel

vercel Bot commented Sep 27, 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 8:54am UTC
billing-web-test Skipped Skipped Sep 27, 2026 8:54am UTC

Request Review

@github-actions

github-actions Bot commented Sep 27, 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

🌾 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 ec7764faa20087cab1e5f5f28adef2c079e09daf

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

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

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

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

Last updated: 2026-09-27T08:56:03Z for babf423

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 15d2b8a3-14d3-42aa-855f-f90c11494057

📥 Commits

Reviewing files that changed from the base of the PR and between ec7764f and babf423.

📒 Files selected for processing (5)
  • apps/website/src/components/workshop/WorkshopFilterMenu.test.ts
  • apps/website/src/components/workshop/WorkshopFilterMenu.vue
  • apps/website/src/components/workshop/WorkshopModelsGrid.test.ts
  • apps/website/src/lib/workshop/filter-label.test.ts
  • apps/website/src/lib/workshop/filter-label.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The workshop filter now displays the sole facet group label when one group is available. It uses the generic localized filter label when there are zero or multiple groups. The menu title, trigger text, and accessible name use this computed label.

Changes

Workshop filter label

Layer / File(s) Summary
Select filter label
apps/website/src/lib/workshop/filter-label.ts, apps/website/src/lib/workshop/filter-label.test.ts
Adds and tests filterLabel, which returns the sole group label or the generic label when the group count is not one.
Apply filter label
apps/website/src/components/workshop/WorkshopFilterMenu.vue, apps/website/src/components/workshop/WorkshopFilterMenu.test.ts, apps/website/src/components/workshop/WorkshopModelsGrid.test.ts
Uses the computed label for the menu title and trigger. Updates tests to find the trigger and dialog by the label “Use cases.”

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: benjcooley

Merge Risk: ⚪ Minimal · up to babf4

The filter label now reflects the available groups without changing which options users can select. The inspected source shows the label matches the rendered groups, with no material merge risk identified.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: the models filter control is named after the attribute it filters by.
Description check ✅ Passed The description includes the required Summary, Changes, Review Focus, and Screenshots sections. It explains the behavior, scope, test coverage, and design focus. Breaking changes and dependencies are …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed The title and commit subject contain the bug-fix signal “fix”, but all changed files are under apps/website. The custom check explicitly excludes changes exclusively in apps/website, so the `brows…
Website End-To-End Regression Coverage ✅ Passed The PR changes a website runtime component, but the diff changes only the filter label and accessible name. This is a text/copy change, not a changed interactive flow, form, navigation, route, or othe…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed files are under apps/website/src and apps/website/src/lib/workshop. None are under src/lib/litegraph/, src/ecs/, or graph-entity-related paths. The ADR compliance check is not applicable.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #19090      +/-   ##
==========================================
- Coverage   84.11%   84.09%   -0.03%     
==========================================
  Files        3164     3129      -35     
  Lines      154834   154058     -776     
  Branches    40141    39945     -196     
==========================================
- Hits       130241   129555     -686     
+ Misses      22989    22948      -41     
+ Partials     1604     1555      -49     
Flag Coverage Δ
billing-web-unit ?
website-unit 78.00% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...ite/src/components/workshop/WorkshopFilterMenu.vue 79.24% <100.00%> (+0.81%) ⬆️
apps/website/src/lib/workshop/filter-label.ts 100.00% <100.00%> (ø)

... and 36 files with indirect coverage changes

🚀 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 27, 2026
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

Included unmodified in #19255, which lands Mar's Hub V2 PRs together as part of the stack #18988 → #19023 → #19255 → #19256. Review fixes for this area are in #19256. Closing in favour of the stack. Your branch is untouched; for further changes, please open a PR on top of #19256 rather than pushing here.

@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 — babf423d 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