fix: remove SSR sensitive-images fetch (#785)
* fix: remove SSR sensitive-images fetch
the frontend SSR was fetching /moderation/sensitive-images on every
page load, hammering the backend during traffic spikes (1,179 rate
limit hits over 7 days).
the SSR fetch was premature optimization - cloudflare pages workers
make direct fetch calls to fly.io with no CDN caching layer. the
cache-control headers from PR #784 only help browser caching.
fix: remove the SSR fetch entirely. the client-side ModerationManager
singleton already has caching and fetches the data once on page load.
the "flash of sensitive content" risk is theoretical - images load
slower than a single API call, and there are only 2 flagged images.
- delete +layout.server.ts
- simplify +layout.ts
- use moderation.isSensitive() singleton in pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add localStorage caching for sensitive images
loads from localStorage synchronously on page load (no flash),
then refreshes from API in background and caches for next visit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
authored by