Skip to content

Fix NSFW blur for latest run when rating is on run - #17636

Closed
mariana953 wants to merge 1 commit into
mainfrom
mariana/models-output-fixes
Closed

mariana953 wants to merge 1 commit into
mainfrom
mariana/models-output-fixes

Conversation

@mariana953

Copy link
Copy Markdown
Contributor

Summary

Fixed NSFW content blurring in the output strip to correctly handle cases where the run itself is marked as sensitive, not just the output.

Changes

  • What:
    • Added latestIsSensitive computed property that checks both the output's NSFW flag and the run's NSFW flag (which the router reports on the run, not the output)
    • Updated shownIsSensitive to use latestIsSensitive for consistency
    • Added nsfw field to RunStop interface to cache the sensitivity state
    • Updated runStops computed to populate the nsfw field for both earlier runs and the latest run
    • Changed blur class binding from stop.output.nsfw to stop.nsfw to use the cached value

Review Focus

The key insight is that the router reports a run's NSFW rating on the run object itself, not always on the output. This means the latest run's sensitivity must be determined by checking both state.nsfw (the run) and state.output.nsfw (the output). By caching this in the RunStop interface, we ensure consistent behavior across all uses of the sensitivity flag in the template.

Test Coverage

Added unit test verifying that the latest run in the strip is blurred when the run (not its output) is rated sensitive, while earlier runs without that flag remain unblurred.

https://claude.ai/code/session_01GnpMtHjZzK5xfgS9aSEjvT

The router reports the latest run's rating on the run, not always on the
output, and the strip read the output alone. A result rated sensitive
could sit unblurred in its thumbnail beside a viewer that blurred it.

Both now consult the run and the output, through one computed, so the
gate cannot come apart again.
@mariana953
mariana953 requested review from a team September 14, 2026 07:49
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🔗 Website Preview

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

Includes the unreleased Workshop feature (workshop-test label), signed in against test Cloud.

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

Last updated: 2026-09-14T09:00:21Z for 3c94ab1

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 19a3dbae-c9ea-47a3-90f8-231300f147de

📥 Commits

Reviewing files that changed from the base of the PR and between 5e05f64 and 3c94ab1.

📒 Files selected for processing (2)
  • apps/website/src/components/workshop/PlaygroundOutput.test.ts
  • apps/website/src/components/workshop/PlaygroundOutput.vue

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


📝 Walkthrough

Walkthrough

The playground now detects sensitivity from both run state and output metadata. It stores sensitivity on each run stop and uses that value for thumbnail blurring. A test covers sensitive latest-run and non-sensitive earlier-run thumbnails.

Changes

Sensitive run display

Layer / File(s) Summary
Sensitivity detection and thumbnail rendering
apps/website/src/components/workshop/PlaygroundOutput.vue, apps/website/src/components/workshop/PlaygroundOutput.test.ts
The component derives latest-run sensitivity from run state or output metadata, stores sensitivity on run stops, and uses it for thumbnail blurring. The test verifies the expected blur classes.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: benjcooley

Merge Risk: ⚪ Minimal · up to 3c94a

The sensitivity handling change is mergeable with no identified production risk.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❓ Inconclusive The required PR title and commit subjects are not available in the review context. The check requires those fields to identify a bug-fix signal, and it explicitly requires INCONCLUSIVE when commit sub… Provide the PR title, the exact commit subjects, and the complete base-to-head changed-file list. Then verify whether a bug-fix signal exists and whether the PR description gives a concrete reason for not adding a browser_tests/ Playwright …
Website End-To-End Regression Coverage ❓ Inconclusive The available metadata shows a website runtime change in apps/website/src/components/workshop/PlaygroundOutput.vue, with user-visible NSFW blur behavior, and no Playwright assertion under `apps/webs… Provide the commit subjects for this PR, then reassess the existing diff and description against the end-to-end coverage conditions.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing NSFW blurring when sensitivity is assigned to the latest run.
Description check ✅ Passed The description includes the required Summary, Changes, and Review Focus sections. It explains the run-level and output-level NSFW handling and documents test coverage. Screenshots are not needed for …
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.
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed files are apps/website/src/components/workshop/PlaygroundOutput.test.ts and apps/website/src/components/workshop/PlaygroundOutput.vue. Neither file is under src/lib/litegraph/, `src/…
Full details: End-To-End Regression Coverage For Fixes

Explanation

The required PR title and commit subjects are not available in the review context. The check requires those fields to identify a bug-fix signal, and it explicitly requires INCONCLUSIVE when commit subjects or the changed-file list are unavailable.

Resolution

Provide the PR title, the exact commit subjects, and the complete base-to-head changed-file list. Then verify whether a bug-fix signal exists and whether the PR description gives a concrete reason for not adding a browser_tests/ Playwright regression test.

Full details: Website End-To-End Regression Coverage

Explanation

The available metadata shows a website runtime change in apps/website/src/components/workshop/PlaygroundOutput.vue, with user-visible NSFW blur behavior, and no Playwright assertion under apps/website/e2e/**/*.spec.ts. The PR description also does not explain why an end-to-end test was not added. However, the custom check requires the commit subjects to be available, and they are not present in the review context. The check therefore cannot reach a definitive result under its stated policy.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mariana/models-output-fixes

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

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...bsite/src/components/workshop/PlaygroundOutput.vue 80.00% 1 Missing ⚠️
@@           Coverage Diff           @@
##             main   #17636   +/-   ##
=======================================
  Coverage   82.79%   82.79%           
=======================================
  Files        2756     2756           
  Lines      138975   138977    +2     
  Branches    37562    37563    +1     
=======================================
+ Hits       115067   115070    +3     
  Misses      22815    22815           
+ Partials     1093     1092    -1     
Flag Coverage Δ
website-unit 75.58% <80.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...bsite/src/components/workshop/PlaygroundOutput.vue 93.40% <80.00%> (+0.62%) ⬆️
🚀 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 14, 2026

Copy link
Copy Markdown
Contributor Author

Handing this one off: it sits outside the UX/UI work I'm focused on, so I'd rather it land with someone closer to the runs/output data flow than sit on my queue.

Context for whoever picks it up:

  • The router reports a run's NSFW rating on the run, not always on the output. The runs strip only read the flag off the output, so a run rated sensitive could render its thumbnail unblurred right next to a viewer that did blur it.
  • The fix reads both state.nsfw and state.output.nsfw, caches the result on RunStop, and the template binds blur to the cached value.
  • Scope is 26 added / 3 removed lines across PlaygroundOutput.vue and its test. Regression test was confirmed red without the fix.
  • CI is green on 3c94ab1: website unit, website e2e, build, and all three Codecov gates pass.

@benjcooley could you take it or point it at the right person? Happy to keep it open as is, or to close it if you'd rather fold the change into the Models work directly.


Generated by Claude Code

@mariana953 mariana953 added the workshop-test Enable this PR/build to run in the TEST environment. label Sep 14, 2026 — with Claude
@mariana953 mariana953 removed the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 14, 2026 — with Claude
@benjcooley

Copy link
Copy Markdown
Collaborator

Consolidated into #17638. The NSFW run-strip fix is included there and has now been reviewed and tested as part of the combined change.

