fix supplier dashboard UX, Paddle integration, and dev tooling

Supplier dashboard: impersonate redirects to supplier dashboard when user
owns a supplier, sidenav active tab updates on click, listing preview
capped at 420px, insufficient-credits error shows balance and buy CTA,
boost buy buttons resolve Paddle price IDs server-side.

Dev tooling: dev_run.sh kills child processes on Ctrl-C (process
substitution fix), syncs Paddle products to DB on each run,
setup_paddle.py gains --sync mode and fixes Duration/Interval SDK change.

Seed data: each claimed supplier gets its own owner user and subscription.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-18 19:40:06 +01:00
parent 891b875cd1
commit 0fe5ab1259
11 changed files with 212 additions and 64 deletions

View File

@@ -13,6 +13,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- **Supplier impersonation** — "Impersonate Owner" button on admin supplier
detail page; reuses existing `admin.impersonate` route, shown only when
the supplier has a `claimed_by` user
- **Seed data: supplier owner accounts** — each claimed supplier now gets its
own user + active subscription for realistic impersonation testing
### Fixed
- **Insufficient credits UX** — unlock error now shows credit balance, cost,
and a "Buy Credits" CTA linking to Boost & Upsells tab (was a collapsed
red error message with no action)
- **Supplier dashboard sidenav** — active tab highlight now updates on click
(was only correct on initial page load)
- **Boost/credit buy buttons used wrong price IDs** — dashboard boosts tab
passed internal keys (`boost_logo`, `credits_25`) as Paddle `priceId`
instead of resolved Paddle price IDs; buttons now show "Not configured"
when Paddle products aren't set up
- **Listing preview card stretched full width** — constrained to 420px to
match actual directory card proportions
- **Impersonate redirects to supplier dashboard** — impersonating a user who
owns a supplier now lands on `/suppliers/dashboard` instead of the generic
demand-side dashboard
### Added — Programmatic SEO: Content Generation Engine
- **Database migration 0010** — `published_scenarios`, `article_templates`,