Post-merge Lighthouse re-verification of PR #47 confirms the article TBT regression is resolved: 7416ms -> 0-348ms, Performance 60 -> 99 median (5 runs + home control, results in docs/PERFORMANCE_BASELINE.md "Deploy & Re-Verification — 2026-08-07").
This follow-up closes a test-wiring gap found during that verification and adds margin above the 90 threshold:
bridge/package.json: sanitize-html.test.ts (added in the original fix, commit ee84059) was never added to the test/test:coverage npm scripts, so PR #47's claim of "28 bridge sanitizer tests pass" was not actually exercised by npm test. Fixed.
Defer mobile-menu and share-button click handlers to requestIdleCallback (institutional/sports headers, ArticleShareBar).
Split Base.astro's theme-flash-prevention script into a minimal inline snippet (must run before paint) and the deferred click-handler logic.
bridge/articles/:slug/related accepts optional ?category_id= to skip a redundant WP post-by-slug fetch.
Test plan
58 bridge tests pass (npm test, now actually including the 28 sanitizer tests)
47 frontend tests pass
bridge tsc --noEmit clean
Astro build succeeds
Lighthouse re-verified live on newsproject.bitreport.pt article page: 5 runs, median Performance 99, TBT 0-348ms (see docs/PERFORMANCE_BASELINE.md)
Closes BIT-28145 acceptance criteria (root cause documented, fix implemented + deployed, Lighthouse Performance >=90 confirmed on live article pages).
## Summary
- Post-merge Lighthouse re-verification of PR #47 confirms the article TBT regression is resolved: 7416ms -> 0-348ms, Performance 60 -> 99 median (5 runs + home control, results in docs/PERFORMANCE_BASELINE.md "Deploy & Re-Verification — 2026-08-07").
- This follow-up closes a test-wiring gap found during that verification and adds margin above the 90 threshold:
- `bridge/package.json`: `sanitize-html.test.ts` (added in the original fix, commit ee84059) was never added to the `test`/`test:coverage` npm scripts, so PR #47's claim of "28 bridge sanitizer tests pass" was not actually exercised by `npm test`. Fixed.
- Defer mobile-menu and share-button click handlers to `requestIdleCallback` (institutional/sports headers, `ArticleShareBar`).
- Split `Base.astro`'s theme-flash-prevention script into a minimal inline snippet (must run before paint) and the deferred click-handler logic.
- `bridge` `/articles/:slug/related` accepts optional `?category_id=` to skip a redundant WP post-by-slug fetch.
## Test plan
- [x] 58 bridge tests pass (`npm test`, now actually including the 28 sanitizer tests)
- [x] 47 frontend tests pass
- [x] bridge `tsc --noEmit` clean
- [x] Astro build succeeds
- [x] Lighthouse re-verified live on newsproject.bitreport.pt article page: 5 runs, median Performance 99, TBT 0-348ms (see docs/PERFORMANCE_BASELINE.md)
Closes BIT-28145 acceptance criteria (root cause documented, fix implemented + deployed, Lighthouse Performance >=90 confirmed on live article pages).
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
bridge/package.json:sanitize-html.test.ts(added in the original fix, commitee84059) was never added to thetest/test:coveragenpm scripts, so PR #47's claim of "28 bridge sanitizer tests pass" was not actually exercised bynpm test. Fixed.requestIdleCallback(institutional/sports headers,ArticleShareBar).Base.astro's theme-flash-prevention script into a minimal inline snippet (must run before paint) and the deferred click-handler logic.bridge/articles/:slug/relatedaccepts optional?category_id=to skip a redundant WP post-by-slug fetch.Test plan
npm test, now actually including the 28 sanitizer tests)tsc --noEmitcleanCloses BIT-28145 acceptance criteria (root cause documented, fix implemented + deployed, Lighthouse Performance >=90 confirmed on live article pages).
auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
auto-approve: CI success (gitea_auto_approve_open_prs_once.py)