fix(tradein): sync n_analogs to anchor count when anchor drives headline (#695) #739

Merged
bot-reviewer merged 1 commit from fix/695-n-analogs-anchor into main 2026-05-30 15:25:35 +00:00

1 commit

Author SHA1 Message Date
d688d24a12 fix(tradein): sync n_analogs to anchor count when anchor drives headline (#695)
QA-fail after #738: that PR de-contradicted the explanation STRING, but
n_analogs stayed = radius count (listings_clean) while the same-building anchor
(#691/#694) replaced the headline + analogs list with the house comps. So every
UI counter («Аналогов N», «Показано N из M», «по N аналогам», histogram) still
read the radius number — producing «Показано 5 из 4» on the Олимп penthouse
(radius=4, anchor=5). #738's Малышева case passed only because radius==anchor
(14=14) — mimicry, not a fix.

Fix: when anchor_tier is not None, set n_analogs = anchor['n'] (the comp count
the estimate is actually built on, = the displayed analogs capped at 10). All
counters now agree. Per #698, for the anchor path that IS the «full count found».
Radius path unchanged.

Refs #695
2026-05-30 18:23:30 +03:00