Repository navigation
test(website): guard that models pages show content, not a loader, and don't shift - #19394
MaanilVerma wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
QALocal production builds with the CI e2e env (
Review round 1 (Ben's review,
|
| # | Check | Proof | Result |
|---|---|---|---|
| 9 | Watcher now sees the post-mount loader | /models/ loaderLastSeenAt: 393px flag on 774 ms, off 524 ms; 1280px on 559 ms, off 362 ms (was 0 with the old selector). Per-id probe: models-loading is the last loader visible (393px 419 ms after workshop-loading 373 ms; 1280px 273 after 240) |
pass |
| 10 | Model pages stay green | All 12 model-page cases pass, loaderLastSeenAt=0, CLS max 0.037 (Bria, 393px, flag off). Pages resolved from /models/catalogue.json: bfl--flux-2-max, bfl--flux-3-text-to-video, bria--eraser |
pass |
| 11 | /models/ runtime reasons re-derived |
With the loader watched correctly all four runtime cases pass (CLS 0 to 0.0055), so their test.fail() is removed. JS-off hub still fails on Received: "Grok Imagine in ComfyUI" (noscript ModelsShowcase), reason updated. Row 5's 2.2 to 5.4 s loader was not reproduced on this build |
pass |
| 12 | Shared flag stub callers still pass | workshop-loading-flash.spec.ts + workshop-visibility.spec.ts on the same build: 11 passed |
pass |
| 13 | Gates | pnpm typecheck (website) 0 errors, pnpm exec eslint on the 5 e2e files exit 0, oxfmt --check apps/website/e2e/ clean, pre-commit hooks passed |
pass |
| 14 | 1 s grace margin | Worst loader case 774 ms vs 1000 ms budget, about 25% headroom locally under 4 workers |
watch in CI |
Review round 2 (Ben's approval, 5c1f8e4c88, 3e736b006b)
Local runs were not reliable this round: the build lacked the CI e2e env, so model pages rendered as not runnable (no run-rollout-note with the flag off), and load average was about 37 against a 1 s loader grace. The pushed d64cddc740 failed the same 10 cases locally while CI passed it, so CI is the proof here.
| # | Check | Proof | Result |
|---|---|---|---|
| 15 | Explicit slugs, name-pinned h1, JS-off model cases restored, no-scroll expectIslandHydrated |
Website E2E run 36618294519 on 5c1f8e4c88: website-build and website-e2e-shard 1 to 4 all success. That covers this spec and the ~20 specs whose waitForIsland gained the count-1 check. Locally, the 3 JS-off model cases pass |
pass |
| 16 | Gates | pnpm typecheck (website) 0 errors, pnpm exec eslint on the 2 e2e files exit 0, pre-commit hooks passed |
pass |
| 17 | Comment move (3e736b006b) |
Comment-only change to islands.ts, eslint exit 0; CI on it not watched |
pass |
🌐 Website E2ETip All tests passed.
🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight 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
🌾 Fallow: ✅ PassedFallow 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 426f1563577c736496bd42adfe02bfca134f2176
Full docs: ADR-DEVEX-LINT-0015 🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-19394.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-qfxwtwbwa-comfyui.vercel.app Last updated: 2026-09-29T20:20:34Z for |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## maanil/fe-2942-model-page-ssr #19394 +/- ##
=================================================================
- Coverage 84.14% 84.05% -0.10%
=================================================================
Files 3188 3158 -30
Lines 155105 154272 -833
Branches 42475 39945 -2530
=================================================================
- Hits 130509 129666 -843
- Misses 22923 22990 +67
+ Partials 1673 1616 -57
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @MaanilVerma.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 5 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
…nto maanil/fe-2985-content-cls-guard
…nto maanil/fe-2985-content-cls-guard
benjcooley
left a comment
There was a problem hiding this comment.
Review
The shape of this is good — one table of pages, no sleeps, no new dependency, CLS from a real layout-shift observer, and frames > 0 to prove the watcher actually ran. One finding is load-bearing enough to block.
| Severity | Count |
|---|---|
| BLOCKER | 1 |
| SHOULD FIX | 5 |
| TRIVIAL | 2 |
Blocker: the loader guard watches the wrong test id
recordLoaderAndLayoutShift polls [data-testid="workshop-loading"]. That id only exists in the pre-hydration frame. Once ModelsPage mounts, its async-component loading state renders h(WorkshopLoading, { label, 'data-testid': 'models-loading' }) (ModelsPage.vue:59) — the fallthrough attribute replaces the root's own workshop-loading, because one element cannot carry two values for one attribute.
So the spinner that actually sits on screen while catalogue.json / page.json load — the exact 2-to-5-second loader named in the PR description — is invisible to this guard. models-catalogue-corrections.spec.ts:60 and ModelsPage.loading.test.ts:46 both already assert models-loading in that window, so this is settled behaviour, not a guess.
Consequences:
loaderLastSeenAtis0on every page under test, soexpect(loaderLastSeenAt).toBeLessThan(1000)passes without observing anything. The headline guarantee of the PR is currently vacuous.- The
/models/runtimePendingannotation blames the loader, but those cases fail on the CLS budget. The recorded reason will mislead whoever removes thetest.fail.
Matching both ids fixes both, and does not put the three model-page cases at risk — router-backed slugs render ModelPage directly and never mount a WorkshopLoading at all.
On the review-focus questions
- 1 s loader grace / 0.1 CLS budget — the budget is fine; the grace window is currently unexercised for the reason above. Worth re-checking the margin once the selector is fixed, since a cold-cache
client:loadhydration under CI parallelism can push the pre-mount frame past 1 s. - Settle signal for model pages — island hydrated plus
run-button:not([data-gate="resolving"])/run-rollout-noteis correct and matches whatModelDetail.vueactually emits forsignedOutandrollingOut. - Hub
test.fail()reasons — the JS-off one is right as far as it goes, though/models/with JS off also rendersModelsShowcasefrom<noscript>, so the Grok assertion fails too, not only the h1. The runtime reasons are wrong (above).
Overlap worth a look
The h1-text, no-Grok and run-rollout-note assertions here are already covered by workshop-visibility.spec.ts and workshop-loading-flash.spec.ts. The genuinely new coverage is CLS and loader timing. Trimming the duplicated assertions would keep this closer to the repo's parsimony guideline and cut the 20-test footprint against a 20-minute CI globalTimeout.
Note on the CLS numbers
blockExternalMedia fulfils all media with a 1x1 webp / tiny webm placeholder. Any shift that production pays for because a real image arrives late at its real aspect ratio will not be charged here. The budget is still a useful regression tripwire, just don't read it as a production CLS figure.
The render guard now matches the post-mount models-loading loader, reuses waitForIsland and the shared VIEWPORTS, types its window hook locally, and picks its model pages from the published catalogue. The /models/ runtime cases pass once the right loader is watched, so their test.fail is gone. Assertions already covered by the visibility and loading-flash specs are trimmed. The cdn-cgi/trace and PostHog flag stub moves to one fixture used by all four callers.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review of d64cddc
Blocker resolved, and resolved properly rather than papered over. Approving.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX (non-blocking) | 3 |
| TRIVIAL | 1 |
The blocker is genuinely fixed
The watcher now matches workshop-loading, models-loading. What moves this from "plausible" to "verified" is the evidence you brought rather than the one-line selector change: per-id timings showing models-loading is the last loader visible (393px: 373 ms then 419 ms; 1280px: 240 ms then 273 ms) prove the guard is now observing the post-mount spinner and not just the pre-hydration frame. Removing the /models/ runtime test.fail on the back of that — instead of leaving it in place with a corrected excuse — is the right call, and it converts four muted cases into four enforcing ones.
All four website-e2e-shard jobs are green on this head (681 tests, the one flaky is an unrelated screenshot). That also settles the grace-window question you flagged for the owner: your 774 ms worst case was measured on a laptop, and the budget held on a slower Actions container. I'd leave LOADER_GRACE_MS at 1 s. If it ever does flake, the useful response is to find out why the loader got slower, which is exactly what this guard is for — not to raise the number.
Fixture extraction
stubWorkshopFlags collapses four copies into one and the three call sites read better for it. One quiet behaviour change worth knowing about: workshop-visibility.spec.ts's old disableWorkshopFlag did not stub cdn-cgi/trace, and now it does, so that test's geo resolves to US deterministically instead of whatever astro preview returned. That's an improvement, but it wasn't in the commit message.
What's left (all non-blocking)
One theme runs through three of the four notes: in trimming assertions and making page selection dynamic, the suite lost its grip on page identity. resolvePath picks a URL at runtime, the h1 checks are gone from the runtime path, and the JS-off block is now a single expected-failure. What survives is a strong assertion that a model page hydrated without a loader or a jump — which is most of the value — but nothing ties a run to the page it claims to be testing. One toHaveText(name) sourced from the catalogue entry you already fetch puts that back for about three lines.
The waitForIsland scroll is on me — I recommended reuse without checking that it scrolls, and scrolling before reading CLS widens what the budget is measuring. Worth a follow-up, not a revert.
None of these block. Good, evidence-driven turnaround.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review of 5c1f8e4
All four notes from the last round addressed, each one at the root rather than at the symptom. Approving.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 0 |
| TRIVIAL | 1 |
What landed
- Page identity restored.
publishedModelreturns the cataloguenamealongsidehref, and the runtime cases pin it withtoHaveText(name)after settle. The guard can no longer pass on the wrong page. - Scroll removed.
expectIslandHydratedsplit out inislands.ts, withwaitForIslanddelegating to it and keeping the scroll for the specs that click. This spec stops moving the viewport it is measuring, and the two callers still share one definition of what "hydrated" means. Clean resolution of a problem I introduced. - Subject pinned. Back to explicit
MODEL_SLUGS, withpublishedModelthrowingThe catalogue no longer publishes <slug>when one is delisted — presence asserted without identity being derived. The wholereadFileSync/workshop-display.json/ example-values block is gone with it, which is a good subtraction: the spec no longer reads app content off disk at collection time. - JS-off coverage restored, and better than the original — the expected h1 now comes from the catalogue instead of a hardcoded string, so the assertion and the route share a source.
- Test titles now name the slug via
pageTitle, so a CI failure identifies the page without digging into annotations.
On the tightened schema
I checked catalogueSchema requiring name on every entry, since catalogue.json is [...workshopModels, ...workflowModels, ...appModels] and a single entry missing the field would take out all fifteen tests with a zod error. It's safe, and safe for a good reason: WorkshopPresentation in models-catalogue.ts declares slug, name and href as required, and all three variants extend it, with appModelsFor skipping entries lacking displayName and workflowPageFor throwing on them. The schema is pinned to a compile-time invariant rather than to incidental data, which is the right thing to assert against.
CI
typecheck, typecheck-aux and lint are green on this head. The website e2e run for 5c1f8e4c88 is still queued, so this approval rests on the previous head's full green (all four shards, 681 tests) plus the fact that this commit's behavioural delta is small and checkable by reading: removing scrollIntoViewIfNeeded is safe because both routes hydrate with client:load, so hydration never depended on visibility, and toHaveCount(1) already provides the existence wait the scroll was incidentally supplying. I'll flag it if the run comes back red.
One leftover, not worth another round
The catalogue's own h1 (ComfyUI models) is asserted only in the test.fail JS-off case, so no passing test checks it. Defensible — /models/ is a literal path, so there's no wrong-page risk to guard against, and h1 text isn't what this spec is for. Mentioning it so it's a known gap rather than an assumed one.
Four rounds, each one converging. Nice work.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review of 3e736b0
Comment-only, and it lands the split correctly: the Astro ssr-attribute explanation stays with expectIslandHydrated (true of both functions), the click rationale moves to waitForIsland (true of only that one), and the reworded opener is self-contained now that it no longer follows the sentence it used to lean on. Verified the diff touches nothing but // lines. Approving.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 0 |
| TRIVIAL | 0 |
Correcting my last review on CI
I owe you an amendment. Last round I approved with the caveat that the e2e run for 5c1f8e4c88 was "still queued" and said I'd flag it if it came back red. That was wrong, and wrong in a way worth naming: I read the run-level status from gh run list, which reports queued while the trailing website-e2e-report job waits on a runner, and concluded the tests hadn't executed. At job level all four shards had already finished:
website-e2e-shard (1, 4) :: completed/success 172 passed (1.7m)
website-e2e-shard (2, 4) :: completed/success 171 passed (1.6m)
website-e2e-shard (3, 4) :: completed/success 171 passed (2.5m)
website-e2e-shard (4, 4) :: completed/success 171 passed (2.6m)
685 passed, zero failed, zero flaky. So the three things I said needed runtime confirmation — removing scrollIntoViewIfNeeded, the toHaveText(name) identity pin, and the tightened catalogueSchema requiring name on every catalogue entry — are all CI-verified on real infrastructure, not just argued from the types.
The test count corroborates that the restored cases actually ran rather than being filtered out: d64cddc740 totalled 682 (681 passed + 1 flaky), 5c1f8e4c88 totalled 685. Exactly +3, which is precisely the three JS-off model-page tests that came back in that commit. Nothing silently skipped.
Same misreading applied to d64cddc740, which I reported as run-level cancelled — its website-e2e gate job is completed/success; only the cosmetic post-result-comment step was cancelled by the next push.
The run for this head is pending, but since the diff is three comment lines there is nothing for it to invalidate.
Where this ended up
Five rounds from a guard whose central assertion could not fail to one that is pinned to named pages, watches both loader ids, verifies page identity from the published catalogue, measures without perturbing the viewport it measures, and is green on CI. The expectIslandHydrated / waitForIsland split is a small piece of real cleanup that outlives this PR — the next spec that needs hydration without a scroll now has somewhere to reach for.
No remaining comments. Good to merge once #18898 and the base land.
## Summary **Deploy gate: comfy-router#46 is merged and live (2026-09-30). Its follow-up comfy-router#48 (serves `/hub/models.md` instead of 301ing it to a /workflows 404) must be deployed before this merges. After the merge, purge Cloudflare for `/hub/models*`, `/hub/workflows*` and the 30 workflow names in `hub-workflow-names.json`. The redirects ship as 307; FE-3083 flips them to 308 later.** This branch combines every Workshop /models SEO PR, so merging it to main replaces merging them one by one. It also launches: Comfy-Org#19405 commits `launchedModelPages = 'all'`, so all 148 model pages become indexable in the same deploy as the URL move. Part of FE-2912, FE-2942 (PR 2 is FE-3086), FE-2974 (/minimax 308 is FE-3087) Fixes FE-2978, FE-2989, FE-2991, FE-2990, FE-2959, FE-2981, FE-2977, FE-2979, FE-3014, FE-2936, FE-2980, FE-2975, FE-3085, FE-2972, FE-2935, FE-2950, FE-2940, FE-2930, FE-2985, FE-2957, FE-2961, FE-2986, FE-2921, FE-2922, FE-2947 ## Changes Router follow-up: comfy-router#48 (`/hub/models.md` routing, 324/324 router tests), deploy before this merges. The included PRs, in merge order. Every head was checked as contained at the final tip. | PR | Ticket | What | Ben | |---|---|---|---| | Comfy-Org#18887 | FE-2978 | Pricing Product markup and full video `uploadDate` | approved | | Comfy-Org#18889 | FE-2989 | A unique meta description on every model page | approved | | Comfy-Org#18890 | FE-2991 | Model page JSON-LD, emitted once noindex lifts | approved | | Comfy-Org#18892 | FE-2990 | Cleaner tag pills, guard against duplicate summaries | approved | | Comfy-Org#18893 | FE-2959, 2981, 2977, 2979 | Social tags, hub title, Organization data. The FE-2977 title was confirmed by the owner | approved | | Comfy-Org#19362 | FE-3014 | Every non-production build is noindex | approved | | Comfy-Org#19366 | FE-2936 | Model titles lead with "API & Playground" | approved | | Comfy-Org#19402 | FE-2980 | Every internal link ends with a slash, plus a CI check | approved | | Comfy-Org#19419 | FE-2975 | Footer links the catalogue on every page and locale | approved | | Comfy-Org#19476 | FE-3085 | `NOINDEX_ROUTES` decides noindex for serverless-animation | approved; re-approval pending on a one-line follow-up (CodeRabbit approved) | | Comfy-Org#19359 | FE-2974 | One typed redirect list that generates `vercel.json` | approved | | Comfy-Org#19369 | FE-2972 A | The old to new model URL map | approved | | Comfy-Org#18891 | FE-2935 | Model content shows whatever the flag says | approved | | Comfy-Org#18899 | FE-2942 | Model pages render in the static HTML | approved | | Comfy-Org#18898 | FE-2950 | Catalogue h1 and A to Z links in the static HTML | approved | | Comfy-Org#19375 | FE-2940 | Related models leave no page unlinked | approved | | Comfy-Org#19385 | FE-2930 | Examples show the prompt that made them | approved | | Comfy-Org#19394 | FE-2985 | Render guard e2e: no loader, no layout shift | approved | | Comfy-Org#19357 | FE-2957 | robots.txt stops blocking our scripts and styles | approved | | Comfy-Org#19360 | FE-2961 | Turning Workshop off keeps every Models page | approved (a CodeRabbit changes-requested review is still open) | | Comfy-Org#19386 | FE-2986 | One registry of every Models address | approved | | Comfy-Org#19421 | FE-2972 B1 | Model pages served at `/hub/models` | approved | | Comfy-Org#19422 | FE-2972 B2 | Every old model URL redirects (307) | approved | | Comfy-Org#19424 | FE-2972 B3 | Workflow pages at `/hub/workflows` with redirects | approved | | Comfy-Org#19399 | FE-2921 | One switch decides model robots and sitemap listing | approved | | Comfy-Org#19404 | FE-2922 | Clean markdown twins for model pages | approved | | Comfy-Org#19405 | FE-2947 | Lifts noindex on every canonical model page | approved | | comfy-router#46 | FE-3075 | Serves `/hub/models*` from the website and routes `/hub/workflows` by manifest. Merged and live | merged | These fixes exist only on this branch, because they only break once two PRs meet: - `scripts/check-models-html.ts` reads each page at `model.href` and skips models without a page (f1df1e4). - `e2e/fixtures/modelsCatalogue.ts` reads `dist/hub/models` (f87bb4c). - `routerIdsByModelPage` accepts an optional `href`, since Comfy-Org#19421 made it optional and Comfy-Org#19405 no longer typechecked (9783819). - `ModelStatus` links a successor only when it has a page, for the same reason on Comfy-Org#18899 (c4761d8). - The model breadcrumb in `modelJsonLd.ts` points at `/hub/models/` instead of the `/models/` redirect (eb985b6). Its label still says "Models" while the nav says "Hub". - Twin, meta-description and entry tests use the hub pages and the new tag set (86ac3b0, d4ffc0f). - The render guard finds the catalogue through `getRoutes().workshop`, and its `test.fail` is gone now that Comfy-Org#18898 renders the h1 (831499f). - A new test renders a real model page and checks its markdown twin has the model's h1 (9a6c5cb). - Main's newer catalogue and workflow e2e cases use the hub addresses (2aeda77). - `resetWorkshopAccountSource` resets `decision`; a clean auto-merge of main's Comfy-Org#19454 into Comfy-Org#18891 left it assigning a variable that no longer exists (c28c7a7). The conflict resolutions, briefly: `ALTERNATE_TWIN_SOURCES` stays deleted as Comfy-Org#18898 wants, so `/hub/models.md` comes from the real catalogue. The hub keeps Comfy-Org#18898's single static h1 instead of the `WorkshopHero` h1 that main's Comfy-Org#19320 added. `ExamplesTab` keeps Comfy-Org#19385's figure and caption with main's video poster. The Comfy-Org#19399/Comfy-Org#19405 indexing tests were rewritten for hub paths. The Comfy-Org#19359 redirect test no longer builds `/enterprise//` from slash-ended routes. The Comfy-Org#19369 URL-map test imports `PROVIDER_NAMES` from its new home. The full table of 47 resolutions is in the integration report. ## Review Focus - Launch rides along with the URL move. If launch should stay a separate step, set `launchedModelPages` in `apps/website/src/config/model-page-launch.ts` to `new Set()` before merging. - Main's Comfy-Org#19320 gives the catalogue island its own h1 through `WorkshopHero`. This branch keeps Comfy-Org#18898's static h1 and renders only the subtitle in `ModelsCatalogue.vue`, so the hub has exactly one h1. - Comfy-Org#19476 overlaps the open community PR Comfy-Org#18591 (same sitemap exclusion for serverless-animation). One of them should be closed once this lands. ## QA - [x] Gates: `pnpm typecheck` and website typecheck clean, `pnpm lint` 0 errors, eslint on `apps/website` clean, `pnpm knip` clean - [x] Website unit: 547 files, 10347 passed, 4 skipped - [x] Build A (`build:e2e`, CI env): 1193 pages; release gate, `check:hreflang`, `validate:llms-txt-links` (225 links), `validate:jsonld` (947 pages), `check:link-slashes`, `check:models-html` (148 pages) all pass - [x] Build B (`WORKSHOP_IN_BUILD=0`): same 182 Models pages as the on build, no `dist/workshop`, `/` is noindex; with the flag stubbed on, no Run, no Hub nav and no Firebase requests - [x] Build C (preview shape): 945 of 945 pages noindex, no canonicals except redirect stubs, no hreflang in the sitemap - [x] E2E on Build A: 644 of 645 passed; the one mobile failure passed on rerun. Earlier load flakes (navigation, demos, fdct, wan-3.0, network isolation, render guard) all passed when rerun alone - [x] Launch: 148 model pages indexable with canonicals, 149 hub entries in the sitemap, 148 non-empty twins with the model h1, 148 in `llms-full.txt`, 0 titles over 60, 30 workflow pages still noindex - [x] Redirects: 853 rules, 782 to /hub all 307, the MiniMax rows 307, every /hub destination built - [x] comfy-router#46 under `wrangler dev` in front of this build: 312 router tests pass; 148 old model URLs (both slash forms) 307 then 200; 30 workflow names served by the website and their old URLs 307; a non-manifest workflow 302 with no-store; `manifest.json` passes through; `/workflows/` and bare `/hub` unchanged - [x] After the router deploys and this merges: purge Cloudflare, then curl `https://comfy.org/hub/models/` for a 200 and three old `/models/<slug>/` URLs for one 307 each - [x] Rich Results Test on `/pricing/` and `/learning/animations/character-sheet/`, then "Validate fix" on Merchant listings and Videos - [x] Rich Results Test on two live model pages: breadcrumbs valid and the breadcrumb URL returns 200 with no redirect - [x] GPTBot and Googlebot curls on the hub and one model page, then a GSC live test on both - [x] Resubmit the sitemap in Search Console and URL-inspect about 20 model pages on day 0 and day 14 - Not covered: Rich Results and GSC need production; the redirect matrix used a local shim for `vercel.json`, since `astro preview` ignores it --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: benjcooley <benjcooley@gmail.com> Co-authored-by: Deep Mehta <42841935+deepme987@users.noreply.github.com>
|
Superseded by the integration branch #19494, which combined this PR with every other Workshop SEO slice and has been merged to main. Closing this one. |
…ion (Comfy-Org#21047) <!-- ccr-slack-attribution --> _Requested by **Alexander Brown** · [Slack thread](https://comfy-organization.slack.com/archives/C0B61J7QCJW/p1792015617100449)_ ## Summary `models-render-guard.spec.ts` timed the `/hub/models/` loader from navigation start, so its 1 s grace also had to cover booting the site's JavaScript on the runner. That boot alone takes most of the budget on CI, so the catalogue cases fail on timing, not on the loader lingering. This PR counts the grace from the moment the page's island hydrates. That is when the component takes over the screen, and when the post-mount `models-loading` loader the guard was written for starts. **Before:** `loaderLastSeenAt` was `performance.now()` at the last frame a loader was visible, compared with 1000 ms. The catalogue renders `WorkshopLoading` on the server (the island is not mounted yet), so that number covers the whole HTML, JS, hydration and `catalogue.json` chain. When Comfy-Org#19394 added the guard, the worst local run was 774 ms, and its review focus already flagged the 1 s budget as the risk. On CI the catalogue cases now land at 1.07 to 1.22 s: - main push run 38649631281 (shard 3, job 116145534816): 393px flag on was flaky (passed on retry). - merge-queue run 38650370738 (shard 3, attempt 1): 393px and 1280px flag on failed all three tries, 1280px flag off was flaky. - merge-queue run 38652042112 (shard 3, job 116153522370): 393px flag on failed at 1139, 1224 and 1068 ms, and 1280px flag on was flaky. None of these come from a change to the catalogue: the same tree passed on rerun. In a local trace about 660 to 940 ms of the 1.0 to 1.3 s went to booting and hydrating the page. `ModelsCatalogue` and `/models/catalogue.json` are only requested once the island mounts. **After:** the init script records when each `<astro-island>` hydrates. Astro dispatches a non-bubbling `astro:hydrate` on it, so the script listens in the capture phase. `waitUntilSettled` reads that time for the island holding the page content and waits a full grace window after it. The assertion becomes "ms after the page island hydrated that the loader was last visible", still under 1000 ms. The CLS budget, the pages, the flag matrix and the readiness waits are unchanged. A loader the server renders into a model page is still caught by the existing JavaScript-off cases, which assert `workshop-loading` is hidden. ## Verification - Local run against a `build:e2e` of current `main` with a local Chromium, launched through `executablePath` from a scratch config that is not committed. - Before, `--repeat-each 5 --workers 2` on the catalogue cases: 16 of 20 failed, at 1044 to 1323 ms. - After, the whole spec with `--repeat-each 10 --workers 3`: 200 of 200 passed. The loader was last visible at most 456 ms after hydration. Under the old metric, 14 of those 40 catalogue runs would have failed, peaking at 1466 ms. - The guard still catches a loader that lingers. Delaying `/models/catalogue.json` by 1.5 s with `context.route` failed all four catalogue cases, with the loader last visible about 1.5 s after hydration. - The pre-commit hooks (oxfmt, oxlint, eslint, server-facts, website typecheck) and the pre-push hooks passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018GfgJuhjWFFm4LbKojTDxV Co-authored-by: Claude <noreply@anthropic.com>
Summary
Adds an e2e guard that model pages and the /models/ catalogue don't leave a loader on screen and don't jump around (CLS < 0.1), with the workshop flag on and off.
Fixes FE-2985 (https://linear.app/comfyorg/issue/FE-2985/automated-guard-models-pages-show-real-content-not-a-spinner-and-dont)
Stacked on #18899.
Changes
e2e/models-render-guard.spec.ts. Pages: the shared FLUX 2 Max page, the first video generation model in the published catalogue, the first catalogue model whose examples have empty values (today Bria Eraser, which has samples but no example values), and /models/.VIEWPORTS, flag on and off: neitherworkshop-loadingnor the post-mountmodels-loadingis visible after 1 s, and CLS stays under 0.1. CLS comes from alayout-shiftPerformanceObserver (same asmcp.spec.ts), read after the island hydrates and the Run area leavesresolving. No sleeps, no new dependency.test.fail()until feat(website): render the models catalogue heading and A to Z links as static HTML #18898, because the noscriptModelsShowcaserenders there today.workshop-visibility.spec.tsandworkshop-loading-flash.spec.ts.e2e/fixtures/workshopFlags.tswithstubWorkshopFlags(context, flags), now used byfixtures/modelsAccount.ts,workshop-loading-flash.spec.ts,workshop-visibility.spec.tsand this spec.Changed from the ticket:
test.fail().Review focus
/models/catalogue.jsonplusworkshop-display.jsonrather than fixed slugs