Skip to content

Show Unactivated badge on locked tiers for unactivated licenses#123

Merged
pauloiankoski merged 9 commits intodevelopfrom
feat/unactivated-tier-badge
Apr 28, 2026
Merged

Show Unactivated badge on locked tiers for unactivated licenses#123
pauloiankoski merged 9 commits intodevelopfrom
feat/unactivated-tier-badge

Conversation

@pauloiankoski
Copy link
Copy Markdown
Contributor

@pauloiankoski pauloiankoski commented Apr 28, 2026

Fixes issue 161

Summary

Fixes an edge case where a user with a valid but unactivated license (domain not yet in the activations list) was shown upgrade buttons for tiers they already own.

When activated_here: false and validation_status: "not_activated", the hook couldn't find a licenseProduct, which left rank = -1 and routed every catalog tier into upgradeCatalogTiers — presenting "Upgrade to Pro" buttons to someone who already purchased Pro.

  • Store: adds getUnactivatedLicenseProduct selector that finds a license product the user owns but hasn't activated on this domain
  • Hook: useProductFeatureGroups falls back to the unactivated product for rank computation; tiers at or below that rank move to activationCatalogTiers instead of upgradeCatalogTiers; exposes isUnactivatedLicense flag
  • TierGroup: new showUnactivated prop renders LicenseBadge type="unactivated" in the upgrade-button slot
  • ProductSection: passes showUnactivated to activation tier groups; folds isUnactivatedLicense into isNotActivated so the product header shows "Unactivated" instead of "Unlicensed"; uses licenseProduct ?? unactivatedLicenseProduct for buttonHref so subscribers with an unactivated license are routed to the change-plan portal flow rather than a fresh purchase_url

Artifacts

Before
CleanShot 2026-04-28 at 13 41 34

After
CleanShot 2026-04-28 at 13 50 05

@pauloiankoski
Copy link
Copy Markdown
Contributor Author

I'm just concerned that I'm seeing too many Unactivated badges on the screen, and I'm not sure I like that, so I'm open to hearing your thoughts.

@pauloiankoski pauloiankoski force-pushed the feat/unactivated-tier-badge branch from 78d6c53 to d6f77b3 Compare April 28, 2026 17:07
jonwaldstein
jonwaldstein previously approved these changes Apr 28, 2026
Copy link
Copy Markdown
Contributor

@jonwaldstein jonwaldstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pauloiankoski nice! I hear you on the badge but I think its fine for now 😏

We released v1.0.0 already so we should probably create a release branch instead of margin into master and add any since tags

}

/**
* @since 1.0.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to add a new TBD release tag now 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TBD since tag and changed base to develop branch.

@pauloiankoski pauloiankoski force-pushed the feat/unactivated-tier-badge branch from 6612a76 to 7d0a020 Compare April 28, 2026 17:17
@pauloiankoski pauloiankoski changed the base branch from main to develop April 28, 2026 17:18
@pauloiankoski pauloiankoski merged commit fc27ade into develop Apr 28, 2026
@pauloiankoski pauloiankoski deleted the feat/unactivated-tier-badge branch April 28, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants