Symptom: sold_pct_of_supply = sum_deals_24mo / supply_count_snapshot * 100 yields >100% (e.g. 199%) for fast-selling small formats due to incompatible time windows (24-month deals vs point-in-time supply snapshot). Option A (hotfix): clamp to 100.0, expose is_oversold=True for UI badge. - best_layouts.py: compute sold_pct_raw, clamp with min(..., 100.0), set is_oversold = raw > 100% - parcel.py TopLayoutRow: add is_oversold: bool field - best-layouts.ts TopLayoutRow: add is_oversold: boolean - BestLayoutsBlock.tsx: show warn badge ">100%" when is_oversold=True - tests: two new cases — raw 199% clamps + is_oversold=True; raw 50% passes through + is_oversold=False Closes (epic part) #271 item 5 |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .eslintrc.json | ||
| Dockerfile | ||
| next-env.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| sentry.client.config.ts | ||
| sentry.edge.config.ts | ||
| sentry.server.config.ts | ||
| tsconfig.json | ||