--- title: How AI Code Assistance Accidentally Tanked My SEO Traffic permalink: /futureproof/ai-code-assist-seo-traffic-drop-cls-fix/ description: "I wanted to share how I recently used AI code assistance to help manage my website, specifically to fix a Cumulative Layout Shift (CLS) issue that arose after adding a dynamic JavaScript Table of Contents (TocBot). Unfortunately, the initial fix suggested by the AI, while addressing the visual layout shift, involved hiding content in a way (`visibility: hidden`) that made large parts of my site invisible to search engines, tanking my traffic. This post details how I diagnosed the problem – realizing it mimicked blocking crawlers – and worked with the AI again to implement a more SEO-friendly solution using CSS `opacity` and a `