Skip to content

Remove fabricated trend values from crm/sales/service dashboards (executive already did, with rationale) #587

Closed

Description

@os-zhuang

Found during a full business/platform-capability review of the app (2026-08-02).

Problem

Three dashboards ship hardcoded, made-up period-over-period trend numbers on their stat widgets:

  • src/dashboards/crm.dashboard.ts:213
  • src/dashboards/sales.dashboard.ts:618, 634, 649, 660
  • src/dashboards/service.dashboard.ts:927, 942, 958, 973

e.g. trend: { value: 12.5, direction: 'up', label: 'vs last month' } — the 12.5 is not computed from anything.

src/dashboards/executive.dashboard.ts:367-370 already removed its own with the correct rationale ("hardcoded percentages previously carried here were fabrications"), so the repo currently ships one honest dashboard and three fabricated ones — an inconsistent half-fix.

Fix

Remove the hardcoded trend blocks from the three remaining dashboards, mirroring the executive dashboard's approach (and its explanatory comment if useful). If/when real period-over-period comparison is wired via the platform's dashboard comparison support, trends can return as computed values.

Acceptance

  • grep -rn "trend:" src/dashboards/ shows no literal numeric trend values.
  • A pin test (or extension of an existing dashboard test) rejects literal trend.value numbers so they can't creep back in.

Activity

  1. added
    bugSomething isn't working
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed on Aug 2, 2026
  2. self-assigned this
    on Aug 2, 2026
  3. os-zhuang commented on Aug 2, 2026

    @os-zhuang
    ContributorAuthor

    认领:PM 循环第 1 轮
    会话:session_019SS7C5SXpniKeCApxgARyf
    分支:claude/issue-587-fabricated-trends
    Worktree:hotcrm-issue-587


    Generated by Claude Code

  4. os-zhuang commented on Aug 2, 2026

    @os-zhuang
    ContributorAuthor

    ✅ 验收通过(PM 循环第 1 轮):PR #608 已进入合并队列。

    交付内容:CRM/Sales/Service 三个仪表盘共 12 处硬编码 trend 全部移除,与 executive 仪表盘(#500)的处理口径一致;三个文件头部补充说明「趋势必须来自对比查询(widget compareTo),不得手写」;新增元数据级守卫遍历所有仪表盘组件、任意嵌套深度拒绝字面量趋势值(修复前先证明守卫报出全部 12 处)。CI 9/9 全绿。

    范围外发现已另行开单:#610(analytics 文档描述了一批不存在的仪表盘组件及一条编造的使用统计)。


    Generated by Claude Code

  5. added
    priority:p0Critical: blocker, must ship before MVP
    and removed on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p0Critical: blocker, must ship before MVP

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions