Harden a custom chat activity page against CSP eval, polling storms, cache duplication, and fallback error stubs