Skip to content

[7/N] fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 - #838

Merged
edwingao28 merged 7 commits into
masterfrom
feat/zh-data-tools
Aug 31, 2026
Merged

[7/N] fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化#838
edwingao28 merged 7 commits into
masterfrom
feat/zh-data-tools

Conversation

@edwingao28

@edwingao28 edwingao28 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Part of #823 / 属于 #823 路线图的一部分

What changed

  • Complete Simplified Chinese coverage for Reliability, Submissions, Historical, CollectiveX, AI Chart, Feedback Viewer, and the global feedback dialog.
  • Follow the [2/N] fix(zh): localize industry testimonials / 本地化业界评价 #824 policy: translate natural presentation copy while preserving canonical product, model, hardware, framework, precision, unit, backend, transport, and database values. OpenAI API Key and the Submissions detail value none intentionally remain unchanged.
  • Localize D3 axes, tooltips, captions, tables, workflow conclusions, dates, AI output instructions, modal validation, and accessibility labels.
  • Complete the follow-up audit: Historical sequence/date captions, CollectiveX mode/phase/legend/support-note copy, AI Chart fallback metric labels, and UTC-consistent Submissions axis/marker/tooltip dates.
  • Preserve safe loading, empty, error, and retry states without exposing raw provider or database errors.
  • Consolidate duplicated Cypress journeys and implementation-coupled assertions while retaining focused unit and end-to-end coverage for real behavior.

Validation

  • App unit suite: 4,676/4,676 passed; constants: 47/47; DB: 597/597.
  • Typecheck, lint, format, typography, and diff checks passed.
  • Focused local Cypress: component 16/16 and affected E2E 132/132 passed.
  • GitHub CI is green, including unit/typecheck, component tests, all eight Chrome/Firefox E2E shards, lint/format, CodeQL, Vercel, Cursor Bugbot, and Claude review.
  • All applicable review threads are addressed and resolved.

Ready for maintainer approval and merge.

中文说明

  • 完成 Reliability、Submissions、Historical、CollectiveX、AI Chart、Feedback Viewer 以及全站反馈弹窗的简体中文覆盖。
  • 遵循 [2/N] fix(zh): localize industry testimonials / 本地化业界评价 #824 的原则:自然展示文案使用中文,同时保留产品、模型、硬件、框架、精度、单位、后端、传输方式及数据库原始值等规范技术名称。OpenAI API Key 与 Submissions 详情中的 none 按约定保持不变。
  • 中文化 D3 坐标轴、提示框、图注、表格、工作流结论、日期、AI 输出要求、弹窗校验和无障碍标签。
  • 补齐本轮复查项目:Historical 的序列与日期图注、CollectiveX 的模式/阶段/图例/支持说明、AI Chart 缺省指标标签,以及 Submissions 坐标轴/标记/提示框统一使用 UTC 日期。
  • 保留安全的加载、空数据、错误和重试状态,不向用户暴露服务商或数据库原始错误。
  • 合并重复的 Cypress 流程和依赖实现细节的断言,同时保留针对真实行为的单元测试与端到端覆盖。

验证

  • App 单元测试 4,676/4,676、constants 47/47、DB 597/597,全部通过。
  • Typecheck、lint、格式、排版与 diff 检查全部通过。
  • 本地重点 Cypress:组件测试 16/16、相关端到端测试 132/132,全部通过。
  • GitHub CI 全部为绿色,包括单元测试/类型检查、组件测试、Chrome 与 Firefox 共八个 E2E 分片、lint/格式、CodeQL、Vercel、Cursor Bugbot 与 Claude 审查。
  • 所有适用的审查线程均已处理并关闭。

现已可供维护者批准并合并。


Note

Medium Risk
Broad UI/i18n surface with localized LLM prompts and centralized error sanitization; low auth/data risk but many user-facing paths and chart behaviors are touched.

Overview
Extends Simplified Chinese across Reliability, Submissions, Historical Trends, CollectiveX, AI Chart, Feedback Viewer, and the global feedback dialog—axes, tooltips, tables, workflow conclusions, dates, validation, and chart accessibility labels—while keeping canonical model/hardware/unit identifiers unchanged per the localization policy.

AI Chart now threads locale through generation (buildParsePrompt / buildSummaryPrompt, validateSpec fallbacks), locale-specific example prompts, localized result chrome (including per-chart empty states and scatter/line role="group" labels), and user-safe provider errors with analytics on retry and API-key visibility.

CollectiveX & reliability/historical data views replace raw API error text with fixed copy, add localized run conclusions and KV/support-matrix strings, expose refetch from reliability and trend hooks for tracked retry buttons, and wire legend/analytics events where expanded.

Feedback gains bilingual FeedbackForm strings, optional dialog titleId/descriptionId (wired from the nudge engine), mapped HTTP/network errors instead of leaking internals, and viewer retry plus localized key validation.

Cypress coverage expands for /zh/* workflows (empty/error/retry, 375px overflow, no leaked secrets) and updates English assertions where UX changed (e.g. CollectiveX load failures).

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

@vercel

vercel Bot commented Aug 23, 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 31, 2026 7:58pm

Request Review

@edwingao28 edwingao28 changed the title fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 【4/7】fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 Aug 23, 2026
@edwingao28 edwingao28 changed the title 【4/7】fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 [4/7] fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 Aug 23, 2026
@edwingao28 edwingao28 changed the title [4/7] fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 [7/N] fix(zh): localize data and tool pages / 完善数据与工具页面中文本地化 Aug 23, 2026
@edwingao28
edwingao28 marked this pull request as ready for review August 26, 2026 21:52
@edwingao28
edwingao28 requested a review from adibarra as a code owner August 26, 2026 21:52
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 7m 1s —— View job


Claude review — ✅ complete

  • Read PR diff & gather context
  • Static review (bugs, logic, resource leaks, test coverage)
  • Chinese copy review (advisory)
  • Runtime verification (localhost + Playwright)
  • Check CI status
  • Post findings

🟢 LGTM — no blocking issues found

This is a large but clean localization PR. I reviewed the logic-bearing changes and verified the changed screens render at runtime against the real read-only DB.

Static review — no bugs found. Spot-checked the risk areas:

  • HistoricalTrendsDisplay — the loading gate dropping graphs.length === 0 is safe: hasInteractivityChart is false in that case, so it renders the localized no-data state instead of an infinite skeleton (an improvement). The new error / trendError branches destructure real fields (InferenceContext exposes error; useInterpolatedTrendData now returns error/refetch).
  • CollectiveXKvSection / CollectiveXDisplaystrings.outcomes[row.outcome] and the conclusion map cover exactly the CollectiveXOutcome union (success|unsupported|failed|invalid|diagnostic|pending), so no undefined labels.
  • use-ai-chart / feedback-modal — locale-keyed error strings and the engine-supplied titleId/descriptionId (fixing the dialog's aria-labelledby dangling reference) are correct. D3 dependency arrays were updated to include the new locale/t closures.

Runtime verification (Playwright, real DB):

  • /zh/reliability — chart renders real bars with localized run counts (次运行), x-axis (成功率(%)), instructions, legend, and feedback dialog. 0 console errors.
  • /zh/historical — trend chart renders real data with localized x-axis dates (8月7日 …), title, y-axis, and controls. 0 console errors.
  • /zh/ai-chart — form, placeholder, example prompts, and hints all localized. 0 console errors.
  • /zh/collectivex — the CollectiveX API returns 500 in this preview env (the separate CollectiveX Neon DB isn't provisioned here — not a PR bug). This exercised the PR's changed error path, which correctly renders the localized, non-raw error state (CollectiveX 运行暂不可用 / CollectiveX 数据集加载失败。 + 重试), confirming provider/DB errors are no longer surfaced.

Test coverage: new functions ship with tests (ai-chart-data.test.ts, SubmissionsChart.test.ts, prompt-templates.test.ts, useInterpolatedTrendData.query.test.tsx, ReliabilityContext.query.test.tsx). ✅

Chinese copy (advisory): the changed strings read as natural, accurate technical Chinese; terminology upgrades (投机解码, 预填充/解码) are correct and consistent. No semantic/fidelity issues worth flagging; nothing requires maintainer escalation.

CI: Lint & Format ✅. Unit/E2E are re-running on the latest push. Note the PR's own "pending" item — regenerating Cypress timings.json from a full integration run — still stands and isn't something this read-only review can produce.

Comment thread packages/app/src/components/collectivex/CollectiveXRunsTable.tsx Outdated
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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


Re-review — latest push (58c8d9f3, "restore localized data workflow recovery")

  • Read PR diff & gather context
  • Verify Cursor Bugbot finding (CollectiveXRunsTable pending status)
  • Static review of logic-bearing changes
  • Check CI status
  • Post findings

🟢 LGTM — no blocking issues in the new commit

The branch was updated since the prior review (c530f0758c8d9f3). This commit adds error-recovery wiring, ARIA fixes, and UTC date formatting. I reviewed the logic-bearing changes:

  • useInterpolatedTrendData / HistoricalTrendsDisplay — the new error/refetch are threaded correctly and the trendError branch is reachable: it sits after loading || trendLoading (false on error) and after the primary error gate, so a secondary history-query failure renders the localized retry card. ✅
  • feedback-modal / nudge-engine / nudges/registryFeedbackForm now takes engine-owned titleId/descriptionId and falls back to useId() when used standalone, so the dialog's aria-labelledby/aria-describedby reference real nodes in both paths. ✅
  • ReliabilityContext / BarChartD3refetch is added to the context value and its useMemo deps, and the error overlay renders a tracked 重试/Retry button. ✅
  • SubmissionsChartformatSubmissionTooltipDate pins timeZone: 'UTC' (fixes date-only drift) and is unit-tested. ✅

Test coverage: new logic ships with tests (useInterpolatedTrendData.query.test.tsx, ReliabilityContext.query.test.tsx, SubmissionsChart.test.ts, plus expanded Cypress). ✅

Cursor Bugbot finding (CollectiveXRunsTable pending): does not reproduce as described — see the inline reply. A pending run has conclusion === null, which line 131's ?? t.pending already localizes to 待处理. I noted the smaller real residual (rare non-success/failure GitHub conclusions render in English in the table but as 待处理 in the header); low severity, non-blocking.

Chinese copy (advisory): the new strings (历史趋势数据加载失败。, 重试加载趋势数据, 重试, 待处理) read as natural, accurate technical Chinese. No fidelity issues; nothing requires maintainer escalation.

CI: Lint & Format ✅, Tests (Unit) ✅; Tests (E2E) still in progress at review time. The PR's own pending item — regenerating Cypress timings.json from a full integration run — still stands and isn't producible from this read-only review.
· feat/zh-data-tools

Comment thread packages/app/src/components/ai-chart/AiChartResult.tsx
Comment thread packages/app/src/components/collectivex/CollectiveXRunsTable.tsx Outdated
@blacksmith-sh

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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


Re-review — latest push (d45082c2, "stabilize localized e2e specs after rebase")

  • Read new changes since last review (58c8d9f3d45082c2)
  • Check CI status (Blacksmith's 18 failures vs. the new fix commit)
  • Review Cursor Bugbot role="img" finding
  • Runtime verification (/zh/historical happy path after the gate reorder)
  • Post findings

🟢 LGTM with one non-blocking a11y nit

The new commit is mostly test stabilization plus one logic-bearing production change. I reviewed the diff and re-verified the affected screen at runtime.

HistoricalTrendsDisplay gate reorder — correct. The error gate now runs before loading || trendLoading. This is the right fix: a failed primary benchmark query never produces rows, and loading folds in "no rows yet", so the old ordering pinned the page on the skeleton forever and 历史基准测试数据加载失败。 never rendered. The reordered chain (error → loading → trendError → content) keeps trendError reachable (trendLoading is false on a settled error). Runtime check of /zh/historical confirms the happy path still renders localized data with 0 console errors — the reorder didn't regress the normal load.

The 18 Blacksmith failures (zh submissions workflow, Dashboard nudges, Historical Trends — Chinese route) were on the prior commit 58c8d9f3; d45082c2 targets exactly those specs (nudge snooze-key isolation, zh-pages aggregate-vs-disaggregated row assertions + click-gated retry intercept, and the Historical error-card ordering above). The Tests (E2E) re-run on this push is still in progress — worth confirming green before merge, since I can't run the fixtures Cypress suite from this read-only review.

Cursor Bugbot role="img" (AiChartResult) — real, low severity. Left an inline comment: this PR newly wraps the interactive scatter (L229) and line (L360) D3Charts in role="img", which makes their zoom/pan/pinned-tooltip/instructions descendants presentational and drops them from the a11y tree. The sibling interactive charts use role="group" (CollectiveXChart, CollectiveXKvChart, TrendChart). Static bar/radar can keep role="img". 🟡 non-blocking.

Prior Bugbot "pending stays English" — already addressed/answered in the earlier review thread; not re-raising.

Chinese copy (advisory): the strings touched here (历史基准测试数据加载失败。, aggregate/disaggregated labels) read as natural, accurate technical Chinese. No fidelity issues; nothing requires maintainer escalation.

CI: Lint & Format ✅, Tests (Unit) ✅, Tests (E2E) in progress at review time. The PR's own pending item (regenerate Cypress timings.json from a full integration run) still stands and isn't producible from a read-only review.
· feat/zh-data-tools

Comment thread packages/app/src/components/ai-chart/AiChartResult.tsx Outdated
@edwingao28
edwingao28 marked this pull request as draft August 29, 2026 02:46
@edwingao28
edwingao28 marked this pull request as ready for review August 29, 2026 02:49
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 1m 17s —— View job


Re-review (ready-for-review) — 🟢 LGTM, no new blocking issues

  • Read changes since last review
  • Check CI status
  • Verify outstanding Bugbot findings still stand
  • Runtime verification of changed /zh screens
  • Post findings

No new commits since my last review. HEAD is still d45082c2, which I already reviewed in full on the prior pass — the logic-bearing changes (HistoricalTrendsDisplay gate reorder, useInterpolatedTrendData error/refetch threading, ReliabilityContext refetch, SubmissionsChart UTC date pinning, feedback-modal titleId/descriptionId, CollectiveX localized error path) were all confirmed correct there. Nothing new to re-review.

CI — now green on this commit. The pending item from earlier reviews is resolved:

  • Lint & Format ✅, Tests (Unit)
  • Tests (E2E)passed on d45082c2 (run 33222729157, the rebase-stabilization commit's own run) — the previously-failing zh/nudge/historical specs are green. A fresh E2E re-run is in progress on this ready-for-review push but the same-commit run already succeeded.

Runtime verification (Playwright, real DB): /zh/historical renders localized content — title 历史推理性能趋势, intro, 历史趋势 chart card, localized nav/footer, and the feedback dialog (帮助我们改进 InferenceX with an accessible name in both languages). 0 console errors.

Two open findings remain — both previously flagged, both non-blocking, still unaddressed in the code:

  1. 🟡 AiChartResult.tsx:229 / :360 — interactive scatter/line D3Charts wrapped in role="img". role="img" makes descendants presentational, dropping zoom/pan/pinned-tooltip/instructions from the a11y tree; sibling interactive charts use role="group" (CollectiveXChart, CollectiveXKvChart, TrendChart). Static bar/radar can keep role="img". Low-severity a11y consistency. Fix →
  2. 🟡 CollectiveXRunsTable.tsx:214-216 — non-null GitHub conclusions other than success/failure (cancelled, timed_out, skipped, …) fall through to raw English in the table, while the single-run header collapses them to a localized fallback. The pending case Bugbot flagged does not reproduce (nullt.pending upstream). Effectively always success/failure/null in ingested data, so low-severity — flagging only so an autofix doesn't re-introduce a false pending mapping.

Chinese copy (advisory): no new strings since the last pass; prior review found the touched copy natural and accurate. Nothing requires maintainer escalation.

The PR's remaining self-declared item — regenerating Cypress timings.json from a full observed integration run — is not producible from this read-only review, but is a timings refresh, not a correctness gate; the E2E suite itself is green.
· feat/zh-data-tools

@edwingao28
edwingao28 marked this pull request as draft August 29, 2026 03:29
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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


Re-review — latest commit (474efa3c, "finish data-tool copy review")

  • Read new changes since last review (d45082c2474efa3c)
  • Static review of the new commit
  • Check CI status
  • Runtime verification of changed /zh screens
  • Post findings

🟢 LGTM — the two prior open findings are now fixed, no new blocking issues

The branch was rebased since my last pass; the one genuinely new commit is 474efa3c, which resolves both non-blocking items I'd left open, refines Chinese copy, and adds a narrow-viewport tick fix. I reviewed the logic-bearing changes and re-verified at runtime.

1. ✅ AiChartResult interactive charts — fixed. The scatter (:229) and line (:360) D3Chart wrappers moved from role="img"role="group", matching the sibling interactive charts (CollectiveXChart, CollectiveXKvChart, TrendChart). Zoom/pan/pinned-tooltip/instructions descendants are back in the a11y tree; the static bar/radar correctly keep role="img".

2. ✅ CollectiveXRunsTable conclusion labels — fixed properly. Table conclusion rendering now routes through the new collectiveXConclusionLabel(conclusion, locale) in data.ts, which maps the full GitHub Actions conclusion union (cancelled, timed_out, skipped, neutral, stale, action_required, startup_failure, …), derives pending/待处理 only from null, and falls back to 未知状态 (zh) / raw value (en) for unknown strings. This gives table/header parity without re-introducing the false pending mapping Bugbot originally flagged. The class lookup (CONCLUSION_CLASSES[conclusion ?? '']) is null-safe. Well unit-tested in data.test.ts (per-conclusion, null→pending, and unknown-value cases). ✅

Other logic change — SubmissionsChart narrow-viewport ticks. New useNarrowViewport() via useSyncExternalStore is SSR-safe (server snapshot false, matchMedia guarded, listener cleaned up on unsubscribe) and only reduces the zh x-axis tickCount to 3 under max-width: 39.999rem. Correct, no leak.

tab-nav locked feature-gated tab — when on a feature-gated route without the gate unlocked, the current route is now rendered as a SelectItem so the Select value resolves to a real option instead of showing empty. Guarded by !featureGateUnlocked, so no duplicate with the unlocked-only block. Has a component test.

Runtime (Playwright, real DB): /zh/ai-chart renders the localized form — refined copy confirmed (提示词示例, placeholder 描述想查看的图表……, +Enter 生成图表, InferenceX 不会读取该密钥). 0 console errors.

CI: Lint & Format ✅, Tests (Unit) ✅; Tests (E2E) in progress on this push (timings.json was refreshed in this commit). Worth confirming the E2E run lands green before merge.

Chinese copy (advisory): the refinements this commit makes (示例提示提示词示例, 忘记密钥清除密钥, 加载中……正在加载反馈记录……, halfwidth→fullwidth parens) all read as natural, accurate technical Chinese. 重试返回修改 on the AI-chart error button reflects that the control returns to the editable prompt rather than re-running — a reasonable, faithful choice. No semantic/fidelity issues; nothing requires maintainer escalation.
· feat/zh-data-tools

@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 474efa3. Configure here.

Comment thread packages/app/src/components/submissions/SubmissionsChart.tsx Outdated
@edwingao28
edwingao28 marked this pull request as ready for review August 29, 2026 03:42
Rewrite Reliability, Submissions, Historical, CollectiveX, AI Chart, and Feedback surfaces with complete locale-aware states, accessibility copy, safe errors, analytics, and responsive E2E coverage.

中文:完整重写可靠性、提交记录、历史趋势、CollectiveX、AI 图表与反馈相关界面的中文文案,并补齐状态提示、无障碍文案、安全错误处理、交互分析及响应式端到端测试。
edwingao28 and others added 3 commits August 29, 2026 03:43
Propagate secondary query retry state, preserve feedback modal ARIA labels, format date-only tooltips in UTC, and make reliability failures recoverable.

中文:补齐中文数据页面的错误恢复流程,修复反馈弹窗无障碍标签、UTC 日期格式与可靠性重试。
- nudge-system: keep the feedback-modal snooze keys out of the shared
  clearAllNudgeStorage helper — clearing them un-snoozed the support-file
  seed and let the immediate feedback modal claim the overlay slot,
  suppressing the reproducibility/filter-hint toasts in every other test.
  The accessibility test now clears those keys in its own onBeforeLoad.
- zh-pages: the first table row (sorted by datapoints) is an aggregate
  deployment, so assert the 聚合推理 detail labels there and expand a
  disaggregated Mooncake ATOMesh row for the 预填充/解码 labels; make the
  error/retry intercept fail until the retry button is actually clicked
  instead of counting attempts (race-prone with query retries).
- historical-trends: surface the error card before the loading skeleton in
  HistoricalTrendsDisplay — a failed benchmark query never produces rows,
  so the loading flag (which includes "no rows yet") pinned the page on
  the skeleton forever and 历史基准测试数据加载失败。 never rendered.
Address the valid accessibility and workflow-status review findings, refine the remaining Chinese data-tool copy, preserve English behavior, and record observed Cypress timings for the rebalanced specs.\n\n中文:处理有效的无障碍与工作流状态审查意见,完成数据与工具页面的中文文案终审,保持英文页面行为不变,并记录调整后 Cypress 测试的实测时长。
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 1m 55s —— View job


Re-review — latest commit (474efa3c) + new Cursor Bugbot finding

  • Read new changes since last review
  • Verify Cursor Bugbot SubmissionsChart UTC axis finding
  • Check CI status
  • Post findings

🟡 One confirmed non-blocking finding — the rest is clean

1. 🟡 SubmissionsChart English axis is local-time while tooltip/marker are UTCinline comment. Confirmed the Cursor Bugbot finding is real: D3Chart builds the time scale with d3.scaleTime() (local time — scale-builders.ts:34), so the English xAxis={{ tickCount: 6 }} branch labels ticks in local time, while the tooltip (formatSubmissionTooltipDate) and nightly-marker label (dateFormatter) are both UTC, and data points sit at UTC-midnight. A viewer west of UTC can see a tooltip on one calendar day and an axis tick on the previous day for the same point. The zh branch already uses the UTC dateFormatter; only English is inconsistent. Non-blocking (cosmetic, west-of-UTC only), fix suggested inline.

Prior findings — all resolved and confirmed in earlier passes, not re-raised:

  • AiChartResult interactive scatter/line → role="group" (static bar/radar keep role="img").
  • CollectiveXRunsTable/data.tscollectiveXConclusionLabel localizes the full GitHub conclusion union, null待处理, safe 未知状态 fallback; unit-tested.
  • HistoricalTrendsDisplay gate reorder, useInterpolatedTrendData error/refetch, ReliabilityContext refetch, feedback-modal titleId/descriptionId.

Test coverage: new logic ships with tests (SubmissionsChart.test.ts, data.test.ts, prompt-templates.test.ts, useInterpolatedTrendData.query.test.tsx, ReliabilityContext.query.test.tsx, plus expanded Cypress). ✅

Runtime (Playwright, real DB): /submissions renders real data, 0 console errors.

Chinese copy (advisory): no new user-visible strings since the last pass; prior review found the touched copy natural and accurate. Nothing requires maintainer escalation.

CI: Lint & Format ✅, Tests (Unit) ✅; Tests (E2E) in progress on this push — worth confirming green before merge.
· feat/zh-data-tools

Comment thread packages/app/src/components/submissions/SubmissionsChart.tsx Outdated
…复失效断言

- drop query-state unit tests duplicated end-to-end by the retry e2e specs
- drop 390px viewport arms (no breakpoint between 375 and 390)
- drop zh success-label component dup and intercept prompt asserts covered by vitest
- fix vacuous locale-leak needle in prompt-templates.test.ts
- replace tautological blank-label sweep with concise-override value table

中文:删除与端到端重试用例重复的 query 单测、390px 视口分支及重复断言;修复永真断言。
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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


Re-review — latest commit (fe137862, "trim redundant coverage and fix inert assertions")

  • Read changes since last review (41176c03/474efa3cfe137862)
  • Check CI status
  • Verify the test trims don't drop coverage of live logic
  • Runtime sanity check of /zh/submissions
  • Post findings

🟢 LGTM — the one new commit is test-only and clean

The branch was rebased; the single genuinely new commit since my last pass is fe137862, which only touches tests (no production code changed since 41176c03, already reviewed in full). I verified the trims don't reduce meaningful coverage:

  • useInterpolatedTrendData.query.test.tsx and ReliabilityContext.query.test.tsx deleted — the error/refetch behavior they asserted is now exercised end-to-end: historical-trends.cy.ts:243 drives the secondary-history error card + tracked 重试加载趋势数据, and reliability-chart.cy.ts:179 drives the safe-error state + tracked 重试 through a click-gated intercept. Coverage of the logic-bearing paths survives. ✅
  • ai-chart-data.test.ts — the tautological never returns a blank label sweep is replaced by a concrete concise-label table (y_tpPerGpuThroughput/Chip / 每芯片吞吐量); assertions match the impl (ai-chart-data.ts:22,34). ✅
  • prompt-templates.test.ts — the English-prompt negative needle is broadened to 'Simplified Chinese', which is a stronger (not vacuous) assertion. ✅
  • 390px viewport arms dropped — correct: there is no breakpoint between 375px and 390px (the narrow-viewport query is max-width: 39.999rem), so those arms were duplicate coverage.

Runtime (Playwright, real DB): /zh/submissions renders localized content with 0 console errors.

CI: Lint & Format ✅, Tests (Unit) ✅; Tests (E2E) in progress on this push — worth confirming green before merge, since it's the suite most affected by this commit.

One prior finding still open (previously flagged, non-blocking, not re-raising inline):

🟡 SubmissionsChart.tsx:320-327 — the English x-axis branch ({ tickCount: 6 }) still uses D3's default local-time tick formatter, while the tooltip and nightly marker are UTC and points sit at UTC-midnight. A west-of-UTC viewer can see a tooltip on one calendar day and an axis tick on the previous day for the same point. The zh branch already uses the UTC dateFormatter. Cosmetic, west-of-UTC only — unchanged since the last pass.

Chinese copy (advisory): no new user-visible strings in this commit; prior passes found the touched copy natural and accurate. Nothing requires maintainer escalation.
· feat/zh-data-tools

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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


Re-review — latest commit (bad685aa, "merge master, resolve collectivex kv conflicts")

  • Determine what changed since last review
  • Static review of the merge conflict resolution
  • Check CI status
  • Runtime verification of /zh/collectivex
  • Post findings

🟢 LGTM — the one new commit is a clean master merge, no new blocking issues

The single new commit since my last pass (fe137862bad685aa) is a merge of master that integrates master's new CollectiveX KV work (bandwidth-envelope frontier toggle, KV overlap chart, support matrices, secondary-page table column, log-scale switches) with this PR's zh localization. I reviewed the combined (conflict-resolution) diff — it's confined to CollectiveXKvChart.tsx, CollectiveXKvSection.tsx, CollectiveXDisplay.tsx, and collectivex.cy.ts — and re-verified the merged result.

Conflict resolution is coherent:

  • CollectiveXKvChart — the merge keeps master's xLogScale ? 'log' : 'linear' scale/axis wiring and this PR's localized t.xAxis(...)/t.yAxis(...) label functions (which now take the logScale arg), plus the localized tooltip and the new role="group" a11y wrapper. The getRulerX cast still covers both ScaleLinear/ScaleLogarithmic, so no runtime cast break. ✅
  • CollectiveXKvSectionpageTokens is a number (234-237), so the localized strings.caption(op, String(pageTokens), suffix) renders combine · page 64 · … / combine · 每页 64 token · …, matching master's prior page {pageTokens}. The frontier/overlap selections correctly pass the number-typed pageTokens. The columns useMemo deps were merged to [strings, primaryPage, secondaryPage], covering every value the new secondary-page column reads. ✅
  • New master components (CollectiveXSupportMatrices, CollectiveXKvOverlapChart, CollectiveXKvFrontierChart) came in verbatim from master and already carry useLocale + zh strings; the zh assertions the merged collectivex.cy.ts adds (带宽包络, 序列长度(ISL token,对数), p50 聚合 pull 带宽(GB/s,对数), 已知 Kernel 支持情况, Bulk 连续传输基线) resolve against real strings in the components. ✅

Runtime (Playwright, real DB): /zh/collectivex renders the localized shell (title CollectiveX 通信基准测试, intro, nav/footer) and the loading state (正在加载运行……). The two console errors are the CollectiveX API 500s from the un-provisioned separate CollectiveX Neon DB in this preview env — same as every prior pass, not a PR bug; the KV section itself needs real CollectiveX data to render, which this env can't supply, so I leaned on typecheck + the mocked Cypress specs for that path.

Local checks: typecheck clean (exit 0). CI: Lint & Format ✅, Tests (Unit) ✅; Tests (E2E) in progress on this push — worth confirming green before merge, since the merge rebalanced collectivex.cy.ts most.

One prior finding still open (previously flagged, non-blocking, not re-raising inline): 🟡 SubmissionsChart.tsx English x-axis uses D3's default local-time tick formatter while the tooltip/marker are UTC — a west-of-UTC viewer can see a tick one calendar day off. Untouched by this merge; the zh branch already avoids it.

Chinese copy (advisory): no new user-visible strings introduced by the merge beyond what master already shipped and prior passes reviewed; the merged copy reads as natural, accurate technical Chinese. Nothing requires maintainer escalation.
· feat/zh-data-tools

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 4m 56s —— View job


Re-review — latest commit (3c95be2d, "complete data-tool copy and trim redundant tests")

  • Determine what changed since last review (bad685aa3c95be2d)
  • Static review of new commit
  • Check CI status
  • Runtime verification of /submissions axis fix
  • Post findings

🟢 LGTM — the one open finding is now fixed, no new blocking issues

The single new commit since my last pass resolves the last outstanding finding (the SubmissionsChart UTC axis drift), extends localization coverage, and trims duplicate tests. I reviewed the logic-bearing changes and re-verified at runtime.

1. ✅ SubmissionsChart English axis UTC drift — fixed. The per-locale dateFormatter was hoisted into a shared UTC-pinned formatSubmissionDate, and the xAxis no longer branches on locale — both English and Chinese now format ticks with the same UTC formatter (SubmissionsChart.tsx:317-321). This is exactly the fix the prior Bugbot Medium finding asked for: axis, tooltip (formatSubmissionDate), and nightly marker are now all UTC, so a west-of-UTC viewer can no longer see a tick one calendar day off a point's tooltip. The narrow-viewport tickCount (3 vs 6) now applies to English too. Runtime confirmed on /submissions: axis renders Jan 1, 2026 … Aug 1, 2026 with the marker Dec 16, 2025 — all UTC-consistent, 0 console errors. The renamed export is covered by the updated SubmissionsChart.test.ts. ✅

2. ✅ CollectiveX label localization threaded correctly. collectiveXTopologyLabel, collectiveXLegendLabel, collectiveXSeriesLabel, and chartPoints gained an optional locale param (default 'en'), and both live callers pass it: CollectiveXDisplay.tsx:600,604 (legend label + title, with locale added to the useMemo deps) and CollectiveXChart.tsx:150 (chartPoints, locale in deps). No caller left un-threaded — the two are the only non-test call sites. Well unit-tested in data.test.ts (topology/legend/chartPoints zh cases). ✅

3. ✅ validateSpec Chinese Y-axis fallback. New fallbackYAxisLabel maps eval_score/reliability_rate to zh labels and derives other metrics via METRIC_REGISTRY[...].labelZh (null-safe through isMetricKey), only when the provider omits yAxisLabel; English and provider-supplied labels are untouched. Covered by types.test.ts (y_tpPerGpu, eval_score, reliability_rate, en passthrough, provider-supplied passthrough). ✅

4. ✅ HistoricalTrendsDisplay run-date + sequence localization. historicalRunDate splits the YYYY-MM-DD string and renders 年月日 only when all three parts parse as integers, else falls back to the raw string — safe. getSequenceLabel(..., locale) matches the helper's (sequence, locale='en') signature. ✅

5. ✅ CollectiveXSupportMatrices note formatter — the inline (note N) / (注 N) string is now a locale-owned formatNote prop, resolving both sides through the same dict. Clean.

Test trims (nudge-system.cy.ts, collectivex.cy.ts, feedback-modal.cy.tsx, prompt-templates.test.ts) — the removed assertions are either duplicated by the new e2e coverage or replaced by stronger toContain checks; no live logic loses coverage.

CI: Lint & Format ✅, Tests (Unit) ✅, PR #838 ✅, Code Quality ✅; Tests (E2E) in progress on this push — worth confirming green before merge, as this commit rebalanced several integration specs.

Chinese copy (advisory): the touched strings (至少一个所选运行加载失败。, the reworded support-matrix description, 域内芯片数, 常规/低延迟, 预填充/解码, 每芯片 token 吞吐量) read as natural, accurate technical Chinese. 至少一个所选运行加载失败 is a clearer rendering than the prior 部分所选运行记录加载失败. No semantic/fidelity issues; nothing requires maintainer escalation.
· feat/zh-data-tools

中文:合并 master 并解决 CollectiveX KV 相关冲突
Complete the remaining native Chinese presentation copy, preserve technical identifiers, align Submissions timestamps to UTC, and consolidate duplicated end-to-end coverage.

中文:补全数据工具中剩余的自然中文展示文案,保留技术标识符,统一 Submissions 时间戳为 UTC,并精简重复的端到端测试。
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 1m 21s —— View job


Re-review — 🟢 LGTM, no new content since the last full pass

  • Determine what changed since last review
  • Static review of any new changes
  • Check CI status
  • Post findings

No new commits since my last full review. The branch was rebased onto latest master, giving the two previously-reviewed commits new SHAs (bad685aa86def3f3 "merge master"; 3c95be2d5b9342b1 "complete data-tool copy and trim redundant tests"). The tree content is unchanged from what I reviewed and runtime-verified at 19:48 — I spot-confirmed the last-fixed item is still present: SubmissionsChart uses the shared UTC-pinned formatSubmissionDate for the axis with no per-locale branch (SubmissionsChart.tsx:320-322), so axis/tooltip/marker stay UTC-consistent.

All prior findings resolved and confirmed in earlier passes — not re-raising:

  • SubmissionsChart English-axis UTC drift → shared UTC formatter for both locales.
  • AiChartResult interactive scatter/line → role="group" (static bar/radar keep role="img").
  • CollectiveXRunsTable/data.tscollectiveXConclusionLabel localizes the full GitHub conclusion union, null待处理, safe 未知状态 fallback; unit-tested.
  • HistoricalTrendsDisplay gate reorder + run-date/sequence localization, useInterpolatedTrendData error/refetch, ReliabilityContext refetch, feedback-modal titleId/descriptionId, CollectiveX localized error path.

Test coverage: unchanged from the last pass — new logic ships with colocated unit tests (SubmissionsChart.test.ts, data.test.ts, types.test.ts, prompt-templates.test.ts, ai-chart-data.test.ts) plus the expanded Cypress suites. ✅

Chinese copy (advisory): no new user-visible strings introduced by the rebase; prior passes found the touched copy natural and accurate. Nothing requires maintainer escalation.

CI: Lint & Format ✅, PR #838 ✅; Tests (Unit), Tests (E2E), and Code Quality re-running on this push — worth confirming green before merge, but the same content already passed on the pre-rebase run.
· feat/zh-data-tools

@edwingao28
edwingao28 merged commit accfe21 into master Aug 31, 2026
24 checks passed
@edwingao28
edwingao28 deleted the feat/zh-data-tools branch August 31, 2026 20:07
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