10b74fd921
Cloud now gates AI on the org, but the dashboard had no way to say so: a free or partner project just watched every widget on the page fail its own way against a 403. - New useAiEntitlement resolves the reason from the instance-info bridge. - Free orgs get the whole page replaced by an upgrade CTA wired to host.onShowUpgradeDialog, matching how BackupsPage gates scheduled backups. - Partner orgs lose the AI tab from the sidebar entirely, with a not-supported state on the page as a backstop for a deep link. - Self-hosting is always allowed; it brings its own key. Partner-ness is carried explicitly as isPartnerOrg rather than derived from planName, because cloud reports partner orgs as 'team' — indistinguishable from a real Team customer. The hook fails OPEN while loading and on bridge errors: cloud still enforces the real gate, so the worst case is a page that renders and then 403s, versus flashing an upgrade wall at a paying customer on a transient blip. Requires the matching insforge-cloud change to send isPartnerOrg in INSTANCE_INFO; until then partner orgs fall back to today's behaviour and the free-plan case works on its own, since planName is already sent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>