Skip to content

feat(seo): render compare, run, rankings, overview and blog index with ISR / compare、run、rankings、overview 与博客索引改用 ISR - #1549

Merged
adibarra merged 6 commits into
masterfrom
feat/isr-programmatic-pages
Oct 29, 2026
Merged

adibarra merged 6 commits into
masterfrom
feat/isr-programmatic-pages

Conversation

@adibarra

@adibarra adibarra commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part 5 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
  5. feat(seo): render compare, run, rankings, overview and blog index with ISR / compare、run、rankings、overview 与博客索引改用 ISR #1549 ISR for programmatic pages ← this PR
  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

These pages were force-dynamic or read searchParams on the server, so every request was an uncached DB render. Real-user p75 TTFB on compare routes was 2–7 s. Compare HTML reached 1.45 MB, with metadata about 1 MB into the body.

  • ISR. Compare (all four families, including [scenario]), run and rankings pages (EN and ZH) use revalidate = 3600 and generateStaticParams returning [], so nothing is prebuilt. Overview and the blog index are prerendered. URL state is applied on the client: overview loads shared controls from /api/v1/overview, and the blog tag filter runs in the browser.
  • Smaller compare pages. They embed only the default sequence's rows (about 245 KB HTML). Other sequences fetch full-model benchmarks through resolveBenchmarkSeed. The interpolated table uses the server-rendered cells only while the controls show the server's sequence; for a shared i_seq it shows its own loading, error or empty state until that sequence's rows arrive.
  • Canonical links. Hub links point at canonical pair URLs. The proxy 308s non-canonical compare slugs and keeps the query.
  • Metadata. Compare, run and rankings titles fit 47 characters, descriptions fit 155 (EN) / 120 (ZH), and the supporters line is gone. Run and rankings get og:image.
Validation details

Targeted Cypress (Chrome): compare-scenario-routes 8/8, compare-precision 5/5, overview 35/35, overview-a11y 6/6, zh-pages 24/24, blog 17/17. On a Vercel preview of the combined change, compare and run pages returned MISS then HIT, with the canonical inside <head>. 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 中的第 5 部分,请按顺序审核与合并。CI 只在以 master 为目标的 PR 上运行,因此每一层都在本地验证;整体改动已在 #1530 上通过完整 CI。

这些页面此前为 force-dynamic 或在服务端读取 searchParams,每次请求都会绕过缓存查询数据库;compare 路由真实用户 p75 TTFB 为 2–7 秒,HTML 最大 1.45 MB,元数据位于正文约 1 MB 处。

  • ISR。 compare(四类页面及 [scenario])、run、rankings 的中英文页面使用 revalidate = 3600,generateStaticParams 返回 [],构建时不预渲染;overview 与博客索引改为预渲染。URL 状态在客户端应用:overview 从 /api/v1/overview 加载分享的控件状态,博客标签筛选在浏览器中进行。
  • 更小的对比页。 只内嵌默认序列的数据行(HTML 约 245 KB),其他序列通过 resolveBenchmarkSeed 拉取完整模型数据。插值表格仅在控件显示的序列与服务端一致时使用服务端渲染的数据;通过分享链接指定 i_seq 时,表格在该序列数据到达前显示自己的加载、错误或空状态。
  • canonical 链接。 入口链接指向 canonical 对比 URL;proxy 以 308 跳转非 canonical 的 slug 并保留查询参数。
  • 元数据。 compare、run、rankings 标题不超过 47 字符,描述英文不超过 155、中文不超过 120 字符,并移除支持者说明;run 与 rankings 增加 og:image。

验证:定向 Cypress(Chrome):compare-scenario-routes 8/8、compare-precision 5/5、overview 35/35、overview-a11y 6/6、zh-pages 24/24、blog 17/17。在整体改动的 Vercel preview 上,compare 与 run 页首次为 MISS、再次为 HIT,canonical 位于 <head> 内。本层的 lint、格式、类型检查与完整单元测试均通过。

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


Note

Medium Risk
ISR plus client-hydrated URL state can serve stale HTML until revalidation, and compare tables depend on correct SSR/client sequence matching to avoid misleading numbers.

Overview
Programmatic pages move from force-dynamic to ISR (revalidate = 3600, empty generateStaticParams) for compare (all four families plus [scenario]), run, and rankings in EN and ZH. Overview and the blog index are prerendered with default content; shared query state is applied after mount (overview via /api/v1/overview, blog ?tag= via a client Suspense leaf in blog-index-posts.tsx).

Compare detail pages shrink and stop server-reading filter query params. Server data is keyed to the route’s default or [scenario] sequence only; i_seq / i_prec / g_model no longer change the RSC payload. Partial benchmark rows seed the chart through resolveBenchmarkSeed() and CompareTableRenderer now drops SSR table cells when the user’s sequence (or fetch) doesn’t match—showing loading, error, or empty states instead of stale cells. Index cards link to canonical pair URLs (no /agentic segment); scenario URLs remain for deep links.

SEO metadata is centralized with socialMetadata(), length helpers, and removal of the supporters line from descriptions; run/rankings/compare variants use shared meta builders. Docs and Cypress tests follow the new routing, ISR, overview a11y settle behavior, and shared-sequence table cases.

Reviewed by Cursor Bugbot for commit 8975ad2. 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 6:16am 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.

@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.

@adibarra
adibarra changed the base branch from fix/seo-metadata to master October 29, 2026 04:50
An error occurred while trying to automatically change base from fix/seo-metadata to master October 29, 2026 04:50
Compare pages (all four families, their scenario children and /zh
mirrors), /run and /rankings detail pages revalidate hourly and render on
first request instead of reading searchParams on the server. A shared
compare link with a non-canonical slug is redirected by the proxy with
its query intact. Compare pages embed only the default sequence's rows,
and InferenceContext uses that seed through resolveBenchmarkSeed only
while the selection matches it. compare-meta builders and the live-seo
titles keep titles and descriptions within search limits, without the
supporters line. Overview and the blog index are prerendered, and the
overview provider and the blog tag filter read the URL in the browser.

中文:compare 页面(四类页面、其 scenario 子页面与 /zh 镜像)以及 /run、
/rankings 详情页改为每小时重新验证的 ISR,首次请求时渲染,服务端不再读取
searchParams。slug 不规范的 compare 分享链接由 proxy 重定向并保留查询参数。
compare 页面只内嵌默认序列的数据行,InferenceContext 通过
resolveBenchmarkSeed 仅在选择与之匹配时使用这些数据。compare-meta 与
live-seo 生成的标题和描述控制在搜索长度内,并去掉支持者说明。overview 与博客
索引改为预渲染,overview 状态与博客标签筛选在浏览器端读取 URL。
…quence

Compare pages no longer read i_seq on the server, so the prerendered
table always describes the path's default sequence. The client still
showed those cells, and the default sequence's empty state, whenever its
own rows were empty, so after a shared i_seq was applied the controls
could name one sequence while the table showed another, including when
the fetch failed or returned no rows for the pair. The table now uses
server cells and the server empty state only while the controls show the
server sequence. For any other sequence it shows a loading, error or
empty state for that sequence, or builds columns from the client rows
with the same target rule as the server, now shared by all four compare
families.

中文:对比页面不再在服务端读取 i_seq,因此预渲染的表格始终对应路径的默认
序列。此前客户端数据为空时仍会显示这些单元格和默认序列的空状态,导致应用
共享链接中的 i_seq 后,控件显示一个序列而表格显示另一个序列,请求失败或该
组合没有数据时也是如此。现在只有控件选中服务端序列时,表格才使用服务端单元格
和服务端空状态;选中其他序列时,显示该序列的加载、错误或空状态,或按与服务端
相同的目标值规则用客户端数据生成表格列。四类对比页面共用这套逻辑。
The prerendered overview loads a shared URL's controls on mount through
commit, which recorded a $pageview once the data arrived. The landing had
already recorded its own pageview, so shared-URL visits counted twice.
The mount-time load now skips the pageview; control changes and
back/forward navigation still record one.

中文:预渲染的 overview 页面在挂载时通过 commit 加载共享链接中的控件设置,
数据返回后会记录一次 $pageview。由于落地时已记录过 pageview,共享链接的访问
会被计算两次。现在挂载时的加载不再记录 pageview;控件切换和前进/后退导航仍会
记录。
…d precisions

resolveCompareTableView reused the server-rendered cells whenever the
selected sequence matched the server sequence. A shared g_model or i_prec
URL, or an in-page model or precision change, kept the default
interpolated rows on screen even though they no longer described the
selection. The gate now also requires the selected model, the
precisions (selected before availability resolves, effective after), and
the latest run to match what the server read. Otherwise the table shows
the client's loading, error, empty, or computed state, keyed by model,
sequence, and precisions. The four compare page clients pass the server
model and precisions through.

中文:resolveCompareTableView 之前只要所选序列与服务端序列一致就复用服务端渲染的单元格。通过分享的 g_model 或 i_prec 链接,或在页面内切换模型、精度后,表格仍显示默认插值行,而这些数据已与当前选择不符。现在只有当模型、精度(可用性解析前取所选值,解析后取实际生效值)以及最新运行日期都与服务端一致时才复用服务端单元格,否则显示客户端的加载、错误、空状态或客户端计算的表格。四个对比页面客户端组件均传入服务端使用的模型和精度。
…on changes

Spec-decode tables are pinned to the page precision, so control precision changes that keep it selected no longer drop the server-rendered cells.

中文:投机解码对比页在仅影响图表的精度变化时保留服务端表格。该表格固定使用页面精度,只要该精度仍被选中,控件中的精度变化不再丢弃服务端渲染的数据。

@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 656e7a1. Configure here.

@blacksmith-sh

This comment has been minimized.

…'s range

The interactivity range for the pinned spec-decode table now comes from the pinned-precision points instead of every chart precision.

中文:投机解码对比表的目标范围改用固定精度的数据。固定精度表格的交互性范围改为由该精度的数据点计算,而不是所有图表精度。
@adibarra
adibarra merged commit bc6f375 into master Oct 29, 2026
33 checks passed
@adibarra
adibarra deleted the feat/isr-programmatic-pages branch October 29, 2026 06:18

This branch was successfully deployed

1 active deployment
Preview — 8975ad27 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