Repository navigation
feat(analytics): dashboards state their base; one money, quantity and date format (#2370) - #2379
Merged
Merged
Conversation
…umber format (#2370) [WIP] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAoAy1McNK4cq14Q2vC
… reports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAoAy1McNK4cq14Q2vC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAoAy1McNK4cq14Q2vC
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
席位核对Verdict: ACCEPT ·
Generated by Claude Code |
This was referenced Oct 29, 2026
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.
Requested by Irene · project thread
Fixes #2370
维护者速读
NeedsAnalysis)已经是对的(图上是两行的 "Needs Analysis"),第 5 行只能说明何时有数(forecast_snapshot 与启动重播种的互动:每次 dev 重启后,当季出现一条无 owner 的幻影快照行与 owner 键控行并存 #702 禁止种子开当季预测)。total_price求和会被 DATASET_INVALID 拒绝,实测)。returnType: 'currency'不显示货币、百分比字段的进度条、报表图不能按维度分系列。What changes
Dashboards (rows 1–6)
service.dashboard.ts:sla_violationsis Open Cases Past SLA and counts open cases only (status $nin [resolved, closed]AND (flagged OR past due)). A case closed late leaves the count when it closes. The gauge is SLA Met (Closed Cases).case.report.ts:sla_performanceis SLA on Closed Cases, and its chart is SLA Violation Rate by Priority.crm.dashboard.ts,sales.dashboard.ts: the two copies of the 12‑month revenue trend are removed. Executive Overview's Revenue Trend is the one home. The rows are reflowed, and Why We Lose now sits beside Lead Source.crm.dashboard.ts:top_productsis List Price by Category, described as "Catalog list prices summed per product category, not sales". Summing sold line items is refused on 18.2.0: a datasetsumover the formulatotal_priceanswers DATASET_INVALID.opportunity.report.ts: Opportunity Funnel by Owner istype: 'matrix'withrows: ['owner'],columns: ['stage'], and a per-owner Total. Its chart is a horizontal bar of amount by owner.sales.dashboard.ts: the Quota Attainment by Rep description says when it fills: after the nightly forecast snapshot opens the quarter and a manager sets each quota. The snapshot flow is unchanged.crm.app.ts,service/index.ts,translations/*/app.ts): Pipeline Coverage by Quarter, Opportunity Funnel by Owner, Lead Engagement by Month, Accounts by Industry and Type, SLA on Closed Cases, Cases Opened by Day.Formats (rows 7–10)
home.page.ts: the two amountobject-metrics carryformat: '0,0', so Sales Home reads$1,290,000like the dashboards instead of$1,290,000.00.quantityisscale: 0, so it reads4and a fractional quantity is refused.total_priceandsubtotaldeclarereturnType: 'currency'. The quote line related list showsdiscountinstead of a second subtotal column.quote.object.ts(quote_date, expiration_date) andprice_book.object.ts(valid_from, valid_to) useformat: 'short', so they always show the year and are never relative:Nov 27, '26, where the list used to showNov 27.docs/developers/number-formats.md, linked fromdocs/README.md: the convention, plus where the tenant currency is set (Setup → Settings → Localization → Default currency). The currency symbol comes from that setting. Measured: Executive Overview reads1,290,000without it and$1,290,000with it.Docs: dashboards, reports, quick tour, analytics index, pipeline management, cases, SLA & escalation, service and marketing index pages, in en, zh‑Hans and zh‑Hant, plus
src/docs/crm_analytics_metrics(.zh).md. The dashboards page's "No tile shows a trend arrow" section was stale on main since #2296. It now lists the tiles that declarecompareTo.Tests
test/app-navigation-shape.test.ts: new test, "each entry is labelled with its report's own name, in every locale". Ablation: setting the zh‑CNnav_report_pipeline_coverageback to管道覆盖率turns it red (zh-CN nav_report_pipeline_coverage: "管道覆盖率" vs report "季度管道覆盖率").test/line-item-conventions.test.ts: new test for both line kinds. A rep'squantity: 2.5rejects withcode: 'VALIDATION_FAILED'on fieldquantity, and4is stored as4. Ablation: withscale: 2restored, both cases go red with "promise resolved … instead of rejecting".test/case-sla-breach-on-close.test.ts: the tile no longer counts late closes (0), and the tile filter is pinned against the sweep's predicate.test/pipeline-by-stage-chart.test.ts: the funnel matrix and owner chart.docs-service-index-analytics(labels, andSLA Performanceis now refused outright),docs-quick-tour-navigation(CRM Overview has noclose_datedimension now),docs-analytics-vocabulary,case-creation-date,seed-sla-share.Acceptance notes
description(18.2.0)total_price$1,290,000on Sales Home; currency is the tenant setting4), where scale 2 showed1.00;returnType: 'currency'still renders24,000(18.2.0)Nov 27, '26;Field.percentdraws a progress bar, no key turns it offNeedsAnalysisaxistspans read as innerTextBefore/after screenshots for sales.manager, service.manager and admin, in en and zh‑CN, are attached in the project thread.
Verification
pnpm verifyon 31bc156: validate, typecheck, lint, hygiene, token ratchet, build, and test all green. Result: Test Files 252 passed (252), Tests 4854 passed | 1 skipped (4855).test/docs-dashboard-tilespassed (11/11), andpnpm hygieneandpnpm hygiene:tokenswere clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAoAy1McNK4cq14Q2vC