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
Root cause: FpaAgendaSection (andebol.net-only, up to 48 FPA agenda cards)
Style & Layout main-thread cost, fixed via content-visibility on
.fpa-agenda__card (PR #42, merged as 6b95f4d).
Also documents a separate but directly blocking finding: the ct222-news
deploy cron had been failing silently for ~24h (broken SSH deploy key,
never registered with Gitea) so 15+ merged PRs including this fix never
reached production. Fixed by switching to the standard HTTPS PAT +
credential-helper pattern from CT_DEPLOY_CREDENTIAL_ROTATION_BIT28016;
cron auto-recovered and deployed ec22a04 without further intervention.
Re-measurement is inconclusive on numeric pass/fail: this measurement
host was under heavy unrelated contention (load avg 48-60/24 cores),
confirmed by newsproject.bitreport.pt (a previously-verified-passing
control) also failing in the same session. Fix is confirmed live and
the targeted metric (Style & Layout) improved ~2x in the calmest runs;
authoritative re-verification needs PSI (quota-exhausted today) or a
quiet host window.
Paperclip-Issue: BIT-28144
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
Incorporate August Lighthouse addendum and board statuses (BIT-28130 done;
follow-ups BIT-28144/28145) so docs do not claim CWV still unmeasured.
Paperclip-Issue: BIT-28131
Paperclip-Run: 73c52077-1860-4763-971f-b6d01d6dd8ac
Align objectives matrix and open-work section with the Aug 2026 governance
sweep children; lead the performance baseline with May HIT evidence instead
of the superseded April cache-gap summary.
Paperclip-Issue: BIT-28131
Paperclip-Run: 52ceb27e-9eda-4fe2-92f2-3794e4a40d1c
Cache Rule applied 2026-05-12T22:39 UTC; both zones now return cf-cache-status:
HIT on repeat GET /. TTFB on HIT ~81-130 ms (down from ~220-380 ms DYNAMIC).
Co-Authored-By: Paperclip <[email protected]>
Add /api/ exclusion and per-zone filter expressions in deployment.md.
Record continuation verification in PERFORMANCE_BASELINE (still DYNAMIC).
Execution moves to Paperclip child BIT-21912 for DevOps dashboard apply.
Co-authored-by: Cursor <[email protected]>
Cache-Control headers (BIT-2261) confirmed live on both domains.
TTFB improved from ~300ms to ~220ms. Remaining gap: Cloudflare Cache
Rule needed for HTML caching (cf-cache-status still DYNAMIC).
Paperclip-Issue: BIT-21610