Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: ensure the web UI doesn't break when license telemetry required check fails#16667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugodutka merged 3 commits intomainfromhugodutka/require-telemetry-frontend-fix
Feb 24, 2025

Conversation

hugodutka
Copy link
Contributor

@hugodutkahugodutka commentedFeb 23, 2025
edited
Loading

Addresses#16455.

Changes

  • Initialize default entitlements in a Set to include all features
  • Initialize entitlements'Warnings andErrors fields to arrays rather thannils.
  • Minor changes in formatting on the frontend

Reasoning

I had to change how entitlements are initialized to match thecodersdkgenerated types, which the frontend assumes are correct, and doesn't run additional checks on.

  • features: Record<FeatureName, Feature>: this type signifies that everyFeatureName is present in the record, but onmain, that's not true if there's a telemetry required error
  • warnings: readonly string[]; anderrors: readonly string[];: these types mean that the fields are notnull, but that's not always true

With a valid license, theLicensesEntitlements function ensures that all features are present in the entitlements. It's called by theEntitlements function, which is called byapi.updateEnittlements. However, when a license requires telemetry and telemetry is disabled, the entitlements with all featuresare discarded in an early exit from the same function. By initializing entitlements with all the features from the get go, we avoid this problem.

License issue banner after the changes

Screenshot 2025-02-23 at 20 25 42

@hugodutkahugodutkaforce-pushed thehugodutka/require-telemetry-frontend-fix branch from1c7cb66 toef80b4fCompareFebruary 24, 2025 11:49
@hugodutkahugodutka marked this pull request as ready for reviewFebruary 24, 2025 12:28
Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

LGTM

@hugodutkahugodutka merged commitac88c9b intomainFeb 24, 2025
37 of 39 checks passed
@hugodutkahugodutka deleted the hugodutka/require-telemetry-frontend-fix branchFebruary 24, 2025 15:02
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@hugodutkahugodutka

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugodutka@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp