Skip to content

Resolve 'Member Settings Enhancements'#698

Merged
themaherkhalil merged 4 commits intodevfrom
member-settings-enhancements
Mar 12, 2025
Merged

Resolve 'Member Settings Enhancements'#698
themaherkhalil merged 4 commits intodevfrom
member-settings-enhancements

Conversation

@JoshRome26
Copy link
Copy Markdown
Contributor

Description

Refactored the membes page to resolve a UI bug and add some QoL features.

Changes Made

  • Removed logic to rename provider types to be the same
  • Add label prop to providers
  • Change Restriction type controller to show use label prop
  • Add higher rows per page values in table

How to Test

  1. When you open the Members Settings page, see that we have the [25, 50, 100] rows per page.
  2. Create a user / edit a user in the table by selecting the 'None' Model Limit restriction type. Check that we are not sending 'null'

We should expect we have the higher rows per page options and not send 'null,'

Notes

@JoshRome26 JoshRome26 added the enhancement New feature or request label Mar 12, 2025
@JoshRome26 JoshRome26 self-assigned this Mar 12, 2025
@JoshRome26 JoshRome26 requested a review from a team as a code owner March 12, 2025 18:19
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

Resolve 'Member Settings Enhancements'


User description

Description

Refactored the membes page to resolve a UI bug and add some QoL features.

Changes Made

  • Removed logic to rename provider types to be the same
  • Add label prop to providers
  • Change Restriction type controller to show use label prop
  • Add higher rows per page values in table

How to Test

  1. When you open the Members Settings page, see that we have the [25, 50, 100] rows per page.
  2. Create a user / edit a user in the table by selecting the 'None' Model Limit restriction type. Check that we are not sending 'null'

We should expect we have the higher rows per page options and not send 'null,'

Notes


PR Type

  • Enhancement

Description

  • Add null assignments for model usage restrictions in user add overlay.

  • Update provider dropdown to use label instead of provider.

  • Modify user table rows per page defaults and options.

  • Introduce label property in config store and login provider mapping.


Changes walkthrough 📝

Relevant files
Enhancement
UserAddOverlay.tsx
Refactor user add overlay for model restrictions and provider label.

packages/client/src/components/settings/UserAddOverlay.tsx

  • Added conditional null assignments for model usage restriction.
  • Switched provider display from provider to label.
  • Removed duplicate logic block for edit member info.
  • +19/-23 
    UserTable.tsx
    Update user table pagination and type display.                     

    packages/client/src/components/settings/UserTable.tsx

  • Changed default rows per page from 5 to 25.
  • Updated rows per page options to [25, 50, 100].
  • Removed custom mapping for user type formatting.
  • +5/-7     
    LoginPage.tsx
    Enhance login page provider mapping and error messages.   

    packages/client/src/pages/LoginPage.tsx

  • Added label field in available providers mapping.
  • Adjusted error handling for password validation.
  • Minor formatting changes in registration prompt.
  • +35/-34 
    config.store.ts
    Update config store with provider label.                                 

    packages/client/src/stores/config/config.store.ts

    • Extended available providers schema with label property.
    +1/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /improve

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Type Conversion

    The new logic checking if data.model_usage_restriction equals the string "null" and then setting it to null should be further validated to ensure consistent type handling and to avoid unintended side-effects.

    if (data.model_usage_restriction === 'token') {
        data.model_max_response_time = null;
    }
    if (data.model_usage_restriction === 'compute') {
        data.model_max_tokens = null;
    }
    if (data.model_usage_restriction === 'null') {
        data.model_usage_restriction = null;
        data.model_max_response_time = null;
        data.model_max_tokens = null;
        data.model_usage_frequency = null;
    }
    Duplicate Check

    The password error handling includes a duplicated check for the special character requirement. Review if both conditions are necessary or if the logic could be simplified to avoid redundancy.

    error &&
    (error.includes(
        'Password must be at least 8 characters in length',
    ) ||
        error.includes(
            'Password must have atleast one uppercase character',
        ) ||
        error.includes(
            'Password must have atleast one lowercase character',
        ) ||
        error.includes(
            'Password must have atleast one special character among [!,@,#,$,%,^,&,*]',
        ) ||
        error.includes(
            'Password must have atleast one special character among [!,@,#,$,%,^,&,*]',
        ))

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @themaherkhalil themaherkhalil merged commit ae05fa3 into dev Mar 12, 2025
    3 checks passed
    @themaherkhalil themaherkhalil deleted the member-settings-enhancements branch March 12, 2025 22:16
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    enhancement New feature or request

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants