Comparison route: always include system-recommended package

The ComparisonPage's `recommendedPackage` prop was never wired in the
demo — users only saw their basket contents. Now always surface a
default recommended package (parsons:deluxe) as an extra column, deduped
against the basket so it never appears twice.

Basket mechanics are unchanged: the 3-package cap counts user selections
only, and the recommended is layered on top as an editorial suggestion.

The empty state only renders when there is genuinely nothing to show —
since the recommended is static, it's effectively defensive for a future
state where resolution could fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 14:03:04 +10:00
parent e5579a4d67
commit ac598ea7b1
2 changed files with 20 additions and 2 deletions

View File

@@ -1245,6 +1245,16 @@ export function resolveComparisonPackage(key: BasketKey): ComparisonPackage | nu
return bundle.forComparison.find((p) => p.id === parsed.packageId) ?? null;
}
/**
* Demo recommendation: the package ComparisonPage always surfaces as the
* system-recommended option. Not part of the user's basket and doesn't
* count against the 3-package basket cap — it's an editorial suggestion
* layered on top of whatever the user has selected. If the same package
* is already in the basket, the Comparison route dedupes so it appears
* once (as the recommended column).
*/
export const DEMO_RECOMMENDED_KEY: BasketKey = 'parsons:deluxe';
/**
* Verified providers surfaced under the "Similar packages from verified
* providers" grid on unverified tier-2 / tier-3 pages. Derived from the