main ← fix-static-viewport-deprecation
merged 08:46AM - 15 Jul 26 UTC
### What & why
The component read `site.mobileView` inside its initializer, whi…ch runs while the application is still booting. Accessing the viewport that early is deprecated (`discourse.static-viewport-initialization`) — the value isn't reliable before boot and can't react to viewport changes. As a result, every admin on a site running this component saw a persistent **"[Admin Notice] … contains code which needs updating"** banner.
### Fix
- Move the desktop-only guard into the `decorateCookedElement` callback so it is evaluated at render time instead of during initialization.
- Read it from the modern `capabilities.viewport` service rather than the legacy mobile/desktop split.
Since `site.mobileView` is defined as `!capabilities.viewport.sm`, behaviour is unchanged — previews remain desktop-only.
See https://meta.discourse.org/t/367810 for the viewport guidance.