Skip to content

fix(web): per-criterion scores are derived from the star rating and saturate at 5.00 (ties, fake ranks) #1143

Closed

Description

@JOY

Found by the live sweep #1131 (Production c23ab85b, 2026-10-27, anonymous visitor).

Problem

The five per-criterion scores (Màn hình, Hiệu năng, Camera/Âm thanh, Pin, Đáng tiền) on the leaderboard, versus pages and the product-page rank chips are not measured: when a product has no real criterion ratings, apps/web/src/lib/leaderboard-engine.ts (parseRaw, around line 228) returns the star rating plus a small category heuristic delta, clamped to 5. Any product rated about 4.85 or more therefore scores 5.00 on almost every criterion, and the rankings become ties.

Evidence (desktop 1280 and phone 390):

So the site presents invented criterion scores as rankings and contradicts its own product page.

Proposed fix

  • When a product has no real criterion data, return null for that criterion instead of a derived number; show "Chưa có" in the leaderboard, versus table and rank chips, and rank by the combined score only (criterion sort lists only products with data).
  • Hide criteria that do not apply to the category (no "Màn hình" rank for earbuds; label "Camera / Âm thanh" per category).
  • Keep the API fields but return null and document it in the OpenAPI spec.
  • Unit tests in leaderboard-engine for a product with no criteria data and for an earbud.

Acceptance

Activity

  1. added
    bugSomething isn't working
    status:readyTask ready to be picked up by an Agent
    agent:auditClaimed by Agent: Audit
    on Oct 27, 2026
  2. self-assigned this
    on Oct 27, 2026
  3. JOY commented on Oct 27, 2026

    @JOY
    ContributorAuthor

    [Agent: Audit] Release: filed from the live sweep #1131; research only, no code started. Status Ready on Project #9. The next session may take it over with node scripts/ops/board.mjs 1143 --status in-progress --agent <Nick> --take-over, citing this comment. Evidence was gathered on Production c23ab85b on 2026-10-27; re-check the live numbers before fixing, since crawls change them.

  4. added
    status:in-progressTask currently claimed and being worked on by an Agent
    agent:webClaimed by Agent: Web
    and removed
    status:readyTask ready to be picked up by an Agent
    agent:auditClaimed by Agent: Audit
    on Oct 31, 2026
  5. JOY commented on Oct 31, 2026

    @JOY
    ContributorAuthor

    [Agent: Web] Takeover. JOY assigned this to the Rate Core PO on 2026-10-31, word for word: "Cho nhận #1143".

    The agent:audit label was the finder's label from the live sweep (#1131). The issue was status:ready, with no live work on it.

    This implements decision D4 of the #1531 design (Docs/Proposals/2026-10-31-criteria-stars-pros-cons.html):

    • drop the derived criterion scores;
    • return null and show "Chưa đủ dữ liệu";
    • leave null criteria out of the leaderboard composite.
  6. added
    status:in-reviewTask completed and waiting for review / PR merge
    and removed
    status:in-progressTask currently claimed and being worked on by an Agent
    on Oct 31, 2026
  7. added
    status:doneTask completed and verified
    and removed
    status:in-reviewTask completed and waiting for review / PR merge
    on Oct 31, 2026
  8. JOY commented on Oct 31, 2026

    @JOY
    ContributorAuthor

    [Agent: Web] Live check after promote #1552: rate.vn serves main d7ab2edc (/api/health: database ok).

    • Read-only: GETs and Playwright Chromium.
    • Vietnamese locale, light and dark, 390 px (phone emulation) and 1280 px.
    • No page errors on any page, and no horizontal scroll.
    Check Result
    API /leaderboard pass. criteria_scores is all null on every phone and earbud. The criterion=camera tab returns 0 products. The combined scores no longer carry invented criteria.
    /leaderboard?cat=smartphones pass. Criterion rows read "Chưa đủ dữ liệu", the block reads "Điểm tiêu chí do chuyên gia chấm", and there are no "5.00/5" criterion scores.
    /leaderboard?cat=earbuds&criterion=screen pass. It opens on "Điểm tổng hợp Rate.vn", with no screen tab, slider or row.
    Product page /smartphones/apple-iphone-16-128gb pass. No "#N " rank chips; the overall rank only.
    Versus /compare/apple-iphone-15-128gb-vs-apple-iphone-16-128gb pass. Each criterion row reads "Chưa đủ dữ liệu" on both sides, with no ✓ and no tie.
    Earbuds page /earbuds/samsung-galaxy-buds3-pro pass. The old "#1 Màn hình (5.00/5.0)" and "#1 Camera / Âm thanh" chips are gone. The issue's acceptance point is met.

    Follow-up filed as #1553. These are not regressions in the scores; they are gaps the change exposed:

    1. Criterion tabs and personas: every criterion tab and persona now shows an empty list "(0)" with no message, because no published product has a criterion score yet.
    2. Earbud product page: its review block "5 TIÊU CHÍ TRẢI NGHIỆM" still lists "Màn hình & hiển thị: Chưa có".

    Note: "Ngang điểm" still appears on that versus page and on the home and leaderboard pairs (5.00 VS 5.00). It comes from the main scores, since those phones' buyer ratings round to 5.0. Criteria do not cause it. It belongs to #1470's single-score question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent:webClaimed by Agent: Webarea:frontendFrontend / Next.js / UIbugSomething isn't workingstatus:doneTask completed and verified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions