perf(seo,perf,a11y): mobile Lighthouse remediation — static routing, defer Sentry, async fonts, tap targets#82
Conversation
…ts, larger tap targets SEO (P0): add public/sitemap.xml and tighten the vercel.json SPA rewrite with a negative-lookahead so static files (robots.txt, sitemap.xml, assets) are served as files instead of falling through to index.html; add Disallow rules for private routes in robots.txt. Performance (P1): initialize Sentry off the critical rendering path via an idle-time dynamic import, moving ~157 KiB gzip out of the initial load without disabling monitoring. Load Google Fonts non-blocking (preload + media=print/onload swap + noscript fallback) while keeping the system-font fallback and display=swap. Accessibility (P2): enlarge mobile tap targets to >=44px (top-bar login button, user-menu trigger, logo link, home-page CTAs). No application behavior changes. Docs: add AUDIT_BISOMAPTECH_MOBILE.md documenting the mobile Lighthouse audit and remediation plan. https://claude.ai/code/session_01GeeGao9xae3Pv31pyzK2sL
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 55 minutes and 4 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughThis PR implements improvements identified in a mobile Lighthouse audit. It fixes SPA routing to preserve static assets, adds SEO configuration via sitemap and robot rules, defers Sentry initialization to avoid blocking initial render, loads Google Fonts non-blockingly, and enlarges touch targets for mobile UI controls. ChangesMobile Lighthouse Audit Remediations
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Context
Acts on the mobile Lighthouse audit (Perf 93, A11y 95, Best Practices 100, SEO 92 — Moto G Power / slow 4G, Lighthouse 13.3.0). Adds the audit as a repo doc and implements the highest-impact fixes. No application behavior is changed — only routing config, monitoring load timing, font loading strategy, and tap-target sizing.
Audit captured in
AUDIT_BISOMAPTECH_MOBILE.md.Changes
P0 — SEO blocker: static-file routing
"/(.*)" → /index.htmlmeant any missing static file fell through toindex.html.robots.txtreferenced/sitemap.xml, but nositemap.xmlexisted, so/sitemap.xmlreturned HTML instead of a valid sitemap.public/sitemap.xmladded, listing the public pages (/,/talents,/lieux,/contributeurs,/matching,/a-propos).vercel.jsonrewrite tightened with a negative-lookahead so files ending in known static extensions (.txt,.xml,.ico, images,.js,.css, fonts, …) are served as files. SPA routes — including paths containing dots like/contributeurs/john.doe— still resolve toindex.html.robots.txtkeepsAllow: /+ the sitemap reference, and addsDisallowfor private/auth routes (/login,/onboarding,/auth/,/profil/edit,/admin,/messages).P1 — Reduce unused JavaScript (~127 KiB)
main.tsx, putting the full SDK on the critical path. It now loads via a dynamic import onrequestIdleCallback(with asetTimeoutfallback). Monitoring stays enabled (same DSN/config); it's just initialized off the critical path.sentry-*.js(~474 KiB / 157 KiB gzip) is no longer in the initialmodulepreloadgraph.React.lazy(verified); Leaflet stays isolated to the lazy map chunk.P1 — Render-blocking resources / fonts
preload+<link media="print" onload="this.media='all'">swap +<noscript>fallback.display=swapand the system-font fallback are retained, so text paints immediately.P2 — Mobile tap targets
h-7/28px), user-menu trigger (wash-8 w-8/32px), logo link, and the three home-page CTAs. The mobile header isstickyat a fixedh-12(48px), so 44px controls fit without layout shifts.Verification
npm run build(tsc + vite) ✅npm test— 17/17 passing ✅dist/index.htmlchecked: fonts non-blocking, Sentry absent frommodulepreload,robots.txt+sitemap.xmlemitted.Notes / follow-ups (not changed here)
index.htmlcanonical/OG usehttps://BisoMapTech.appwhilerobots.txt/sitemap.xml(and the audited URL) usehttps://bisomaptech.vercel.app. Left as-is to avoid changing the intended production canonical without confirmation.https://claude.ai/code/session_01GeeGao9xae3Pv31pyzK2sL
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Documentation