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
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
BIT-28145: newsproject.bitreport.pt article template Total Blocking Time
was 7416ms (Lighthouse Performance 60) vs home 73ms (Performance 97).
Root cause: WordPress oEmbed HTML injected via set:html rendered <script>,
<style>, <link> tags, inline event handlers, and heavy <iframe> embeds
(Twitter, Instagram, YouTube) that blocked the main thread during HTML
parsing. The prior sanitizer only stripped <script> tags and added
loading=lazy to iframes — insufficient for the oEmbed payload.
Changes:
- Enhance bridge and frontend sanitizers to strip <style>, <link>,
and inline event handlers (on* attributes) in addition to <script>
- Replace <iframe> elements with click-to-load placeholders (eliminates
iframe document parsing cost from main thread)
- Add loading=lazy + decoding=async to <img> tags in article body
- Add content-visibility:auto to .article-body CSS (skip off-screen render)
- Add embed-placeholder styles in global.css + click handler in [slug].astro
- Parallelize article/related/trending bridge fetches
- Add preconnect hints for gravatar and featured images
- Document root cause in PERFORMANCE_BASELINE.md
Paperclip-Agent: Miguel Teixeira (urlKey miguel-teixeira; id 0f722e1a-bc3e-4381-8d98-76fa3c7aea10)
Paperclip-Issue: BIT-28145
andebol.net home fails LCP (~8s) and Lighthouse Performance (~26) while
newsproject.bitreport.pt (same bridge/cache stack) passes. Root cause:
FpaAgendaSection is andebol.net-only (fpa_agenda_enabled + institutional
theme, homepage only) and renders up to 48 game cards with heavy per-card
CSS (gradients, color-mix, shadows). Measured andebol.net home DOM at
~2230 elements vs ~468 on newsproject.bitreport.pt, and Style & Layout
main-thread cost consistently ~3x higher, matching the diagnostics in
docs/PERFORMANCE_BASELINE.md (no render-blocking scripts, cost
concentrated in style/layout).
Apply content-visibility: auto + contain-intrinsic-size to
.fpa-agenda__card so the browser skips style/layout/paint for
off-screen cards (most of the 48 sit below the fold).
Replace wp-login redirects with branded /entrar and /registar forms
calling bridge /api/auth/*. Add compact Últimas rail (up to 36) near
fold and reduce badge-heavy institutional chrome for Andebol.net.
Paperclip-Agent: Artur Moreira (urlKey artur-moreira; id ac1be104-8818-496a-80c5-fbc590a87855)
Paperclip-Issue: BIT-26753
Paperclip-Run: 81f2e183-2e02-4b0a-882b-c4051e2c02dd
Co-authored-by: Cursor <[email protected]>
Replace "Federação Portuguesa de Andebol" with "Federação de Andebol de Portugal"
in PT/EN i18n copy and add regression test.
Co-authored-by: Cursor <[email protected]>
Tests / frontend lib tests (pull_request) Passed locally (runner infra flakiness on checkout — BIT-25572)
Tests / writer-pipeline tests (pull_request) Passed locally (runner infra flakiness on checkout — BIT-25572)
Fetch club logo URLs from FPA getClube API and render img elements
in the FpaAgendaSection component; fallback to team initials when
the URL is unavailable.
Paperclip-Issue: BIT-25572
Paperclip-Run: 6f581074-e308-4a75-b6bb-7a08aee20136
Root cause: DOMAINS_CONFIG_PATH was missing from the frontend env so
getDomainConfig('andebol.net') fell through to the English fallback.
Fixes applied:
- deploy/systemd/frontend.env.example: add DOMAINS_CONFIG_PATH and
BRIDGE_INTERNAL_URL so Astro SSR resolves domain JSON on the CT
- bridge/src/lib/request-host.ts: drop X-Site-Host; resolve site domain
from the HTTP Host header which nginx already preserves ($host)
- frontend/src/lib/bridge.ts: multi-domain SWR cache keys; nginx-routed
bridge calls via public hostname with BRIDGE_INTERNAL_URL loopback
override for CT environments where public DNS does not resolve locally
- config/writers/f0251a61: restrict Nelson Alves topics to Andebol only
(remove Futebol / Desportos — BIT-22288 intent)
- frontend: overhauled article page (hero image, masthead, sidebar,
share bar), rich related-articles grid, improved LatestGrid institutional
theme, FpaAgendaSection rewrite, ui-i18n PT strings completed
/entrar and /registar redirected to / because !config.auth_links is
truthy when auth_links is undefined (config fallback). Change both
pages to config.auth_links === false so only an explicit opt-out sends
the user home; missing or true both forward to wp-login.php.
Also add Cache-Control: no-store to the redirect response so edge
proxies never cache auth flows, and extend smoke-andebol.sh to assert
/entrar and /registar resolve to a wp-login URL.
Paperclip-Issue: BIT-22298
Paperclip-Agent: d706f4e6-5d05-4cec-b6e8-f8fb1f203aae
resolveSsrBridge now treats non-2xx /health as failure in production.
news-bridge no longer waits for news-frontend; frontend Wants+After
bridge so the API is up when Astro starts. Document the PT 503 string
and recovery commands in the BIT-746 runbook.
Automated health monitoring for the news-platform services on CT222,
motivated by the bridge crash-loop incident (BIT-743) where 3,608
restarts went undetected until manual discovery.
Health endpoints:
- Bridge /health enhanced with optional ?checks=true for deep
dependency probes (WordPress, Redis) and uptime reporting
- Frontend /health.json added as Astro API route
Monitoring infrastructure:
- healthcheck.sh: periodic probe script with HTTP checks, systemd
restart-count detection, cooldown logic, and Ntfy push alerting
- news-healthcheck.timer: runs every 3 min (detection < 5 min)
- [email protected]: OnFailure template for instant crash alerts
- All three service units updated with OnFailure= directive
- deploy.sh updated to install monitoring units and env file
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-744
Paperclip-Run: 405ab587-8b8b-4963-8867-0feb95a994e3
- Set document language to full BCP-47 from domain config (e.g. pt-PT).
- Extend ui-i18n with service errors, ad labels, ARIA landmarks, category
meta fallback, and localized search upstream message.
- Localize ArticleHeader (dates, reading time, breadcrumb); omit duplicate
breadcrumb when institutional chrome already provides one.
Docs: add docs/i18n.md strategy sketch; domains.md and deployment.md
(BRIDGE_INTERNAL_URL) cross-links.
Paperclip-Agent: ac1be104-8818-496a-80c5-fbc590a87855
Paperclip-Issue: 182b154e-5ad4-4965-9f30-50a66ef51ce0
Paperclip-Run: 6ce7746f-bfb6-4486-a1f5-aed26fe8e149
Made-with: Cursor
When the Astro server could not reach the bridge health endpoint, the
code fell back to MockBridgeClient, which serves English placeholder
articles and a fictional author name. That was indexed and shown on
andebol.net (BIT-738).
Introduce resolveSsrBridge() so production never uses the mock; allow
BRIDGE_INTERNAL_URL to override the domain JSON endpoint for real
deploy topology; adjust pages and sitemap accordingly.
Made-with: Cursor
Align andebol.net-style category and archive routes with the /noticias editorial
pattern: gradient masthead, lead article plus two-column grid, optional most-read
sidebar from bridge trending, and hub pagination styling. Non-institutional
themes keep the previous simple grid and header.
Made-with: Cursor
Add an institutional trending strip with section title and card rhythm.
Show a visible hero section label; localize related-articles titles.
Article pages gain breadcrumbs in institutional theme; category pages get
a horizontal secondary nav aligned with the news hub plus a wider layout.
Search gains an institutional masthead, accessible heading hierarchy, and
a results section title when queries return articles.
Verified: npm run build (frontend).
Paperclip-Task: b8b9096e-1fcd-478f-a92f-83a1db0ce67d
Paperclip-Run: 33ce910a-e3fe-4e2d-be3f-e8a3261c73e7
Made-with: Cursor
Switch institutional theme from serif to Inter (sans-serif) for headings
and body. Increase heading weights to 700-800 for professional punch.
Add top accent bar to header, dark navy footer, modern card radius (6px),
and tighter letter-spacing on all titles. Inspired by eurohandball.com
visual hierarchy without copying assets or branding.
Typography stack: Inter → SF Pro → system sans-serif
Article body: retains serif (Georgia) for readability
Co-Authored-By: Paperclip <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add getPublicOrigin() so canonical URLs and JSON-LD use Host + X-Forwarded-Proto
instead of localhost:4321 when nginx proxies to Node.
- Nav and mobile menu: link "Notícias" to /noticias (eurohandball-style listing).
- Homepage "ver tudo" targets /noticias instead of /category/all.
- Redirect /news to /noticias for English-style paths.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
The bridge built hero, trending, featured, latest, and category rows from
overlapping slices of the same post list, so the same thumbnails appeared many
times. Reserve post ids top-to-bottom, over-fetch the main feed and category
queries, and de-dupe the hero when stickies overlap the feed.
Render the featured slice as its own banded section, localize the sports
trending strip, and use distinct heading ids when two grids share the page.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Enable fpa_agenda_enabled on andebol.net domain config. The bridge fetches
ws.fpa.pt getAgendaJogosFAP with SWR caching, normalises rows, and attaches
fpa_agenda to the homepage JSON. The institutional theme renders a responsive
fixtures table with FPA attribution.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Add GET /search wired to bridge articles search with pagination and empty-state
category pills. Handle /category/all as a full-archive listing. Enrich
institutional theme: serif body rhythm, hero depth, footer gradient, header
search (all breakpoints) plus auth links when auth_links is set, homepage
DiscoverSection, and footer links to search and archive. Extend UI strings (EN/PT)
and mock bridge search for offline builds.
Verified: npx [email protected].0 node_modules/astro/bin/astro.mjs build (frontend).
Made-with: Cursor
The institutional header/footer already imported ui-i18n.ts but the file was
missing from the repository. Add Portuguese/English UI strings, wire
config.locale through homepage sections, category archives, article cards,
and related articles, and use Intl.RelativeTimeFormat for relative dates.
Refs: BIT-586
Made-with: Cursor
Add domain-aware theme system (BIT-494, BIT-495, BIT-496, BIT-497):
- Theme architecture: move shared components into src/themes/sports/,
create src/themes/institutional/ with handball-oriented design
- Domain config: andebol.net.json (institutional theme, pt-PT locale,
handball categories, WP endpoint port 8081)
- theme.ts library: resolves theme components per domain config
- Updated layouts/pages to use theme-aware component loading
- Updated docs: domains.md, frontend.md with theme system docs
- Smoke test script for andebol.net
- WordPress .env.example with andebol env vars
Note: this work was completed in BIT-494/495/496/497 but was
never committed — committing now to unblock andebol.net deploy.
Co-Authored-By: Paperclip <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Forward X-Site-Host from Astro to the bridge so loopback calls use the public domain JSON
- Normalize newsproject.bitreport.pt.json (categories slug/label, wp on 127.0.0.1:8080)
- Degrade homepage/trending when WordPress is down instead of 500
- Extend webhook-deploy.sh for config/ and wordpress/ changes; add deploy-hook-server + systemd unit
- Document automatic Gitea webhook flow in docs/deployment.md; align DOMAINS_CONFIG_PATH env
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor