Skip to content

feat(overview): link history cells to exact curves / 总览历史单元格链接精确对比曲线 - #686

Merged
edwingao28 merged 8 commits into
masterfrom
codex/overview-history-cell-details
Aug 8, 2026
Merged

feat(overview): link history cells to exact curves / 总览历史单元格链接精确对比曲线#686
edwingao28 merged 8 commits into
masterfrom
codex/overview-history-cell-details

Conversation

@edwingao28

@edwingao28 edwingao28 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Add per-platform curve links to 30-day comparison cells.
  • Open the dashboard with the exact current and historical serving envelopes behind each percentage.
  • Keep the pinned historical date visible in the comparison controls.

Validation

  • bun run test:unit
  • Overview Cypress: 24/24
  • bun run build
  • bun run typecheck
  • bun run lint
  • bun run fmt

中文说明

  • 为 30 天变化模式下的各平台单元格增加曲线对比入口。
  • 详情页仅展示该百分比对应的当前与历史 serving envelope。
  • 在对比控件中显示固定的历史日期。

Note

Medium Risk
Changes inference chart data selection, URL state, and comparison-exclusion behavior for deep-linked Overview history views; risk is mitigated by unit and Cypress tests but regressions could affect normal dashboard comparisons if the scope flags are mishandled.

Overview
30-day Overview history now exposes a Compare curves link on comparable platform cells (replacing row-level View details in history mode). The link opens the inference dashboard with GPUs, dates/runs, cost metric, and new URL params i_overview_current / i_overview_baseline that identify the two independently ranked serving envelopes.

On the inference side, that pair is restored from the URL, disables engine-family comparison exclusion so both curves can appear even when engine/precision differ, and filters benchmark rows on main vs overlay snapshots to those keys only. Changing model, GPUs, dates, presets, etc. clears the pinned pair; run-to-multi-run date expansion uses a separate setter so it does not drop the scope.

Supporting changes: historical comparison objects carry baselineConfig for link building; buildComparisonDates excludes only the selected main run id (not other same-day runs); active comparison legend ids include the current run date when scoped; overview client navigation uses native History push/replace. Cypress coverage asserts link shape and that changing model after follow-through still renders a chart.

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

Add per-platform current-versus-history drilldowns that preserve the exact independently selected serving envelopes and display the pinned comparison date.

中文:为各平台的当前值与历史值增加精确曲线入口,保留独立选出的 serving envelope,并在详情页显示固定的对比日期。
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Aug 8, 2026 1:15am

Request Review

@edwingao28
edwingao28 marked this pull request as ready for review August 7, 2026 18:33
@edwingao28
edwingao28 requested a review from adibarra as a code owner August 7, 2026 18:33
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 3m 52s —— View job


Review: PR #686 — link history cells to exact curves

🟢 LGTM — no blocking issues found.

  • Read the full diff
  • Static correctness review (overview links, curve filtering, URL state)
  • Check CI status — all green
  • Runtime verification (localhost + Playwright)
  • Post findings

Static review — the design is sound and internally consistent:

  • i_overview_current / i_overview_baseline carry config.key, which is exactly overviewServingSeriesKey(...). filterOverviewHistoryRows re-derives the same JSON key from raw BenchmarkRows on both the main (current) and comparison (baseline) snapshots, so the chart shows precisely the two envelopes behind the percentage — even across engine/precision/topology changes.
  • The comparisonExclusion bypass (isOverviewHistoryPair) is correctly plumbed through resolveComparisonExclusion and only relaxes the like-for-like guard when the overview pair is present.
  • buildActiveComparisonIds prepends effectiveRunDate only in overview-history mode, keeping the current curve in the active set alongside the run-scoped baseline date.
  • New lib functions all have colocated unit tests (overview-links, overview-data, useChartData, comparison-exclusion, comparisonEntry) and the UI is covered by overview.cy.ts; the new OverviewHistoryDetailLink fires a named track('overview_history_detail_clicked', …). Chinese strings (compareCurvesLink / compareCurvesAria) are present.

Runtime verification (real-data dev server + Playwright):

  • /overview?compare=30d renders the per-cell "Compare curves" links with correct hrefs.
  • Opened the cross-engine cell (DeepSeek-V4-Pro · B200, current vLLM/MTP 2026-07-12 vs baseline SGLang/none 2026-07-01): the dashboard renders exactly the two curves — current vLLM curve pinned/highlighted and the historical SGLang curve labeled with its date in the legend. 0 console errors.
  • CI: typecheck, unit, lint/format, component, and E2E chrome/firefox shards 1–3 all pass (shard 4 pending at review time, not a concern).

Comment thread packages/app/src/components/inference/InferenceContext.tsx
@blacksmith-sh

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 204d2fc8b3

ℹ️ 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".

Comment thread packages/app/src/components/inference/InferenceContext.tsx
Comment thread packages/app/src/components/inference/InferenceContext.tsx Outdated
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 6m 12s —— View job


Re-review: PR #686 — link history cells to exact curves

  • Read new commit a6324fb diff
  • Investigate "current curve missing from legend" (Bugbot + Codex P1)
  • Investigate "overview pair not cleared on filter change" (Codex P2)
  • Runtime-verify with Playwright (real-data dev server)
  • Post findings

I re-ran this against the running dashboard and can confirm both outstanding findings are real — correcting my earlier automated review, which incorrectly passed the first one.

🟡 Current envelope renders gray + missing from legend (Bugbot / Codex P1). i_dates carries only the baseline; the current date reaches the chart only via buildActiveComparisonIds prepending effectiveRunDate to activeDates, but GPUGraph builds colors and legend rows solely from selectedDates. On the DeepSeek-V4-Pro · B200 cross-engine link the SVG has exactly one gray #6b7280 roofline (current vLLM 2026-07-12) and one colored roofline (baseline SGLang), and the legend lists only B200 (SGLang) 2026-07-01 #1. The current curve is unlabeled and uncontrollable. → inline comment

🟡 Stale overviewHistoryPair → empty chart after a filter change (Codex P2). overviewServingSeriesKey includes row.model, and the pair is never cleared, so switching the model (verified: → Kimi K3 + a valid B300 chip) leaves i_overview_current pinned to ["dsv4",…] and filterOverviewHistoryRows matches zero rows → 0 rooflines, blank chart until reload. → inline comment

Both are should-fix (recoverable, gated behind the two overview params) rather than blocking crashes, but the first defeats the feature's stated purpose ("identify the exact curves behind the percentage") and the second breaks the chart on the next interaction. No console errors observed; CI (typecheck, unit, lint, component, all E2E shards) is green.

Comment thread packages/app/src/lib/overview-links.ts Outdated
Comment thread packages/app/src/components/inference/InferenceContext.tsx Outdated
Bring the client-navigation performance work into the history-cell details branch before addressing its remaining review findings.\n\n中文:在处理历史单元格详情剩余 review 问题前,将客户端导航性能改动合并到当前分支。
Include the current snapshot in comparison metadata and release Overview-only exact-pair filtering when users change chart selections.\n\n中文:将当前快照纳入对比图表元数据,并在用户更改图表选择后解除 Overview 专用的精确配置对过滤。
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Re-review: PR #686 — link history cells to exact curves

Working…

  • Read new commit 1ca3cce (fix: preserve history curve context)
  • Verify P1 fixed: current curve now has legend row + color
  • Verify P2 fixed: overview pair cleared on filter change
  • Runtime-verify with Playwright
  • Post findings

View job run

Comment thread packages/app/src/components/inference/hooks/useChartData.ts Outdated
Keep run-qualified comparison entries when they share the primary run's calendar date, while continuing to deduplicate the plain primary date.

中文:保留与主运行处于同一天的指定运行对比项,同时继续去重普通的主运行日期。
Comment thread packages/app/src/components/inference/hooks/useChartData.ts Outdated
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 23m 25s —— View job


Re-review: PR #686 — link history cells to exact curves

Re-reviewed new commits 1ca3cce (preserve history curve context) and b271c03 (preserve same-day run overlays), with runtime verification on the real-data dev server + Playwright.

  • Read new commits 1ca3cce + b271c03
  • Verify P1 (current curve in legend/color)
  • Verify P2 (overview pair cleared on filter change)
  • Investigate Bugbot "Main-date runs become overlays"
  • Check CI status (all green: typecheck, unit, lint, component, E2E)
  • Runtime-verify with Playwright
  • Post findings

🔴 BLOCKING — cross-engine "Compare curves" links show only one curve (regression)

The P2 fix wires clearOverviewHistoryPair() into clearScopedSelectionOnChange, which setSelectedDatesAndClear calls unconditionally. ChartDisplay's multi-run date-expansion effect (ChartDisplay.tsx:274-297) calls setSelectedDates(...) programmatically on mount (once changelogs load, no user interaction), so overviewHistoryPair is wiped immediately. That disables filterOverviewHistoryRows and re-enables the cross-engine exclusion guard, which drops the baseline chip.

Verified on the DeepSeek-V4-Pro · B200 cross-engine cell (current vLLM, baseline SGLang): only B200 (vLLM, MTP) · 2026-07-12 renders. B200 (SGLang) is a valid, available chip but is left unchecked, and re-adding it is instantly removed by the still-active engine guard. The baseline run (28403258484, 22 SGLang rows) is fetched and matches baselineConfigKey, but filterByGPU drops it because the chip was excluded. This defeats the feature's stated purpose ("show exactly the two curves behind the percentage") for exactly the cross-engine/cross-envelope cells that motivate it. Regression from a6324fb. → inline comment

⚠️ Note for verifiers: writeUrlParams mutates an in-memory store, not window.location, so the address bar keeps showing the original i_overview_*/i_gpus params even after the pair is cleared — checking the URL is misleading here; check the rendered chip selection / curves instead.

Previously-flagged items

  • P1 (current curve missing from legend) — the current date is now added to i_dates, so on same-engine cells (e.g. MiniMax M3 · B200 vLLM) the current curve gets a colored legend row and both dates render ✅. But on cross-engine cells it's moot because of the BLOCKING issue above.
  • P2 (clear pair on filter change) — implemented, but it's the source of the regression above: it also fires on programmatic/internal setSelectedDates calls, not just genuine user edits.
  • Bugbot "Main-date runs become overlays" (buildComparisonDates)entry !== selectedRunDate restores the original master behavior (run-qualified same-day entries are intentional distinct overlays, per the code comment); in overview mode those current-day rows would be filtered by baselineConfigKey when the pair is active. Not blocking on its own.

CI is green (typecheck / unit / lint / component / E2E). The one blocking item above is behavioral and only reproduces at runtime for cross-engine cells.
branch codex/overview-history-cell-details

Comment thread packages/app/src/components/inference/InferenceContext.tsx
Keep internal run-date expansion from clearing the Overview exact curve pair, exclude only the selected main run from same-day overlays, and keep soft-navigation URLs synchronized across browsers.

中文:日期自动展开时保留 Overview 的精确曲线对,仅从同日叠加结果中排除当前主运行,并确保软导航 URL 在不同浏览器中保持同步。
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 3m 43s —— View job


Re-review: PR #686 — link history cells to exact curves

Re-reviewed new commit 1011d8e (preserve exact history comparisons) with runtime verification on the real-data dev server + Playwright.

  • Read new commit 1011d8e
  • Verify prior 🔴 BLOCKING (overview pair wiped on programmatic setSelectedDates) is fixed
  • Verify P1 (current curve in legend/color) on the cross-engine cell
  • Verify P2 (overview pair cleared on filter change) — no blank chart
  • Check Bugbot "Main-date runs become overlays" fix
  • Check CI (all green)
  • Runtime-verify with Playwright

🟢 The previously-blocking regression is fixed — both curves now render on cross-engine links

The prior 🔴 BLOCKING finding was that ChartDisplay's multi-run date-expansion effect fired setSelectedDates programmatically on mount, which routed through setSelectedDatesAndClear → clearScopedSelectionOnChange → clearOverviewHistoryPair, wiping the overview pair before the chart even rendered — so cross-engine cells showed only the current curve.

1011d8e addresses this cleanly by exposing a dedicated raw setter, setSelectedDatesFromRunExpansion: setSelectedDates (InferenceContext.tsx:1487), and pointing the expansion effect at it (ChartDisplay.tsx:278). Internal date→run normalization no longer clears the scoped pair; only genuine user edits (model / GPU / dates / preset) still call setSelectedDatesAndClear.

Verified on the DeepSeek-V4-Pro · B200 cross-engine cell (i_overview_current=…vllm…, i_overview_baseline=…sglang…):

  • Two distinct colored rooflines (oklch(0.500 …) current vLLM, oklch(0.780 …) baseline SGLang), 0 gray #6b7280 fallback strokes.
  • Legend lists bothB200 (vLLM, MTP) • 2026-07-12 and B200 (SGLang) • 2026-07-01 #1. The current curve is now labeled and controllable. 0 console errors.

Previously-flagged items — all resolved

  • P1 (current curve gray / missing from legend) — fixed; current run is in i_dates, so it flows through gpuDatePairs → allGraphs and gets a color swatch + legend row (verified above).
  • P2 (stale pair → empty chart on filter change) — verified: switching the model DeepSeek-V4-Pro → Kimi K3 clears the pair and the chart re-renders 5 rooflines with real data (no "No data available", 0 console errors) instead of going blank.
  • Bugbot "Main-date runs become overlays" (buildComparisonDates) — fixed: the filter now drops the plain main date and the run-qualified entry matching selectedRunId, while keeping other same-day runs as distinct overlays (useChartData.ts:74-77). Covered by the updated unit test (useChartData.test.ts).

CI

All green: typecheck / unit, lint & format, component, and E2E chrome/firefox shards 1–3 pass (shards 4 + Bugbot pending at review time, not a concern).

🟢 LGTM — the blocking regression and all prior findings are resolved; no new issues found.
branch codex/overview-history-cell-details

@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 1011d8e. Configure here.

Comment thread packages/app/src/components/inference/hooks/useChartData.ts Outdated
Pass the effective selected run separately from contested-run scoping so ordinary same-day main runs are not fetched again as comparison overlays.

中文:将实际选中的主运行与争议运行作用域分开传递,避免普通同日主运行被再次作为对比叠加结果拉取。
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 2m 49s —— View job


Re-review: PR #686 — link history cells to exact curves

Reviewed the new commit 0bfe85c (fix(inference): dedupe the selected main run), which landed after my last LGTM and after Cursor Bugbot's latest finding.

  • Read latest commit 0bfe85c + prior review history
  • Investigate Bugbot finding: "Wrong run id for exclusion" (useChartData.ts)
  • Check CI status (all green)
  • Runtime sanity check (/overview?compare=30d, 0 console errors)

🟢 The remaining Bugbot finding ("Wrong run id for exclusion") is fixed

Bugbot flagged (on 1011d8e) that buildComparisonDates was excluding the main run using benchmarkRunId, which is contested-only (undefined when the selected run isn't contested — InferenceContext.tsx:473-476). So for an ordinary, non-contested same-day main run, the exclusion no-oped and that run could be fetched a second time as a comparison overlay. That was a real bug.

0bfe85c fixes it correctly by threading the run id through a separate channel:

  • useChartData gains a dedicated comparisonMainRunId param (useChartData.ts:213-215), documented as "the selected main run id, including non-contested runs, used only to avoid fetching the primary run again as a same-day comparison overlay".
  • The call site passes effectiveSelectedRunId (the full selected run, contested or not) into it (InferenceContext.tsx:507), while benchmarkRunId still feeds the contested-only run-scoping path (selectedRunId, line 506) — the two concerns are now decoupled.
  • buildComparisonDates uses comparisonMainRunId for the exclusion (useChartData.ts:280-287), so the date~r<mainRunId> entry is dropped for any selected run, not just contested ones.

The default path is preserved: when no run is selected, effectiveSelectedRunId is falsy → comparisonMainRunId is undefinedbuildComparisonDates behaves exactly as before (plain-date exclusion only).

Coverage: the exclusion contract is exercised by the existing unit buildComparisonDates › keeps other same-day runs but excludes the selected main run (useChartData.test.ts:104-113). This commit is a wiring change routing the correct, already-tested value; no new test gap.

CI & runtime

  • CI green: Lint & Format, Tests (Unit), Tests (E2E), Code Quality, and the base PR checks all pass.
  • /overview?compare=30d renders with 0 console errors.

🟢 LGTM — the last outstanding Bugbot finding is resolved and no new issues were introduced.
branch codex/overview-history-cell-details

@edwingao28
edwingao28 merged commit 4097c8c into master Aug 8, 2026
24 checks passed
@edwingao28
edwingao28 deleted the codex/overview-history-cell-details branch August 8, 2026 01:18
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