fix: round €/m² in Telegram, drop "Bilder nachladen" admin button, fix lightbox visibility

- notifications: round sqm_price to whole € in Telegram match messages
  (was emitting raw float like "12.345614 €/m²").

- wohnungen: remove the admin-only "Bilder nachladen (N)" button. It
  flickered into view whenever a freshly-scraped flat was still in
  pending state, which was effectively random from the user's point of
  view, and the manual backfill it triggered isn't needed anymore — new
  flats are auto-enriched at scrape time. Also drops the dead helpers
  it was the sole caller of: enrichment.kick_backfill,
  enrichment._backfill_runner, db.flats_needing_enrichment,
  db.enrichment_counts.

- lightbox: the modal didn't appear because Tailwind's Play CDN injects
  its own .hidden { display: none } rule at runtime, which kept fighting
  our class toggle. Switch the show/hide to inline style.display so no
  external stylesheet can mask it. Single-class .lightbox now only owns
  the layout — the initial-hidden state is on the element via
  style="display:none".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
EiSiMo 2026-04-23 12:48:14 +02:00
parent 787f848aba
commit ee7ba6c6ff
8 changed files with 14 additions and 76 deletions

View file

@ -232,19 +232,3 @@ def _spawn(coro) -> asyncio.Task:
def kick(flat_id: str) -> None:
_spawn(asyncio.to_thread(enrich_flat_sync, flat_id))
async def _backfill_runner() -> None:
rows = db.flats_needing_enrichment(limit=200)
logger.info("enrich backfill: %d flats queued", len(rows))
for row in rows:
try:
await asyncio.to_thread(enrich_flat_sync, row["id"])
except Exception:
logger.exception("backfill step failed flat=%s", row["id"])
def kick_backfill() -> int:
pending = db.flats_needing_enrichment(limit=200)
_spawn(_backfill_runner())
return len(pending)