Skip to content

Conversation

andriidudar
Copy link
Contributor

Details

This PR adds a visible upgrade button to the user menu as part of improving the self-serve flow. The upgrade button helps organization admins easily discover and access billing upgrade options directly from the main interface.

Key Changes:

  • Added an upgrade button in the UserMenu component that appears next to the app selector and user menu
  • The button is only visible to organization administrators who are not on academic plans
image

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-2270

Testing

  • Tested upgrade button visibility for different user roles (admin vs non-admin)
  • Verified button does not appear for academic organizations
  • Confirmed button links correctly to billing page with upgrade card parameter
  • Tested responsive behavior and visual integration with existing header elements
  • Manual testing scenarios:
    • Organization admin (non-academic): Button visible and functional
    • Organization admin (academic): Button hidden
    • Non-admin user: Button hidden
    • Button click opens billing page in new tab with correct parameters

Documentation

@andriidudar andriidudar requested a review from a team as a code owner August 27, 2025 15:25
Copy link
Contributor

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and at least one component tag ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change

Example: [issue-3108] [BE] [FE] Fix authentication bug

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a prominent "Upgrade" button to the user interface header to improve the self-serve billing flow. The button appears next to the app selector and user menu, making billing upgrades more discoverable for organization administrators.

Key Changes:

  • Added upgrade button that only displays for organization admins on non-academic plans
  • Extended Organization type to include academic plan status
  • Positioned button strategically in the header for maximum visibility

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/opik-frontend/src/plugins/comet/types.ts Added academic boolean field to Organization interface
apps/opik-frontend/src/plugins/comet/UserMenu.tsx Added upgrade button component with conditional rendering logic

href={buildUrl(
`organizations/${organization.id}/billing`,
workspaceName,
"&initialOpenUpgradeCard=true",
Copy link
Preview

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

The query parameter format is inconsistent. Consider using '?initialOpenUpgradeCard=true' instead of '&initialOpenUpgradeCard=true' as the third parameter, or use a proper URL building utility that handles parameter concatenation correctly.

Suggested change
"&initialOpenUpgradeCard=true",
"?initialOpenUpgradeCard=true",

Copilot uses AI. Check for mistakes.

@andriidudar andriidudar changed the title OPIK-2270 [Improve self-serve flow] Add Visible Upgrade button [OPIK-2270] [Improve self-serve flow] Add Visible Upgrade button Aug 27, 2025
Copy link
Contributor

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and at least one component tag ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change

Example: [issue-3108] [BE] [FE] Fix authentication bug

@andriidudar andriidudar changed the title [OPIK-2270] [Improve self-serve flow] Add Visible Upgrade button [OPIK-2270] [FE] [Improve self-serve flow] Add Visible Upgrade button Aug 27, 2025
Copy link
Collaborator

@aadereiko aadereiko left a comment

Choose a reason for hiding this comment

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

Nice work!

@andriidudar andriidudar merged commit 36b21d0 into main Aug 28, 2025
7 of 9 checks passed
@andriidudar andriidudar deleted the andriidudar/OPIK-2270-upgrate-button branch August 28, 2025 10:30
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