Skip to content

Conversation

@nikhilsaikethe
Copy link
Contributor

don't load license info for cloud in about us page
show license section for meta orgs in cloud as well
show default ingestion limit when license expired

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Nov 27, 2025
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 27, 2025

Greptile Overview

Greptile Summary

This PR consolidates three license-related fixes: disabling license data loading for cloud environments in About page, displaying default ingestion limits when licenses expire, and simplifying meta org detection to use only identifier matching.

  • Optimized About page by skipping unnecessary license API calls for cloud deployments
  • Enhanced user experience by showing consistent default limits (100 GB/day, PerDayCount) when license has expired
  • Fixed meta org detection by removing unreliable label check, enabling License tab visibility for meta orgs in cloud environments
  • Updated test coverage to match new identifier-only meta org detection logic

Confidence Score: 4/5

  • This PR is safe to merge with minor issues to address
  • The changes are focused and logical, with proper test coverage updates. The logic simplification in useIsMetaOrg reduces complexity and potential bugs. However, there is a typo in the test file that should be corrected, and a minor comment formatting issue in About.vue
  • Pay attention to web/src/composables/useIsMetaOrg.spec.ts for the typo fix

Important Files Changed

File Analysis

Filename Score Overview
web/src/composables/useIsMetaOrg.spec.ts 4/5 Updated test to match new logic (identifier-only check), contains typo in test name
web/src/views/About.vue 4/5 Added conditional to skip license data loading for cloud, shows default limits when license expired, minor formatting issue in comment

Sequence Diagram

sequenceDiagram
    participant User
    participant AboutPage as About.vue
    participant LicenseComponent as License.vue
    participant useIsMetaOrg
    participant Store as Vuex Store
    participant LicenseAPI

    User->>AboutPage: Load About page
    AboutPage->>AboutPage: Check config.isCloud
    alt config.isCloud == 'false' (Self-hosted)
        AboutPage->>LicenseAPI: loadLicenseData()
        LicenseAPI-->>AboutPage: License data
        AboutPage->>AboutPage: Display license info with limits
        alt license.expired
            AboutPage->>AboutPage: Show default limits (100 GB/day, PerDayCount)
        else license valid
            AboutPage->>AboutPage: Show actual license limits
        end
    else config.isCloud == 'true' (Cloud)
        AboutPage->>AboutPage: Skip license data loading
    end

    User->>LicenseComponent: Access License tab in Settings
    LicenseComponent->>useIsMetaOrg: Check isMetaOrg
    useIsMetaOrg->>Store: Get selectedOrganization.identifier
    useIsMetaOrg->>Store: Get zoConfig.meta_org
    useIsMetaOrg-->>LicenseComponent: identifier === meta_org
    
    alt isMetaOrg && isEnterprise
        LicenseComponent->>LicenseComponent: Show License tab
        LicenseComponent->>LicenseAPI: Load license data
        LicenseAPI-->>LicenseComponent: License data
        alt license.expired
            LicenseComponent->>LicenseComponent: Show default limits (100 GB/day, PerDayCount)
        else license valid
            LicenseComponent->>LicenseComponent: Show actual license limits
        end
    else not meta org
        LicenseComponent->>LicenseComponent: Hide License tab
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@nikhilsaikethe nikhilsaikethe force-pushed the fix/hide-alert-history branch 9 times, most recently from a9b0832 to 000fc27 Compare November 28, 2025 11:56
@nikhilsaikethe nikhilsaikethe merged commit c58714f into main Nov 28, 2025
37 checks passed
@nikhilsaikethe nikhilsaikethe deleted the fix/hide-alert-history branch November 28, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants