8 Commits
Author SHA1 Message Date
tiago-neves e723e3ee5b chore(runtime): WordPress PHP 8.5 + Node.js 24.22.1 baseline (BIT-31729)
Tests / bridge tests (push) Successful in 39s
Tests / writer-pipeline tests (push) Successful in 42s
Tests / writer-pipeline tests (pull_request) Successful in 45s
Tests / frontend lib tests (push) Successful in 55s
Tests / bridge tests (pull_request) Successful in 35s
Tests / frontend lib tests (pull_request) Successful in 47s
Align docker-compose, engines, nvmrc, and CI with the company runtime baseline.
Official wordpress:6-php8.5-fpm ships PHP 8.5.6 today; host Node must move to 24.22.1 Active LTS.

Paperclip-Issue: BIT-31729
Paperclip-Run: 8b5ae44d-b3e7-430e-871e-d5fcb1bd9fb1
2026-10-23 18:52:30 +01:00
tiago-neves de19fb7e1a feat(andebol): add Classificação link on FPA agenda game cards (BIT-31056)
Tests / writer-pipeline tests (push) Successful in 47s
Tests / bridge tests (push) Successful in 49s
Tests / frontend lib tests (push) Successful in 56s
Tests / writer-pipeline tests (pull_request) Successful in 51s
Tests / bridge tests (pull_request) Successful in 51s
Tests / frontend lib tests (pull_request) Successful in 54s
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
2026-10-10 17:47:03 +01:00
tiago-neves 657e1c3bde fix(perf): BIT-28145 follow-up — wire sanitizer tests into npm test, defer non-critical scripts
Tests / writer-pipeline tests (push) Successful in 1m30s
Tests / frontend lib tests (pull_request) Successful in 1m22s
Tests / bridge tests (push) Successful in 1m30s
Tests / frontend lib tests (push) Successful in 1m30s
Tests / bridge tests (pull_request) Successful in 1m23s
Tests / writer-pipeline tests (pull_request) Successful in 1m23s
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
2026-08-07 10:20:04 +01:00
José Alves 6e82cc0106 feat(bridge): importar agenda FPA para BD local em vez de ws.fpa.pt em runtime (BIT-26500)
Tests / writer-pipeline tests (push) Successful in 31s
Tests / bridge tests (push) Successful in 32s
Tests / frontend lib tests (push) Successful in 32s
Tests / writer-pipeline tests (pull_request) Successful in 31s
Tests / bridge tests (pull_request) Successful in 31s
Tests / frontend lib tests (pull_request) Successful in 32s
- 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
2026-07-13 07:59:44 +00:00
José AlvesandPaperclip d057709297 feat(andebol): AndebolTV live stream badges on FPA agenda (BIT-26493)
Tests / bridge tests (push) Successful in 37s
Tests / writer-pipeline tests (push) Successful in 39s
Tests / frontend lib tests (push) Successful in 39s
- bridge: andeboltv.ts fetches Pixellot /api/event/list (live + upcoming)
- bridge: fpa-stream-match.ts matches FPA games to AndebolTV streams
- bridge: homepage route enriches agenda with stream_url, stream_status, is_live
- frontend: FpaAgendaSection renders Em direto badge + AndebolTV link
- i18n: PT-PT strings for live/stream status and watch links
- test: fpa-stream-match.test.ts (teams_overlap, teams_match_pair, find, enrich)

Co-Authored-By: Paperclip <[email protected]>
2026-07-13 07:14:35 +00:00
José Alves e08840af18 feat(writer-pipeline): FPA featured-image backfill + media:content ingestion — BIT-24384
Tests / writer-pipeline tests (push) Successful in 31s
Tests / bridge tests (push) Successful in 32s
Tests / frontend lib tests (push) Successful in 34s
Tests / writer-pipeline tests (pull_request) Successful in 28s
Tests / bridge tests (pull_request) Successful in 32s
Tests / frontend lib tests (pull_request) Successful in 31s
- 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
2026-06-05 02:29:47 +00:00
Maria PapoilaandPaperclip 3d4b129b4c BIT-15752: Add unit tests across writer-pipeline, bridge, and frontend
Tests / writer-pipeline tests (push) Failing after 1s
Tests / bridge tests (push) Failing after 1s
Tests / frontend lib tests (push) Failing after 1s
Tests / writer-pipeline tests (pull_request) Successful in 52s
Tests / bridge tests (pull_request) Successful in 25s
Tests / frontend lib tests (pull_request) Successful in 29s
87 new tests covering previously untested pure functions:
- writer-pipeline: token-metrics, store (canonicalUrl/itemId/upsertItem/shortlist), config-load
- bridge: ranking (freshness/relevance/rank/filter/take_top_n), aggregator-mapper
- frontend/lib: format, ui-i18n, public-origin

Adds test:coverage scripts (node --experimental-test-coverage) and Gitea
CI workflow. writer-pipeline now reports 95.91% line coverage.

Co-Authored-By: Paperclip <[email protected]>
2026-04-29 01:08:41 +00:00
Artur MoreiraandPaperclip b2034f2497 feat(bridge): implement Fastify bridge API for WordPress (BIT-350)
- 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
2026-03-23 14:17:37 +00:00