Repository navigation
fix(website): send /models to /models/ permanently - #18484
benjcooley wants to merge 1 commit into
Conversation
The catalogue answered 200 at both /models and /models/, and organic search split across them while only the slash form ranked. Every page canonicalizes with the slash, so Vercel now sends the bare path there with a 301, in both locales. The llms.txt stale-link check treated every redirect source as a retired page; a redirect that only adds the slash keeps its page, so it is left out of that set. Refs FE-2770
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
🧩 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 🌐 Website E2ETip All tests passed.
🌾 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 2d91d541ae686105ac4cb1cc8395bcb0084bdc62
Full docs: ADR-DEVEX-LINT-0015 🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-18484.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-3i1mt034n-comfyui.vercel.app Last updated: 2026-09-23T00:06:33Z for |
|
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 configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe website adds permanent redirects from model routes without trailing slashes to trailing-slash routes. Redirect parsing excludes these slash-only redirects from stale-source checks. Tests verify both behaviors. ChangesModels trailing-slash routing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change safely canonicalizes model URLs and prevents harmless trailing-slash redirects from producing stale-link reports. 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18484 +/- ##
==========================================
+ Coverage 83.35% 83.37% +0.01%
==========================================
Files 2987 2956 -31
Lines 147788 147156 -632
Branches 38162 38009 -153
==========================================
- Hits 123190 122684 -506
+ Misses 23317 23227 -90
+ Partials 1281 1245 -36
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| { | ||
| "source": "/models", | ||
| "destination": "/models/", | ||
| "permanent": true | ||
| }, |
There was a problem hiding this comment.
suggestion (non-blocking): with #18480 in, the 148 model pages carry 887 links to bare /models or /models?…, all built from workshop: '/models' in config/routes.ts:52: the "Back to all models" link, "Browse all models", and every tag and use-case filter link (/models?q=flux, /models?useCase=generate-images). After this lands, each one is a redirect hop on pages we're asking Google to crawl. Could that constant become '/models/' in this PR, so the redirect only ever catches outside links?
|
Checked on this PR's Vercel preview and against Vercel's own route compiler (@vercel/routing-utils 6.6.0). /models and /zh-CN/models redirect to the slash form in one hop, the query string survives (/models?utm_source=x lands on /models/?utm_source=x), and /models/ itself isn't matched because the source compiles to ^/models$, so there's no loop. Removing the two entries turns 2 tests red and turning one into a loop turns 1 red.
One correction for the description and the post-deploy check: Vercel answers permanent: true with 308, not 301, so |
Summary
/modelsand/models/both answered 200 and search traffic split between them (Hex: 134 organic sessions on/models/, zero on/models); Vercel now 301s the bare path to the canonical slash form in both locales.Changes
vercel.json: two permanent redirects,/models→/models/and/zh-CN/models→/zh-CN/models/. Literal sources, same pattern as the MiniMax and Enterprise entries.src/config/redirects.test.ts: pins both redirects and that the slash forms stay unredirected.src/config/llms-txt.test.ts: the stale-link check built its set from every redirect source, andnormalizePathcollapses/modelsand/models/, so llms.txt's/models/link would have read as stale. A redirect whose destination is its own source plus a slash keeps its page; those are left out of the set.Review Focus
/pricing,/cli, …) with canonicals on the slash form; a site-widetrailingSlash: trueis the principled fix but interacts with the existing hand-doubled/api+/api/style entries and Cloudflare in front, so it deserves its own change and its own revert switch. This PR fixes the one split we have data for./models/<slug>/with the slash already.Refs FE-2770 (https://linear.app/comfyorg/issue/FE-2770)
Screenshots (if applicable)
Not applicable — a redirect. Verification after deploy:
curl -sI https://comfy.org/models→301withlocation: https://comfy.org/models/.