Map PROVA competition codes to public standings URLs so every "Próximos jogos"
card links to the competition table (Flashscore for Betclic leagues; FPA portal
hubs otherwise).
Paperclip-Issue: BIT-31056
Paperclip-Run: 5901136e-753a-494f-bd36-250d1b822690
Post-merge Lighthouse re-verification of PR #47 confirmed article TBT
regression is resolved (7416ms -> 0-348ms, Performance 60 -> 99 median,
5 runs, results in PERFORMANCE_BASELINE.md). This follow-up closes a
gap found during that verification and widens the pass margin:
- bridge/package.json: sanitize-html.test.ts (added in the original
fix) was never wired into the test/test:coverage scripts, so the
"28 bridge sanitizer tests pass" claim wasn't actually exercised by
npm test. Fixed.
- Defer mobile-menu and share-button click handlers to
requestIdleCallback (institutional/sports headers, ArticleShareBar)
so they don't compete with hydration-critical work.
- Split Base.astro's theme-flash-prevention script into a minimal
inline snippet (runs before paint) and the deferred click-handler
logic, instead of one blocking script.
- bridge articles route: /articles/:slug/related accepts an optional
?category_id= to skip a redundant WP post-by-slug fetch when the
caller already has it.
Paperclip-Agent: Miguel Teixeira (urlKey miguel-teixeira; id 0f722e1a-bc3e-4381-8d98-76fa3c7aea10)
Paperclip-Issue: BIT-28145
- fpa-store.ts: lê/escreve agenda em JSON persistente (FPA_STORE_PATH)
- fpa-import.ts: script standalone que importa de ws.fpa.pt e escreve na store
- fpa-sync.ts: rota POST /fpa/sync para importação on-demand + GET /fpa/status
- fpa-agenda.ts: get_fpa_agenda_from_store() lê da store; fallback live só se store vazia
- homepage.ts: usa get_fpa_agenda_from_store() — ws.fpa.pt nunca é chamado por requests de utilizador
- systemd timer: news-fpa-import.timer dispara diariamente às 05:30 Europe/Lisbon
- andeboltv.ts: corrige build_stream_url para usar event_id (fix anterior BIT-26494)
Paperclip-Issue: BIT-26500
Paperclip-Agent: coo
- Add backfill-featured-from-fpa.ts: matches andebol.net post slugs against
FPA portal WP REST API and uploads featured images for matched posts
- Export attachFeaturedImageToPost from wp-publish.ts for reuse by backfill
- Add npm script backfill:featured for one-shot execution
- Extend RSS ingest to extract media:content and media:thumbnail fields
(BIT-24388: FPA feed uses <media:content> for images, not <enclosure>)
- Update config/domains/andebol.net.json: wp_endpoint → public HTTPS URL
- Update docs; add pino-pretty dev dep to bridge
Backfill result (2026-06-05): 30 updated, 52 skipped (no FPA match), 0 errors.
Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-24389
- Fastify + TypeScript service in bridge/ listening on port 3200
- WordPress REST API client with _embed support and data normalization
- Redis stale-while-revalidate cache with in-process Map fallback
- Domain routing: reads config/domains/<host>.json per Host header
- Routes: /homepage, /articles, /articles/:slug, /articles/:slug/related,
/categories, /categories/:slug, /trending, /api/tags, /api/media/:id,
/api/site-config, /health
- /api/posts and /api/categories aliases redirect to canonical routes
- Rate limiting via @fastify/rate-limit; CORS via @fastify/cors
- Error handling: WP unavailable → serve stale cache or 503
- Domain configs for localhost and newsproject.bitreport.pt
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor