Add commercial use nudge banners#478
Conversation
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…to codex/commercial-use-banners # Conflicts: # apps/yaak-client/components/CloneGitRepositoryDialog.tsx # apps/yaak-client/components/CommercialUseBanner.tsx # apps/yaak-client/components/ExportDataDialog.tsx # apps/yaak-client/components/ImportDataDialog.tsx # apps/yaak-client/components/Settings/SettingsCertificates.tsx # apps/yaak-client/components/Settings/SettingsGeneral.tsx # apps/yaak-client/components/Settings/SettingsProxy.tsx # apps/yaak-client/components/core/DismissibleBanner.tsx # apps/yaak-client/components/git/GitCommitDialog.tsx # packages/theme/src/window.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d7266a7cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onDismiss={() => | ||
| setSnoozedAt(JSON.stringify({ source, at: new Date().toISOString() })) | ||
| } | ||
| onShow={handleShow} |
There was a problem hiding this comment.
Avoid snoozing the banner as soon as it renders
When a post-trial user reaches any of these workflows, onShow calls handleShow, which writes the current timestamp into snoozedAt; the parent then recomputes snoozed and returns null, so the banner removes itself as soon as the KV update propagates and users only see a flash with no reliable chance to read it or click “View plans.” Move this write to an explicit dismissal/action, or track impressions separately from the snooze value used to hide the banner.
Useful? React with 👍 / 👎.
| return license.status !== "active" && license.status !== "trialing"; | ||
| } catch (err) { | ||
| console.log("Failed to check license before commercial-use prompt", err); | ||
| return true; |
There was a problem hiding this comment.
Do not prompt when license verification fails
If an activated user is offline or the license service returns an error, plugin:yaak-license|check rejects here; returning true treats that transient failure as “no active/trial license” and shows purchase nudges to someone who may already have a valid license. Since the banner is meant for confirmed post-trial/personal-use states, failures should be non-promoting or reuse the cached license query state rather than defaulting to a commercial-use prompt.
Useful? React with 👍 / 👎.
Adds a shared inline commercial-use banner for post-trial users and places it in team-oriented workflows.