@benjcooley benjcooley closed this Sep 14, 2026
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 14, 2026
… run (Comfy-Org#17638)

## Summary

Two days of UI, UX and copy corrections on the Models screens, each one
found by looking at the running site rather than at the diff. Three of
them close the item Comfy-Org#17569 recorded as unaddressed, Pablo's report that
the sort menu does nothing, and Hunter's note that the copy needs a
human pass.

**Comfy-Org#17636 is consolidated here** so QA and review use one preview and one
landing PR. The duplicate PR is closed; its NSFW run-strip fix remains
included and tested here.

The templates v2 that an earlier revision of this branch carried was
reverted out in 6da6a71. This PR is the V1 correction pass and nothing
else, so it can be reviewed and landed on its own. The two-catalogue
recommendation will come back as its own PR.

QA preview: https://comfy-website-preview-pr-17638.vercel.app/models/

## Changes

- **What**:
- **A summary no longer repeats the name above it.** Router's
descriptions close on the model's own name in parentheses, and both
screens that show a summary, the featured banner and the model page, put
it directly under that same name. Twenty of the catalogue's 139
summaries lose the echo. The five parentheticals that say something the
name does not, such as `(predates Ultra)` on FLUX Pro 1.1, stay: the
rule is that the parenthetical goes only when every word in it is
already in the name or the provider.
- **Every category chip is reachable.** The search panel's desktop
dropdown had no height of its own, so with the whole catalogue listed
the chips ran past the bottom of the window with no way to scroll to
them. It stops at `70dvh` and scrolls, which is what the phone sheet
already did.
- **A dialog's edge is a container edge, not a brand accent.** The
yellow border becomes a subtle white. This is in the shared
`DialogContent`, so it changes all six dialogs that use it, which is the
point: the border is a component-level choice, not a per-screen one.
- **The custom amount sits between its two steppers**, and a title and
its subtitle are one block. The amount was right-aligned inside a
fixed-width box, far from the minus and tight against the plus; centring
it keeps the width, so the row still does not jump as the number
changes. The five title and subtitle pairs were siblings in the dialog's
own `gap-6`, so 24px opened between them; they pair at `gap-2` now.
- **The run's video fills its panel**, and a chosen file is no longer
inside the drop zone. `VideoPlayer` carries its own radius and border,
which inside a panel that already has both read as a rounded card
floating in a rounded card. The dashed frame said "drop here" about a
file already dropped, so the list moved out and the dashes now wrap only
the part that still accepts one.
- **Sign In is the size of the buttons beside it.** It was a bare link
at text height in a row of 40px controls.
- **The sticky toolbar covers the rows passing under it.** The rows
bleed 4px into the gutter so their focus rings are not clipped; the
toolbar did not, so a card showed two translucent slivers at the edges
as it scrolled behind.
- **The estimate reads as a price, and its caveat is an icon.**
`Estimated 9.5 credits/Image` and a paragraph of qualification under it
became the price itself, in white at 18px, with an info icon beside it
that opens the caveat on hover and on focus.
- **The overflow tag chip opens on hover.** The `+6` chip was a click
popover sitting among cards that all reveal on hover, so the one element
that looked like the others behaved unlike them. It is a hover card now,
with the same focus behaviour for keyboards.
- **The files under a result say what they are.** The row named each
file by the name the Router gave it, so a run read as
`byteplus-seedream-4-5-251128-1.jpg` beside `...-response.json` with
nothing saying which was the picture. Each file is named by what it is
now, numbered only where a kind repeats, and the file name stays on
hover and on the download. This is the item Comfy-Org#17569 flagged as
unaddressed.
- **Leaving a page with a run in flight is asked in our own words.** A
click on an in-site link is caught before the client router sees it, so
the page can ask with its own dialog instead of the browser's unstyled
prompt. The `beforeunload`, `popstate` and `astro:before-preparation`
guards behind it are unchanged and still cover reloads, typed URLs and
history moves.
- **The sort menu stops offering an order it cannot give.** Not one of
the 139 models carries a `creditsPerRun`, so Cheapest and Most expensive
both fell through to the name comparator: four orders, three identical
lists. The two price orders are withheld while no model has a price and
return on their own the moment one does.
- **The run strip blurs what the viewer blurs** (from Comfy-Org#17636). The
Router reports a run's sensitive rating on the run, not always on the
output, so the newest thumbnail in the session strip stayed sharp while
the result above it was blurred.
- **The form stops restating what its controls already show.** Every
field with a declared default carried a `Default: X` line under it, so a
select sat under the option it had already selected, a toggle under the
state its own switch was showing, and a slider under the number printed
beside its label. On Seedream 5.0 Pro that was four grey lines in a row
saying nothing. The line stays only where the control starts empty and
the default really is invisible: number and text inputs. The per-field
hint moves into the info tooltip beside the label rather than a grey
subtitle under every field, and stays on the field for screen readers.
- **The examples row carries its own labels.** "Start from an example"
was wrong on a page that has already loaded the example into the form,
and the subtitle under it restated either the heading or the tick
already on the card. Each card names itself over a gradient instead of a
caption underneath.
- **The shipped example names the model it offers to run.** "Run the
model to make your own" said nothing the page did not already say; it
reads "Run Seedream 5.0 Pro to make your own" now.
- **A copy pass over about 45 strings**, after Hunter's note that the
copy needed a human read. The recurring faults were sentences explaining
what the reader was already looking at, three different names for one
action, and two placeholders that shipped. Log in and Sign in are one
wording throughout. Five dead keys were deleted rather than rewritten.
- **Dependencies**: none.

## Review Focus

1. **The price estimate is missing for most of the catalogue, and the
copy is wrong about why.** 22 of the 139 models return an estimate; the
other 117 show "Cost depends on your settings". Measuring the reason:
116 of those 117 have no pricing data at all (the pricing files carry
rules for 16 model IDs), and exactly 0 are in the "price genuinely
varies" case. So that line tells the reader the cost depends on them
when the truth is we do not have the number. Either the data lands
before launch or the copy should say so honestly. Raised separately with
@ericsun and @Purz, and not changed here because it is a product call.
2. **The model descriptions have the same problem one level up.** They
come from the Router export, so all this PR does is trim the trailing
parenthetical that repeats the title. 28 of the 116 models have a
concrete fault: seven pairs of different models share word-for-word text
(including Veo 3 / Veo 3.1 and Wan 2.6 / 2.7), six describe themselves
only by comparison to another model, four leak API vocabulary
(`image_weight`, "legacy endpoint", `1..7`, `@Image1`), and six repeat
the model name inside the sentence. Full list available. Fixing it needs
an owner upstream, or a `description` field on the display overlay,
which already overrides `displayName` on 4 models. Either way, its own
PR.
3. **The shared dialog border.** Six dialogs change, including
`TeamMemberDialog01` outside Models. Say so if any of them wants the
yellow back.
4. **`modelSummary` is deliberately conservative.** It compares whole
words against the name and the provider, so an abbreviation the name
does not contain, such as `(Sonilo v2m)`, is left alone rather than
guessed at. Widening it would start removing text that carries meaning.
5. **The leave dialog is one more layer, not a replacement.** It only
catches a left-click on a same-origin link with no modifier, which is
how most people leave the page. Everything else still reaches the
existing guards, so nothing that was protected before is less protected
now. The decision itself lives in `linkLeavingPage`, covered branch by
branch, rather than inside the component where only a mounted island
could reach it.
6. **Withholding the price orders is data-driven, not a deletion.**
`sortOrdersFor` reads the list it is given, so the moment a model
carries a price the two orders come back with no further change.
7. **The terms line now reads "By signing up, you agree to our ..."**
and should get a legal check before launch. Its zh-CN and ja
translations still describe a Next button that no longer exists and need
a translator, not a guess.
8. **One earlier change did not survive the Comfy-Org#17614 squash:** a video
result no longer opens full screen, only a still does (`expandable` is
image-only again). Re-landing it is not a one-line revert now, because
the inline `VideoPlayer` has gained its own hover controls in the same
corner as the expand affordance and would keep playing behind the
overlay. Left out of this PR deliberately: was it dropped on purpose, or
lost in the squash?
9. **Also a product call, not touched here:** the estimated cost was
removed from the Run button in Comfy-Org#17614, which added a test pinning it out
("does not put the page-load estimate on the live Run button"). The
estimate is computed at page load and does not follow the form, so the
test is defensible; the price is still on the model header. Deliberate,
or a side effect?

Verified with the full website unit suite, a production-configured
website build, `astro check`, `vue-tsc`, lint, format and knip.

This PR needs the `workshop-test` label to get a preview with Models in
the build.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: benjcooley <benjcooley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workshop-test Enable this PR/build to run in the TEST environment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants