feat(overview): add 30-day cost comparison / 总览页新增 30 天成本对比 - #676
Conversation
中文:为总览页新增可分享的历史对比 URL 模式,并在档位与引擎切换时保留该状态。
中文:基于数据库最新证据日加载 30–60 天历史快照,并按平台服务包络线计算变化。
Add the bilingual comparison control, historical heat-map states, bounded fixture coverage, and responsive cross-browser assertions.\n\n中文:新增双语对比控件、历史变化热力状态、限定时间窗口的测试数据,以及跨浏览器响应式断言。
Filter snapshot candidates through the curated overview scenario layout and document every em-dash state in both locales.\n\n中文:让历史窗口与可见场景保持一致,并完整说明缺失结果状态。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @edwingao28's task in 7m 57s —— View job PR Review: 30-day cost comparison on /overview
🟢 LGTM — no blocking code issues found. I verified the change at runtime against the read-only DB ( Runtime verification ✅
Correctness spot-checks ✅
Tests ✅ — 86 overview unit tests pass locally; new E2E ( ℹ️ Note on the red |
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.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b6ff87f. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6ff87fd42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Scope snapshots to visible engines, gate deltas on tier evidence dates, restore screen-reader text, and relax the flaky trace stream test timeout. 中文:按可见引擎限定历史快照,以档位证据日期判断变化,恢复读屏文本,并放宽易波动的 trace 流式测试超时。
|
Claude finished @edwingao28's task in 2m 4s —— View job Re-review: 30-day cost comparison on /overview
🟢 Re-review: LGTM — commit Since the prior review ( Cursor Bugbot — cost-delta badge screen-reader text ✅ Fixed Codex P2 — history window built from unscoped rows ✅ Fixed Codex P2 — delta gated on frontier Runtime verification ✅ (
CI ✅ — all checks green on the latest commit (Typecheck & unit, Lint/format, Component, E2E Chrome ×4 + Firefox, CodeQL, Cursor Bugbot). The previously-flagged flaky Overlay path is correctly N/A — Overview is server-rendered with no |
Move comparison mode into the primary centered tab row and show only current cost when a valid 30-day comparison is unavailable. 中文:将对比方式提升为居中的主视图标签;缺少有效 30 天对比时仅显示当前成本。
|
Claude finished @edwingao28's task in 2m 39s —— View job Re-review: 30-day cost comparison on /overview
🟢 Re-review: LGTM — commit Only one new commit since the prior LGTM ( 1. Compare switcher promoted to a centered tab row 2. History mode: current-cost-only when no valid 30-day comparison Runtime verification ✅
CI — Overlay path remains correctly N/A — Overview is server-rendered with no |

Summary
30-day changemode to/overviewand/zh/overview.∞, and missing/stale current results as—.Unofficial overlays: N/A — Overview is a server-rendered summary and has no
?unofficialrun=path.Validation
typecheck,lint,fmt, production build中文说明
/overview与/zh/overview新增可分享的「30 天变化」模式。∞,当前无结果或没有更新结果显示—。非官方运行叠加不适用:Overview 是服务端渲染的摘要页,不存在
?unofficialrun=数据路径。验证
typecheck、lint、fmt、production buildNote
Medium Risk
Introduces a second benchmark fetch and historical matching rules that drive published cost deltas; incorrect window or pairing logic would misstate trends, though changes are display-only with broad test coverage.
Overview
Adds a 30-day change comparison mode on the inference cost overview (
?compare=30d), alongside the existing vs B200 view.Users switch via a new comparison control; tier, engine scope, locale, and comparison mode stay in sync through canonical URLs. In history mode the matrix drops the B200 “Reference” column treatment and shows per-platform cost deltas versus each platform’s latest validated result from 30–60 days earlier (same model, scenario, hardware, SLO, and engine scope). Comparable cells keep heat-map percentages; missing baselines or stale current evidence show cost only (no misleading
∞in history).Backend: resolves comparison mode from
compare, derives a snapshot date from current overview-visible rows, loads an as-of benchmark snapshot for the baseline window, and merges viaassembleOverviewHistoricalPageData(with cachedgetCachedBenchmarksAsOf). Fixtures and unit/E2E coverage exercise the new path; E2E date assertions ignore.sr-onlytext so screen-reader baseline dates don’t fail “no visible dates” checks.Reviewed by Cursor Bugbot for commit 9dabdea. Bugbot is set up for automated code reviews on this repo. Configure here.