Repository navigation
fix(dashboard): load benchmarks in parallel with availability / dashboard 的 benchmarks 与 availability 并行加载 - #1547
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6792abe. Configure here.
This was referenced Oct 28, 2026
Merged
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 并行发起,序列确定后直接读取缓存,不会再次请求。
adibarra
force-pushed
the
feat/api-response-caching
branch
from
October 29, 2026 02:06
e645ff3 to
3a1c60d
Compare
adibarra
force-pushed
the
fix/dashboard-data-waterfall
branch
from
October 29, 2026 02:06
9869176 to
0a00217
Compare
中文:将 master 合并到 fix/dashboard-data-waterfall
中文:针对 master 重新运行 CI
This comment has been minimized.
This comment has been minimized.
中文:针对 master 重新运行 CI
This comment has been minimized.
This comment has been minimized.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Part 3 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):
The dashboard fetched availability, then benchmarks, then several id lookups, in sequence. On throttled mobile the first chart appeared after about 11 s.
/api/v1/availability(prefetchLatestRowsinuseChartData). The chart keeps its loading state until the sequence resolves, then draws from the cache with no second request, so the default 8K/1K sequence never flashes first.log-availability400 on models with more than 500 ids. They reuse ids already fetched within the stale window, and freshness is tracked per id.InferenceContextkeeps the URL'si_label/i_advlabeloverrides until the sequence resolves, fixing a race that dropped them from shared links.Validation details
Targeted Cypress (Chrome): agentic-point-coach-mark 3/3, inference-chart 39/39, landing-dashboard-navigation 23/23, ttft-x-axis-toggle 21/21. Lint, format, typecheck and the full unit suite pass on this layer.
AI model disclosure
anthropic/claude-opus-5-5(runtime-exposed identifier for the coordinating agent).PR checklist
inferencex-skillschanges (no filters or views change)/zhsiblingdocs/chinese-copy.md(Chinese maintainer review pending)中文
本 PR 为从 #1530 拆分的 stack 中的第 3 部分,请按顺序审核与合并。CI 只在以
master为目标的 PR 上运行,因此每一层都在本地验证;整体改动已在 #1530 上通过完整 CI。dashboard 此前按顺序请求 availability、benchmarks 以及多个 id 查询,在限速移动网络下首个图表约 11 秒后才出现。
/api/v1/availability并行加载(useChartData中的prefetchLatestRows)。图表在序列确定前保持加载状态,确定后直接从缓存绘制、无需再次请求,因此不会先闪现默认的 8K/1K 序列。log-availability返回 400 的问题;复用有效期内已获取的 id,并按 id 记录新鲜度。InferenceContext在序列确定前保留 URL 中的i_label/i_advlabel,修复分享链接丢失这两个参数的竞争问题。验证:定向 Cypress(Chrome):agentic-point-coach-mark 3/3、inference-chart 39/39、landing-dashboard-navigation 23/23、ttft-x-axis-toggle 21/21。本层的 lint、格式、类型检查与完整单元测试均通过。
AI 模型使用说明:协调 agent 使用
anthropic/claude-opus-5-5(运行环境提供的标识),负责审计、规划与整合改动、拆分 stack 以及撰写提交与 PR 文本;委派的子 agent 在同一环境中实现各部分、构建 stack 并运行验证,其确切模型标识无法获取,因此无法确认。Note
Medium Risk
Touches core chart data fetching, React Query caching, and URL sync on the inference dashboard; behavior changes are intentional but affect first paint and bulk API traffic patterns.
Overview
Removes the availability → benchmarks waterfall on the inference dashboard by prefetching latest benchmark rows in parallel with availability (
prefetchLatestRowsinuseChartData). While the sequence is still provisional, the chart stays loading instead of painting rows for the default 8K/1K slice, then uses the warmed cache once the sequence resolves—avoiding a second fetch and a flash of the wrong sequence.Bulk
?ids=lookups are centralized inbenchmark-id-query: requests are chunked to each route’s limit (fixing large-modellog-availability400s), query keys are canonical, and only missing or stale ids are refetched with per-id freshness so filter churn doesn’t repeat work. Derived agentic metrics drop their local chunk helper in favor of this path.Placeholder benchmark data no longer crosses query scope, so compare/seed keys can’t briefly render an empty chart.
InferenceContextkeeps raw URL label params until the sequence resolves, and the agentic coach-mark Cypress test waits for overlay legend + settled chart width before pinning tooltips.Reviewed by Cursor Bugbot for commit 0160146. Bugbot is set up for automated code reviews on this repo. Configure here.