fix(site-finder): попап конкурента — NUMERIC-поля приходят строкой (цена/площадь не рендерились) #2114
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2114
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/competitor-popup-numeric-strings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Баг (найден прод-верификацией #2113)
Прямая проверка живого
/analyzeпоказала:avg_price_per_m2_rubиavg_area_pdприходят с бэкенда строкой («160345», «47.5»), потому что Pydantic v2 сериализуетDecimal(изROUND(…::numeric)) в JSON-строку. Гварды в попапе конкурентаtypeof === "number"/Number.isFinite(строка)→ false, поэтому:formatPrice);(units_sold/units_available/lots_with_price/distance_m/flat_count — int/float → числа, не задеты.)
Фикс (frontend-only, контракт не меняется)
toFiniteNumber(v: number | string | null)→number | null(coerce + finite-check).formatPriceиспользует его → цена снова показывается.avg_area_pdрендерится черезtoFiniteNumber.avg_price_per_m2_rub/avg_area_pdрасширены доnumber | string | null— честно отражает рантайм Decimal-сериализации.tsc/eslint/prettier ✅. После deploy — прод-verify попапа конкурента (Застройщик + цена + Ср. площадь кв.).