Skip to content

fix(seo): social images, canonicals, titles, intros, structured data and sitemap / SEO:社交图片、canonical、标题、简介、结构化数据与 sitemap - #1548

Merged
adibarra merged 11 commits into
masterfrom
fix/seo-metadata
Oct 29, 2026
Merged

adibarra merged 11 commits into
masterfrom
fix/seo-metadata

Conversation

@adibarra

@adibarra adibarra commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part 4 of the stack split from #1530. Review and merge in order. CI only runs on PRs that target master, so each layer was verified locally; the combined change passed full CI on #1530.

Stack (merge in order):

  1. fix(next): stop the image optimizer hanging after a cancelled request / 修复请求取消后图片优化器卡住的问题 #1545 Next image optimizer patch
  2. feat(api): negotiate compression, add ETag/304 and stale-while-revalidate purges / API 协商压缩,支持 ETag/304 与 stale-while-revalidate 失效 #1546 API response caching
  3. fix(dashboard): load benchmarks in parallel with availability / dashboard 的 benchmarks 与 availability 并行加载 #1547 Dashboard data waterfall
  4. fix(seo): social images, canonicals, titles, intros, structured data and sitemap / SEO:社交图片、canonical、标题、简介、结构化数据与 sitemap #1548 SEO metadata ← this PR
  5. feat(seo): render compare, run, rankings, overview and blog index with ISR / compare、run、rankings、overview 与博客索引改用 ISR #1549 ISR for programmatic pages
  6. fix(perf): cut client bundle, image and prefetch weight / 减少客户端代码、图片与预取体积 #1550 Client bundle, image and prefetch weight
  7. fix(ux): remove layout shifts and explain blocked legend toggles / 消除布局偏移并说明被禁用的图例切换 #1551 Layout shift and UX
  8. fix(analytics): correct pageviews, proxy PostHog and stop sending search text / 统计:修正 pageview、代理 PostHog 并不再发送搜索文本 #1552 Analytics pageviews and privacy
  9. feat(analytics): cover untracked interactions, add event context and standardize keys / 统计:覆盖未追踪的交互,补充事件上下文并统一键名 #1555 Analytics coverage

About a third of sitemap URLs had no og:image. /inference canonicalized to / and was missing from the sitemap. English dashboards had no h1, titles and descriptions ran long, and Dataset rich results were invalid.

  • Social metadata. A shared socialMetadata helper gives every page outside compare, run, rankings, overview and the blog index (EN and ZH) an og:image and a summary_large_image card.
  • Canonicals. /inference is self-canonical and in the sitemap. The root-layout canonical is removed.
  • Titles and descriptions. The title template is now %s | InferenceX. Titles are capped at 47 characters before the suffix, descriptions at 155 (EN) and 120 (ZH). A test enforces the description budget on every static page, which led to hand-shortened copy on about a dozen EN and ZH pages (about, overview, rankings, model index, compare indexes, chips, quotes and others); worth a copy review. Chips descriptions lead with specs and price; glossary titles are "What Is X?"; chip versus titles fall back to shorter forms for long SKUs.
  • Headings. Dashboard tabs get a server-rendered TabIntro h1 and intro, matching ZH. /inference/[model] and /zh/inference/[model] both use a model-specific h1 and intro. Landing, about and quotes lead with an h1.
  • Structured data. Dataset JSON-LD includes description, license and creator.
  • Sitemap. Adds the explorer sections, uses real data dates for lastmod, and revalidates hourly.
  • Routing. Unknown /agentx/<slug> URLs return 404. Model aliases redirect permanently. next.config adds 308s for dead URLs (EN and /zh) and Content-Language for /zh.

Compare, run and rankings metadata is in the next PR. Until then those pages still include the supporters line that docs/i18n.md describes as removed.

Validation details

Targeted Cypress (Chrome): navigation 31/31, zh-pages 24/24. Lint, format, typecheck and the full unit suite pass on this layer.

AI model disclosure
  • Model/version: anthropic/claude-opus-5-5 (runtime-exposed identifier for the coordinating agent).
  • Role: audited the site, planned and integrated the change set, split it into this stack, and wrote commit and PR text.
  • Delegated agents (scout, worker and critic subagents) implemented slices, built the stack and ran verification under the same harness. Their exact model identifier was not exposed to the coordinating agent, so it could not be verified.
PR checklist
  • I have completed the AI model disclosure and kept it current
  • Added, changed, or removed filters, views, or pages include the matching API and inferencex-skills changes (no filters or views change)
  • New or changed indexable pages ship their /zh sibling
  • Changed Chinese copy follows the PR review checklist in docs/chinese-copy.md (Chinese maintainer review pending)
中文

本 PR 为从 #1530 拆分的 stack 中的第 4 部分,请按顺序审核与合并。CI 只在以 master 为目标的 PR 上运行,因此每一层都在本地验证;整体改动已在 #1530 上通过完整 CI。

约三分之一的 sitemap URL 没有 og:image;/inference 的 canonical 指向 / 且不在 sitemap 中;英文 dashboard 没有 h1;标题与描述过长;Dataset 富结果无效。

  • 社交元数据。 新增共享 socialMetadata,除 compare、run、rankings、overview 与博客索引外的所有中英文页面都输出 og:image 与 summary_large_image 卡片。
  • canonical。 /inference 改为自引用并加入 sitemap,移除根布局 canonical。
  • 标题与描述。 标题模板改为 %s | InferenceX;标题(后缀前)不超过 47 字符,描述英文不超过 155、中文不超过 120 字符。新增测试对所有静态页的描述长度进行约束,因此手动缩短了十余个中英文页面的文案(about、overview、rankings、模型索引、各 compare 索引、chips、quotes 等),建议审阅。芯片页描述优先给出规格与价格;术语页标题改为 “What Is X?”;SKU 名称较长时,芯片对比页标题会退回更短的形式。
  • 标题层级。 dashboard 标签页加入服务端渲染的 TabIntro h1 与简介,与中文页一致;/inference/[model] 与 /zh/inference/[model] 均使用包含模型名的 h1 与简介;首页、about、quotes 以 h1 开头。
  • 结构化数据。 Dataset JSON-LD 补齐 description、license、creator。
  • sitemap。 加入 explorer 分区,lastmod 使用真实数据日期,并每小时重新生成。
  • 路由。 未知的 /agentx/<slug> 返回 404;模型别名永久跳转;next.config 为失效 URL 增加 308,并为 /zh 返回 Content-Language。

compare、run、rankings 的元数据在下一个 PR 中处理;在此之前,这些页面的描述仍包含 docs/i18n.md 中已说明移除的支持者说明。

验证:定向 Cypress(Chrome):navigation 31/31、zh-pages 24/24。本层的 lint、格式、类型检查与完整单元测试均通过。

AI 模型使用说明:协调 agent 使用 anthropic/claude-opus-5-5(运行环境提供的标识),负责审计、规划与整合改动、拆分 stack 以及撰写提交与 PR 文本;委派的子 agent 在同一环境中实现各部分、构建 stack 并运行验证,其确切模型标识无法获取,因此无法确认。


Note

Medium Risk
Wide metadata, canonical, redirect, and sitemap changes affect how search engines and social crawlers interpret most URLs; mistakes could alter indexing or sharing previews site-wide.

Overview
This PR is a broad SEO and crawlability pass across English and Chinese routes.

Social and canonicals. Most pages now spread a shared socialMetadata() helper so custom titles/descriptions still get og:image, locale, and summary_large_image. /inference is self-canonical and listed separately from / in the sitemap; the root layout drops its site-wide canonical. The default title template becomes %s | InferenceX (without the author suffix).

On-page SEO. English dashboards gain server-rendered TabIntro blocks (TAB_INTRO + optional model-specific copy), aligned with existing ZhTabIntro. Per-model inference pages render model-specific h1/intro; landing AgentX hero, about, and quotes promote key headings to h1. Titles and descriptions are tightened via fitMetaTitle() / clampMetaDescription() (including new chip-meta helpers); many static pages get shorter meta copy, and compare index pages use shorter snippets while keeping longer text in JSON-LD.

Structured data, sitemap, routing. Compare Dataset JSON-LD nodes pick up description, license, and creator. The sitemap adds agentic-workload-explorer sections, derives lastmod from benchmark/content dates, and revalidates hourly. next.config adds locale-aware 308 redirects, Content-Language headers for EN/zh, and tests for those routes. Unknown /agentx/[slug] pages 404 via lookupDatasetPage; model alias routes use permanent redirects.

Reviewed by Cursor Bugbot for commit 0816077. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Oct 29, 2026 4:46am UTC

Request Review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/app/src/app/zh/chips/page.tsx Resolved
Comment thread packages/app/src/app/zh/quotes/page.tsx Resolved
Comment thread packages/app/next.config.ts Resolved
Patch [email protected] through root patchedDependencies. Unpatched, the
self-hosted optimizer reads a local source image through a mocked request
that reuses the browser socket. When the browser cancels the image, the
read is dropped and every later request for that variant hangs until the
server restarts. A unit test fails if a Next upgrade loses the patch, and
the unit and E2E workflows now run when patches/ changes.

中文:通过根目录 patchedDependencies 为 [email protected] 打补丁。未打补丁时,
自托管图片优化器复用浏览器 socket 读取本地源图,浏览器取消请求后读取被丢弃,
同一尺寸的后续请求会一直挂起,直到服务重启。新增单元测试在升级 Next 丢失补丁
时失败,patches/ 变更也会触发单元测试与 E2E 工作流。
…mediately

cachedJson now takes the request. It answers with brotli, gzip or plain
JSON per Accept-Encoding, always sends Vary and a strong ETag, and returns
304 for a matching If-None-Match. Browsers reuse a response for 60 s.
Route data, ISR page data (db-page) and CDN responses (db-cdn) carry
separate tags, so an ingest expires route data at once and lets pages and
the CDN refresh in the background. purgeAll, purgeCollectiveX and
purgeOperatorX accept immediate, exposed through /api/v1/invalidate and the
admin scripts. Fixture builds send no-store. The ingest and deploy
workflows warm the dashboard APIs with a browser Accept-Encoding. The
datasets route shares a per-slug cache helper. Docs, API reference text
and catalog digests follow.

中文:cachedJson 改为接收请求对象,按 Accept-Encoding 返回 brotli、gzip 或
未压缩 JSON,并始终携带 Vary 与强 ETag,命中 If-None-Match 时返回 304;浏览器
复用响应 60 秒。路由数据、ISR 页面数据(db-page)与 CDN 响应(db-cdn)使用
独立标签,ingest 后路由数据立即失效,页面与 CDN 在后台刷新。purgeAll、
purgeCollectiveX、purgeOperatorX 支持 immediate,并通过 /api/v1/invalidate
与管理脚本提供。fixture 构建返回 no-store。ingest 与部署工作流以浏览器的
Accept-Encoding 预热仪表板 API。datasets 路由改用按 slug 共享的缓存。同步更新
文档、API 参考文案与路由目录摘要。
…ility

The latest benchmarks request depends only on the model, so useChartData
starts it alongside /api/v1/availability through a second observer on the
same query key. Bulk id lookups split at each route's id limit, skip ids a
fresh lookup already covered, and track freshness per id. Placeholder rows
never cross a query scope. InferenceContext keeps the URL's label
overrides until the sequence resolves. The coach-mark E2E waits for the
overlay chart to settle before pinning a point.

中文:最新 benchmark 请求只依赖模型,useChartData 现通过同一 query key 的
第二个观察者,与 /api/v1/availability 并行发起。批量 ID 查询按各路由上限分片,
跳过已有新鲜结果的 ID,并按 ID 记录新鲜度。占位数据不再跨查询范围复用。
InferenceContext 在序列确定前保留 URL 中的标签设置。coach-mark E2E 等待叠加
图表稳定后再固定数据点。
… resolves

The latest-rows prefetch fills the same query key that the sequence-gated
observer reads, and a disabled React Query observer still returns cached
data. Once the prefetch landed, useChartData filtered those rows by the
provisional 8k/1k default and painted it, then swapped to the resolved
sequence (often AgenticTraces). While prefetching, the hook now ignores
that key's rows and stays loading. The network request still runs in
parallel with availability, and the resolved query reads the cache
without a second fetch.

中文:最新数据预取会写入与按序列门控的查询相同的 query key,而被禁用的
React Query 观察者仍会返回缓存数据。预取完成后,useChartData 会按临时的
8k/1k 默认序列过滤并绘制这些数据,随后再切换到实际序列(通常是
AgenticTraces)。现在预取期间,该 hook 不使用此 key 的数据并保持加载状态。
网络请求仍与 availability 并行发起,序列确定后直接读取缓存,不会再次请求。
Add lib/seo helpers. socialMetadata keeps og:image, og:locale and the large
Twitter card on pages that set their own title. fitMetaTitle and
clampMetaDescription hold titles and descriptions to search limits.
chipMeta, datasetJsonLd and sitemap lastmod helpers are new too. Every
non-compare page and its /zh sibling uses them. Dashboard tabs render a
TabIntro h1, and the landing, about and quotes pages lead with an h1. The
root layout drops its site-wide canonical and the author suffix in the
title template, and /inference becomes self-canonical. Compare Dataset
JSON-LD nodes carry description, license and creator. The sitemap reports
real data dates instead of the build time. Model aliases redirect
permanently, and next.config adds one-hop SEO redirects and a
Content-Language header.

中文:新增 lib/seo 工具。socialMetadata 让自定义标题的页面保留 og:image、
og:locale 与大图 Twitter 卡片,fitMetaTitle 与 clampMetaDescription 将标题和
描述控制在搜索引擎长度内,另有 chipMeta、datasetJsonLd 与 sitemap lastmod
工具。所有非 compare 页面及其 /zh 版本改用这些工具。仪表板标签页渲染 TabIntro
h1,首页、about 与 quotes 页面以 h1 开头。根布局移除全站 canonical 与标题模板
中的作者后缀,/inference 改为自引用 canonical。compare 的 Dataset JSON-LD 节点
补充 description、license 与 creator。sitemap 使用真实数据日期而非构建时间。
模型别名改为永久重定向,next.config 新增一跳 SEO 重定向与 Content-Language 头。
The Chinese per-model inference page rendered the generic ZhTabIntro copy,
so every /zh/inference/<slug> shared one h1. Add an intro to
inferenceModelMeta/inferenceModelMetaZh and pass title + intro to the
intro card on both the EN and ZH pages. Other ZH per-model pages
(historical, calculator, profit-estimator*) already use MODEL_TAB_META_ZH.

中文:/zh/inference/[model] 页面此前沿用通用的中文简介,各模型页的 h1 完全相同。现为中英文模型元数据补充按模型生成的简介,并在中英文页面中传入模型专属标题与简介。其余中文按模型页面(历史趋势、计算器、利润估算器)已使用 MODEL_TAB_META_ZH,无需改动。
The qwen/minimax ranking slugs, the renamed MiniMax M3 blog post and /media
only had English 308s, so the /zh copies of those URLs returned 404. They now
use LOCALE_PREFIXES like the neighbouring SEO redirects, with tests for the /zh hops.

中文:已失效的排行榜 slug、更名的 MiniMax M3 博客与 /media 原先只有英文 308 跳转,导致对应 /zh 路径返回 404。现与相邻 SEO 跳转一样使用 LOCALE_PREFIXES,并为 /zh 跳转补充测试。
Versus titles like "A vs B: Specs, Price & Power" overflowed META_TITLE_MAX
for long chip names. chipMetaTitle/chipVsMetaTitle now pick the longest
descriptor that fits via fitMetaTitle (EN and ZH), and a test checks every
chip and versus title in both locales.

中文:芯片名称较长时,对比页标题会超出 META_TITLE_MAX。现通过 fitMetaTitle 依次尝试从长到短的中英文标题,并新增测试确保所有芯片页与对比页标题均不超限。
/zh/chips and /zh/quotes (and several other index pages) had descriptions over
META_DESCRIPTION_MAX. Rewrite them to fit, give compare index pages a short
search snippet while JSON-LD keeps the full text, and add a test that loads
every static page metadata and checks its locale budget (EN 155, ZH 120).

中文:/zh/chips、/zh/quotes 等多个索引页的描述超出 META_DESCRIPTION_MAX。现已改写以符合长度限制,对比索引页使用简短摘要(JSON-LD 保留完整描述),并新增测试检查所有静态页面描述是否符合各语言上限(英文 155,中文 120)。
@adibarra
adibarra force-pushed the fix/dashboard-data-waterfall branch from 9869176 to 0a00217 Compare October 29, 2026 02:06
Base automatically changed from fix/dashboard-data-waterfall to master October 29, 2026 04:31
中文:将 master 合并到 fix/seo-metadata
@blacksmith-sh

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b201d66. Configure here.

inferenceModelMetaZh now falls back to the short model name when the detailed description exceeds the zh budget, like the English builder.

中文:中文模型描述限制在 120 字符以内。详细描述超出中文长度上限时,inferenceModelMetaZh 改用简短模型名,与英文一致。
@adibarra
adibarra merged commit 763a077 into master Oct 29, 2026
33 checks passed
@adibarra
adibarra deleted the fix/seo-metadata branch October 29, 2026 04:50

This branch was successfully deployed

1 active deployment
Preview — 08160775 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant