Skip to content

Conversation

@lucasgoral
Copy link
Contributor

What this PR does / why we need it:
Fixes incorrect ProviderConfig usage counter

@lucasgoral lucasgoral marked this pull request as ready for review August 4, 2025 09:51
@andreaskienle andreaskienle requested a review from Copilot August 4, 2025 10:28
Copy link
Contributor

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 fixes the incorrect source for the ProviderConfig usage counter by updating the data field from which usage information is extracted and adding the corresponding type definition.

  • Updates the usage counter to read from config.status.users instead of config.metadata.usage
  • Adds the users field to the ProviderConfig type definition to support the new usage source

Reviewed Changes

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

File Description
src/lib/shared/types.ts Adds users field to the ProviderConfig status type definition
src/components/ControlPlane/ProvidersConfig.tsx Updates usage counter to read from config.status.users instead of config.metadata.usage

};
status: {
count: string;
users: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you check that this is a string? With the provider that I checked, it looks like to come through as a number. I’m not sure if each provider could define this differently.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can also keep it like this and tackle proper typings with the move to gql

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, with generated types it won't be an issue anymore. And here we don't do any math but only display it.

Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

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

Works for me 👍

};
status: {
count: string;
users: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can also keep it like this and tackle proper typings with the move to gql

@lucasgoral lucasgoral merged commit 04d2035 into main Aug 5, 2025
5 checks passed
@lucasgoral lucasgoral deleted the fix-provider-config-usage branch August 5, 2025 07:10
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