Skip to content

🤖 fix(web): show compact fallback until AdSense slot is filled and cap height at 90px - #44

Merged
thenom merged 1 commit into
mainfrom
fix/adsense-filled-swap
Nov 13, 2026
Merged

thenom merged 1 commit into
mainfrom
fix/adsense-filled-swap

Conversation

@thenom

@thenom thenom commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Eliminate Blank 280px AdSense Container (data-ad-status === "filled" Check):
    • On scbind.com, Google AdSense's adsbygoogle.js processes <ins class="adsbygoogle"> (data-adsbygoogle-status="done"), resizes the <ins> element to 280px tall when data-ad-format="auto" is used, and leaves data-ad-status unset (null) while a newly created ad unit (9700539154) warms up or when no ad impression is served.
    • Inverted the visibility toggle in AdSenseSlot (apps/web/src/components/MonetizationSlot.tsx) so the compact Aegis Flight Systems fallback card remains visible until MutationObserver observes data-ad-status="filled", keeping the <ins> wrapper collapsed (0px height) until a real ad is filled.
  • Cap AdSense Banner Height to 90px:
    • Set data-ad-format="horizontal" and data-full-width-responsive="false" with maxHeight: '90px' so Google's script cannot expand the slot to 280px tall.

🤖 AI Agent / LLM Contribution Disclosure

  • Developed with AI Agent: Generated and verified with the assistance of Google DeepMind Antigravity (Gemini).
  • Prompt / Context: Inspect live https://scbind.com/ to diagnose why the AdSense slot rendered as a 280px blank box and update AdSenseSlot to keep the compact fallback card visible until data-ad-status="filled" while capping the ad unit height at 90px.
  • Verification Steps:
    • Updated and executed Vitest unit test suite (apps/web/src/components/__tests__/MonetizationSlot.spec.tsx).
    • Verified full TypeScript & Vite production build (npm run build).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Deploying sc-controller-mapper with  Cloudflare Pages  Cloudflare Pages

Latest commit: 65d6db7
Status: ✅  Deploy successful!
Preview URL: https://b81a246d.sc-controller-mapper.pages.dev
Branch Preview URL: https://fix-adsense-filled-swap.sc-controller-mapper.pages.dev

View logs

@thenom
thenom merged commit 4d8917a into main Nov 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant