Sitesmith: take the upgrade link from the panel #63

Merged
jknapp merged 1 commits from fix/upgrade-url-from-panel into main 2026-12-03 21:27:27 +00:00
Owner

The editor's UpgradeBanner hard-coded a billing link. It now uses summary.upgrade_url from the Sitesmith entitlement response and renders no link when it is empty or absent. Everything else in the banner is unchanged.

  • SitesmithSummary gains an optional upgrade_url?: string.
  • The WHP panel sends upgrade_url as <billing_url>/clientarea.php?action=services, built from its billing_url setting. Empty means the host operator has not configured a billing URL, so no link is shown.
  • Companion change in the WHP panel, which also patches the compiled web-files/site-builder/js/editor.js the same way. Rebuilding the bundle from this branch should produce the equivalent.

Tests: new UpgradeBanner.test.tsx (link rendered with the given url; no link when empty or absent). vitest run src/panels/sitesmith passes and tsc --noEmit is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0185ukXiDeTw5Hbvm5fCmEsH

The editor's UpgradeBanner hard-coded a billing link. It now uses `summary.upgrade_url` from the Sitesmith entitlement response and renders no link when it is empty or absent. Everything else in the banner is unchanged. - `SitesmithSummary` gains an optional `upgrade_url?: string`. - The WHP panel sends `upgrade_url` as `<billing_url>/clientarea.php?action=services`, built from its `billing_url` setting. Empty means the host operator has not configured a billing URL, so no link is shown. - Companion change in the WHP panel, which also patches the compiled `web-files/site-builder/js/editor.js` the same way. Rebuilding the bundle from this branch should produce the equivalent. Tests: new `UpgradeBanner.test.tsx` (link rendered with the given url; no link when empty or absent). `vitest run src/panels/sitesmith` passes and `tsc --noEmit` is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0185ukXiDeTw5Hbvm5fCmEsH
jknapp added 1 commit 2026-12-03 01:52:22 +00:00
The panel now sends upgrade_url in the entitlement summary, derived from
its billing_url setting. The banner uses it for the upgrade link and
renders no link when it is empty or absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXiDeTw5Hbvm5fCmEsH
jknapp merged commit bc42eec8e5 into main 2026-12-03 21:27:27 +00:00
Sign in to join this conversation.