From c663c657e298e6bdcce2e3d3be88e1a7fb7a71fc Mon Sep 17 00:00:00 2001 From: moojttaba Date: Wed, 3 Jun 2026 10:54:04 +0330 Subject: [PATCH] =?UTF-8?q?docs:=20sync=20from=20backend=20c5d6490=20?= =?UTF-8?q?=E2=80=94=20points=20level=20fixes=20(v2.8.62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 09 - Audits/Activity Log.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/09 - Audits/Activity Log.md b/09 - Audits/Activity Log.md index b08294e..d88465a 100644 --- a/09 - Audits/Activity Log.md +++ b/09 - Audits/Activity Log.md @@ -724,4 +724,19 @@ as "·", Bronze level claims "highest level"); Mini App dark mode (تنظیما --- +### 2026-06-03 — backend@c5d6490 — Points & Referral audit fixes (v2.8.62) + +**Why (from points audit):** /dashboard/points showed "·" instead of numbers and told Bronze users +they are at "the highest level". Root causes: (1) level boundary off-by-one — seeds define +inclusive maxPoints (Bronze 0–999) but PG used `>` and Mongo `<`, so exact-boundary users resolved +to no level; (2) `level_configs` table in Postgres was created but NEVER seeded → zero levels → +null next-level → "highest level" message. Fixes: inclusive comparisons in both repos + +self-seeding of the 5 default levels (برنز/نقره/طلا/پلاتین/الماس) in ensurePostgresLevelConfigSchema. +**Remaining from audit:** frontend points page swallows API errors (shows zeros instead of an +error state); integration ideas: award points on completed escrow, show points in Mini App. +**Verification:** tsc clean, 8 tests green. Admin verifies after deploy: /dashboard/points shows +real numbers and Bronze shows progress toward نقره. + +--- +